summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/R/Manifest7
-rw-r--r--dev-lang/R/R-3.0.1.ebuild206
-rw-r--r--dev-lang/R/R-3.0.3.ebuild203
-rw-r--r--dev-lang/R/R-3.1.0.ebuild206
-rw-r--r--dev-lang/R/R-3.1.1.ebuild206
-rw-r--r--dev-lang/R/R-3.1.2.ebuild206
-rw-r--r--dev-lang/R/R-3.2.0-r1.ebuild207
-rw-r--r--dev-lang/R/files/R-2.11.1-parallel.patch17
-rw-r--r--dev-lang/R/files/R-2.12.1-ldflags.patch15
-rw-r--r--dev-lang/R/files/R-2.13.1-zlib_header_fix.patch20
-rw-r--r--dev-lang/R/files/R-2.14.1-rmath-shared.patch24
-rw-r--r--dev-lang/R/files/R-3.0.0-rmath-shared.patch28
-rw-r--r--dev-lang/R/files/R-3.2.0-omitted-extern-R_running_as_main_program.patch12
-rw-r--r--dev-lang/R/metadata.xml25
-rw-r--r--dev-lang/ats/Manifest1
-rw-r--r--dev-lang/ats/ats-0.2.9.ebuild34
-rw-r--r--dev-lang/ats/metadata.xml8
-rw-r--r--dev-lang/bas/Manifest1
-rw-r--r--dev-lang/bas/bas-2.4.ebuild40
-rw-r--r--dev-lang/bas/files/bas-2.1-makefile.patch49
-rw-r--r--dev-lang/bas/metadata.xml10
-rw-r--r--dev-lang/bashforth/Manifest1
-rw-r--r--dev-lang/bashforth/bashforth-0.58a.ebuild25
-rw-r--r--dev-lang/bashforth/metadata.xml8
-rw-r--r--dev-lang/bff/Manifest2
-rw-r--r--dev-lang/bff/bff-1.0.3.1.ebuild41
-rw-r--r--dev-lang/bff/metadata.xml12
-rw-r--r--dev-lang/blassic/Manifest1
-rw-r--r--dev-lang/blassic/blassic-0.10.2.ebuild33
-rw-r--r--dev-lang/blassic/files/blassic-0.10.2-tinfo.patch12
-rw-r--r--dev-lang/blassic/metadata.xml14
-rw-r--r--dev-lang/c-intercal/Manifest1
-rw-r--r--dev-lang/c-intercal/c-intercal-29.0.ebuild76
-rw-r--r--dev-lang/c-intercal/files/50c-intercal-gentoo.el4
-rw-r--r--dev-lang/c-intercal/metadata.xml17
-rw-r--r--dev-lang/cfortran/Manifest2
-rw-r--r--dev-lang/cfortran/cfortran-4.4-r2.ebuild38
-rw-r--r--dev-lang/cfortran/cfortran-4.4-r3.ebuild50
-rw-r--r--dev-lang/cfortran/metadata.xml11
-rw-r--r--dev-lang/cilk/Manifest1
-rw-r--r--dev-lang/cilk/cilk-5.4.6-r1.ebuild36
-rw-r--r--dev-lang/cilk/files/cilk-5.4.6-autotools.patch81
-rw-r--r--dev-lang/cilk/metadata.xml16
-rw-r--r--dev-lang/cll1h/Manifest1
-rw-r--r--dev-lang/cll1h/cll1h-0.6-r1.ebuild26
-rw-r--r--dev-lang/cll1h/metadata.xml7
-rw-r--r--dev-lang/clojure/Manifest2
-rw-r--r--dev-lang/clojure/clojure-1.5.1.ebuild33
-rw-r--r--dev-lang/clojure/clojure-1.6.0.ebuild33
-rw-r--r--dev-lang/clojure/metadata.xml11
-rw-r--r--dev-lang/closure-compiler-bin/Manifest5
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20120305.ebuild30
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20121212.ebuild30
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20130227.ebuild30
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20130411.ebuild30
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild30
-rw-r--r--dev-lang/closure-compiler-bin/metadata.xml11
-rw-r--r--dev-lang/coffee-script/Manifest1
-rw-r--r--dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild48
-rw-r--r--dev-lang/coffee-script/metadata.xml11
-rw-r--r--dev-lang/confluence/Manifest1
-rw-r--r--dev-lang/confluence/confluence-0.10.6.ebuild47
-rw-r--r--dev-lang/confluence/metadata.xml5
-rw-r--r--dev-lang/dmd-bin/Manifest2
-rw-r--r--dev-lang/dmd-bin/dmd-bin-1.016.ebuild109
-rw-r--r--dev-lang/dmd-bin/dmd-bin-2.008-r1.ebuild105
-rw-r--r--dev-lang/dmd-bin/files/25dmd2
-rw-r--r--dev-lang/dmd-bin/metadata.xml9
-rw-r--r--dev-lang/ekopath/Manifest3
-rw-r--r--dev-lang/ekopath/ekopath-6.0.430_p20150629.ebuild74
-rw-r--r--dev-lang/ekopath/ekopath-6.0.439_p20150707.ebuild74
-rw-r--r--dev-lang/ekopath/ekopath-6.0.468_p20150803.ebuild74
-rw-r--r--dev-lang/ekopath/metadata.xml16
-rw-r--r--dev-lang/elixir/Manifest11
-rw-r--r--dev-lang/elixir/elixir-0.11.2.ebuild28
-rw-r--r--dev-lang/elixir/elixir-0.12.5.ebuild28
-rw-r--r--dev-lang/elixir/elixir-0.13.3.ebuild28
-rw-r--r--dev-lang/elixir/elixir-0.14.3.ebuild28
-rw-r--r--dev-lang/elixir/elixir-0.15.1.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.0.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.1.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.2.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.3.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.4.ebuild28
-rw-r--r--dev-lang/elixir/elixir-1.0.5.ebuild28
-rw-r--r--dev-lang/elixir/metadata.xml26
-rw-r--r--dev-lang/epic/Manifest4
-rw-r--r--dev-lang/epic/epic-0.9.2.ebuild27
-rw-r--r--dev-lang/epic/epic-0.9.3.2.ebuild33
-rw-r--r--dev-lang/epic/epic-0.9.3.3.ebuild34
-rw-r--r--dev-lang/epic/epic-0.9.3.ebuild29
-rw-r--r--dev-lang/epic/files/epic-0.9.3-ghc-7.6.patch53
-rw-r--r--dev-lang/epic/files/respect-user-cflags.patch13
-rw-r--r--dev-lang/epic/metadata.xml17
-rw-r--r--dev-lang/erlang/Manifest12
-rw-r--r--dev-lang/erlang/erlang-15.2.3.1.ebuild175
-rw-r--r--dev-lang/erlang/erlang-17.3.ebuild159
-rw-r--r--dev-lang/erlang/erlang-17.5.ebuild159
-rw-r--r--dev-lang/erlang/erlang-18.0.ebuild158
-rw-r--r--dev-lang/erlang/files/16.2-tinfo.patch11
-rw-r--r--dev-lang/erlang/files/17.0-systemd.patch85
-rw-r--r--dev-lang/erlang/files/50erlang-gentoo.el5
-rw-r--r--dev-lang/erlang/files/epmd.init20
-rw-r--r--dev-lang/erlang/files/epmd.service9
-rw-r--r--dev-lang/erlang/metadata.xml22
-rw-r--r--dev-lang/esco/Manifest1
-rw-r--r--dev-lang/esco/esco-0.512.ebuild32
-rw-r--r--dev-lang/esco/metadata.xml11
-rw-r--r--dev-lang/execline/Manifest1
-rw-r--r--dev-lang/execline/execline-2.1.1.0.ebuild55
-rw-r--r--dev-lang/execline/metadata.xml13
-rw-r--r--dev-lang/f2c/Manifest3
-rw-r--r--dev-lang/f2c/f2c-20060507.ebuild37
-rw-r--r--dev-lang/f2c/f2c-20100827.ebuild51
-rw-r--r--dev-lang/f2c/metadata.xml15
-rw-r--r--dev-lang/falcon/Manifest1
-rw-r--r--dev-lang/falcon/falcon-0.9.6.4.ebuild51
-rw-r--r--dev-lang/falcon/metadata.xml5
-rw-r--r--dev-lang/ferite/Manifest1
-rw-r--r--dev-lang/ferite/ferite-1.1.17-r1.ebuild79
-rw-r--r--dev-lang/ferite/files/ferite-pcre.patch26
-rw-r--r--dev-lang/ferite/metadata.xml10
-rw-r--r--dev-lang/fpc/Manifest18
-rw-r--r--dev-lang/fpc/fpc-2.6.2.ebuild174
-rw-r--r--dev-lang/fpc/fpc-2.6.4.ebuild175
-rw-r--r--dev-lang/fpc/metadata.xml11
-rw-r--r--dev-lang/fsharp/Manifest1
-rw-r--r--dev-lang/fsharp/fsharp-3.1.1.31.ebuild28
-rw-r--r--dev-lang/fsharp/metadata.xml11
-rw-r--r--dev-lang/gdl/Manifest2
-rw-r--r--dev-lang/gdl/files/0.9.2-antlr.patch76
-rw-r--r--dev-lang/gdl/files/0.9.2-include.patch10
-rw-r--r--dev-lang/gdl/files/0.9.2-proj4.patch27
-rw-r--r--dev-lang/gdl/files/0.9.2-semaphore.patch22
-rw-r--r--dev-lang/gdl/files/0.9.3-plwidth.patch158
-rw-r--r--dev-lang/gdl/files/0.9.4-gsl.patch62
-rw-r--r--dev-lang/gdl/files/0.9.4-plplot.patch18
-rw-r--r--dev-lang/gdl/files/0.9.4-python.patch12
-rw-r--r--dev-lang/gdl/files/0.9.4-python2.patch17
-rw-r--r--dev-lang/gdl/files/0.9.4-reorder.patch380
-rw-r--r--dev-lang/gdl/files/0.9.5-antlr.patch91
-rw-r--r--dev-lang/gdl/files/0.9.5-plplot.patch134
-rw-r--r--dev-lang/gdl/files/0.9.5-png.patch15
-rw-r--r--dev-lang/gdl/files/0.9.5-proj4.patch41
-rw-r--r--dev-lang/gdl/gdl-0.9.4.ebuild161
-rw-r--r--dev-lang/gdl/gdl-0.9.5.ebuild156
-rw-r--r--dev-lang/gdl/metadata.xml21
-rw-r--r--dev-lang/gforth/Manifest1
-rw-r--r--dev-lang/gforth/files/0.6.2-c-to-forth-to-c.patch30
-rw-r--r--dev-lang/gforth/files/0.6.2-ppc-configure-gentoo.patch13
-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/files/gforth.el-gentoo.patch37
-rw-r--r--dev-lang/gforth/gforth-0.7.3.ebuild60
-rw-r--r--dev-lang/gforth/metadata.xml9
-rw-r--r--dev-lang/ghc/Manifest34
-rw-r--r--dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch17
-rw-r--r--dev-lang/ghc/files/ghc-7.0.4-darwin8.patch18
-rw-r--r--dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch89
-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.2.1-freebsd-CHOST.patch13
-rw-r--r--dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch23
-rw-r--r--dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch18
-rw-r--r--dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch28
-rw-r--r--dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch119
-rw-r--r--dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch88
-rw-r--r--dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch57
-rw-r--r--dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch14
-rw-r--r--dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch387
-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-cc-lang.patch129
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch38
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch69
-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-asm.patch107
-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.3-unreg-lit.patch84
-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-bash-completion218
-rw-r--r--dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch25
-rw-r--r--dev-lang/ghc/ghc-7.10.2.ebuild643
-rw-r--r--dev-lang/ghc/ghc-7.4.2.ebuild639
-rw-r--r--dev-lang/ghc/ghc-7.6.3-r1.ebuild828
-rw-r--r--dev-lang/ghc/ghc-7.8.3.ebuild615
-rw-r--r--dev-lang/ghc/ghc-7.8.4.ebuild618
-rw-r--r--dev-lang/ghc/metadata.xml11
-rw-r--r--dev-lang/gnat-gcc/Manifest28
-rw-r--r--dev-lang/gnat-gcc/files/gcc-configure-LANG.patch41
-rw-r--r--dev-lang/gnat-gcc/files/gnat-Make-lang.in.patch14
-rw-r--r--dev-lang/gnat-gcc/files/gnat-gcc-4.5.4-tex-version-workaround.patch75
-rw-r--r--dev-lang/gnat-gcc/files/patches/4.3/01-siginfo.patch121
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-3.4.6.ebuild33
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.1.2.ebuild47
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.2.3.ebuild50
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.3.5.ebuild70
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.3.6.ebuild64
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.4.7.ebuild63
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.5.4.ebuild75
-rw-r--r--dev-lang/gnat-gcc/gnat-gcc-4.6.4.ebuild61
-rw-r--r--dev-lang/gnat-gcc/metadata.xml15
-rw-r--r--dev-lang/gnat-gpl/Manifest16
-rw-r--r--dev-lang/gnat-gpl/files/gcc-configure-LANG.patch41
-rw-r--r--dev-lang/gnat-gpl/files/gnat-Make-lang.in.patch14
-rw-r--r--dev-lang/gnat-gpl/files/patches/51_all_gcc-3.4-libiberty-pic.patch10
-rw-r--r--dev-lang/gnat-gpl/files/patches/74_all_sh-pr24836.patch25
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-3.4.5.2005.ebuild79
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-3.4.6.2006-r1.ebuild86
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-4.1.3.2007.ebuild67
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-4.1.3.2008-r2.ebuild75
-rw-r--r--dev-lang/gnat-gpl/metadata.xml12
-rw-r--r--dev-lang/gnu-smalltalk/Manifest1
-rw-r--r--dev-lang/gnu-smalltalk/files/50gnu-smalltalk-gentoo.el7
-rw-r--r--dev-lang/gnu-smalltalk/files/SequenceableCollection-size-3.2.4.patch23
-rw-r--r--dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.4.ebuild73
-rw-r--r--dev-lang/gnu-smalltalk/metadata.xml14
-rw-r--r--dev-lang/go-bootstrap/Manifest1
-rw-r--r--dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild83
-rw-r--r--dev-lang/go-bootstrap/metadata.xml13
-rw-r--r--dev-lang/go/Manifest1
-rw-r--r--dev-lang/go/go-1.4.2.ebuild126
-rw-r--r--dev-lang/go/go-9999.ebuild127
-rw-r--r--dev-lang/go/metadata.xml13
-rw-r--r--dev-lang/gpc/Manifest3
-rw-r--r--dev-lang/gpc/gpc-20051104.ebuild160
-rw-r--r--dev-lang/gpc/gpc-20070904.ebuild161
-rw-r--r--dev-lang/gpc/metadata.xml8
-rw-r--r--dev-lang/gprolog/Manifest1
-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-txt-file.patch11
-rw-r--r--dev-lang/gprolog/gprolog-1.4.4.ebuild68
-rw-r--r--dev-lang/gprolog/metadata.xml5
-rw-r--r--dev-lang/gwydion-dylan-bin/Manifest1
-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.ebuild30
-rw-r--r--dev-lang/gwydion-dylan-bin/metadata.xml17
-rw-r--r--dev-lang/helium/Manifest3
-rw-r--r--dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch59
-rw-r--r--dev-lang/helium/files/helium-wrapper-1.631
-rw-r--r--dev-lang/helium/helium-1.6.ebuild105
-rw-r--r--dev-lang/helium/helium-1.8.1.ebuild32
-rw-r--r--dev-lang/helium/metadata.xml5
-rw-r--r--dev-lang/hy/Manifest4
-rw-r--r--dev-lang/hy/hy-0.10.0.ebuild32
-rw-r--r--dev-lang/hy/hy-0.10.1.ebuild32
-rw-r--r--dev-lang/hy/hy-0.11.0.ebuild34
-rw-r--r--dev-lang/hy/hy-0.9.12.ebuild32
-rw-r--r--dev-lang/hy/metadata.xml11
-rw-r--r--dev-lang/icc/Manifest23
-rw-r--r--dev-lang/icc/icc-13.0.0.079.ebuild37
-rw-r--r--dev-lang/icc/icc-13.0.1.117.ebuild37
-rw-r--r--dev-lang/icc/icc-13.1.2.146.ebuild39
-rw-r--r--dev-lang/icc/icc-13.1.3.163.ebuild39
-rw-r--r--dev-lang/icc/icc-13.1.5.192.ebuild36
-rw-r--r--dev-lang/icc/icc-14.0.0.080.ebuild37
-rw-r--r--dev-lang/icc/icc-14.0.1.106.ebuild37
-rw-r--r--dev-lang/icc/icc-14.0.2.144.ebuild37
-rw-r--r--dev-lang/icc/icc-14.0.3.174.ebuild37
-rw-r--r--dev-lang/icc/icc-15.0.0.090.ebuild37
-rw-r--r--dev-lang/icc/icc-15.0.1.133.ebuild37
-rw-r--r--dev-lang/icc/icc-15.0.2.164.ebuild37
-rw-r--r--dev-lang/icc/icc-15.0.3.187.ebuild37
-rw-r--r--dev-lang/icc/metadata.xml16
-rw-r--r--dev-lang/icon/Manifest2
-rw-r--r--dev-lang/icon/files/icon-9.4.3-flags.patch62
-rw-r--r--dev-lang/icon/files/icon-9.5.0-flags.patch75
-rw-r--r--dev-lang/icon/files/tests-943.patch113
-rw-r--r--dev-lang/icon/icon-9.4.3-r5.ebuild107
-rw-r--r--dev-lang/icon/icon-9.5.0.ebuild104
-rw-r--r--dev-lang/icon/metadata.xml6
-rw-r--r--dev-lang/idb/Manifest19
-rw-r--r--dev-lang/idb/files/50idb-gentoo.el5
-rw-r--r--dev-lang/idb/idb-13.0.0.079.ebuild24
-rw-r--r--dev-lang/idb/idb-13.0.1.117-r1.ebuild32
-rw-r--r--dev-lang/idb/idb-13.0.2.146.ebuild34
-rw-r--r--dev-lang/idb/idb-13.0.3.163.ebuild34
-rw-r--r--dev-lang/idb/idb-13.0.5.192.ebuild34
-rw-r--r--dev-lang/idb/idb-14.0.0.080.ebuild41
-rw-r--r--dev-lang/idb/idb-14.0.1.106.ebuild41
-rw-r--r--dev-lang/idb/idb-14.0.2.144.ebuild41
-rw-r--r--dev-lang/idb/idb-14.0.3.174.ebuild41
-rw-r--r--dev-lang/idb/metadata.xml18
-rw-r--r--dev-lang/ifc/Manifest23
-rw-r--r--dev-lang/ifc/ifc-13.0.0.079-r1.ebuild38
-rw-r--r--dev-lang/ifc/ifc-13.0.1.117.ebuild38
-rw-r--r--dev-lang/ifc/ifc-13.1.2.146.ebuild38
-rw-r--r--dev-lang/ifc/ifc-13.1.3.163.ebuild38
-rw-r--r--dev-lang/ifc/ifc-13.1.5.192.ebuild34
-rw-r--r--dev-lang/ifc/ifc-14.0.0.080.ebuild35
-rw-r--r--dev-lang/ifc/ifc-14.0.1.106.ebuild35
-rw-r--r--dev-lang/ifc/ifc-14.0.2.144.ebuild35
-rw-r--r--dev-lang/ifc/ifc-14.0.3.174.ebuild35
-rw-r--r--dev-lang/ifc/ifc-15.0.0.090.ebuild35
-rw-r--r--dev-lang/ifc/ifc-15.0.1.133.ebuild35
-rw-r--r--dev-lang/ifc/ifc-15.0.2.164.ebuild38
-rw-r--r--dev-lang/ifc/ifc-15.0.3.187.ebuild36
-rw-r--r--dev-lang/ifc/metadata.xml14
-rw-r--r--dev-lang/inform/Manifest1
-rw-r--r--dev-lang/inform/inform-6.33.1_p2.ebuild26
-rw-r--r--dev-lang/inform/metadata.xml41
-rw-r--r--dev-lang/interprolog/Manifest1
-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.ebuild61
-rw-r--r--dev-lang/interprolog/metadata.xml5
-rw-r--r--dev-lang/io/Manifest1
-rw-r--r--dev-lang/io/files/io-2011.09.12-gentoo-fixes.patch160
-rw-r--r--dev-lang/io/io-2011.09.12-r2.ebuild101
-rw-r--r--dev-lang/io/metadata.xml27
-rw-r--r--dev-lang/ispc/Manifest2
-rw-r--r--dev-lang/ispc/ispc-1.8.1.ebuild52
-rw-r--r--dev-lang/ispc/ispc-1.8.2.ebuild52
-rw-r--r--dev-lang/ispc/metadata.xml11
-rw-r--r--dev-lang/j/Manifest1
-rw-r--r--dev-lang/j/j-701-r2.ebuild45
-rw-r--r--dev-lang/j/metadata.xml8
-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.70_pre20110317.ebuild38
-rw-r--r--dev-lang/jimtcl/jimtcl-0.73.ebuild43
-rw-r--r--dev-lang/jimtcl/jimtcl-0.74-r1.ebuild47
-rw-r--r--dev-lang/jimtcl/jimtcl-0.75-r1.ebuild72
-rw-r--r--dev-lang/jimtcl/jimtcl-0.75.ebuild47
-rw-r--r--dev-lang/jimtcl/jimtcl-0.76.ebuild72
-rw-r--r--dev-lang/jimtcl/jimtcl-9999.ebuild72
-rw-r--r--dev-lang/jimtcl/metadata.xml13
-rw-r--r--dev-lang/julia/Manifest10
-rw-r--r--dev-lang/julia/files/63julia-gentoo.el2
-rw-r--r--dev-lang/julia/files/julia-0.2.1-patchelf.patch16
-rw-r--r--dev-lang/julia/files/julia-0.2.1-readline63.patch17
-rw-r--r--dev-lang/julia/julia-0.2.0-r1.ebuild106
-rw-r--r--dev-lang/julia/julia-0.2.0.ebuild79
-rw-r--r--dev-lang/julia/julia-0.2.1-r2.ebuild152
-rw-r--r--dev-lang/julia/julia-0.3.0.ebuild156
-rw-r--r--dev-lang/julia/metadata.xml24
-rw-r--r--dev-lang/jwasm/Manifest2
-rw-r--r--dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch41
-rw-r--r--dev-lang/jwasm/files/jwasm-2.10-types-test.patch60
-rw-r--r--dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch28
-rw-r--r--dev-lang/jwasm/files/jwasm-2.11-types-test.patch58
-rw-r--r--dev-lang/jwasm/jwasm-2.10-r1.ebuild42
-rw-r--r--dev-lang/jwasm/jwasm-2.11.ebuild40
-rw-r--r--dev-lang/jwasm/metadata.xml9
-rw-r--r--dev-lang/lazarus/Manifest4
-rw-r--r--dev-lang/lazarus/files/lazarus-0.9.26-fpcsrc.patch13
-rw-r--r--dev-lang/lazarus/lazarus-1.0.12.ebuild76
-rw-r--r--dev-lang/lazarus/lazarus-1.2.2.ebuild76
-rw-r--r--dev-lang/lazarus/lazarus-1.2.4.ebuild76
-rw-r--r--dev-lang/lazarus/lazarus-1.2.6.ebuild76
-rw-r--r--dev-lang/lazarus/metadata.xml14
-rw-r--r--dev-lang/lfe/Manifest1
-rw-r--r--dev-lang/lfe/lfe-0.7.ebuild32
-rw-r--r--dev-lang/lfe/metadata.xml11
-rw-r--r--dev-lang/lisaac/Manifest1
-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.ebuild74
-rw-r--r--dev-lang/lisaac/metadata.xml7
-rw-r--r--dev-lang/logtalk/Manifest3
-rw-r--r--dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch34
-rw-r--r--dev-lang/logtalk/logtalk-2.41.0.ebuild100
-rw-r--r--dev-lang/logtalk/logtalk-2.42.2.ebuild100
-rw-r--r--dev-lang/logtalk/logtalk-3.00.0.ebuild133
-rw-r--r--dev-lang/logtalk/metadata.xml14
-rw-r--r--dev-lang/lua/Manifest3
-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.patch64
-rw-r--r--dev-lang/lua/files/lua-5.1-make_static-r1.patch12
-rw-r--r--dev-lang/lua/files/lua-5.1-make_static.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.2-make-r1.patch75
-rw-r--r--dev-lang/lua/files/lua-5.2-make.patch60
-rw-r--r--dev-lang/lua/files/lua.pc31
-rw-r--r--dev-lang/lua/lua-5.1.4-r8.ebuild118
-rw-r--r--dev-lang/lua/lua-5.1.5-r1.ebuild119
-rw-r--r--dev-lang/lua/lua-5.1.5-r100.ebuild132
-rw-r--r--dev-lang/lua/lua-5.1.5-r2.ebuild124
-rw-r--r--dev-lang/lua/lua-5.1.5-r3.ebuild127
-rw-r--r--dev-lang/lua/lua-5.1.5.ebuild119
-rw-r--r--dev-lang/lua/lua-5.2.3-r1.ebuild130
-rw-r--r--dev-lang/lua/lua-5.2.3.ebuild118
-rw-r--r--dev-lang/lua/metadata.xml13
-rw-r--r--dev-lang/luajit/Manifest4
-rw-r--r--dev-lang/luajit/luajit-1.1.6.ebuild55
-rw-r--r--dev-lang/luajit/luajit-2.0.2.ebuild67
-rw-r--r--dev-lang/luajit/luajit-2.0.3-r1.ebuild62
-rw-r--r--dev-lang/luajit/luajit-2.0.3.ebuild67
-rw-r--r--dev-lang/luajit/luajit-2.0.4.ebuild62
-rw-r--r--dev-lang/luajit/metadata.xml18
-rw-r--r--dev-lang/maude/Manifest2
-rw-r--r--dev-lang/maude/files/maude-2.5.0-prll.patch24
-rw-r--r--dev-lang/maude/files/maude-2.6-gcc47.patch25
-rw-r--r--dev-lang/maude/files/maude-2.6-search-datadir.patch37
-rw-r--r--dev-lang/maude/maude-2.6-r1.ebuild64
-rw-r--r--dev-lang/maude/metadata.xml13
-rw-r--r--dev-lang/mercury-extras/Manifest14
-rw-r--r--dev-lang/mercury-extras/mercury-extras-11.01.ebuild193
-rw-r--r--dev-lang/mercury-extras/mercury-extras-11.07.1.ebuild194
-rw-r--r--dev-lang/mercury-extras/mercury-extras-11.07.2.ebuild194
-rw-r--r--dev-lang/mercury-extras/mercury-extras-11.07.ebuild194
-rw-r--r--dev-lang/mercury-extras/mercury-extras-13.05.1.ebuild194
-rw-r--r--dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild194
-rw-r--r--dev-lang/mercury-extras/mercury-extras-13.05.ebuild194
-rw-r--r--dev-lang/mercury-extras/metadata.xml8
-rw-r--r--dev-lang/mercury/Manifest18
-rw-r--r--dev-lang/mercury/files/50mercury-gentoo.el5
-rw-r--r--dev-lang/mercury/mercury-11.01.ebuild216
-rw-r--r--dev-lang/mercury/mercury-11.07.1.ebuild216
-rw-r--r--dev-lang/mercury/mercury-11.07.2.ebuild216
-rw-r--r--dev-lang/mercury/mercury-11.07.ebuild216
-rw-r--r--dev-lang/mercury/mercury-13.05.1.ebuild197
-rw-r--r--dev-lang/mercury/mercury-13.05.2.ebuild197
-rw-r--r--dev-lang/mercury/mercury-13.05.ebuild196
-rw-r--r--dev-lang/mercury/metadata.xml11
-rw-r--r--dev-lang/metadata.xml40
-rw-r--r--dev-lang/mlton/Manifest3
-rw-r--r--dev-lang/mlton/files/mlton-20070826-no-execmem.patch29
-rw-r--r--dev-lang/mlton/files/mlton-20130715-no-PIE.patch66
-rw-r--r--dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch11
-rw-r--r--dev-lang/mlton/metadata.xml11
-rw-r--r--dev-lang/mlton/mlton-20130715.ebuild120
-rw-r--r--dev-lang/mmix/Manifest1
-rw-r--r--dev-lang/mmix/files/mmix-20110420-makefile.patch71
-rw-r--r--dev-lang/mmix/metadata.xml8
-rw-r--r--dev-lang/mmix/mmix-20131017.ebuild48
-rw-r--r--dev-lang/moarvm/Manifest7
-rw-r--r--dev-lang/moarvm/files/Configure-9999.patch15
-rw-r--r--dev-lang/moarvm/files/Configure.patch14
-rw-r--r--dev-lang/moarvm/metadata.xml12
-rw-r--r--dev-lang/moarvm/moarvm-2015.01.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.02.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.03.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.04.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.05.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.06.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-2015.07.ebuild31
-rw-r--r--dev-lang/moarvm/moarvm-9999.ebuild36
-rw-r--r--dev-lang/mono-basic/Manifest1
-rw-r--r--dev-lang/mono-basic/metadata.xml9
-rw-r--r--dev-lang/mono-basic/mono-basic-2.10.ebuild17
-rw-r--r--dev-lang/mono/Manifest5
-rw-r--r--dev-lang/mono/files/mono-2.10.1-ppc-len.patch13
-rw-r--r--dev-lang/mono/files/mono-2.10.2-threads-access.patch40
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch13
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch196
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch34
-rw-r--r--dev-lang/mono/files/mono-3.2.8-disable-missing-test.patch7
-rw-r--r--dev-lang/mono/metadata.xml9
-rw-r--r--dev-lang/mono/mono-2.10.9-r2.ebuild265
-rw-r--r--dev-lang/mono/mono-3.0.7.ebuild100
-rw-r--r--dev-lang/mono/mono-3.12.1.ebuild117
-rw-r--r--dev-lang/mono/mono-3.2.3.ebuild119
-rw-r--r--dev-lang/mono/mono-3.2.8.ebuild123
-rw-r--r--dev-lang/mozart-stdlib/Manifest1
-rw-r--r--dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-doc.patch179
-rw-r--r--dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-ozmake.patch78
-rw-r--r--dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-r1-ozmake.patch78
-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.ebuild41
-rw-r--r--dev-lang/mozart/Manifest3
-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-r2.ebuild131
-rw-r--r--dev-lang/mozart/mozart-1.4.0-r3.ebuild125
-rw-r--r--dev-lang/mujs/Manifest1
-rw-r--r--dev-lang/mujs/files/mujs-0_p20150202-Makefile.patch28
-rw-r--r--dev-lang/mujs/metadata.xml8
-rw-r--r--dev-lang/mujs/mujs-0_p20150202.ebuild27
-rw-r--r--dev-lang/nacl-toolchain-newlib/Manifest19
-rw-r--r--dev-lang/nacl-toolchain-newlib/files/binutils-texinfo-r0.patch58
-rw-r--r--dev-lang/nacl-toolchain-newlib/files/gcc-parallel-build-r0.patch15
-rw-r--r--dev-lang/nacl-toolchain-newlib/files/gcc-texinfo-r0.patch132
-rw-r--r--dev-lang/nacl-toolchain-newlib/metadata.xml5
-rw-r--r--dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10520.ebuild98
-rw-r--r--dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10915.ebuild104
-rw-r--r--dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p11846.ebuild104
-rw-r--r--dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p9093.ebuild104
-rw-r--r--dev-lang/nasm/Manifest1
-rw-r--r--dev-lang/nasm/metadata.xml16
-rw-r--r--dev-lang/nasm/nasm-2.11.08.ebuild42
-rw-r--r--dev-lang/niecza-bin/Manifest4
-rw-r--r--dev-lang/niecza-bin/metadata.xml11
-rw-r--r--dev-lang/niecza-bin/niecza-bin-20.ebuild34
-rw-r--r--dev-lang/niecza-bin/niecza-bin-21.ebuild34
-rw-r--r--dev-lang/niecza-bin/niecza-bin-22.ebuild34
-rw-r--r--dev-lang/niecza-bin/niecza-bin-24.ebuild34
-rw-r--r--dev-lang/niecza/Manifest4
-rw-r--r--dev-lang/niecza/files/fix-bootstrap-21.patch13
-rw-r--r--dev-lang/niecza/files/fix-bootstrap-22.patch13
-rw-r--r--dev-lang/niecza/files/fix-bootstrap-24.patch13
-rw-r--r--dev-lang/niecza/files/fix-bootstrap-9999.patch13
-rw-r--r--dev-lang/niecza/files/fix-bootstrap.patch13
-rw-r--r--dev-lang/niecza/metadata.xml11
-rw-r--r--dev-lang/niecza/niecza-19.ebuild57
-rw-r--r--dev-lang/niecza/niecza-21.ebuild58
-rw-r--r--dev-lang/niecza/niecza-22.ebuild58
-rw-r--r--dev-lang/niecza/niecza-24.ebuild58
-rw-r--r--dev-lang/niecza/niecza-9999.ebuild57
-rw-r--r--dev-lang/nqc/Manifest1
-rw-r--r--dev-lang/nqc/files/nqc-3.1_p6-flags.patch73
-rw-r--r--dev-lang/nqc/files/nqc-3.1_p6-gcc-4.7.patch15
-rw-r--r--dev-lang/nqc/metadata.xml8
-rw-r--r--dev-lang/nqc/nqc-3.1_p6.ebuild56
-rw-r--r--dev-lang/nqp/Manifest7
-rw-r--r--dev-lang/nqp/metadata.xml16
-rw-r--r--dev-lang/nqp/nqp-2015.01.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.02.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.03.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.04.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.05.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.06.ebuild66
-rw-r--r--dev-lang/nqp/nqp-2015.07.2.ebuild66
-rw-r--r--dev-lang/nwcc/Manifest1
-rw-r--r--dev-lang/nwcc/metadata.xml8
-rw-r--r--dev-lang/nwcc/nwcc-0.8.2.ebuild25
-rw-r--r--dev-lang/ocaml/Manifest8
-rw-r--r--dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch66
-rw-r--r--dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch15
-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.xml5
-rw-r--r--dev-lang/ocaml/ocaml-3.12.1.ebuild132
-rw-r--r--dev-lang/ocaml/ocaml-4.01.0.ebuild128
-rw-r--r--dev-lang/ocaml/ocaml-4.02.1.ebuild114
-rw-r--r--dev-lang/ocaml/ocaml-4.02.2.ebuild115
-rw-r--r--dev-lang/ocaml/ocaml-4.02.3.ebuild115
-rw-r--r--dev-lang/open-cobol/Manifest1
-rw-r--r--dev-lang/open-cobol/metadata.xml11
-rw-r--r--dev-lang/open-cobol/open-cobol-1.1.ebuild34
-rw-r--r--dev-lang/opendylan-bin/Manifest10
-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/Manifest3
-rw-r--r--dev-lang/opendylan/metadata.xml8
-rw-r--r--dev-lang/opendylan/opendylan-2013.1-r1.ebuild104
-rw-r--r--dev-lang/opendylan/opendylan-2013.2.ebuild109
-rw-r--r--dev-lang/opendylan/opendylan-2014.1.ebuild105
-rw-r--r--dev-lang/opendylan/opendylan-9999.ebuild66
-rw-r--r--dev-lang/orc/Manifest2
-rw-r--r--dev-lang/orc/metadata.xml5
-rw-r--r--dev-lang/orc/orc-0.4.23.ebuild39
-rw-r--r--dev-lang/orc/orc-0.4.24.ebuild55
-rw-r--r--dev-lang/parrot/Manifest5
-rw-r--r--dev-lang/parrot/metadata.xml5
-rw-r--r--dev-lang/parrot/parrot-7.0.2.ebuild84
-rw-r--r--dev-lang/parrot/parrot-7.1.0.ebuild84
-rw-r--r--dev-lang/parrot/parrot-7.2.0.ebuild84
-rw-r--r--dev-lang/parrot/parrot-7.3.0.ebuild84
-rw-r--r--dev-lang/parrot/parrot-7.5.0.ebuild84
-rw-r--r--dev-lang/pasm/Manifest1
-rw-r--r--dev-lang/pasm/files/pasm-1.7-ppc.patch29
-rw-r--r--dev-lang/pasm/metadata.xml15
-rw-r--r--dev-lang/pasm/pasm-1.7.ebuild29
-rw-r--r--dev-lang/path64/Manifest16
-rw-r--r--dev-lang/path64/metadata.xml17
-rw-r--r--dev-lang/path64/path64-1.0.0_pre20110821.ebuild94
-rw-r--r--dev-lang/path64/path64-1.0.0_pre20110924.ebuild94
-rw-r--r--dev-lang/path64/path64-1.0.0_pre20111108.ebuild94
-rw-r--r--dev-lang/path64/path64-1.0.0_pre20120223.ebuild94
-rw-r--r--dev-lang/pcc/Manifest1
-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.ebuild38
-rw-r--r--dev-lang/pcc/pcc-9999.ebuild45
-rw-r--r--dev-lang/perl/Manifest5
-rw-r--r--dev-lang/perl/files/eblits/common-v50160001.eblit71
-rw-r--r--dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit67
-rw-r--r--dev-lang/perl/files/eblits/pkg_postinst-v50220001.eblit67
-rw-r--r--dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit12
-rw-r--r--dev-lang/perl/files/eblits/pkg_postrm-v50220001.eblit12
-rw-r--r--dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit70
-rw-r--r--dev-lang/perl/files/eblits/pkg_setup-v50220001.eblit72
-rw-r--r--dev-lang/perl/files/eblits/src_configure-v50180002.eblit146
-rw-r--r--dev-lang/perl/files/eblits/src_install-v50160001.eblit61
-rw-r--r--dev-lang/perl/files/eblits/src_install-v50200001.eblit51
-rw-r--r--dev-lang/perl/files/eblits/src_prepare-v50160001.eblit70
-rw-r--r--dev-lang/perl/files/eblits/src_test-v50160001.eblit12
-rw-r--r--dev-lang/perl/metadata.xml8
-rw-r--r--dev-lang/perl/perl-5.20.2-r1.ebuild122
-rw-r--r--dev-lang/perl/perl-5.20.2.ebuild122
-rw-r--r--dev-lang/perl/perl-5.22.0.ebuild120
-rw-r--r--dev-lang/php/Manifest14
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/all_mysql_socket_location-gentoo.patch13
-rw-r--r--dev-lang/php/files/all_strict_aliasing.patch14
-rw-r--r--dev-lang/php/files/bison_any_version.patch16
-rw-r--r--dev-lang/php/files/bison_build_2.patch29
-rw-r--r--dev-lang/php/files/bison_build_2a.patch30
-rw-r--r--dev-lang/php/files/fix-libstdc++-underlinking.patch10
-rw-r--r--dev-lang/php/files/freetype-2.5.1-linking-fix.patch64
-rw-r--r--dev-lang/php/files/iodbc-pkgconfig-r1.patch52
-rw-r--r--dev-lang/php/files/iodbc-pkgconfig.patch52
-rw-r--r--dev-lang/php/files/missing-openssl-include.patch14
-rw-r--r--dev-lang/php/files/php-fpm-r1.conf311
-rwxr-xr-xdev-lang/php/files/php-fpm-r4.init47
-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-libvpx.patch24
-rw-r--r--dev-lang/php/files/php5-ldvs1
-rw-r--r--dev-lang/php/files/stricter-libc-client-symlink-check.patch15
-rw-r--r--dev-lang/php/metadata.xml28
-rw-r--r--dev-lang/php/php-5.4.41.ebuild802
-rw-r--r--dev-lang/php/php-5.4.42.ebuild802
-rw-r--r--dev-lang/php/php-5.4.43.ebuild802
-rw-r--r--dev-lang/php/php-5.4.44.ebuild802
-rw-r--r--dev-lang/php/php-5.5.25-r1.ebuild787
-rw-r--r--dev-lang/php/php-5.5.26.ebuild784
-rw-r--r--dev-lang/php/php-5.5.27.ebuild784
-rw-r--r--dev-lang/php/php-5.5.28.ebuild784
-rw-r--r--dev-lang/php/php-5.6.10.ebuild784
-rw-r--r--dev-lang/php/php-5.6.11.ebuild784
-rw-r--r--dev-lang/php/php-5.6.12.ebuild784
-rw-r--r--dev-lang/php/php-5.6.9.ebuild787
-rw-r--r--dev-lang/php/php-7.0.0_beta1.ebuild760
-rw-r--r--dev-lang/pocl/Manifest1
-rw-r--r--dev-lang/pocl/metadata.xml8
-rw-r--r--dev-lang/pocl/pocl-0.11.ebuild32
-rw-r--r--dev-lang/polyml/Manifest4
-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-mprotect-exec.patch29
-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.xml15
-rw-r--r--dev-lang/polyml/polyml-5.4.1.ebuild45
-rw-r--r--dev-lang/polyml/polyml-5.5.0.ebuild51
-rw-r--r--dev-lang/polyml/polyml-5.5.1.ebuild72
-rw-r--r--dev-lang/polyml/polyml-5.5.2.ebuild72
-rw-r--r--dev-lang/python-exec/Manifest2
-rw-r--r--dev-lang/python-exec/metadata.xml13
-rw-r--r--dev-lang/python-exec/python-exec-2.0.1-r1.ebuild37
-rw-r--r--dev-lang/python-exec/python-exec-2.0.2.ebuild37
-rw-r--r--dev-lang/python-exec/python-exec-2.9999.ebuild50
-rw-r--r--dev-lang/python/Manifest19
-rw-r--r--dev-lang/python/files/CVE-2013-4238_py27.patch247
-rw-r--r--dev-lang/python/files/CVE-2013-4238_py33.patch241
-rw-r--r--dev-lang/python/files/pydoc.conf7
-rwxr-xr-xdev-lang/python/files/pydoc.init25
-rw-r--r--dev-lang/python/files/python-2.5-tcl86.patch11
-rw-r--r--dev-lang/python/files/python-2.7-issue16248.patch19
-rw-r--r--dev-lang/python/files/python-2.7-issue18851.patch287
-rw-r--r--dev-lang/python/files/python-2.7.10-semaphore-pid.patch51
-rw-r--r--dev-lang/python/files/python-2.7.5-library-path.patch25
-rw-r--r--dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch18
-rw-r--r--dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch23
-rw-r--r--dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch17
-rw-r--r--dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2013-2099.patch51
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2014-1912.patch51
-rw-r--r--dev-lang/python/files/python-3.2-CVE-2014-4616.patch39
-rw-r--r--dev-lang/python/files/python-3.2-issue16248.patch19
-rw-r--r--dev-lang/python/files/python-3.3-CVE-2013-2099.patch51
-rw-r--r--dev-lang/python/files/python-3.3-CVE-2014-4616.patch52
-rw-r--r--dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch40
-rw-r--r--dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-config-2.4-r158
-rw-r--r--dev-lang/python/metadata.xml10
-rw-r--r--dev-lang/python/python-2.6.9.ebuild371
-rw-r--r--dev-lang/python/python-2.7.10.ebuild357
-rw-r--r--dev-lang/python/python-2.7.9-r1.ebuild358
-rw-r--r--dev-lang/python/python-2.7.9-r2.ebuild359
-rw-r--r--dev-lang/python/python-3.2.5-r6.ebuild384
-rw-r--r--dev-lang/python/python-3.3.5-r1.ebuild325
-rw-r--r--dev-lang/python/python-3.4.0.ebuild320
-rw-r--r--dev-lang/python/python-3.4.1.ebuild319
-rw-r--r--dev-lang/python/python-3.4.2.ebuild319
-rw-r--r--dev-lang/python/python-3.4.3.ebuild318
-rw-r--r--dev-lang/qu-prolog/Manifest2
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch40
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch33
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch32
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch32
-rw-r--r--dev-lang/qu-prolog/metadata.xml8
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild96
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1.ebuild103
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.5.ebuild94
-rw-r--r--dev-lang/rakudo/Manifest7
-rw-r--r--dev-lang/rakudo/files/jakudo-fix-paths.patch23
-rw-r--r--dev-lang/rakudo/metadata.xml13
-rw-r--r--dev-lang/rakudo/rakudo-2015.01.1.ebuild58
-rw-r--r--dev-lang/rakudo/rakudo-2015.02.ebuild58
-rw-r--r--dev-lang/rakudo/rakudo-2015.03.ebuild45
-rw-r--r--dev-lang/rakudo/rakudo-2015.04.ebuild45
-rw-r--r--dev-lang/rakudo/rakudo-2015.05-r1.ebuild47
-rw-r--r--dev-lang/rakudo/rakudo-2015.06.ebuild43
-rw-r--r--dev-lang/rakudo/rakudo-2015.07.2.ebuild43
-rw-r--r--dev-lang/rebol-bin/Manifest1
-rw-r--r--dev-lang/rebol-bin/metadata.xml8
-rw-r--r--dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild31
-rw-r--r--dev-lang/rebol/metadata.xml8
-rw-r--r--dev-lang/rebol/rebol-9999.ebuild40
-rw-r--r--dev-lang/regina-rexx/Manifest1
-rw-r--r--dev-lang/regina-rexx/files/regina-rexx-3.6-gentoo.patch28
-rw-r--r--dev-lang/regina-rexx/files/rxstack14
-rw-r--r--dev-lang/regina-rexx/files/rxstack-r114
-rw-r--r--dev-lang/regina-rexx/metadata.xml18
-rw-r--r--dev-lang/regina-rexx/regina-rexx-3.6-r2.ebuild48
-rw-r--r--dev-lang/rubinius/Manifest2
-rw-r--r--dev-lang/rubinius/files/auto_gem.rb7
-rw-r--r--dev-lang/rubinius/metadata.xml10
-rw-r--r--dev-lang/rubinius/rubinius-2.5.3.ebuild86
-rw-r--r--dev-lang/rubinius/rubinius-2.5.5.ebuild86
-rw-r--r--dev-lang/ruby/Manifest8
-rw-r--r--dev-lang/ruby/metadata.xml30
-rw-r--r--dev-lang/ruby/ruby-1.9.3_p551-r1.ebuild217
-rw-r--r--dev-lang/ruby/ruby-2.0.0_p645.ebuild230
-rw-r--r--dev-lang/ruby/ruby-2.1.6-r1.ebuild227
-rw-r--r--dev-lang/ruby/ruby-2.2.2-r1.ebuild238
-rw-r--r--dev-lang/rust-bin/Manifest2
-rw-r--r--dev-lang/rust-bin/metadata.xml8
-rw-r--r--dev-lang/rust-bin/rust-bin-1.1.0.ebuild93
-rw-r--r--dev-lang/rust/Manifest3
-rw-r--r--dev-lang/rust/files/rust-1.1.0-install.patch16
-rw-r--r--dev-lang/rust/metadata.xml22
-rw-r--r--dev-lang/rust/rust-1.1.0.ebuild131
-rw-r--r--dev-lang/scala-bin/Manifest2
-rw-r--r--dev-lang/scala-bin/metadata.xml8
-rw-r--r--dev-lang/scala-bin/scala-bin-2.11.6.ebuild77
-rw-r--r--dev-lang/scala-bin/scala-bin-2.11.7.ebuild77
-rw-r--r--dev-lang/scala/Manifest165
-rw-r--r--dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch165
-rw-r--r--dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch236
-rw-r--r--dev-lang/scala/files/scala-2.10.2-maven-deps.patch70
-rw-r--r--dev-lang/scala/files/scala-2.10.2-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.10.3-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.10.4-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.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.7.3-build.xml.patch10
-rw-r--r--dev-lang/scala/metadata.xml6
-rw-r--r--dev-lang/scala/scala-2.10.2-r2.ebuild256
-rw-r--r--dev-lang/scala/scala-2.10.3-r1.ebuild227
-rw-r--r--dev-lang/scala/scala-2.10.4-r1.ebuild227
-rw-r--r--dev-lang/scala/scala-2.11.1-r1.ebuild220
-rw-r--r--dev-lang/scala/scala-2.11.2-r1.ebuild222
-rw-r--r--dev-lang/scala/scala-2.11.4-r1.ebuild222
-rw-r--r--dev-lang/scala/scala-2.11.6.ebuild222
-rw-r--r--dev-lang/scala/scala-2.11.7.ebuild226
-rw-r--r--dev-lang/scala/scala-2.9.2-r1.ebuild148
-rw-r--r--dev-lang/smlnj/Manifest22
-rw-r--r--dev-lang/smlnj/metadata.xml5
-rw-r--r--dev-lang/smlnj/smlnj-110.75.ebuild113
-rw-r--r--dev-lang/snobol/Manifest4
-rw-r--r--dev-lang/snobol/metadata.xml8
-rw-r--r--dev-lang/snobol/snobol-0.99.4.ebuild46
-rw-r--r--dev-lang/snobol/snobol-0.99.44.ebuild52
-rw-r--r--dev-lang/snobol/snobol-1.1.ebuild60
-rw-r--r--dev-lang/snobol/snobol-1.4.1.ebuild53
-rw-r--r--dev-lang/spidermonkey/Manifest5
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch138
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch13
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch42
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff18
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch102
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-3.patch99
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-install-symlinks.patch15
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-ppc64.patch61
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-fix.patch53
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-static-strings.patch381
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-isfinite.patch11
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch21
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.5-symbol-versions.patch32
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.7-filter_desc.patch18
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.7-freebsd-pthreads.patch11
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.7-symbol-versions.patch32
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch25
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.9.2.13-as-needed.patch22
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch67
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-17-js-config-shebang.patch22
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch37
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch199
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-24-upward-growing-stack.patch41
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch29
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-perl-defined-array-check.patch11
-rw-r--r--dev-lang/spidermonkey/metadata.xml14
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild51
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild52
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild52
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0.ebuild50
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.2.15-r2.ebuild77
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild136
-rw-r--r--dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild132
-rw-r--r--dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild147
-rw-r--r--dev-lang/squirrel/Manifest1
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch302
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch59
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch75
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch22
-rw-r--r--dev-lang/squirrel/metadata.xml11
-rw-r--r--dev-lang/squirrel/squirrel-2.2.4-r1.ebuild46
-rw-r--r--dev-lang/squirrel/squirrel-2.2.4-r2.ebuild47
-rw-r--r--dev-lang/srf/Manifest1
-rw-r--r--dev-lang/srf/metadata.xml14
-rw-r--r--dev-lang/srf/srf-1.0-r1.ebuild35
-rw-r--r--dev-lang/swi-prolog/Manifest14
-rw-r--r--dev-lang/swi-prolog/metadata.xml8
-rw-r--r--dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild125
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.2.0.ebuild128
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.2.1.ebuild128
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.2.2.ebuild128
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.3.2.ebuild128
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.3.3.ebuild128
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.3.4.ebuild128
-rw-r--r--dev-lang/swig/Manifest7
-rw-r--r--dev-lang/swig/metadata.xml25
-rw-r--r--dev-lang/swig/swig-1.3.40-r2.ebuild40
-rw-r--r--dev-lang/swig/swig-2.0.12.ebuild35
-rw-r--r--dev-lang/swig/swig-2.0.9.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.2.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.4.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.5.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.6.ebuild35
-rw-r--r--dev-lang/tcc/Manifest1
-rw-r--r--dev-lang/tcc/metadata.xml5
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r1.ebuild67
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r2.ebuild64
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild64
-rw-r--r--dev-lang/tcl/Manifest2
-rw-r--r--dev-lang/tcl/files/tcl-8.4.15-tclm4-soname.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.4.16-multilib.patch21
-rw-r--r--dev-lang/tcl/files/tcl-8.4.9-strtod.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.5.10-conf.patch26
-rw-r--r--dev-lang/tcl/files/tcl-8.5.13-autopath.patch19
-rw-r--r--dev-lang/tcl/files/tcl-8.5.13-conf.patch20
-rw-r--r--dev-lang/tcl/files/tcl-8.5.13-multilib.patch12
-rw-r--r--dev-lang/tcl/files/tcl-8.5.14-conf.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.5.9-gentoo-fbsd.patch13
-rw-r--r--dev-lang/tcl/files/tcl-8.5_alpha6-multilib.patch24
-rw-r--r--dev-lang/tcl/files/tcl-8.5_alpha6-tclm4-soname.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.6.1-conf.patch11
-rw-r--r--dev-lang/tcl/files/tcl-configure-LANG.patch41
-rw-r--r--dev-lang/tcl/metadata.xml12
-rw-r--r--dev-lang/tcl/tcl-8.5.17-r100.ebuild94
-rw-r--r--dev-lang/tcl/tcl-8.5.17.ebuild115
-rw-r--r--dev-lang/tcl/tcl-8.6.4.ebuild126
-rw-r--r--dev-lang/teyjus/Manifest1
-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.xml29
-rw-r--r--dev-lang/teyjus/teyjus-2.0.2.ebuild108
-rw-r--r--dev-lang/tinycobol/Manifest1
-rw-r--r--dev-lang/tinycobol/files/tinycobol-0.65.9.patch140
-rw-r--r--dev-lang/tinycobol/metadata.xml10
-rw-r--r--dev-lang/tinycobol/tinycobol-0.65.9.ebuild47
-rw-r--r--dev-lang/tk/Manifest3
-rw-r--r--dev-lang/tk/files/tcl-8.5.9-gentoo-fbsd.patch13
-rw-r--r--dev-lang/tk/files/tk-8.4-lastevent.patch28
-rw-r--r--dev-lang/tk/files/tk-8.4.11-multilib.patch24
-rw-r--r--dev-lang/tk/files/tk-8.4.15-aqua.patch11
-rw-r--r--dev-lang/tk/files/tk-8.4.15-tclm4-soname.patch12
-rw-r--r--dev-lang/tk/files/tk-8.4.9-man.patch29
-rw-r--r--dev-lang/tk/files/tk-8.5.10-conf.patch31
-rw-r--r--dev-lang/tk/files/tk-8.5.11-fedora-xft.patch13
-rw-r--r--dev-lang/tk/files/tk-8.5.11-fix-name-collision-uclibc.patch35
-rw-r--r--dev-lang/tk/files/tk-8.5.13-conf.patch25
-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/files/tk-8.5_alpha6-tclm4-soname.patch12
-rw-r--r--dev-lang/tk/files/tk-configure-LANG.patch41
-rw-r--r--dev-lang/tk/metadata.xml8
-rw-r--r--dev-lang/tk/tk-8.5.17-r100.ebuild94
-rw-r--r--dev-lang/tk/tk-8.5.17.ebuild124
-rw-r--r--dev-lang/tk/tk-8.6.4-r1.ebuild139
-rw-r--r--dev-lang/tuprolog/Manifest6
-rw-r--r--dev-lang/tuprolog/files/build.xml99
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.3.1_beta-javadocs.patch228
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.4.0_rc5-javadocs.patch315
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.5.0-javadocs.patch315
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.6.0-javadocs.patch454
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.7.0-javadocs.patch437
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.7.2-javadocs.patch479
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.7.2-no-ikvm.patch105
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.9.0-no-ikvm.patch116
-rw-r--r--dev-lang/tuprolog/metadata.xml5
-rw-r--r--dev-lang/tuprolog/tuprolog-2.4.0_rc5.ebuild57
-rw-r--r--dev-lang/tuprolog/tuprolog-2.5.0.ebuild55
-rw-r--r--dev-lang/tuprolog/tuprolog-2.6.0.ebuild59
-rw-r--r--dev-lang/tuprolog/tuprolog-2.7.0.ebuild59
-rw-r--r--dev-lang/tuprolog/tuprolog-2.7.2.ebuild60
-rw-r--r--dev-lang/tuprolog/tuprolog-2.9.0.ebuild60
-rw-r--r--dev-lang/ucblogo/Manifest1
-rw-r--r--dev-lang/ucblogo/files/50ucblogo-gentoo.el12
-rw-r--r--dev-lang/ucblogo/files/ucblogo-5.5-destdir.patch75
-rw-r--r--dev-lang/ucblogo/files/ucblogo-5.5-dont-require-tetex.patch40
-rw-r--r--dev-lang/ucblogo/files/ucblogo-5.5-fhs.patch28
-rw-r--r--dev-lang/ucblogo/files/ucblogo-5.5-no-emacs.patch28
-rw-r--r--dev-lang/ucblogo/metadata.xml16
-rw-r--r--dev-lang/ucblogo/ucblogo-5.5-r1.ebuild48
-rw-r--r--dev-lang/ucblogo/ucblogo-5.5.ebuild37
-rw-r--r--dev-lang/vala/Manifest5
-rw-r--r--dev-lang/vala/files/vala-0.24.0-atk-metadata.patch248
-rw-r--r--dev-lang/vala/metadata.xml8
-rw-r--r--dev-lang/vala/vala-0.20.1.ebuild36
-rw-r--r--dev-lang/vala/vala-0.22.1.ebuild38
-rw-r--r--dev-lang/vala/vala-0.24.0-r1.ebuild44
-rw-r--r--dev-lang/vala/vala-0.26.2.ebuild36
-rw-r--r--dev-lang/vala/vala-0.28.0.ebuild36
-rw-r--r--dev-lang/whitespace/Manifest1
-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.ebuild34
-rw-r--r--dev-lang/xsb/Manifest6
-rw-r--r--dev-lang/xsb/metadata.xml5
-rw-r--r--dev-lang/xsb/xsb-3.3.6.ebuild210
-rw-r--r--dev-lang/xsb/xsb-3.3.7.ebuild210
-rw-r--r--dev-lang/xsb/xsb-3.5.0.ebuild207
-rw-r--r--dev-lang/yap/Manifest6
-rw-r--r--dev-lang/yap/metadata.xml8
-rw-r--r--dev-lang/yap/yap-6.2.2.ebuild106
-rw-r--r--dev-lang/yap/yap-6.3.2.ebuild111
-rw-r--r--dev-lang/yap/yap-6.3.3.ebuild111
-rw-r--r--dev-lang/yasm/Manifest3
-rw-r--r--dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch23
-rw-r--r--dev-lang/yasm/metadata.xml9
-rw-r--r--dev-lang/yasm/yasm-1.2.0-r1.ebuild51
-rw-r--r--dev-lang/yasm/yasm-1.3.0.ebuild41
-rw-r--r--dev-lang/yasm/yasm-9999.ebuild66
956 files changed, 66113 insertions, 0 deletions
diff --git a/dev-lang/R/Manifest b/dev-lang/R/Manifest
new file mode 100644
index 00000000000..d6134ee943d
--- /dev/null
+++ b/dev-lang/R/Manifest
@@ -0,0 +1,7 @@
+DIST R-20130129.bash_completion.bz2 4209 SHA256 487e969b94563fec98ec58de7e6142e9361d4219088add0fca282b482a9e01b1 SHA512 910b26e16cfebe677f438abfa5f2652e582db143d91dbf0e7d4b1ea33462c7e5c89c3a3619c63ae98bba26b11a5adb16eda9d344f8cdbe4f0feabc546993c1a5 WHIRLPOOL 2368efaed37fcb6e010f6a234864631f68549bd8e3f733561170cc5b28f5557e546d8561246fb265a481a47991a262fec3acf6abc1dc3929a9357405e0d3c6fc
+DIST R-3.0.1.tar.gz 25508280 SHA256 af90488af3141103b211dc81b6f17d1f0faf4f17684c579a32dfeb25d0d87134 SHA512 470edbf4a4fccf9310add110d7fa7f338e410e412b3ec84f6ea5f1253e94a435e185a7a1b62b22aee443293147ff7bcca139015b490a9271a502b1bfbf1426a2 WHIRLPOOL f45c960280f51cba3a4f3730fa79671808b3c07fd49f97b2cdce4a1de45986e62ac9bb24c6f764386a3ef1034a266b86f041a1a1652ec7f687a4db08a074d22e
+DIST R-3.0.3.tar.gz 28075821 SHA256 b97cfd9540f294ab786e846153f3dd8605610d7e27616bfb4296795bc4fde6d6 SHA512 881c9c0a8d866eb87218a5cdca72153c9ef0fa0a0f091595fc065bdcbc1ea8b0bd1a2fb3008457b12e1b5025a7e70bd7764de4286a57ad3f73226367b2fc4e83 WHIRLPOOL 076d041c0581dc211a4ee53cf5cad731dc0ece33bbb34f8c066dc660ef0c1f7dcfc1b3359c6a0cebfa2ccec9b689776965a530edcf9f81758c4e003242347225
+DIST R-3.1.0.tar.gz 28469975 SHA256 8a680390f84c58c01dcdefd682eaa0e90389f09e6d2f2e090c71af40065f5fe2 SHA512 bb21fc90c7d37a5328031ed784e7dcbd20259d1837c33db3b51c14a116939a53496683d5de142a1223e89fc12406294efc67bed3595131615e9607d5ffab5ce2 WHIRLPOOL b376180d700d18780eb344b737a3a1bfc8b40f67967032e0f34abf940d76c3ffd7694be9f2f10be985571e8f94d92a6970a3d1cba503280e3fcf6df7a5e4298e
+DIST R-3.1.1.tar.gz 28606569 SHA256 ce5c4d5e34414ce8f1ec2d5642861435fa1ddc4cd89bd336172bbe25a62c7a19 SHA512 a75d8b82645bd9486873669b802924448d591013076e3d7dc958502dc6f0dac7d7fb78f3921d34a1eac1383f141b6e800f4293f7fac09651e0176cf84c431af9 WHIRLPOOL ec05c70193a229cbaf15f3432853070c6666c3963a4e2719a6d8ff188bfc2cada0d1f2fe90a9dd6b43f46913138afed0be387ba73b7f9c4d87abc362cc8a5393
+DIST R-3.1.2.tar.gz 28655941 SHA256 bcd150afcae0e02f6efb5f35a6ab72432be82e849ec52ce0bb89d8c342a8fa7a SHA512 fee20cd94d14bd46cc36fb265ed4d64f44eaa3929dd13c62d29a5883fde607aba63e28a4b0f265ede63f78788996deaee36acf6a70cc0bc90a705c9782be01a1 WHIRLPOOL f02d543c0fd7e89e63aba844b7c0f651a9a6bb5dbfcd58bdb64b49d08335c3270383eb62291b9f2f20ef6ec9f39eef5cf77ae1af3109296f8b1898227cca99d1
+DIST R-3.2.0.tar.gz 29124927 SHA256 f5ae953f18ba6f3d55b46556bbbf73441350f9fd22625402b723a2b81ff64f35 SHA512 c6041c854251d51dd936d3a3632c2958a0437c58488f93e5ba810e957fb7f2276e3fe4f615fb4705f2fc5a66aa50a828b54b5e4e7b4358c7fd465c71531b9828 WHIRLPOOL e21a65b9197a202691dbe903b441caf7d8b92efdffb86dcccdbf09d080177cfd472a54d381df1cca749937434ffb9c08ac74198457e320353207cd00837e1086
diff --git a/dev-lang/R/R-3.0.1.ebuild b/dev-lang/R/R-3.0.1.ebuild
new file mode 100644
index 00000000000..da39c790010
--- /dev/null
+++ b/dev-lang/R/R-3.0.1.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ bash-completion? ( http://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="bash-completion 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
+ app-text/ghostscript-gpl
+ dev-libs/libpcre
+ virtual/blas
+ cairo? ( x11-libs/cairo[X] x11-libs/pango )
+ icu? ( dev-libs/icu:= )
+ jpeg? ( virtual/jpeg:0 )
+ lapack? ( virtual/lapack )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0= )
+ readline? ( sys-libs/readline:0= )
+ tk? ( dev-lang/tk:0= )
+ X? ( x11-libs/libXmu 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-r1 >=sys-libs/zlib-1.2.5.1-r2[minizip] ) )
+ app-arch/xz-utils
+ java? ( >=virtual/jre-1.5 )"
+
+RESTRICT="minimal? ( test )"
+
+R_DIR="${EROOT%/}/usr/$(get_libdir)/${PN}"
+
+pkg_setup() {
+ if use openmp; then
+ FORTRAN_NEED_OPENMP=1
+ tc-has-openmp || die "Please enable openmp support in your compiler"
+ 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() {
+ # gentoo bug #322965 (not applied upstream)
+ # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14505
+ epatch "${FILESDIR}"/${PN}-2.11.1-parallel.patch
+
+ # respect ldflags (not applied upstream)
+ # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14506
+ epatch "${FILESDIR}"/${PN}-2.12.1-ldflags.patch
+
+ # gentoo bug #383431
+ # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14951
+ epatch "${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch
+
+ # https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14953
+ epatch "${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() {
+ econf \
+ --enable-byte-compiled-packages \
+ --enable-R-shlib \
+ --disable-R-framework \
+ --with-system-zlib \
+ --with-system-bzlib \
+ --with-system-pcre \
+ --with-system-xz \
+ --without-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 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
+ use bash-completion && newbashcomp "${WORKDIR}"/${BCP} ${PN}
+ # The buildsystem has a different understanding of install_names than what
+ # 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.0.3.ebuild b/dev-lang/R/R-3.0.3.ebuild
new file mode 100644
index 00000000000..6b4fe58cb7c
--- /dev/null
+++ b/dev-lang/R/R-3.0.3.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ bash-completion? ( http://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="bash-completion 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:3=
+ virtual/blas:0
+ || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
+ cairo? ( x11-libs/cairo[X] x11-libs/pango )
+ 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-r1:0 >=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() {
+ 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
+ use bash-completion && newbashcomp "${WORKDIR}"/${BCP} ${PN}
+ # The buildsystem has a different understanding of install_names than what
+ # 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.1.0.ebuild b/dev-lang/R/R-3.1.0.ebuild
new file mode 100644
index 00000000000..0ff21980d8f
--- /dev/null
+++ b/dev-lang/R/R-3.1.0.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ bash-completion? ( http://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="bash-completion 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: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-r1:0 >=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
+ use bash-completion && 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.1.1.ebuild b/dev-lang/R/R-3.1.1.ebuild
new file mode 100644
index 00000000000..695519aa819
--- /dev/null
+++ b/dev-lang/R/R-3.1.1.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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-r1:0 >=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.1.2.ebuild b/dev-lang/R/R-3.1.2.ebuild
new file mode 100644
index 00000000000..695519aa819
--- /dev/null
+++ b/dev-lang/R/R-3.1.2.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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-r1:0 >=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.2.0-r1.ebuild b/dev-lang/R/R-3.2.0-r1.ebuild
new file mode 100644
index 00000000000..f8ee36f425b
--- /dev/null
+++ b/dev-lang/R/R-3.2.0-r1.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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-r1:0 >=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 \
+ "${FILESDIR}"/${PN}-3.2.0-omitted-extern-R_running_as_main_program.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/files/R-2.11.1-parallel.patch b/dev-lang/R/files/R-2.11.1-parallel.patch
new file mode 100644
index 00000000000..c713d335bad
--- /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.12.1-ldflags.patch b/dev-lang/R/files/R-2.12.1-ldflags.patch
new file mode 100644
index 00000000000..2876ac3a416
--- /dev/null
+++ b/dev-lang/R/files/R-2.12.1-ldflags.patch
@@ -0,0 +1,15 @@
+Respect ldflags on rscript
+Patch by Sebastien Fabbro
+https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14506
+
+--- src/unix/Makefile.in.orig 2010-12-22 16:58:19.000000000 +0000
++++ src/unix/Makefile.in 2010-12-22 16:54:16.000000000 +0000
+@@ -66,7 +66,7 @@
+
+ ## we need to build at install time to capture the correct 'rhome'
+ install-Rscript:
+- $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \
++ $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \
+ $(srcdir)/Rscript.c
+ @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecbindir)"
+ @$(INSTALL_PROGRAM) Rscript "$(DESTDIR)$(Rexecbindir)/Rscript"
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 00000000000..136acb26055
--- /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-2.14.1-rmath-shared.patch b/dev-lang/R/files/R-2.14.1-rmath-shared.patch
new file mode 100644
index 00000000000..c16f20e756d
--- /dev/null
+++ b/dev-lang/R/files/R-2.14.1-rmath-shared.patch
@@ -0,0 +1,24 @@
+Link with libm to fix unresolved symbols when linked with as-needed
+and add a soname to the standalone math library
+Patch by Sebastien Fabbro
+--- src/nmath/standalone/Makefile.in.orig 2010-03-17 14:43:22.000000000 +0000
++++ src/nmath/standalone/Makefile.in 2012-01-02 17:40:13.000000000 +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 $(SOURCES)
+ DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
+@@ -116,7 +117,7 @@
+ $(RANLIB) $@
+
+ $(libRmath_la): $(libRmath_la_OBJECTS)
+- $(DYLIB_LINK) -o $@ $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS)
++ $(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.0.0-rmath-shared.patch b/dev-lang/R/files/R-3.0.0-rmath-shared.patch
new file mode 100644
index 00000000000..f53fb791051
--- /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.2.0-omitted-extern-R_running_as_main_program.patch b/dev-lang/R/files/R-3.2.0-omitted-extern-R_running_as_main_program.patch
new file mode 100644
index 00000000000..eebe5088ff9
--- /dev/null
+++ b/dev-lang/R/files/R-3.2.0-omitted-extern-R_running_as_main_program.patch
@@ -0,0 +1,12 @@
+--- R-3.2.0-orig/src/include/Rinterface.h 2015-03-19 10:02:16.000000000 +1100
++++ R-3.2.0/src/include/Rinterface.h 2015-05-01 23:02:17.541946810 +1000
+@@ -90,7 +90,8 @@
+ void fpu_setup(Rboolean);
+
+ /* in unix/system.c */
+-int R_running_as_main_program;
++/* Gentoo bug 547478 R bug https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15899 */
++extern int R_running_as_main_program;
+
+ #ifdef CSTACK_DEFNS
+ /* duplicating Defn.h */
diff --git a/dev-lang/R/metadata.xml b/dev-lang/R/metadata.xml
new file mode 100644
index 00000000000..1deadcbddd0
--- /dev/null
+++ b/dev-lang/R/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-mathematics</herd>
+ <maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ </maintainer>
+ <longdescription lang="en">
+ R is GNU S, a system for statistical computation and graphics. It
+ consists of a language plus a run-time environment with graphics, a
+ debugger, access to certain system functions, and the ability to run
+ programs stored in script files.
+
+ The core of R is an interpreted computer language which allows
+ branching and looping as well as modular programming using functions.
+ The R distribution contains functionality for a large number of
+ statistical procedures such as: linear and generalized linear
+ models, nonlinear regression models, time series analysis, classical
+ parametric and nonparametric tests, clustering, smoothing and
+ graphical data representations. Additional modules ("add-on
+ packages") are available for a variety of specific purposes but are
+ not distributed with this package.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ats/Manifest b/dev-lang/ats/Manifest
new file mode 100644
index 00000000000..dcfc012e60b
--- /dev/null
+++ b/dev-lang/ats/Manifest
@@ -0,0 +1 @@
+DIST ats-lang-anairiats-0.2.9.tgz 2466767 SHA256 44bbf49f7bea0e411c5a24ae0ea3ecf1d771886b6bd19ea6798badb01f1512fd SHA512 fc7df7bc032ad665c9c8376245bb52f88f71ab81d36fa6f18e66886d9d19f247f54888a8ae3fa5adf17117ee6826bbbde1a177040dc2657f6da0f98d66b035e3 WHIRLPOOL 9d0f2906c87c98aca69ff0f76db19d42adc8bf5a97625b4f8c13bc751690c389e8b2f871206bad09a64ec2913b740cc38a65448c056a227ac561d832a1541e2e
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 00000000000..4bab28a1075
--- /dev/null
+++ b/dev-lang/ats/ats-0.2.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..6719fcd2bb3
--- /dev/null
+++ b/dev-lang/ats/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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/bas/Manifest b/dev-lang/bas/Manifest
new file mode 100644
index 00000000000..e794ae1b521
--- /dev/null
+++ b/dev-lang/bas/Manifest
@@ -0,0 +1 @@
+DIST bas-2.4.tar.gz 258055 SHA256 2a147dd75a80049c1e6030c97aadb03a31fdbb622d0e18bd7961d167c9b48fac SHA512 1a86805d1981a7bc920d7f6ab7827ee9f0ed9535b78b4c46718106e7abe0b1ef9298631e7e4d3d9bf206a8ca0e1239db48a9d94b0b85b71101aea0956d1454d7 WHIRLPOOL 15a1c8a7f00158e330c13998f00976ab10258d8dffb9689722cb01db7ddd62fd15b6a1cc8ad91368a578729e312088a34f29dcaf60b960e43736e3aa2ff8049d
diff --git a/dev-lang/bas/bas-2.4.ebuild b/dev-lang/bas/bas-2.4.ebuild
new file mode 100644
index 00000000000..286c97c3354
--- /dev/null
+++ b/dev-lang/bas/bas-2.4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..3be4bb09eaf
--- /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 00000000000..367faed79b4
--- /dev/null
+++ b/dev-lang/bas/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='lr0'>Use the LR0 parser instead of the recursive descending parser</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/bashforth/Manifest b/dev-lang/bashforth/Manifest
new file mode 100644
index 00000000000..1053fecb20a
--- /dev/null
+++ b/dev-lang/bashforth/Manifest
@@ -0,0 +1 @@
+DIST bashforth-0.58a 78391 SHA256 846eb063e49aae42c38c29c792ec71a9e0d7b0d60f04cd69c15a8cb53257d128 SHA512 55a158fc80d6108a9151537d9d222f23dbeab9b3c9c821068c15ace283b050c0630da8e1cc0a30d997d76acbcd5f7cc38662c997df0d87b7ce68bb3de446d296 WHIRLPOOL 7041a9f9a903c2850c743668eebc410002f8843bee053c341403b9933f9e8b2e1ce9c6a4c785f84bcc67bc51dc6fd6abab7f55f940bd00c642456c20e86737bf
diff --git a/dev-lang/bashforth/bashforth-0.58a.ebuild b/dev-lang/bashforth/bashforth-0.58a.ebuild
new file mode 100644
index 00000000000..6abe4a1689e
--- /dev/null
+++ b/dev-lang/bashforth/bashforth-0.58a.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..1e7587374fd
--- /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>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/bff/Manifest b/dev-lang/bff/Manifest
new file mode 100644
index 00000000000..a7985e55309
--- /dev/null
+++ b/dev-lang/bff/Manifest
@@ -0,0 +1,2 @@
+DIST bff-1.0.3.1.tar.gz 2617 SHA256 189438f69bf0b66728caa1afed99e83fc03cdd3bdbcfa3c10c766e7bbea50712 SHA512 0bf9e20ffff204f3092b7f02197002880a0be0f4851f4c5f29bcb0974b90e5d518588c334b4f9224ed3320191269c7b4bfe42bd0339ef5ba86bee8bf1cf2a66d WHIRLPOOL be6e7ee7cbd2da649c3d7c0c29075996a552a9d716fdd34268390e5b6a38f8a4db77c5ab9f7c17c9b5066b605aaeb7950398092be697c961a10b2300d00a6f17
+DIST mandelbrot.b 11669 SHA256 f0f048e90855450fb06f2bea21f914f0d24e6b6c15fd050c68176ff794c6229e SHA512 3a1950f8be61fd33e563fe17dbc1297deae3ec2d276a6895e4bbb7d55c5bcf33ec7e9024d9776ad5c9c29b25c55bd08dea71403a60f9478fb3b80c22303d0862 WHIRLPOOL 8dca9257c6c6e1c56a8e5b4b9dc3cd698b44d28499b1760caff7b1fe3bdf8ebafdd30fc92b0134484e91d97bf59b6b2ad8dcc5b02892f28d4bb74add97d892e0
diff --git a/dev-lang/bff/bff-1.0.3.1.ebuild b/dev-lang/bff/bff-1.0.3.1.ebuild
new file mode 100644
index 00000000000..ee86e1e1a0f
--- /dev/null
+++ b/dev-lang/bff/bff-1.0.3.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="a brainfuck interpreter"
+HOMEPAGE="http://swapped.cc/bf/"
+SRC_URI="http://swapped.cc/bf/files/${P}.tar.gz
+ test? ( http://swapped.cc/bf/files/mandelbrot.b )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 m68k ppc ppc64 s390 sh x86"
+IUSE="test"
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ use test && cp "${DISTDIR}"/mandelbrot.b "${S}"/
+}
+
+src_compile() {
+ $(tc-getCC) -Wall ${CFLAGS} ${LDFLAGS} -o bff bff.c || die "compile failed"
+}
+
+src_test() {
+ ebegin "Running mandelbrot test"
+ ./bff mandelbrot.b > mandelbrot.out
+ eend $? || die
+ [[ $(md5sum mandelbrot.out) == "5024283fa65866ddd347b877798e84d8 "* ]] \
+ && cat mandelbrot.out \
+ || die "mandelbrot did not output correctly"
+}
+
+src_install() {
+ dobin bff || die
+ dodoc README
+}
diff --git a/dev-lang/bff/metadata.xml b/dev-lang/bff/metadata.xml
new file mode 100644
index 00000000000..9e77c1fd69b
--- /dev/null
+++ b/dev-lang/bff/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>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+bff is a slightly optimized interpreter for brainfuck, a turing-complete
+programming language.
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/blassic/Manifest b/dev-lang/blassic/Manifest
new file mode 100644
index 00000000000..382955a9885
--- /dev/null
+++ b/dev-lang/blassic/Manifest
@@ -0,0 +1 @@
+DIST blassic-0.10.2.tgz 361603 SHA256 b0ef334d5c1c710643f1dd11e651ce091e7059aa5e9895b547dfa86c3638bdfa SHA512 20f7210fd42ff58e11d7238aee37c21f18b733faf11edeb1d1a3e78c8fb524e37f0c871a2ab6b6608daaf593c4b4e8da4e2f86cddb8ad5e23905b0ce081feffa WHIRLPOOL ba571518104e319c47a341654f241e0b53ece0b614f200a824440fd0e67795a375d4f1703ccaa42ac8c85572c0ee6b0d3c980379094bc836fc4d866e2678cf1a
diff --git a/dev-lang/blassic/blassic-0.10.2.ebuild b/dev-lang/blassic/blassic-0.10.2.ebuild
new file mode 100644
index 00000000000..bb82254467a
--- /dev/null
+++ b/dev-lang/blassic/blassic-0.10.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="classic Basic interpreter"
+HOMEPAGE="http://blassic.org"
+SRC_URI="http://blassic.org/bin/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 hppa ppc x86 ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="X"
+
+RDEPEND="sys-libs/ncurses
+ X? ( x11-libs/libICE x11-libs/libX11 x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-svgalib \
+ $(use_with X x)
+}
+
+DOCS=( AUTHORS NEWS README THANKS TODO )
diff --git a/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch b/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch
new file mode 100644
index 00000000000..3253532a6bc
--- /dev/null
+++ b/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -191,7 +191,8 @@
+ AC_CHECK_HEADERS([ncurses.h],,[ncurses_found=no])
+ if test "$ncurses_found" = yes
+ then
+- AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no])
++ AC_CHECK_LIB([tinfo],[tputs],,
++ AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no]))
+ if test "$ncurses_found" = yes
+ then
+ AC_DEFINE(BLASSIC_CONFIG_USE_NCURSES)
diff --git a/dev-lang/blassic/metadata.xml b/dev-lang/blassic/metadata.xml
new file mode 100644
index 00000000000..6e8b0800bd5
--- /dev/null
+++ b/dev-lang/blassic/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+</maintainer>
+<longdescription>
+Blassic is a classic Basic interpreter. The line numbers are mandatory,
+and it has PEEK &amp; POKE. The main goal is to execute programs written in
+old interpreters, but it can be used as a scripting language. Many examples
+are included in /usr/share/blassic/examples/.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/c-intercal/Manifest b/dev-lang/c-intercal/Manifest
new file mode 100644
index 00000000000..dbf4bee2304
--- /dev/null
+++ b/dev-lang/c-intercal/Manifest
@@ -0,0 +1 @@
+DIST intercal-0.29.pax.gz 1003800 SHA256 fba1678bdd058350742fad2f3f0673bcea9f4c8add761855a67d8ada6650950b SHA512 0789278b334f65b6e2034493cf08b26a9885e7aec09072c9d9d3d2796b2c6b09f13a856afea1f77f6c6aac0f386b0a76e35ddd9c87584386f3b8a0ad30bddd31 WHIRLPOOL 9039db79d0ecfd17abdd2ba4788d5e812d4fc5db1fab3ba554567ec3d08cd7091408d054903e8a59dbf77fc78f5408dfc1608eaac0b10e1bf76c32b3a92e300d
diff --git a/dev-lang/c-intercal/c-intercal-29.0.ebuild b/dev-lang/c-intercal/c-intercal-29.0.ebuild
new file mode 100644
index 00000000000..f1dbfc2a418
--- /dev/null
+++ b/dev-lang/c-intercal/c-intercal-29.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit elisp-common eutils multilib
+
+# 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://c.intercal.org.uk"
+SRC_URI="http://overload.intercal.org.uk/c/${MY_PN}-${MY_PV}.pax.gz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs examples"
+
+DEPEND="emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+MY_PV2=${MY_PV%.${MY_PV##*.}}
+S="${WORKDIR}/${MY_PN}-${MY_PV2##*.}.${MY_PV##*.}"
+SITEFILE="50${PN}-gentoo.el"
+
+src_unpack() {
+ tar xzf "${DISTDIR}/${A}" || die "tar failed"
+}
+
+src_compile() {
+ emake
+
+ if use emacs; then
+ elisp-compile etc/intercal.el || die
+ 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} || die
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ 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 00000000000..c376230eb41
--- /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/metadata.xml b/dev-lang/c-intercal/metadata.xml
new file mode 100644
index 00000000000..6c6ba5563b7
--- /dev/null
+++ b/dev-lang/c-intercal/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>ulm@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>pchrist@gentoo.org</email>
+</maintainer>
+<longdescription>
+ An implementation of the language INTERCAL, legendary for its perversity
+ and horribleness (this version adds COME FROM for extra flavor). Comes with
+ language manual and examples including possibly the entire extant body of
+ INTERCAL code. Now supports i18n and l14n (to Ancient Roman locale only).
+ Now with fix patch by Donald Knuth.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cfortran/Manifest b/dev-lang/cfortran/Manifest
new file mode 100644
index 00000000000..6c32e575f4b
--- /dev/null
+++ b/dev-lang/cfortran/Manifest
@@ -0,0 +1,2 @@
+DIST cfortran_4.4-14.diff.gz 23084 SHA256 b49fe76e90f4f7c37e9b9709f4efdc4eee44e781d4c1f3842eed24fac0633daa SHA512 1e0b267efc17c2ba30ca1108d59ef87d1a401e6b88bea2c7045458f8cfad6ec9a05f6bf4a08c1d6cb314c790a4969a1f0fdf0c7b6abc28bae544928aad5b0218 WHIRLPOOL 5e07597d527303c1c15d155ac259f41a4d49e3b3285cc581b044ab5a52d05f8228309eea0a27b7e1a40b255fe3330dea4bf6ab4c1ab3453998ac6500ad17e727
+DIST cfortran_4.4.orig.tar.gz 120119 SHA256 ac7182f01afd3cc14b2525850509109598683eeb1e066c4a1f18661fb0d3d926 SHA512 969d0db566ecd7ed7945cac7f8ceea1cbd94ab427734ba83882acf97022c83b1417e32515d847fee89144137f58f7041cf5164fc397f3d7526f3aa958f8b038c WHIRLPOOL a5544fb9c23b5042d7dd2b52a516115b74e12bc54751f2cd6448eecd4f70cd86854ee4b7bac1248d312155e8be9d756e06d0d4a5bbed4162509a1b2b448330de
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 00000000000..b7be931d525
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DEB_PR="14"
+
+DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
+SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
+HOMEPAGE="http://www-zeus.desy.de/~burow/cfortran/"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+LICENSE="LGPL-2"
+IUSE="examples"
+SLOT="0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_PR}.diff
+ if use examples; then
+ tar xfz cfortran.examples.tar.gz
+ mv eg examples
+ ln -sfn sz1.c examples/sz1/sz1.C
+ ln -sfn pz.c examples/pz/pz.C
+ fi
+}
+
+src_install() {
+ insinto /usr/include/cfortran
+ doins cfortran.h || die
+ dosym cfortran/cfortran.h /usr/include/cfortran.h || die
+ dodoc cfortran.doc debian/{NEWS,changelog,copyright}
+ insinto /usr/share/doc/${PF}
+ doins cfortran.html index.htm cfortest.c cfortex.f
+ use examples && doins -r examples
+}
diff --git a/dev-lang/cfortran/cfortran-4.4-r3.ebuild b/dev-lang/cfortran/cfortran-4.4-r3.ebuild
new file mode 100644
index 00000000000..fea33052e18
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DEB_PR="14"
+
+DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
+HOMEPAGE="http://www-zeus.desy.de/~burow/cfortran/"
+SRC_URI="
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
+
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha ~amd64 ~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 00000000000..db1151c490f
--- /dev/null
+++ b/dev-lang/cfortran/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ cfortran is a header file to ease bridge between C and FORTRAN. It
+ provides an interface between C and FORTRAN routines and global
+ data, i.e. structures and COMMON blocks. This package includes
+ patches from Debian for better support on newer compilers and architectures.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cilk/Manifest b/dev-lang/cilk/Manifest
new file mode 100644
index 00000000000..1ca7aa3bf83
--- /dev/null
+++ b/dev-lang/cilk/Manifest
@@ -0,0 +1 @@
+DIST cilk-5.4.6.tar.gz 1270768 SHA256 0bee5386fabc87c97d716331b1b492eb8f18c8a8398c566afa3663f27139c9f6 SHA512 1ad082c5e1f42a4f15130673d1d43a0b5dedd80ca0e3182765065be8dccce72b26087243ca3405460dcc90332a84c3c5b1decf5a4650505fb738e7e085998e0e WHIRLPOOL 168138300c33c99a8906ad4c4755b57b7fc360bf5042a63b029a7c58cb7572674c9e8a67fe488ac9573461ea5a0cda69cb3d796abca375a4ecd0fcd7cb9bac4b
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 00000000000..7d181822116
--- /dev/null
+++ b/dev-lang/cilk/cilk-5.4.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/files/cilk-5.4.6-autotools.patch b/dev-lang/cilk/files/cilk-5.4.6-autotools.patch
new file mode 100644
index 00000000000..9f2d62b9041
--- /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 00000000000..86b18b2b236
--- /dev/null
+++ b/dev-lang/cilk/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ Cilk is a language for multithreaded parallel programming based on
+ ANSI C. Cilk is especially effective for exploiting dynamic, highly
+ asynchronous parallelism, which can be difficult to write in data-parallel or
+ message-passing style. Cilk provides an effective platform for
+ programming dense and sparse numerical algorithms, such as matrix
+ factorization and N-body simulations. Cilk is algorithmic, in that
+ the runtime system employs a scheduler that allows the performance
+ of programs to be estimated accurately based on abstract complexity
+ measures.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cll1h/Manifest b/dev-lang/cll1h/Manifest
new file mode 100644
index 00000000000..70a508bafa5
--- /dev/null
+++ b/dev-lang/cll1h/Manifest
@@ -0,0 +1 @@
+DIST cll1h-0.6.tar.gz 6569 SHA256 3f3e964d7b2e2779c13e6f08f1ca9fe97b9b8a698dcf26eea9e2f16246adf6dc SHA512 19b2716519d169d6c090c64c60db318008ac807723d73420d29b75d8b5cf74d56b2b68177483a861ab659efe24cdc1b6e1f17a9fd3c373490bcb1e755ba784b2 WHIRLPOOL 851f920e221eea0dd7e9eea011646f2bdac5dcb23367c8747a075904d5ec7fb095077a287f6a8866c375f66a0194bb3d5f2cfde3a6399272f72c9ca9344448ea
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 00000000000..8a86362d03d
--- /dev/null
+++ b/dev-lang/cll1h/cll1h-0.6-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..d9cd2cad66c
--- /dev/null
+++ b/dev-lang/cll1h/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/clojure/Manifest b/dev-lang/clojure/Manifest
new file mode 100644
index 00000000000..334ac5de3b4
--- /dev/null
+++ b/dev-lang/clojure/Manifest
@@ -0,0 +1,2 @@
+DIST clojure-1.5.1.tar.gz 540021 SHA256 ee6cc9360e3545a35cdd6a9ae48b5f4034ef2eb2aaa19721df976078952a805b SHA512 8bc4b7098ec11a3cd4d077f32607c5d23118d5f84b88af69b2051c4dd5b17f28f092b77206fba87e23f1163d2d0f7a2c37b1b1ffa1bcfef3ad4c8f74695d71cd WHIRLPOOL e77d13a771903100a3fe6b0ade84375217c5b150498e727a7cef2d856a4004e640e0c95717fb67be6cae1fbab7611189a1f3999726f7bbec43968eef646dcb32
+DIST clojure-1.6.0.tar.gz 579154 SHA256 70b664b24bd8cc7bf0b5519cfa5fa98424eb3e23303fec04b24a03b8bc4f0b4a SHA512 52bf54d157dae77e71e53bac421daa1bca7ef55b837600c8b04751a545cbed0f04d3718543031d1e5b8ca43e2518d356082b9f8c029c2e318996450cfaee9c81 WHIRLPOOL b79b008773ad678e6418a719183c5b240ad0629d3a32384ec6e5979f0377ba2bd39768f27b71da815342bffbd8bdfa5b66cb24e90cf4f489273b33515f591509
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 00000000000..0b432548557
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.5.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Clojure is a dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="1.5"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.5"
+DEPEND=">=virtual/jdk-1.5"
+
+S=${WORKDIR}/clojure-clojure-22c7e75
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md readme.txt
+}
diff --git a/dev-lang/clojure/clojure-1.6.0.ebuild b/dev-lang/clojure/clojure-1.6.0.ebuild
new file mode 100644
index 00000000000..d7acc4b6b26
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.6.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Clojure is a dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0 Apache-2.0 BSD"
+SLOT="1.6"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6"
+
+S=${WORKDIR}/clojure-clojure-42ce994
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md readme.txt
+}
diff --git a/dev-lang/clojure/metadata.xml b/dev-lang/clojure/metadata.xml
new file mode 100644
index 00000000000..761b85fc517
--- /dev/null
+++ b/dev-lang/clojure/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">clojure/clojure</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/closure-compiler-bin/Manifest b/dev-lang/closure-compiler-bin/Manifest
new file mode 100644
index 00000000000..737c089f310
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/Manifest
@@ -0,0 +1,5 @@
+DIST closure-compiler-bin-20120305.tar.gz 4905502 SHA256 593037f0f4e8df99293384559d64c3f89f50cecbd36f9a8755b3d4ddeeea89f2 SHA512 53c10a2731e4da8e49c46154c5a997a8b68f2d2e6a86baf4268425b3be416be1e4e9bc64809098484536af980e1192d649a95bd1088bb4da7ba83d4b7dad054f WHIRLPOOL 6e140b19282c1564a715aedd1ccee264ee5ea85e7da94f47fe9d59a3b3c9733cd0797b49238b49e68e25a7ce6957b9b3e26214b23ed41547378f45020d6d3490
+DIST closure-compiler-bin-20121212.tar.gz 5436614 SHA256 a78280bfe585be69648c0777d97bd33d9374d035463125521ca532d203974f60 SHA512 bb7bf694ff8aa9b932a6b248414884fc0d9cef6ab44d88cfad256ebd707ca299b21d2ee313a3b024032fc5eec0ffc4b7080182882af3c2311a2ad1f4ca85d1f9 WHIRLPOOL 5935f6ca1aada268a7d0fca28765c0ad4fc775891cf8f44148b81898838d5a3521a911b13efcb7a97e541f346ddb5fdeb6c998fddf6ed638c0d1fb4c52e87469
+DIST closure-compiler-bin-20130227.tar.gz 5694074 SHA256 c8ac4796e61919a4112ed616cc1734caf69b5aa5e777d5b0428defb21c253537 SHA512 f9ea62e994e1989643e3fe3db8fbe8c66eda34196b30bb31cdccbcbb4c209231bc35e705d5ac8cbcc73aecca8325e41ca48879eb624090b595a05413a56eb243 WHIRLPOOL ec4adc79e51fe5365a3087fc5d92fa1da15939a31f80c36faeda5aff3820cb58a7d77f52883f125c80c74cfa57aa3e830d98dd0975391186658339a66a457b93
+DIST closure-compiler-bin-20130411.tar.gz 5719640 SHA256 8487ab0b22f3c3e1d96ab518d42da057b113a41a685c1e68088c73fa9addcc3c SHA512 19cda8997828f58954ad94b63777aaf3157ce557af16090b6fc7dfc6333d57f901b630b75443a1b0ce961baec3989aae47061e92f97742be051f4451d8ae4023 WHIRLPOOL 3ee276d2f377be03f8bc33ba910770aa2631cc20392855d9dafc25fccc7ea0b393ecb98c20da9932eb6732e68bffc4218b87455260c4ac67d8bf7481aeef7e08
+DIST closure-compiler-bin-20150126.tar.gz 5654460 SHA256 9b8eb3ada77a440f09b32807be492f7b71429e6677d2227866fb2b50d9c7574a SHA512 fe302299aa9f5e21c6db4ebb628b63b83a84faea57a533c52d5f1590617d7df1ab484a1f32a4f666ed23de12860e30cd2f43da33fa5ec7dbb27048d2905d537c WHIRLPOOL 5e4f532ddf90577a84613af18e9a81561090a3518dd994f0f3407fa0bc16c3d94f2934c4437519e14394353e43147b5a9677ee5d413b5f08c00136ef6e9f9471
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20120305.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20120305.ebuild
new file mode 100644
index 00000000000..8d86d9cc484
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20120305.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="http://code.google.com/p/closure-compiler/"
+SRC_URI="http://closure-compiler.googlecode.com/files/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README
+}
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20121212.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20121212.ebuild
new file mode 100644
index 00000000000..5f49369896c
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20121212.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="http://code.google.com/p/closure-compiler/"
+SRC_URI="http://closure-compiler.googlecode.com/files/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README
+}
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20130227.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20130227.ebuild
new file mode 100644
index 00000000000..5f49369896c
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20130227.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="http://code.google.com/p/closure-compiler/"
+SRC_URI="http://closure-compiler.googlecode.com/files/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README
+}
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20130411.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20130411.ebuild
new file mode 100644
index 00000000000..5f49369896c
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20130411.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="http://code.google.com/p/closure-compiler/"
+SRC_URI="http://closure-compiler.googlecode.com/files/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README
+}
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild
new file mode 100644
index 00000000000..81c9ee43b7c
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="https://github.com/google/closure-compiler"
+SRC_URI="http://dl.google.com/closure-compiler/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README.md
+}
diff --git a/dev-lang/closure-compiler-bin/metadata.xml b/dev-lang/closure-compiler-bin/metadata.xml
new file mode 100644
index 00000000000..42d57aedbec
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ <description>make whatever changes you want except for removal -- i need a compiler that avoids installing a jdk</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">google/closure-compiler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/coffee-script/Manifest b/dev-lang/coffee-script/Manifest
new file mode 100644
index 00000000000..9567d32cc94
--- /dev/null
+++ b/dev-lang/coffee-script/Manifest
@@ -0,0 +1 @@
+DIST coffee-script-1.9.3.tar.gz 810246 SHA256 8c8faeeee21ed3cdde727fcc08ed6062d9d0233679317f026160aee8bfa85060 SHA512 660826e27f842ed67ec6ef59f734087c95585e03b6b8c6d25c8ecfc567f3161f59034e730b61e5f806edaaa7ec6c805ad6d14902857aaf09cf6193b0fe14f506 WHIRLPOOL c99eab68344609b5352ee7b7f59ebb4e6c90d1454c3cf37ac8cb00b1add0637e2e56084864ae54cdeb494a6966a97e896bf95760e1e8dbe1b26c0fc75abd5a41
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 00000000000..98497739ed4
--- /dev/null
+++ b/dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+MY_PN="coffeescript"
+
+DESCRIPTION="A little language that compiles into javascript"
+HOMEPAGE="http://coffeescript.org/"
+
+# The tests are missing from the npm registry package, so use Github
+# instead.
+SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
+ -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# This package has a test suite (that works), but it requires a number
+# of packages not in the tree. See thread "NPM / NodeJS project" on the
+# gentoo-dev archives for more info.
+IUSE="doc examples"
+
+RDEPEND="net-libs/nodejs"
+
+src_install(){
+ local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
+ insinto "${npm_module_dir}"
+ doins *.js package.json
+ doins -r lib
+ dodoc CONTRIBUTING.md README.md
+
+ use doc && dodoc -r documentation
+ use examples && dodoc -r examples
+
+ # The coffee and cake "binaries" use a relative path to find the lib
+ # directory, so we have to symlink them rather than use dobin().
+ exeinto "${npm_module_dir}/bin"
+ doexe bin/cake
+ doexe bin/coffee
+ dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
+ dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"
+}
diff --git a/dev-lang/coffee-script/metadata.xml b/dev-lang/coffee-script/metadata.xml
new file mode 100644
index 00000000000..fd269876d51
--- /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>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">jashkenas/coffeescript</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/confluence/Manifest b/dev-lang/confluence/Manifest
new file mode 100644
index 00000000000..e51da980b9f
--- /dev/null
+++ b/dev-lang/confluence/Manifest
@@ -0,0 +1 @@
+DIST confluence-0.10.6.tar.gz 118762 SHA256 7ab76a4183dae9f2429df5cb07b0df293c50cd947e3c051a6784561e8d3b3273 SHA512 904ea553a917ac2aafc33464fe4175bca76c53c51c50819ea92326dd5a1451e98eca6a56db28b7041814e5e4cea61da618012087a79fa9ec670ca67fc0014d25 WHIRLPOOL 74ad34b66a5f38185b00ac955d10da9b81fdba6b6f9422182550eb039d82782bf168e82a8df738a2fa3f2d615fe36bf605feb5c0b0b3b92c9c67132c4d63fc4d
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 00000000000..85c0c915bb7
--- /dev/null
+++ b/dev-lang/confluence/confluence-0.10.6.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="Functional programming language for reactive system design (digital logic, hard-real-time software)"
+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 00000000000..2193d772e35
--- /dev/null
+++ b/dev-lang/confluence/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ml</herd>
+</pkgmetadata>
diff --git a/dev-lang/dmd-bin/Manifest b/dev-lang/dmd-bin/Manifest
new file mode 100644
index 00000000000..85904b4c011
--- /dev/null
+++ b/dev-lang/dmd-bin/Manifest
@@ -0,0 +1,2 @@
+DIST dmd.1.016.zip 4813864 SHA256 839c0d0288560989e16271e842c368347ff392c648b8fe5e4daa9853dfd6684d SHA512 d7d801904c706b2a1fbecadc51a49f2549a4a8b2da6027195d56c9ff2a271ad2f90eb091b80066a0a4608d38905de988a7320c9c720df876bad79dd4f5c14674 WHIRLPOOL 619d0d5a5baf849fff96433b332b99fc868bb30f6cfeab1221f217c953d546312c0ebc088f782edbfcd1630d4541f998167493df20bf90288c718fb51fc6f993
+DIST dmd.2.008.zip 5325757 SHA256 8d8a0b4399ebf1ecc7e88ee68852db5e944ec7b88607d7c02a150bfcdfaf2b64 SHA512 a66aa0141147f2c6a46938c235bc2f7747f493fd09c5265b7d6bb77242075f5e262efb2b03425f2e2ed1e6b7c2bef4ab4c0e935e1ce8167738abb86f4967db96 WHIRLPOOL 356f307353a57fa75a32866d7c21b95f92da308bd6d2afc8bb7bc559a6f18138c6f17975b2b4ea7e332130bbb5e37d1b0ec96ac28d63331a8b13b972e959d8de
diff --git a/dev-lang/dmd-bin/dmd-bin-1.016.ebuild b/dev-lang/dmd-bin/dmd-bin-1.016.ebuild
new file mode 100644
index 00000000000..31876f81e6d
--- /dev/null
+++ b/dev-lang/dmd-bin/dmd-bin-1.016.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P=${P/-bin/}
+MY_P=${MY_P/-/.}
+
+DESCRIPTION="Digital Mars D Compiler"
+HOMEPAGE="http://www.digitalmars.com/d/"
+SRC_URI="http://ftp.digitalmars.com/${MY_P}.zip"
+
+LICENSE="DMD"
+SLOT="0"
+KEYWORDS="~x86"
+RESTRICT="mirror strip"
+
+LOC="/opt/dmd"
+S="${WORKDIR}"
+
+DEPEND="sys-apps/findutils
+ app-arch/unzip"
+RDEPEND="~virtual/libstdc++-3.3"
+
+src_unpack() {
+ unpack ${A}
+
+ # Remove unneccessary files
+ mv "${S}"/dmd/lib/libphobos.a "${S}"/dmd
+ rm -r "${S}"/dmd/lib
+ mkdir "${S}"/dmd/lib
+ mv "${S}"/dmd/libphobos.a "${S}"/dmd/lib
+
+ rm -r "${S}"/dm
+ rm "${S}"/dmd/bin/*.dll "${S}"/dmd/bin/*.exe "${S}"/dmd/bin/readme.txt
+ rm "${S}"/dmd/bin/sc.ini "${S}"/dmd/bin/windbg.hlp
+
+ # Cleanup line endings
+ cd "${S}"/dmd
+ edos2unix `find . -name '*.c' -type f`
+ edos2unix `find . -name '*.d' -type f`
+ edos2unix `find . -name '*.ddoc' -type f`
+ edos2unix `find . -name '*.h' -type f`
+ edos2unix `find . -name '*.mak' -type f`
+ edos2unix `find . -name '*.txt' -type f`
+ edos2unix `find samples -name '*.html' -type f`
+
+ # Fix permissions
+ fperms guo=r `find . -type f`
+ fperms guo=rx `find . -type d`
+ fperms guo=rx bin/dmd bin/dumpobj bin/obj2asm bin/rdmd
+}
+
+src_compile() {
+ cd "${S}"/dmd/src/phobos
+ sed -i -e "s:DMD=.*:DMD=${S}/dmd/bin/dmd -I${S}/dmd/src/phobos -L${S}/dmd/lib/libphobos.a:" linux.mak internal/gc/linux.mak
+ edos2unix linux.mak internal/gc/linux.mak
+ make -f linux.mak
+ cp libphobos.a "${S}"/dmd/lib
+
+ # Clean up
+ make -f linux.mak clean
+ rm internal/gc/*.o
+}
+
+src_install() {
+ cd "${S}"/dmd
+
+ # Broken dmd.conf
+ # http://d.puremagic.com/issues/show_bug.cgi?id=278
+ mv bin/dmd bin/dmd.bin
+ cat <<END > "bin/dmd"
+#!/bin/sh
+${LOC}/bin/dmd.bin -I${LOC}/src/phobos -L${LOC}/lib/libphobos.a \$*
+END
+ fperms guo=rx bin/dmd bin/dmd.bin
+
+ # Man pages
+ doman man/man1/dmd.1
+ doman man/man1/dumpobj.1
+ doman man/man1/obj2asm.1
+ rm -r man
+
+ # Install
+ mkdir "${D}/opt"
+ mv "${S}/dmd" "${D}/opt/dmd"
+
+ # Set PATH
+ doenvd "${FILESDIR}/25dmd"
+}
+
+pkg_postinst () {
+ ewarn "The DMD Configuration file has been disabled, "
+ ewarn "and will be re-enabled when: "
+ ewarn " "
+ ewarn "http://d.puremagic.com/issues/show_bug.cgi?id=278"
+ ewarn " "
+ ewarn "has been fixed. Meanwhile, please supply all your"
+ ewarn "configuration options in the /opt/dmd/bin/dmd "
+ ewarn "shell script. "
+ ewarn " "
+ ewarn "You may need to run: "
+ ewarn " "
+ ewarn "env-update && source /etc/profile "
+ ewarn " "
+ ewarn "to be able to use the compiler immediately. "
+ ewarn " "
+}
diff --git a/dev-lang/dmd-bin/dmd-bin-2.008-r1.ebuild b/dev-lang/dmd-bin/dmd-bin-2.008-r1.ebuild
new file mode 100644
index 00000000000..cbe2bdb2ee5
--- /dev/null
+++ b/dev-lang/dmd-bin/dmd-bin-2.008-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P=${P/-bin/}
+MY_P=${MY_P/-/.}
+
+DESCRIPTION="Digital Mars D Compiler"
+HOMEPAGE="http://www.digitalmars.com/d/"
+SRC_URI="http://ftp.digitalmars.com/${MY_P}.zip"
+
+LICENSE="DMD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror strip"
+
+LOC="/opt/dmd"
+S="${WORKDIR}"
+
+DEPEND="sys-apps/findutils
+ app-arch/unzip"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+
+ # Cleanup line endings
+ cd "${S}/dmd"
+ edos2unix `find . -name '*.c' -type f`
+ edos2unix `find . -name '*.d' -type f`
+ edos2unix `find . -name '*.ddoc' -type f`
+ edos2unix `find . -name '*.h' -type f`
+ edos2unix `find . -name '*.mak' -type f`
+ edos2unix `find . -name '*.txt' -type f`
+ edos2unix `find samples -name '*.html' -type f`
+ edos2unix src/phobos/linux.mak src/phobos/internal/gc/linux.mak
+
+ # Fix permissions and clean up
+ fperms guo=r `find . -type f`
+ fperms guo=rx `find . -type d`
+ fperms guo=rx bin/dmd bin/dumpobj bin/obj2asm bin/rdmd
+}
+
+src_compile() {
+ # Don't use teh bundled library since on gentoo we do teh compile
+ cd "${S}/dmd/src/phobos"
+ sed -i -e "s:DMD=.*:DMD=${S}/dmd/bin/dmd:" linux.mak internal/gc/linux.mak
+ # Can't use emake, customized build system
+ make -f linux.mak
+ cp obj/release/libphobos2.a "${S}/dmd/lib"
+
+ # Clean up
+ make -f linux.mak clean
+}
+
+src_install() {
+ cd "${S}/dmd"
+
+ # Setup dmd.conf
+ cat <<END > "bin/dmd.conf"
+[Environment]
+DFLAGS=-I/opt/dmd/src/phobos -L-L/opt/dmd/lib
+END
+ insinto /etc
+ doins bin/dmd.conf
+
+ # Man pages
+ doman man/man1/dmd.1
+ doman man/man1/dumpobj.1
+ doman man/man1/obj2asm.1
+
+ # Documentation
+ dohtml "html/d/*" "html/d/phobos/*"
+
+ # Install
+ exeinto /opt/dmd/bin
+ doexe bin/dmd
+ doexe bin/dumpobj
+ doexe bin/obj2asm
+ doexe bin/rdmd
+
+ insinto /opt/dmd/lib
+ doins lib/libphobos2.a
+
+ insinto /opt/dmd/samples
+ doins "samples/d/*"
+
+ # Phobos and DMD source
+ mv src "${D}/opt/dmd/"
+
+ # Set PATH
+ doenvd "${FILESDIR}/25dmd"
+}
+
+pkg_postinst () {
+ ewarn "You may need to run: "
+ ewarn "env-update && source /etc/profile "
+ ewarn "to be able to use the compiler immediately. "
+ einfo " "
+ einfo "The bundled samples and sources may be found in "
+ einfo "/opt/dmd/samples and /opt/dmd/src respectively. "
+ einfo " "
+}
diff --git a/dev-lang/dmd-bin/files/25dmd b/dev-lang/dmd-bin/files/25dmd
new file mode 100644
index 00000000000..ab7699d90d7
--- /dev/null
+++ b/dev-lang/dmd-bin/files/25dmd
@@ -0,0 +1,2 @@
+PATH=/opt/dmd/bin
+ROOTPATH=/opt/dmd/bin
diff --git a/dev-lang/dmd-bin/metadata.xml b/dev-lang/dmd-bin/metadata.xml
new file mode 100644
index 00000000000..8160b30f53e
--- /dev/null
+++ b/dev-lang/dmd-bin/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>lang-misc</herd>
+<longdescription>
+ This package provides a binary version of
+ the D language compiler from Digital Mars
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ekopath/Manifest b/dev-lang/ekopath/Manifest
new file mode 100644
index 00000000000..6fb3ce59791
--- /dev/null
+++ b/dev-lang/ekopath/Manifest
@@ -0,0 +1,3 @@
+DIST ekopath-2015-06-29-installer.run 61567050 SHA256 b98b2b686a7a9624b81838a37b64d8bbfc450b40c7fdfd9957c8a1690a68d4a8 SHA512 e56a9436f837df8d7acd3b9789d50316002ff42b0139b9aa7025f63ad27d98c586715277f3818a10a443d28653a1afd52f69b7101b36afd40beb4594ecbd8f91 WHIRLPOOL 42fe5fc00e83990bcf7c05a76e861d86626d54249da58608d6925323a522f7f2dc5806807aa56deceacce701386163eb34d96344fda4c49bd9b71bedc029ae3b
+DIST ekopath-2015-07-07-installer.run 59012713 SHA256 7e0026405b38f46932fc5b11ebef4c828bc9c0cf05e85f365d314949a091bdd0 SHA512 c68a4b986e9f48ae70c891535a71238a43ba5afa5dcf36c900798292096abf245cc434b03dee8c9ad87e35d7ac1f27c361edcec41dae9989fee6092dd98f5fd3 WHIRLPOOL d32c2564d0c5240fa9c112224c52b38ec2a96062c69d6e4264e610e531258fc3bf8205c4c338890ece3cecf857ffa32cced2d20339f69f098e064bf96306c51e
+DIST ekopath-2015-08-03-installer.run 59079587 SHA256 21e2f3339321e0de09a3e5df250c2dc52aa2ad9c95534a19539c342817f14c2b SHA512 1628f9bfbbce19d666a7ea6158c0abf6a159ef7680854456cfa811fe2a55b9228b34105ce97894af6d714fe23d2d3f0b3f0829c6dec67dd1318b52b3bc541b09 WHIRLPOOL 0978ecb39a8ef3291f05730b17c4df86538a540d5b8f01da699ed821f2aab8da8578a7a0b19a5af74fa560b1ae7c4d6ac06d178aff49aa1fd4b3440b8aa5d0e5
diff --git a/dev-lang/ekopath/ekopath-6.0.430_p20150629.ebuild b/dev-lang/ekopath/ekopath-6.0.430_p20150629.ebuild
new file mode 100644
index 00000000000..ab16a2fc622
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.430_p20150629.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator multilib pax-utils
+
+MY_PV=$(get_version_component_range 1-3)
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND=""
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="
+ opt/${PN}/lib/${MY_PV}/x8664/*
+ opt/${PN}/bin/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_prepare() {
+ cat > 99${PN} <<-EOF
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${PN}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${PN}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${PN}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${PN}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${PN}"/uninstall* || die
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.439_p20150707.ebuild b/dev-lang/ekopath/ekopath-6.0.439_p20150707.ebuild
new file mode 100644
index 00000000000..ab16a2fc622
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.439_p20150707.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator multilib pax-utils
+
+MY_PV=$(get_version_component_range 1-3)
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND=""
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="
+ opt/${PN}/lib/${MY_PV}/x8664/*
+ opt/${PN}/bin/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_prepare() {
+ cat > 99${PN} <<-EOF
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${PN}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${PN}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${PN}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${PN}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${PN}"/uninstall* || die
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.468_p20150803.ebuild b/dev-lang/ekopath/ekopath-6.0.468_p20150803.ebuild
new file mode 100644
index 00000000000..ab16a2fc622
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.468_p20150803.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator multilib pax-utils
+
+MY_PV=$(get_version_component_range 1-3)
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND=""
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="
+ opt/${PN}/lib/${MY_PV}/x8664/*
+ opt/${PN}/bin/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_prepare() {
+ cat > 99${PN} <<-EOF
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${PN}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${PN}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${PN}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${PN}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${PN}"/uninstall* || die
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/metadata.xml b/dev-lang/ekopath/metadata.xml
new file mode 100644
index 00000000000..b78884b8579
--- /dev/null
+++ b/dev-lang/ekopath/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ <description>Co-maintainer</description>
+</maintainer>
+<longdescription>
+ The PathScale EKOPath Compiler Suite offers programmers a rich set of tools and
+ one of the world's most sophisticated optimization infrastructures to maximize
+ program performance on any Intel 64 or AMD64 platform supporting Intel MMX,
+ SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AMD SSE4A and AVX.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest
new file mode 100644
index 00000000000..190d49144f7
--- /dev/null
+++ b/dev-lang/elixir/Manifest
@@ -0,0 +1,11 @@
+DIST elixir-0.11.2.tar.gz 848108 SHA256 bd3099af3f8b2796e88559b78e1474638ff6ef4894342ea5f0858d00f018fd65 SHA512 2800dfa3d152dd67634c35f31fe1f0a2c59d2db128b80ae6ad07253b1215e181a25c215c5865089adbc122026458ed2d7db4b031823326ee206bd5bcb8f77477 WHIRLPOOL 3fe2cde17708ffe9ece58be18a24d26985c33db54a8b85a55da5809628d499f0a13849cf0b0acd50adb8d4bce9b2492b96a5b609802a4d19fbaa780c98f3e8f2
+DIST elixir-0.12.5.tar.gz 876886 SHA256 8b6ad20decb0a71240d00005daca2e2145a721552455896e091477f53d26a47c SHA512 63e436938deec9916c11598af24897d80a3c3dcda983e5ff281a595b2ef02d4605fb13f9cbef442653fd4e461db77e6588589c280f9425ee9163970ca8752532 WHIRLPOOL 9e59cc1a4e683882d78e16cf266422b193e95f58cf3cc705ba41af20b9cc376e432bfc45b69a98a15cd0494dee72ea1eba443e69d4ca2bf5a250bb42cdf786fb
+DIST elixir-0.13.3.tar.gz 936934 SHA256 2e2349dc42350b0ef23220f9cc89ea0194f0017e8282d08579c730e91d46cb9e SHA512 cca45b6c9165ef428d22474d803ddd769e3eb1fd80b56dce874fb0ae1ab35f75210742b7dd543316cf8b6379ebd4b4f2265ad04780f6abe6db6cf708ec2d4203 WHIRLPOOL 998e32e45be96126500318224adfc99ea443e91b34362907962c648e62a5a9b708c0a6efa9da69fb0ede5248c6a10634f119b5446ec12f6d460b950de1f72929
+DIST elixir-0.14.3.tar.gz 989493 SHA256 7fb49733c1fad8129183d1dd00f7433d56fbc7d9980cc9fdd54f0e472f7d89ee SHA512 4e099beb3877802e47a79e59eddd7a19c00ffb80c6242e24cf0f989688d6d0b3ec8db5a889914b0c2e9ba861ccc2ceda3c913d099aefe24a16fa0aa6ec0fef1b WHIRLPOOL a85d649c14bee7313e71f1b660f36d9828ac947baf600ea85f5fff348a1f4d6357b37b7c7a4e20f2c9800ed54da92d1224d88b5686744e9bf9fc1c9af318f16c
+DIST elixir-0.15.1.tar.gz 1017067 SHA256 8e608abf90a6e9a25ef5fb7e45dfd04e2cb7e1fecb4ac260bf6652885a7f0c50 SHA512 6e10400e15f34e962485ffeefe7a728a688c3b6b31d32ae0d1f990a369810e73cb85bcb3645054b3fb6b3bfaf50249fb074d2894cb58581d71c4d2155225588a WHIRLPOOL 15e8303cc5c1dc3f426331bd1d524505691ee6f072f7eae90d3d25bdd3ec15bee36e42b2f3527457fba3e86828e89380228a02bb7b4ebdb28626d570e6264599
+DIST elixir-1.0.0.tar.gz 1032066 SHA256 527774b05bcaacb0347299b42035b606107e88665fcdd415b0b62704ad7928b2 SHA512 96978fc0df8bd59d22801f376a31d3d5802f5c16e76299a5c7fcfe50c733596b02b9092a92a16edb571fac1bda63a1dbaf38daf586675079d2d21e0f595a5d5d WHIRLPOOL 80ce9826b4288d050e3539643bfe54965ca3162123fa1d1326bf98de72baf3eb87ecfd81ee6b9937845af50d52029a35514bcb48c4700494ac0392f6427f354e
+DIST elixir-1.0.1.tar.gz 1033936 SHA256 87ecbe8aa8eecfed5033a80b0f1ad2fe95ef835fa909fde65fbc622a5aa3431b SHA512 88743b578bdd0f70356d6adfa0793ebe13a77b0022692b7329be9f192dd61ebf14e802b331e79e40460dd7b6937bf5fe12cb82bb5672db14f320385cadf5ba72 WHIRLPOOL a80ff718431163714a68ccf807c2b5db3f40bbd1307d28d03d7c661e72204a697e89b76491c0b288edcba1a598fcbf5442f14dee432e4aa1d88f6f43268511c7
+DIST elixir-1.0.2.tar.gz 1033260 SHA256 6156ee396e85045358d11a6839e157e8fa9573b7414bddbd2c91843ed2b4b962 SHA512 3768bdfeab7478df5e8e7208f5f6e5fad584d3beef78784a322e346851a39c0da5657cb0f88632246377d0795ac735bd80e7a68ca879c08b9e21283a807b4511 WHIRLPOOL 6b766c6cff9f95e95b218ff830ae1d0655e52197c817f9f0b484e7a4f94c37da931ffe48e6caa5430a00fc4807ac0a870bf175b2e20a0c016748de606d106369
+DIST elixir-1.0.3.tar.gz 1039041 SHA256 ec6c4eaffcb771d91bdea9fb274600c624fd16b1891d194b3fcb2b521f52cc75 SHA512 d48636c355181a633dfc5d256f9a1718d74137686080c965d2d568e3d9b0f5cc1352f2ed4d12e50bd89c4cfc9cd59e7a1112ae22979012845df0556124151d1e WHIRLPOOL e76b92272598aba72e9b067eef20492b692f9d4aeeff796a35dc9ea2ee27eed40a5eea369bb92c3a58e23001cf5ea627eb72bf7b7b8b13827f8601479f104135
+DIST elixir-1.0.4.tar.gz 1040843 SHA256 79341fde3b01217aa252b8996d1b1b27cd1006cb89fe43446d5241e3dcb84bad SHA512 c25bc101fd3d1bc8bfb8c793b5da95ac544d0b921538dc24fcd92ff87d1f6248f3c760f714dd7fe061827c5495004d4f7d6d4788c28daf9d519694e49afd5e0f WHIRLPOOL 3ede94b8151319198be053c8e432d801cbbd3386c8c931d5f075696e21668272d3fc058a6f7f9726fd4f6989a70e16d99850d8852703bf23c115ce2cd44a539b
+DIST elixir-1.0.5.tar.gz 1043275 SHA256 5ce5c226b3d11d751b41ad79b915b86f13f8a1b89ef3e733321d3f46ff4d81b8 SHA512 1f621e1a3939433dc91a0e2f7e62512b074ce2e8dc7190535570056875f82eda2001a333a51627e39b0f710e104409c8d17aea9635235b0963265d39b32c9f6c WHIRLPOOL eea70416f08132654e9cc4b65342971cdd7793b45d97fbe5cb1b8e6739a3befb16d72ce15b485a8c2a3204462c8b54afc9c2d934c924863e3a6342e8067644fe
diff --git a/dev-lang/elixir/elixir-0.11.2.ebuild b/dev-lang/elixir/elixir-0.11.2.ebuild
new file mode 100644
index 00000000000..00d92e3def2
--- /dev/null
+++ b/dev-lang/elixir/elixir-0.11.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-16"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-0.12.5.ebuild b/dev-lang/elixir/elixir-0.12.5.ebuild
new file mode 100644
index 00000000000..fb0c4b1ffc9
--- /dev/null
+++ b/dev-lang/elixir/elixir-0.12.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-16"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-0.13.3.ebuild b/dev-lang/elixir/elixir-0.13.3.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-0.13.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-0.14.3.ebuild b/dev-lang/elixir/elixir-0.14.3.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-0.14.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-0.15.1.ebuild b/dev-lang/elixir/elixir-0.15.1.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-0.15.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.0.ebuild b/dev-lang/elixir/elixir-1.0.0.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.1.ebuild b/dev-lang/elixir/elixir-1.0.1.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.2.ebuild b/dev-lang/elixir/elixir-1.0.2.ebuild
new file mode 100644
index 00000000000..0a9e1387f09
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.3.ebuild b/dev-lang/elixir/elixir-1.0.3.ebuild
new file mode 100644
index 00000000000..77a909a3db8
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.4.ebuild b/dev-lang/elixir/elixir-1.0.4.ebuild
new file mode 100644
index 00000000000..77a909a3db8
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.4.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/elixir-1.0.5.ebuild b/dev-lang/elixir/elixir-1.0.5.ebuild
new file mode 100644
index 00000000000..77a909a3db8
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.0.5.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="http://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 ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-17"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CONTRIBUTING.md
+}
diff --git a/dev-lang/elixir/metadata.xml b/dev-lang/elixir/metadata.xml
new file mode 100644
index 00000000000..d553c3568b7
--- /dev/null
+++ b/dev-lang/elixir/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <maintainer>
+ <email>styx.mp@gmail.com</email>
+ <name>Mikhail</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>
+ https://github.com/elixir-lang/elixir/issues
+ </bugs-to>
+ <changelog>
+ https://github.com/elixir-lang/elixir/blob/master/CHANGELOG.md
+ </changelog>
+ <doc lang='en'>
+ http://elixir-lang.org/docs.html
+ </doc>
+ <remote-id type='github'>
+ elixir-lang/elixir
+ </remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/epic/Manifest b/dev-lang/epic/Manifest
new file mode 100644
index 00000000000..5b4e80be0bf
--- /dev/null
+++ b/dev-lang/epic/Manifest
@@ -0,0 +1,4 @@
+DIST epic-0.9.2.tar.gz 65607 SHA256 dca5fb553e383ff1984fb4de9e734a6c4a1390290aafa7bf5b4718d7d1743bc7 SHA512 f9ec3011e8e54d061180a1b3f945158741b35f91ee75ea065df2871d2a872ab8117bb5d34912e4ef84fd39c681eff10fb070a2fdfb23342bfc23aed5bd61534e WHIRLPOOL 85e9982abffd84eea89436912fbccf8e1aa131c9eebcf0354fdea20d321f6f9b3c40eccd6e9044c6c9fa76967180f761fc10928eda501ee17c1c2164e08fa3b5
+DIST epic-0.9.3.2.tar.gz 87050 SHA256 30f5fc0fcd67461c9b19a7ab8d50ef9ddc44430e4fb699171091116df552e3d0 SHA512 de265363ef57500ff544d8fcba5cae95bdd8f5562dff3191595f75a1e37658c1906ffa36b1252e21be06143e0f9096e606f1c59bcaff1026972d70595c76c342 WHIRLPOOL 859308b1ed4b3868cf03b9b68c9de67267f4de5971a81a61e19f65b79e27ca587d40a771285007fb9f730803756b8c5cf521b1c38a71472113524dd8cfa6a3b1
+DIST epic-0.9.3.3.tar.gz 87163 SHA256 559844322f0f3c6d511d70e1a3166175f4aea084ea0e109b161b4d1d4296e82a SHA512 f957eb5402eebad9d52f0d38cf552c00ff5df9caffce97961e761e7c91ed33dee520cb0255f6547db1c05ed6dda7a3e4833d375a5fc0ebe7e94502736a49c566 WHIRLPOOL be19a826d292f490c618659ba8c482cc74cf2239c1585a1d26b62265623858daeb79bdb65b14ede58d0d695a9a0c7f5397d6c3b94c0e5c9326e3b9cc0533096d
+DIST epic-0.9.3.tar.gz 86632 SHA256 6708a21cdf226f0a9344afaf1ee25900b74462d94ed681f815252305251d1ef5 SHA512 2db308f62561f6b4dbada2064754e9e9cbac21ebc3148e04dd102c8eeb6e122f1361374a8900a5daadcb1dac823c21cc5f7164b2ca902183e8647e936991ce08 WHIRLPOOL cbd4e03ff0d1db4551224c884517be1dc4f44521434ca32a52df1743eb691ccd9c4157ca01e64258668473984ec44fff215e43647c0eef9aea015f6fe601de37
diff --git a/dev-lang/epic/epic-0.9.2.ebuild b/dev-lang/epic/epic-0.9.2.ebuild
new file mode 100644
index 00000000000..6d6ab69f020
--- /dev/null
+++ b/dev-lang/epic/epic-0.9.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# ebuild generated by hackport 0.2.14
+
+EAPI="4"
+
+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"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/cabal
+ dev-haskell/mtl[profile?]
+ >=dev-libs/boehm-gc-7.0[threads]
+ >=dev-lang/ghc-6.10.1"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.4
+ dev-haskell/happy"
diff --git a/dev-lang/epic/epic-0.9.3.2.ebuild b/dev-lang/epic/epic-0.9.3.2.ebuild
new file mode 100644
index 00000000000..7dc8a8442ce
--- /dev/null
+++ b/dev-lang/epic/epic-0.9.3.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.4.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit eutils 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[threads]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.4
+"
+
+src_prepare() {
+ # Bug #438422, upstream at https://github.com/edwinb/EpiVM/issues/5.
+ epatch "${FILESDIR}"/respect-user-cflags.patch
+}
diff --git a/dev-lang/epic/epic-0.9.3.3.ebuild b/dev-lang/epic/epic-0.9.3.3.ebuild
new file mode 100644
index 00000000000..b3201fc5325
--- /dev/null
+++ b/dev-lang/epic/epic-0.9.3.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.5.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit eutils 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[threads]
+ dev-libs/gmp:0
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.4
+"
+
+src_prepare() {
+ # Bug #438422, upstream at https://github.com/edwinb/EpiVM/issues/5.
+ epatch "${FILESDIR}"/respect-user-cflags.patch
+}
diff --git a/dev-lang/epic/epic-0.9.3.ebuild b/dev-lang/epic/epic-0.9.3.ebuild
new file mode 100644
index 00000000000..6bb5318741a
--- /dev/null
+++ b/dev-lang/epic/epic-0.9.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit base 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[threads]
+ >=dev-lang/ghc-6.10.4:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.4
+ dev-haskell/happy"
+
+PATCHES=("${FILESDIR}/${PN}-0.9.3-ghc-7.6.patch")
diff --git a/dev-lang/epic/files/epic-0.9.3-ghc-7.6.patch b/dev-lang/epic/files/epic-0.9.3-ghc-7.6.patch
new file mode 100644
index 00000000000..d168f032b92
--- /dev/null
+++ b/dev-lang/epic/files/epic-0.9.3-ghc-7.6.patch
@@ -0,0 +1,53 @@
+--- epic-0.9.3-orig/Epic/Language.lhs 2012-02-28 10:44:29.000000000 +1100
++++ epic-0.9.3/Epic/Language.lhs 2012-09-14 16:20:29.841939337 +1000
+@@ -1,9 +1,14 @@
+-> {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses,
++> {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, CPP,
+ > FunctionalDependencies #-}
+
+ > module Epic.Language where
+
+ > import Control.Monad
++#if MIN_VERSION_base(4,6,0)
++> import Control.Exception.Base
++#endif
++
++
+ > import System.IO
+ > import System.Directory
+ > import System.Environment
+@@ -379,7 +384,13 @@
+ > environment :: String -> IO (Maybe String)
+ > environment x = catch (do e <- getEnv x
+ > return (Just e))
+-> (\_ -> return Nothing)
++#if MIN_VERSION_base(4,6,0)
++> (\y-> do return (y::SomeException); return Nothing)
++#endif
++>
++#if !MIN_VERSION_base(4,6,0)
++> (\_-> return Nothing)
++#endif
+
+ Some tests
+
+--- epic-0.9.3-orig/Epic/CodegenC.lhs 2012-02-28 10:44:29.000000000 +1100
++++ epic-0.9.3/Epic/CodegenC.lhs 2012-09-14 16:13:48.061329048 +1000
+@@ -1,3 +1,4 @@
++> {-#LANGUAGE FlexibleContexts#-}
+ > module Epic.CodegenC where
+
+ > import Control.Monad.State
+@@ -98,10 +99,11 @@
+ > if (x>max) then put x else return ()
+
+ > cgs [] = return ""
++
+ > cgs (x:xs) = do xc <- cg x
+ > xsc <- cgs xs
+ > return $ xc ++ "\n" ++ xsc
+-
++> cg:: (MonadState Int m) => ByteOp -> m [Char]
+ > cg (CALL t fn args) = return $ tmp t ++ " = " ++ quickcall fn ++
+ > targs "(" args ++ ");"
+ > cg (TAILCALL t fn args)
diff --git a/dev-lang/epic/files/respect-user-cflags.patch b/dev-lang/epic/files/respect-user-cflags.patch
new file mode 100644
index 00000000000..eedfd253afe
--- /dev/null
+++ b/dev-lang/epic/files/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 00000000000..b242285af82
--- /dev/null
+++ b/dev-lang/epic/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <maintainer>
+ <email>haskell@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Epic is a simple functional language which compiles to
+ reasonably efficient C code, using the Boehm-Demers-Weiser
+ garbage collector (&lt;http://www.hpl.hp.com/personal/Hans_Boehm/gc/&gt;).
+ It is intended as a compiler back end, and is currently used
+ as a back end for Epigram (&lt;http://www.e-pig.org&gt;) and Idris
+ (&lt;http://idris-lang.org/&gt;).
+ It can be invoked either as a library or an application.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
new file mode 100644
index 00000000000..80c9fdcf169
--- /dev/null
+++ b/dev-lang/erlang/Manifest
@@ -0,0 +1,12 @@
+DIST otp_doc_html_17.3.tar.gz 33444170 SHA256 bd8278b34f610d6025549640d4e03d79d2a69d7129ea230c0d71d7e6b231f5b3 SHA512 4b1f46c4258b7189b3651af8763916d791888bbc2232c9db60cfda019f611d34d215225fadc88dcfc39539a2c00fbe13b0feba59dea334b77522d7777dc55497 WHIRLPOOL 97930374b82609e27e7ea997050efaf7e92817ec5503fa895a9db30faf1a1c293a6582c769a12ab407eb6981d53aeb58d6a1d558a3b97aa8d2b533cab5aa4c3b
+DIST otp_doc_html_17.5.tar.gz 33510258 SHA256 baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5 SHA512 d3e455452e6d6e241c40de6e41a7b1069f8daa45c8d2340adb62f8867948261692c8465db7e288378942ebe86fd938847756992600da93aa99cb294fadcb5211 WHIRLPOOL 9657c1fd133fa713d0f30bae0394f47f43b090149ec3457a177bd9f129c052b73f1e757762ced02c1c8bcbaec294e845859b18b0e2004429e04df8e04e36cade
+DIST otp_doc_html_18.0.tar.gz 33857396 SHA256 e5a766f68406f5025f921ec32e8959937189ed1245e24b03a74156a8898b03b2 SHA512 5fcbd1ac7fb5f646e181ede385a56adb8d754bc645fd9313c2e3a77a01cb686b1c5975695207f388a78c9599b0d4e6b52c7ea121e900c0a1e2ab20679c0bede1 WHIRLPOOL 5e9174059212b3f5023c04b19164184937b2eb4cbea29103a85813f630b733e60e600e31d3478b3ef759150421b6153a1a3e946e313706bc23e110e01dc1a945
+DIST otp_doc_html_R15B03-1.tar.gz 30436303 SHA256 d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e SHA512 8a22ad702d50f40162f7d6051dbbc0226af449f7a1dcfb087e952dd7eb7213257940933441cfb68f055746450e3e5aa2c5ed8107ac67af7c3a940afb195af8c7 WHIRLPOOL ac10f9ce0ffd4cbd98617e4018e5a4729ce83f0ace6a4db219e7beef2f3a626a8c9a419c7f7772c934ca50310f55486df7eb24955ba845a9230c69c93e183d33
+DIST otp_doc_man_17.3.tar.gz 1357195 SHA256 3fabdac0b0594432fdd8186fa2c74ff49a629a9bcc4174e3bd605a3d4002dab7 SHA512 2e1c483dae85b84bb15950bb06e765ab47ec10785d1fe9b06dce0310dfd3d194b4690ed19e4b16c79a21c8fd1a701895a21af0ceb3422ceee84498d16d984715 WHIRLPOOL bd86e3ba1df1a73efdcd746e50f941620c0d16595901f8336f5180d1030cd8103c52d2f8c9f550984591ab9f439484ffa73b58fdd30de442ee08a0371119f458
+DIST otp_doc_man_17.5.tar.gz 1363320 SHA256 85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3 SHA512 98d241aa127cfe377e5efc52284cd324713cacefc96db5992275c4f8712a9e35e43f0dbc0d2a8d58a1127fbfa3f762eb001aea1bb1c9fa82205a3d83659ad548 WHIRLPOOL b790046a449824aa02e11bef6b84a7027351edba0fffd241221e690739df30c9c692074b7354612970d8d02b3c1bccfdbd81bb988af9874d181f177ffed49e2c
+DIST otp_doc_man_18.0.tar.gz 1389178 SHA256 e44f0ec36ee0683867bc2aa9cc7fbb020d9dfd57338f37b98dcd0771f5b95673 SHA512 d3e757b15ee03b4fd89b21a456b89c847a60f4715fb8257c4d3d4f431798cb8d1ae30978608bc85db7f0e25d51072a2d32927745ff410956dca11a01ae4fa034 WHIRLPOOL 83fc8d483a5385b053f5c24e51f35d448dd5ab8e4228500a858422192da17078dbd0f776cbea6d2f77a483c97397cb7e80b5bb5184157611c49743d05fd542bd
+DIST otp_doc_man_R15B03-1.tar.gz 1305001 SHA256 07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8 SHA512 eb07552c83a942c1e7f1960b45edfab97b0628a1e08c7c827a07d77797901b4b60a6719b35d0f92a49eb04ada924e9263df70968a5920efc6ccf8e4e966933c6 WHIRLPOOL 764495a8bb67e2c67493452c83ff890d959aa5cd3bd711fce75b3c756dbacb913e50f7d92aab14dc33d6839daaac5a37dc7bcc11fc6392af11dd506a8d99076c
+DIST otp_src_17.3.tar.gz 67050599 SHA256 d4be03eb346016f4ca95d53eb9437ffaa6106762f153620dd98cd7f7733b76e4 SHA512 89d005fc3fdb4dc76c191b6e6a35e03f66ce01d765ba4f58cdd812d358025c62e032443d7ae73fea5b06bf6f27c9bf4e786f8090627ecb1e1309b88b82892910 WHIRLPOOL ef73ea10df2126c129ddb85c0a2bd72c6a7885b200b4d584577beab7c90b84f81647e017f2814dc4406427d4b22f48626db983636bcd5a8648f861484bfe6eff
+DIST otp_src_17.5.tar.gz 67242289 SHA256 3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474 SHA512 cfd082c8baee7ded370a34f15a1ba3b846b7d81e06edc36c62308c9220697925f1feda91eeecb70fc658f8987087256f51a2ebd0c526d16eeb09c72889d2390d WHIRLPOOL 3c3d987981383bf148b9788fae0574da398ff63d81eea13da0463bed303922d06fe54354de1cd3d37091eb23438939c645176ab565877f06cc1f11235c4d8d3d
+DIST otp_src_18.0.tar.gz 68124710 SHA256 a0b69da34b4f218eb7d63d9e96fc120aa7257bb6c37a0f40fb388e188b4111aa SHA512 84ec2a3834270c1babe153572d6187faa36c12128e604037d55be01719788c0dd79d46769ea7090d530b746206a25fe02346b02849abee10ee41ed4ac7567c02 WHIRLPOOL 7edc237ef906da5e086bcb7b37fe23da3293b3635f612adc9239736e17731270bf64624444c5556d9fd7a03e4e64678a3bd294d04be2aada2a88d897dad9bee0
+DIST otp_src_R15B03-1.tar.gz 76123810 SHA256 4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c SHA512 baa8f388bd56bbdf1d3818802d011970fb51d38d14434532b1e4f04c1b8203e5a0cd9cc870f93a993cce750cd1af6e4b7df40dffc44e455353bce9d7c46c8e34 WHIRLPOOL ce76d01dfd17e0bc70e3daa7eab218000d1e802f55b0892e2e9654d2ea262f214f3bd006c0988885e787a1cfe782e8b61d5d1ee3a1d05cbced465b5a28e2de2e
diff --git a/dev-lang/erlang/erlang-15.2.3.1.ebuild b/dev-lang/erlang/erlang-15.2.3.1.ebuild
new file mode 100644
index 00000000000..b5476abf4a6
--- /dev/null
+++ b/dev-lang/erlang/erlang-15.2.3.1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+WX_GTK_VER="2.8"
+
+inherit elisp-common eutils java-pkg-opt-2 multilib versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+# erlang uses a really weird versioning scheme which caused quite a few problems
+# already. Thus we do a slight modification converting all letters to digits to
+# make it more sane (see e.g. #26420)
+
+# the next line selects the right source.
+ERL_VER=($(get_version_components))
+MY_PV="R$(get_major_version)B0${ERL_VER[2]}"
+
+# ATTN!! Take care when processing the C, etc version!
+MY_P=otp_src_${MY_PV}
+
+DESCRIPTION="Erlang programming language, runtime environment, and large collection of libraries"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="http://www.erlang.org/download/${MY_P}-${ERL_VER[3]}.tar.gz
+ http://erlang.org/download/otp_doc_man_${MY_PV}-${ERL_VER[3]}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${MY_PV}-${ERL_VER[3]}.tar.gz )"
+
+LICENSE="ErlPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread doc emacs halfword hipe java kpoll odbc smp sctp ssl tk wxwidgets"
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ ssl? ( >=dev-libs/openssl-0.9.7d )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2 )
+ odbc? ( dev-db/unixODBC )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/${MY_P}"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ if use halfword ; then
+ use amd64 || die "halfword support is limited to amd64"
+ fi
+}
+
+src_prepare() {
+ 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 || die
+
+ # 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 || die
+
+ 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 || die
+
+ # bug 383697
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c || die
+}
+
+src_configure() {
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ --enable-shared-zlib \ \
+ $(use_enable sctp) \
+ $(use_enable halfword halfword-emulator) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit") \
+ || die
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake || die
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el || die
+ 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 || die
+ 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
+
+ ## Remove ${D} from the following files
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl" || die
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start" || die
+ grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g"
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"||die
+
+ 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 || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ elog
+ elog "If you need a symlink to one of Erlang's binaries,"
+ elog "please open a bug on http://bugs.gentoo.org/"
+ elog
+ elog "Gentoo's versioning scheme differs from the author's, so please refer to this version as ${MY_PV}"
+ elog
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/erlang-17.3.ebuild b/dev-lang/erlang/erlang-17.3.ebuild
new file mode 100644
index 00000000000..0d9af90b383
--- /dev/null
+++ b/dev-lang/erlang/erlang-17.3.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+WX_GTK_VER="2.8"
+
+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 large collection of libraries"
+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="ErlPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread doc emacs halfword hipe java kpoll odbc smp sctp ssl systemd tk wxwidgets"
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ ssl? ( >=dev-libs/openssl-0.9.7d )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2 )
+ odbc? ( dev-db/unixODBC )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ if use halfword ; then
+ use amd64 || die "halfword support is limited to amd64"
+ fi
+}
+
+src_prepare() {
+ 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 && eautoreconf
+}
+
+src_configure() {
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable halfword halfword-emulator) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit")
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Remove ${D} from the following files
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl"
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start"
+ grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g"
+
+ ## 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-17.5.ebuild b/dev-lang/erlang/erlang-17.5.ebuild
new file mode 100644
index 00000000000..069811e4666
--- /dev/null
+++ b/dev-lang/erlang/erlang-17.5.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+WX_GTK_VER="2.8"
+
+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 large collection of libraries"
+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="ErlPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~ia64 ppc ~ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread doc emacs halfword hipe java kpoll odbc smp sctp ssl systemd tk wxwidgets"
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ ssl? ( >=dev-libs/openssl-0.9.7d )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2 )
+ odbc? ( dev-db/unixODBC )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ if use halfword ; then
+ use amd64 || die "halfword support is limited to amd64"
+ fi
+}
+
+src_prepare() {
+ 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 && eautoreconf
+}
+
+src_configure() {
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable halfword halfword-emulator) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit")
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Remove ${D} from the following files
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl"
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start"
+ grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g"
+
+ ## 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-18.0.ebuild b/dev-lang/erlang/erlang-18.0.ebuild
new file mode 100644
index 00000000000..547d0a5aa6d
--- /dev/null
+++ b/dev-lang/erlang/erlang-18.0.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+WX_GTK_VER="2.8"
+
+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 large collection of libraries"
+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="ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread doc emacs halfword hipe java kpoll odbc smp sctp ssl systemd tk wxwidgets"
+
+RDEPEND="ssl? ( >=dev-libs/openssl-0.9.7d )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2 )
+ odbc? ( dev-db/unixODBC )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:2.8[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ if use halfword ; then
+ use amd64 || die "halfword support is limited to amd64"
+ fi
+}
+
+src_prepare() {
+ 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 && eautoreconf
+}
+
+src_configure() {
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable halfword halfword-emulator) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit")
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Remove ${D} from the following files
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/erl"
+ sed -e "s:${D}::g" -i "${ED}${ERL_LIBDIR}/bin/start"
+ grep -rle "${D}" "${ED}/${ERL_LIBDIR}/erts-${ERL_ERTS_VER}" | xargs sed -i -e "s:${D}::g"
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"
+
+ for i in "${WORKDIR}"/man/man* ; do
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
+ done
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do
+ # doman sucks so we can't use it
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
+ done
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ dodir /etc/env.d/
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
+
+ if use doc ; then
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
+ fi
+
+ if use emacs ; then
+ pushd "${S}"
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
+ elisp-site-file-install "${T}"/${SITEFILE}
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/files/16.2-tinfo.patch b/dev-lang/erlang/files/16.2-tinfo.patch
new file mode 100644
index 00000000000..f51ba582d8c
--- /dev/null
+++ b/dev-lang/erlang/files/16.2-tinfo.patch
@@ -0,0 +1,11 @@
+--- erts/configure.in.bak 2013-11-04 14:47:47.838188678 +0100
++++ erts/configure.in 2013-11-04 14:46:54.352439671 +0100
+@@ -1322,7 +1322,7 @@
+ if test "x$with_termcap" != "xno" &&
+ test "X$host" != "Xwin32"; then
+ # try these libs
+- termcap_libs="ncurses curses termcap termlib"
++ termcap_libs="tinfo ncurses curses termcap termlib"
+
+ for termcap_lib in $termcap_libs; do
+ AC_CHECK_LIB($termcap_lib, tgetent, TERMCAP_LIB="-l$termcap_lib")
diff --git a/dev-lang/erlang/files/17.0-systemd.patch b/dev-lang/erlang/files/17.0-systemd.patch
new file mode 100644
index 00000000000..2dba8c897fe
--- /dev/null
+++ b/dev-lang/erlang/files/17.0-systemd.patch
@@ -0,0 +1,85 @@
+--- erts/configure.in 2014-05-08 10:07:18.691087332 +0200
++++ erts/configure.in 2014-05-08 10:12:56.579375822 +0200
+@@ -366,6 +366,11 @@
+ $with_assumed_cache_line_size,
+ [Assumed cache-line size (in bytes)])
+
++AC_ARG_ENABLE(systemd,
++AS_HELP_STRING([--enable-systemd], [enable systemd support in epmd]),
++[],
++[enable_systemd=no])
++
+ dnl Magic test for clearcase.
+ OTP_RELEASE=
+ if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then
+@@ -1042,8 +1047,6 @@
+ AC_CHECK_LIB(inet, main)
+ AC_CHECK_LIB(util, openpty)
+
+-AC_CHECK_LIB(systemd-daemon, sd_listen_fds)
+-
+ dnl Try to find a thread library.
+ dnl
+ dnl ETHR_LIB_NAME, ETHR_LIBS, ETHR_X_LIBS, ETHR_THR_LIB_BASE and ETHR_DEFS
+@@ -1679,7 +1682,29 @@
+ #endif
+ ])
+
+-AC_CHECK_HEADERS(systemd/sd-daemon.h)
++dnl ----------------------------------------------------------------------
++dnl Check the availability of systemd
++dnl ----------------------------------------------------------------------
++if test x"$enable_systemd" != x"no"; then
++
++systemd_daemon_save_LIBS=$LIBS
++LIBS=
++AC_SEARCH_LIBS(sd_listen_fds,[systemd systemd-daemon],
++ [have_sd_listen_fds=yes],[have_sd_listen_fds=no],$systemd_daemon_save_LIBS)
++AC_CHECK_HEADERS(systemd/sd-daemon.h,
++ [have_systemd_sd_daemon_h=yes],[have_systemd_sd_daemon_h=no])
++
++if test x"$have_sd_listen_fds" = x"yes" && \
++ test x"$have_systemd_sd_daemon_h" = x"yes"; then
++ AC_DEFINE([HAVE_SYSTEMD_DAEMON],[1],[Define if you have systemd daemon])
++ SYSTEMD_DAEMON_LIBS=$LIBS
++elif test x"$enable_systemd" = x"yes"; then
++ AC_MSG_FAILURE([--enable-systemd was given, but test for systemd failed])
++fi
++LIBS=$systemd_daemon_save_LIBS
++fi
++AC_SUBST(SYSTEMD_DAEMON_LIBS)
++
+
+ dnl ----------------------------------------------------------------------
+ dnl Check the availability for libdlpi
+--- erts/epmd/src/Makefile.in 2014-05-08 10:07:58.344182314 +0200
++++ erts/epmd/src/Makefile.in 2014-05-08 10:12:56.580375784 +0200
+@@ -84,7 +84,7 @@
+ ifeq ($(findstring ose,$(TARGET)),ose)
+ LIBS = $(ERTS_INTERNAL_LIBS) @LIBS@
+ else
+-LIBS = @LIBS@ $(ERTS_INTERNAL_LIBS)
++LIBS = @LIBS@ @SYSTEMD_DAEMON_LIBS@ $(ERTS_INTERNAL_LIBS)
+ endif
+ LDFLAGS = @LDFLAGS@
+
+--- erts/epmd/src/epmd_srv.c 2014-05-08 10:07:49.137392770 +0200
++++ erts/epmd/src/epmd_srv.c 2014-05-08 10:12:39.777759407 +0200
+@@ -213,7 +213,7 @@
+ node_init(g);
+ g->conn = conn_init(g);
+
+-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
++#ifdef HAVE_SYSTEMD_DAEMON
+ if (g->is_systemd)
+ {
+ int n;
+@@ -310,7 +310,7 @@
+ SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport);
+ num_sockets = 1;
+ }
+-#ifdef HAVE_SYSTEMD_SD_DAEMON_H
++#ifdef HAVE_SYSTEMD_DAEMON
+ }
+ #endif
+
diff --git a/dev-lang/erlang/files/50erlang-gentoo.el b/dev-lang/erlang/files/50erlang-gentoo.el
new file mode 100644
index 00000000000..db1ae7636f1
--- /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 00000000000..8bcc2d9675d
--- /dev/null
+++ b/dev-lang/erlang/files/epmd.init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the Erlang Public License 1.1
+# $Id$
+
+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 00000000000..57382ff36a4
--- /dev/null
+++ b/dev-lang/erlang/files/epmd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Erlang Portmapper Daemon
+Wants=network.target
+
+[Service]
+ExecStart=/usr/bin/epmd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-lang/erlang/metadata.xml b/dev-lang/erlang/metadata.xml
new file mode 100644
index 00000000000..b78c5d38c90
--- /dev/null
+++ b/dev-lang/erlang/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>lang-misc</herd>
+<maintainer>
+<email>djc@gentoo.org</email>
+<name>Dirkjan Ochtman</name>
+</maintainer>
+ <use>
+ <flag name="hipe">HIgh Performance Erlang extension</flag>
+ <flag name="halfword">Enable halfword emulator</flag>
+ <flag name="kpoll">Enable kernel polling support</flag>
+ <flag name="sctp">Support for Stream Control Transmission Protocol</flag>
+ <flag name="compat-ethread">Enable compatibility with pre-pentium 4 CPUs in the ethread library.</flag>
+ </use>
+<longdescription>
+Erlang is a programming language designed at the Ericsson
+Computer Science Laboratory. Open-source Erlang is being
+released to help encourage the spread of Erlang outside
+Ericsson.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/esco/Manifest b/dev-lang/esco/Manifest
new file mode 100644
index 00000000000..b36d0e17720
--- /dev/null
+++ b/dev-lang/esco/Manifest
@@ -0,0 +1 @@
+DIST esco-src-0.512.tar.gz 382056 SHA256 646e88b3ff16346e41061c6cd33c37cb5e2e7d3b2b2b8604f6931fe1723935d1 SHA512 4d02af7097abbd6770a891065ea9d7d3f9acdd9c7c9164f726dba2385db48993e7fe9baa4fc57aac2d998544788416700933d473f1e9467c9f94e240f80ccf97 WHIRLPOOL 91cfdfe44756bf3b5328b8dc42d746dc33487c3565f6e172396d27e9ea5377f6e4f8fb2b6e8b28d89da8343fd437c39174c7d92daeb0157c815da64e101042c7
diff --git a/dev-lang/esco/esco-0.512.ebuild b/dev-lang/esco/esco-0.512.ebuild
new file mode 100644
index 00000000000..2e7858ef662
--- /dev/null
+++ b/dev-lang/esco/esco-0.512.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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 linguas_ru"
+
+DEPEND="gmp? ( dev-libs/gmp )"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog README TODO docs/basics.txt )
+
+src_configure() {
+ econf $(use_with gmp)
+}
+
+src_install() {
+ default
+ use linguas_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 00000000000..852bb704e58
--- /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>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">esco</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/execline/Manifest b/dev-lang/execline/Manifest
new file mode 100644
index 00000000000..d0ed12e70c3
--- /dev/null
+++ b/dev-lang/execline/Manifest
@@ -0,0 +1 @@
+DIST execline-2.1.1.0.tar.gz 75967 SHA256 9e1a9b95772b64bd623c1ddea6200909cca0eb659893ac47857848928eaff7dc SHA512 250fe449b39a198193f1431b249b342f3c6c499fea12779a55d0e27aec2095285bbf9dc2a48d84eebdf9f540ecf5e67ef39393243ca0fadfc764d2cc95ac0b6b WHIRLPOOL ce92f6d7786e5f1efcfb5298b1fa8a561957c6b9f542ace49b815e69f98da4f88adcd339f7210d61d7ae1298573cd9bc31c22c6f7b3c8ac30f44986c88241f32
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 00000000000..d6208474946
--- /dev/null
+++ b/dev-lang/execline/execline-2.1.1.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2013-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/metadata.xml b/dev-lang/execline/metadata.xml
new file mode 100644
index 00000000000..8004498b8ba
--- /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>
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ Execline is a non-interactive scripting language similar to sh.
+ According to the home page, the syntax is far mor logical and
+ predictable than sh, and has no security issues.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/f2c/Manifest b/dev-lang/f2c/Manifest
new file mode 100644
index 00000000000..38008a9806c
--- /dev/null
+++ b/dev-lang/f2c/Manifest
@@ -0,0 +1,3 @@
+DIST f2c-20060507.tar.bz2 186677 SHA256 5d1f7579139bc474bdc5455a0d1726cab30f09f2c13c9110bdf3813066b10e2a SHA512 d0c9019b65a8ad2fd769ada596646a1cd9b682dcc8afa2cd99081376d967fbe959186a38d74570ab4bcce7622c58c8c10042948fa56e0a7080b12111c2b99b1e WHIRLPOOL a88b3e4aec80a064168ac640b6370fa5afc3d1584d6507abf53aefc471ef438aa4fded4e0cbe30d64c68324c93e97ec1f10097851f4850c55a3266bdd3ee34fc
+DIST f2c_20100827-1.debian.tar.gz 15659 SHA256 1597878d24b4261094f67853b681db1be53dce5a320052d52e5203de765bd2dd SHA512 784d3f1a74311a933b54103d36dd18eb879bef1816ea82e8d93ef5a0eb7582d4ddde3a2b764d15b78194bab4cdf940480089e8b920002134af66cdf095708535 WHIRLPOOL e71139315c318c160bddd2c76486d88b0429a7e8b8f67dd2e9d6f259e2b83ce6351a95b683d7caa95d31ca64c8421d07ff90d69ec7f974d62013653f8c6beb09
+DIST f2c_20100827.orig.tar.gz 417930 SHA256 d3d1bbf814e3f6d7adf4fb86d092997dbb4994899e85b9f436920b79f0ea55b9 SHA512 2c28d8c06e53b569816e7982725133d46e9b145a84ec51771f4cca2409098f894648ebe5b8089a1ddd8468be62394b0edb5985e50baeea8129e4f507236d6c0d WHIRLPOOL c19022a3b9d269d69e3e4f507a6675f632fc2ef29da825099083aaa71f6b547a61f1ff229c1ecf5b201a98d697f8226719a305c0bdb3684db10e19b3e8c6339d
diff --git a/dev-lang/f2c/f2c-20060507.ebuild b/dev-lang/f2c/f2c-20060507.ebuild
new file mode 100644
index 00000000000..09be3136a74
--- /dev/null
+++ b/dev-lang/f2c/f2c-20060507.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..107d53bd289
--- /dev/null
+++ b/dev-lang/f2c/f2c-20100827.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..adca89fcd3f
--- /dev/null
+++ b/dev-lang/f2c/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <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/falcon/Manifest b/dev-lang/falcon/Manifest
new file mode 100644
index 00000000000..e76bd45cf2d
--- /dev/null
+++ b/dev-lang/falcon/Manifest
@@ -0,0 +1 @@
+DIST Falcon-0.9.6.4.tar.gz 1782796 SHA256 24f4294f93c192f21d3590795a9fdd864c3f2d376cb0baac9c1e11e893cfaf81 SHA512 244fc0cc6811d9c918a1983d93e380982584016d84752b00d3adc17e46d7a7cbf9d20f09b7562316b1c9ea6eaaa91c1cb931f4469f7d510d9084f1daaca732a5 WHIRLPOOL 2178d6307fcd516f490fada540af649a60ca39f8640215b926f153316ab349ed9b46e47c7849270a20632e9639ca65d635f88ed4d0a2fccf718967ce83106a8b
diff --git a/dev-lang/falcon/falcon-0.9.6.4.ebuild b/dev-lang/falcon/falcon-0.9.6.4.ebuild
new file mode 100644
index 00000000000..89e124c350e
--- /dev/null
+++ b/dev-lang/falcon/falcon-0.9.6.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit cmake-utils multilib
+
+MY_P=${P/f/F}
+
+DESCRIPTION="An open source general purpose untyped language written in C++"
+HOMEPAGE="http://falconpl.org/"
+SRC_URI="http://falconpl.org/project_dl/_official_rel/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug readline"
+
+DEPEND="
+ dev-libs/libpcre
+ sys-libs/zlib
+ readline? ( sys-libs/readline )
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="AUTHORS ChangeLog README RELNOTES"
+
+src_configure() {
+ mycmakeargs=(
+ -DFALCON_DISABLE_RPATH=ON
+ -DFALCON_LIB_DIR=$(get_libdir)
+ -DFALCON_SKIP_BISON=ON
+ -DFALCON_WITH_MANPAGES=ON
+ -DFALCON_WITH_INTERNAL_PCRE=OFF
+ -DFALCON_WITH_INTERNAL_ZLIB=OFF
+ -DFALCON_WITH_GPL_READLINE=ON
+ $(cmake-utils_use readline FALCON_WITH_EDITLINE)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ FALCON_LOAD_PATH=".;${CMAKE_BUILD_DIR}/core/clt"
+ for testsuite in "${S}/core/tests/testsuite" "${S}/modules/feathers/tests/testsuite"; do
+ "${CMAKE_BUILD_DIR}/core/clt/faltest/faltest" \
+ -d "${testsuite}" || die "faltest in ${testsuite} failed"
+ done
+}
diff --git a/dev-lang/falcon/metadata.xml b/dev-lang/falcon/metadata.xml
new file mode 100644
index 00000000000..6318a491915
--- /dev/null
+++ b/dev-lang/falcon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>lang-misc</herd>
+</pkgmetadata>
diff --git a/dev-lang/ferite/Manifest b/dev-lang/ferite/Manifest
new file mode 100644
index 00000000000..f5d5339288d
--- /dev/null
+++ b/dev-lang/ferite/Manifest
@@ -0,0 +1 @@
+DIST ferite-1.1.17.tar.gz 2174774 SHA256 d407f3db45482e17f41820fb029cf8b06e6104699b8d7340f3946f57d3f4e690 SHA512 475983b865fba492661e59b7470b7e46889f29ed8ba829b112354963fafcbed6ab4d4677579337c1c4ed730c6fe02897743f56edae335ceda6277da975d1098f WHIRLPOOL d563849e7b1ebe19657f319ecf970ad4987d10c28c29729da2868b10b7466159f5210e8bb7c065b8fccb7314ebc764dc8dbe97484c138c70ec066ecd12ebb005
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 00000000000..1bd7daee9cc
--- /dev/null
+++ b/dev-lang/ferite/ferite-1.1.17-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 || die
+
+ # 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 00000000000..1e2e19ce481
--- /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 00000000000..c5d9211b3c1
--- /dev/null
+++ b/dev-lang/ferite/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ferite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/fpc/Manifest b/dev-lang/fpc/Manifest
new file mode 100644
index 00000000000..c99167a7d14
--- /dev/null
+++ b/dev-lang/fpc/Manifest
@@ -0,0 +1,18 @@
+DIST fpc-2.6.2-doc-html.tar.gz 4716648 SHA256 2f30db4ad0687cfeb990bff1933aea6c644c8c49460051bafb1645863fd14005 SHA512 abefed1ac92e49d3ef18599c6d0e44c6963bda214a599f2d9c1df64c88f3bd43fc31baf1b7a032b626f4caedca225b55f99a06f1828b2da143cd07d8cd242999 WHIRLPOOL 4f4b13eb5e55aaf271be9ee93ec7ec425169940cd85d65b796c63e0b09b111ec381ae9274dcd8b671e9ff0b81f6b2abebbc99628e6791aa1682feb11d9aadf89
+DIST fpc-2.6.2-fpctoc.htx.bz2 124078 SHA256 de9b948c4d3d3f41f7a4c1eb1d0a022d6a0cd2cd3860d738dc8c0183c3207e78 SHA512 98f53ec7a2ddd6403696c5b0feb8c05797b1c267593adce0e3a50132238c0b5abd2f00886f0e68f73b449e0376ef7ebbf666ba3eb9362cffbb1f0fffd6886591 WHIRLPOOL 3dc2d0d633962635a9fa74e5c6f984d658ae5a7c5254b1ff0317d94820525262d3f741dec05a8af35844e2471cfa4939bed98a7fa3fb492cb9075fb6ebbbdf50
+DIST fpc-2.6.2.arm-linux.tar 32501760 SHA256 c961ea868ac2c7ea9a724a8ed5f5d4c3965e0ada61e97735e75252a50067e68e SHA512 c7f5a5b1938608cf3195549a3272c0932c08ee6601ffc516bab2cd7efd52145fbd6e03ad6664d1c876de02e89de63674cdc064dc23d228b73a621a5cd1e23220 WHIRLPOOL b0c8eacdac44615891a1fed574098a95e8616caaad4472c933b44e054d6f2237c79f66cc7e6a8f17d1d263d762ba723b94f41652b0ec0aaa0abaf9ae828dbeec
+DIST fpc-2.6.2.i386-linux.tar 45905920 SHA256 d625a3dfdb248d1975a580ee01c43db3bfe05610248b2196bafddbb74579eac9 SHA512 741b01821cbc4eb1e2602bd69ccce58fac48640e06868ba29896a24376f77afe07a27ebd26a7936cc4bb813685b7151e7d64806ebe1bfce8988254a921015280 WHIRLPOOL 88ab9381c1f84f511770602f00148418e71daf6d107fbd6f341b61981809987b710f70761e0e840b40811b487389072ba53f3493f1fae7844afafd674c5b000a
+DIST fpc-2.6.2.powerpc-linux.tar 44462080 SHA256 c2e7847c0a6d41820e3eb2da50122ac8fe5eade02157551f5857933d5a4e13c6 SHA512 a0894e56143115e35a00da48eb7cb11d90907b4474065b5092d2084cf5733c8d0ece74ec90f654dcf8b92e0cf016a7f5c6f48c8d02a2f85950f37a609583966a WHIRLPOOL db7b91f267d1321a49743ce682b4ed4f42699cb4b85bb15a3efbd1447e00e70fac1157ff21756bdf547528a6055221cf2296941efdb8bbdee6db6905730fcdc2
+DIST fpc-2.6.2.powerpc64-linux.tar 49336320 SHA256 b4870ad23405324dd3549f03fe6d8662b9dff17eafe681046b28d63be542989e SHA512 e5a8e75302b6281ac14a1b299ee208ffa3f447e87ed3e74113f82b0e99175ebc71a4431bcef26a0fb99ca8566748c743dc69f8d7bc756889f17a7b1e1cfd267b WHIRLPOOL b4725180d5de66ccb64408552a3449a88c7a6ba47213e81411dcef4a1fc14f756d4e73ec6f10082d7572183229fd1da3f7e802b3681cfa2f1b3280ee7c914bcc
+DIST fpc-2.6.2.sparc-linux.tar 33843200 SHA256 3a1918c7076e4984f8c085d0dde672907f730940214c5abca2d9513051d1cd79 SHA512 9f6ba30680bd51ccb6b627935ce2cc10dfa8671f621d5ef7d7e047b036c48934829e165c3f9bbac61bbccda8b679ee132fc26e41c4f9b66cf30966481eb81f09 WHIRLPOOL c754e925761d99bc0ad5185d19ee2f0db83a5c5bafca26051efccfeef4db5f3f29464542127d27b950a0cef6463f5333eec7dea260fd386fab74ec5ef26facf6
+DIST fpc-2.6.2.x86_64-linux.tar 48332800 SHA256 e05aed29318c250ce3c494c3938c905c7853620da8cbc4d66ba584160690e558 SHA512 3ac22bff975197b3ecc40bd76bb66093f71253290d6eb095e1bf014cb1cdf0354cf05212516bca008d9b525f906c173c1bf2067eda9015cb3db64a42b576a512 WHIRLPOOL b52d8ba4b97c83bba051a771d1b952839440828bfabd18004ca9b03ba3f1f3763b73396940c965aeeb4944ef05f7f968658629214c0ab777b9b3841286d7d40a
+DIST fpc-2.6.4-doc-html.tar.gz 4864530 SHA256 bdfa09ff5d362bc39262fa33f8f4365a4767871df17095b3cbf83582c60d0e3b SHA512 c76b15c3c9c47d687bb4760753f605a169c7e76b8b8478dc4e557d0a172f9e7ce7abb24fc1512f7eaa305807a1f4cb0a1305bb02e983f932b02aa9683026e54d WHIRLPOOL a24a99cc5a0450f377a3235b5d9d697a431e93a9825263869ee5d861dd91a3f3f18ca899beec01a8180e60da24769fb2e85c52c8be307e8fd5497dc3fc01aac9
+DIST fpc-2.6.4-fpctoc.htx.bz2 125626 SHA256 2718b88921370cadee365849224b0edbb3a2a0d4e3f2c9767f4631d246ce5050 SHA512 12fdc2755adfabbda74257b058e00072e5e11925b8e62cf7959b2acab90b3e226b8f51544a127f88fc3cd473ba9794e6c9da4e73c04ced2a0d41994b520cd33d WHIRLPOOL 73279b563c683fdb8c25546b9c3f8438a464ca6499f38e30bab2ab452c943802035753bd8c442fd17f12b02cffe79d29c2d242b38d37ab33e46553376a791331
+DIST fpc-2.6.4.arm-linux.tar 38440960 SHA256 cf0aa330a60327865125e74063ef9e62648f26ce8431fba548204e94c9da3fdc SHA512 3a11ebed39f37021201cac8a7e435d7ef3b1110d6893de7faf33651ff9b5a9aa13b6b529b0011132850386048483a55754ed8b1dba7de2e7ba9b2e881e7f0203 WHIRLPOOL 67e19376a6d5a1a5d374397e2af4d311cde5e2a06e9de31302a5c0f87ae9647c1510ab73216b4e9ab2cab0fd93050662154254cf89cc6a5c365dfad45a67ba04
+DIST fpc-2.6.4.i386-linux.tar 47718400 SHA256 3ca6271d18f9b4f48b4bd6e9500045cd18964aea62abede9cf9f130f3c72e602 SHA512 2c1c33c80553d8a331f4fb35e1b136ab195de9fa03ab566b218a265a64cc75447a697a34472fa9cceeedf1e3acd664fada2cd36d60b319ea43eed7e1f9e57615 WHIRLPOOL 4f2fa5b569907dcec030e4501670b7b2d4b13da429c9ef0900de64cda95820d05a03b290b4487ee86751264647d4218fa3d583f1054f8fb7fc9f39993c740ddb
+DIST fpc-2.6.4.powerpc-linux.tar 48220160 SHA256 c1af7e353b7ac40fdd542fbcb6fbfb0cc8f8c68bc0c89e14d3aeeac4c86ed752 SHA512 a78b416a6dd59a10ad50c3549956f15fae5962b64d43be1f1d605befd035732cf860146970dcb410080f9ceb2af1a4f798434fceb11be550cb87d41c72be1810 WHIRLPOOL 4a1d285c682b31f8cdd4cd6c317bd3ad26f88894117c9de71bb982e7ba6aab5fe21075687d4b141d01ef0362c00ea7b3b665d2fd2913e5bafdb6331f049588c3
+DIST fpc-2.6.4.powerpc64-linux.tar 53975040 SHA256 20a0b4ef0810afe826c4dbf7003f72f5968c3b7caa581e3202f29e38c075fa29 SHA512 0e978f68e339f12e2c53c8641c4f0918604b6b970949159dd20c49d65dabb5253d338d180da144eea3c6102a0110c401d03efbd634885220a320fce5fc686b16 WHIRLPOOL 65c3c496a32f86372db1eb7dc81dd413b0c813313fc6acf3d09c90d37c7c923b4c03420c9043b25dc054072bcbec4b8cb1255bd2e95ad1b966001d09d7031982
+DIST fpc-2.6.4.source.tar.gz 29904088 SHA256 c16f2e6e0274c7afc0f1d2dded22d0fec98fe329b1d5b2f011af1655f3a1cc29 SHA512 653968786b40c69c3703f67cddfe7c501686cc8b3524a045498c247dc36b66a6619e9cdb5bb5ca002fb700ddc0b653f2a4298e92527df46fc09c8a69e8e9c3a5 WHIRLPOOL 73fa37e002c1674dee097955b6e199df4bd2a25e0149121810593378b9083660bf1e3eda7398b07d9e97a5a6bdbffe41018d2e40d4b86915076f097422dae417
+DIST fpc-2.6.4.x86_64-linux.tar 50350080 SHA256 196c386f927d772c447fb4c84f61b29133891d14261f0ed3aa773c2f9dda3b39 SHA512 3a993d1f978353a1d68d8ce2cd62748a875b0d0589ed8daf71ebba545b51879b09173e26245e02ac327b5d64932153a7695975c02f3f266642b4ef68e8ff48dc WHIRLPOOL eba5dde2fa6614ebc1e3969a7a8524c779cdb7a3ebdb8855872669387488d5606f0c482cc8e9f8ac9db33203edbb5e0fc01c26c61d3179cd67479167705ecc2a
+DIST fpcbuild-2.6.2.tar.gz 55198144 SHA256 75ad700ccc772b07304c286b0aae95f48a504b15fe890a36361d17dc8e92d83c SHA512 ecc28e8c63fd6bdd6a1b02b0aca4b7ac861bd4c0e815146ab34181fff63f3f60102c227e17317efdc30d6e97b6003b708ed9853f1d21f9e5faabcc89c85a91fe WHIRLPOOL 8614adf51cb71072dc1a4ed9b79acb1943b58decfcadbefd260dfbf20b07f9cba1b5c91c3b57ea78cf89ceb4de102e7cc4d0d93c54e7101bbfa3151b80c0af26
+DIST fpcbuild-2.6.4.tar.gz 55604643 SHA256 8d9c3bcfa469d9b37c05663e2775d179809e4b3443604fac7d21aa64c9a56daa SHA512 7c48fb48a3742ffe533a8a172758071c0a1129ffac09231e6969aa1d31bac346dc764598b6ae78dc9d25585a788f6ed4f2b4c39502774d4d3620f09185b807de WHIRLPOOL d2cb72917031f6ffaeb66c2e1e4f0bc18050da2437241da9e6655af4f62aa3e05c7f7c89ba88ba3f96ee20571c3e0d733bebab7a9c2e3f04aa2f0208bb1dc7f9
diff --git a/dev-lang/fpc/fpc-2.6.2.ebuild b/dev-lang/fpc/fpc-2.6.2.ebuild
new file mode 100644
index 00000000000..aece8d6df85
--- /dev/null
+++ b/dev-lang/fpc/fpc-2.6.2.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+HOMEPAGE="http://www.freepascal.org/"
+DESCRIPTION="Free Pascal Compiler"
+SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.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/${P}.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
+ http://dev.gentoo.org/~radhermit/distfiles/${P}-fpctoc.htx.bz2 )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ arm) FPC_ARCH="arm" PV_BIN=${PV} ;;
+ ppc) FPC_ARCH="powerpc" PV_BIN=${PV} ;;
+ ppc64) FPC_ARCH="powerpc64" PV_BIN=${PV} ;;
+ sparc) FPC_ARCH="sparc" PV_BIN=${PV} ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${P}.${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-2.6.4.ebuild b/dev-lang/fpc/fpc-2.6.4.ebuild
new file mode 100644
index 00000000000..2d8f16c8d7d
--- /dev/null
+++ b/dev-lang/fpc/fpc-2.6.4.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+HOMEPAGE="http://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
+ http://dev.gentoo.org/~radhermit/distfiles/${P}-fpctoc.htx.bz2 )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ arm) FPC_ARCH="arm" PV_BIN=${PV} ;;
+ ppc) FPC_ARCH="powerpc" PV_BIN=${PV} ;;
+ ppc64) FPC_ARCH="powerpc64" PV_BIN=${PV} ;;
+ sparc) FPC_ARCH="sparc" PV_BIN=2.6.2 ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
+ tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
+}
+
+src_prepare() {
+ find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die
+
+ # let the pkg manager compress man files
+ sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
+}
+
+set_pp() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x64" ;;
+ arm) FPC_ARCH="arm" ;;
+ ppc) FPC_ARCH="ppc" ;;
+ ppc64) FPC_ARCH="ppc64" ;;
+ sparc) FPC_ARCH="sparc" ;;
+ x86) FPC_ARCH="386" ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ case ${1} in
+ bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
+ new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
+ *) die "set_pp: unknown argument: ${1}" ;;
+ esac
+}
+
+src_compile() {
+ local pp
+
+ # Using the bootstrap compiler.
+ set_pp bootstrap
+
+ emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)"
+
+ # Save new compiler from cleaning...
+ cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die
+
+ # ...rebuild with current version...
+ emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle
+
+ # ..and clean up afterwards
+ rm "${S}"/ppc${FPC_ARCH}.new || die
+
+ # Using the new compiler.
+ set_pp new
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 PP="${pp}" AS="$(tc-getAS)"
+ fi
+}
+
+src_install() {
+ local pp
+ set_pp new
+
+ set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/fpcmake" \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_DOCDIR="${D}"/usr/share/doc/${PF} \
+ INSTALL_MANDIR="${D}"/usr/share/man \
+ INSTALL_SOURCEDIR="${D}"/usr/lib/fpc/${PV}/source
+
+ emake -j1 "$@" compiler_install rtl_install packages_install utils_install
+
+ dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
+
+ cd "${S}"/../install/doc || die
+ emake -j1 "$@" installdoc
+
+ cd "${S}"/../install/man || die
+ emake -j1 "$@" installman
+
+ if use doc ; then
+ cd "${S}"/../../doc || die
+ dodoc -r *
+ newdoc "${WORKDIR}"/${P}-fpctoc.htx fpctoc.htx
+ docompress -x /usr/share/doc/${PF}/fpctoc.htx
+ fi
+
+ if use ide ; then
+ cd "${S}"/ide
+ emake -j1 "$@" install
+ fi
+
+ if use source ; then
+ cd "${S}" || die
+ shift
+ emake -j1 PP="${D}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall
+ find "${D}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
+ fi
+
+ "${D}"/usr/lib/fpc/${PV}/samplecfg "${D}"/usr/lib/fpc/${PV} "${D}"/etc || die
+
+ sed -i "s:${D}::g" "${D}"/etc/fpc.cfg || die
+
+ if use ide ; then
+ sed -e "s:${D}::g" \
+ -i "${D}"/etc/fppkg.cfg \
+ -i "${D}"/etc/fppkg/* \
+ -i "${D}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \
+ || die
+ fi
+
+ rm -r "${D}"/usr/lib/fpc/lexyacc || die
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then
+ einfo "To read the documentation in the fpc IDE, enable the doc USE flag"
+ einfo "and add /usr/share/doc/${PF}/fpctoc.htx to the Help Files list."
+ fi
+}
diff --git a/dev-lang/fpc/metadata.xml b/dev-lang/fpc/metadata.xml
new file mode 100644
index 00000000000..b2e0e1884e3
--- /dev/null
+++ b/dev-lang/fpc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>lang-misc</herd>
+ <use>
+ <flag name="ide">Build and install the Free Pascal Compiler IDE</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freepascal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/fsharp/Manifest b/dev-lang/fsharp/Manifest
new file mode 100644
index 00000000000..c06d4304080
--- /dev/null
+++ b/dev-lang/fsharp/Manifest
@@ -0,0 +1 @@
+DIST fsharp-3.1.1.31.tar.gz 31369171 SHA256 9b39c3f4625475c2553668ddbca337ec52fa3a637a05ae14a61a41abe39568b0 SHA512 fcbdad5780a5dd6ab55c380d70b8d0a38f25088e2bb49078468a2cd723b604a14bee6ba2d1005094b1f777a894208654b3f8d3876c5f72126ddc24f96e1eb049 WHIRLPOOL e9060e1e8ccfd3b0efcfeb1148cb5182390e738e8b462746e87d52acaacf5561b53cde50c920a1e4f6929ddf9f3ad0ca6a7d1e9eb8fd3b10af37a375675df019
diff --git a/dev-lang/fsharp/fsharp-3.1.1.31.ebuild b/dev-lang/fsharp/fsharp-3.1.1.31.ebuild
new file mode 100644
index 00000000000..ef9be8c1c83
--- /dev/null
+++ b/dev-lang/fsharp/fsharp-3.1.1.31.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils mono-env
+
+DESCRIPTION="The F# Compiler"
+HOMEPAGE="https://github.com/fsharp/fsharp"
+SRC_URI="https://github.com/fsharp/fsharp/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+MAKEOPTS+=" -j1" #nowarn
+DEPEND="dev-lang/mono"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_install() {
+ autotools-utils_src_install
+}
diff --git a/dev-lang/fsharp/metadata.xml b/dev-lang/fsharp/metadata.xml
new file mode 100644
index 00000000000..1740437050d
--- /dev/null
+++ b/dev-lang/fsharp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dotnet</herd>
+ <longdescription>
+ Mono/.NET open-source, strongly typed, multi-paradigm programming language encompassing functional, imperative and object-oriented programming techniques. Most often used as a cross-platform CLI language.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">fsharp/fsharp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
new file mode 100644
index 00000000000..4a390d7fcd9
--- /dev/null
+++ b/dev-lang/gdl/Manifest
@@ -0,0 +1,2 @@
+DIST gdl-0.9.4.tar.gz 2191342 SHA256 e18010cd874cad7b1fd8c752e9386571156e1fb066f2d27ecbcc15bbfc9514fa SHA512 46921eb3333a6b890187a6c75f71758e5e234b76d61a194e17de81ace10760659a4a676060490a5ef7374fd1acadf47c7f565133c19ea165e04c54a577b3c723 WHIRLPOOL a760fcf37e47235e3d21c8c852b65560894e29cfe3684bfee6e83f2d1d060dcaa41a2f9e60e41cbae55d9e5a2036518a5aad22cfd6f07b951a978e1ba2446eae
+DIST gdl-0.9.5.tar.gz 2341992 SHA256 cc9635e836b5ea456cad93f8a07d589aed8649668fbd14c4aad22091991137e2 SHA512 10f004956fedc1ae5a99a9398f82e64982267a59637fc8823591b9573df9ce136b303a0fcebd774475b9bea266a640e2b66cd590c85b57b6cf505f40448e0d3a WHIRLPOOL 6ef59fc574ce26e798d30e9b4fdec9f49b82933b500901c8013c60de884ed6601d99c58ecd17221191cea121914dffce4c59211ce86b2c43fb40d43ce7ce033b
diff --git a/dev-lang/gdl/files/0.9.2-antlr.patch b/dev-lang/gdl/files/0.9.2-antlr.patch
new file mode 100644
index 00000000000..9c8e6abb235
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-antlr.patch
@@ -0,0 +1,76 @@
+diff -Nur gdl-0.9.2.orig/CMakeLists.txt gdl-0.9.2/CMakeLists.txt
+--- gdl-0.9.2.orig/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt 2011-12-22 20:32:20.000000000 +0000
+@@ -94,6 +94,8 @@
+
+ set(GDL_DATA_DIR "/share/gnudatalanguage" CACHE PATH "Choose data install 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)
+@@ -143,9 +145,15 @@
+ # 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)
+
+ # Ncurses MANDATORY
+ # -DNCURSESDIR=DIR
+diff -Nur gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake gdl-0.9.2/CMakeModules/FindANTLR.cmake
+--- gdl-0.9.2.orig/CMakeModules/FindANTLR.cmake 1970-01-01 01:00:00.000000000 +0100
++++ gdl-0.9.2/CMakeModules/FindANTLR.cmake 2011-12-22 21:03:34.000000000 +0000
+@@ -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 -Nur gdl-0.9.2.orig/src/CMakeLists.txt gdl-0.9.2/src/CMakeLists.txt
+--- gdl-0.9.2.orig/src/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/src/CMakeLists.txt 2011-12-22 20:31:27.000000000 +0000
+@@ -224,9 +224,8 @@
+ widget.cpp
+ )
+
+-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
+@@ -237,8 +236,13 @@
+ 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(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
++endif(BUNDLED_ANTLR)
++
+ target_link_libraries(gdl ${LIBRARIES})
+ add_definitions(-DHAVE_CONFIG_H)
+
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 00000000000..49613da16e2
--- /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.2-proj4.patch b/dev-lang/gdl/files/0.9.2-proj4.patch
new file mode 100644
index 00000000000..594b6d5cbae
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-proj4.patch
@@ -0,0 +1,27 @@
+--- gdl-0.9.2.orig/CMakeLists.txt 2011-12-22 20:18:17.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt 2011-12-24 06:12:08.000000000 +0000
+@@ -412,17 +420,17 @@
+ find_package(Libproj4 QUIET)
+ if(LIBPROJ4_FOUND)
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBPROJ4_LIBRARIES} ${GSL_LIBRARIES} m)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4_NEW)
+- if(USE_LIBPROJ4_NEW)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
++ if(USE_LIBPROJ4)
+ set(USE_LIBPROJ4 1)
+- else(USE_LIBPROJ4_NEW)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4)
+- if(NOT USE_LIBPROJ4)
++ else(USE_LIBPROJ4)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
++ if(NOT USE_LIBPROJ4_NEW)
+ message(FATAL_ERROR "Libproj4 is required but was not found.\n"
+ "Use -DLIBPROJ4DIR=DIR to specify the Libproj4 directory tree.\n"
+ "Use -DLIBPRJ4=OFF to not use it.")
+- endif(NOT USE_LIBPROJ4)
+- endif(USE_LIBPROJ4_NEW)
++ endif(NOT USE_LIBPROJ4_NEW)
++ endif(USE_LIBPROJ4)
+ include_directories(${LIBPROJ4_INCLUDE_DIR})
+ set(LIBRARIES ${LIBRARIES} ${LIBPROJ4_LIBRARIES})
+ set(CMAKE_REQUIRED_LIBRARIES)
diff --git a/dev-lang/gdl/files/0.9.2-semaphore.patch b/dev-lang/gdl/files/0.9.2-semaphore.patch
new file mode 100644
index 00000000000..f2a28042f8d
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-semaphore.patch
@@ -0,0 +1,22 @@
+--- gdl-0.9.2/CMakeLists.txt 2011-11-06 22:39:45.000000000 +0000
++++ gdl-0.9.2/CMakeLists.txt.new 2012-06-21 00:02:42.000000000 +0100
+@@ -217,6 +217,19 @@
+ add_definitions(${OpenMP_CXX_FLAGS})
+ set(LIBRARIES ${LIBRARIES} ${OpenMP_CXX_FLAGS})
+ endif(OPENMP_FOUND)
++else(OPENMP)
++ # we need to define those semaphore posix symbols, do it with threads libs
++ find_package(Threads)
++ if(THREADS_FOUND)
++ set(LIBRARIES ${LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
++ else(THREADS_FOUND)
++ check_library_exists(rt sem_unlink "" HAVE_RT)
++ if(HAVE_RT)
++ set(LIBRARIES ${LIBRARIES} rt)
++ else(HAVE_RT)
++ message(FATAL_ERROR "Missing a POSIX semaphore symbols (rt or threads).\n")
++ endif(HAVE_RT)
++ endif(THREADS_FOUND)
+ endif(OPENMP)
+
+ # GSL MANDATORY
diff --git a/dev-lang/gdl/files/0.9.3-plwidth.patch b/dev-lang/gdl/files/0.9.3-plwidth.patch
new file mode 100644
index 00000000000..b09e1a88f5d
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.3-plwidth.patch
@@ -0,0 +1,158 @@
+diff -up gdl-0.9.3/CMakeLists.txt.plwidth gdl-0.9.3/CMakeLists.txt
+--- gdl-0.9.3/CMakeLists.txt.plwidth 2013-08-27 16:55:33.806600443 -0600
++++ gdl-0.9.3/CMakeLists.txt 2013-08-27 16:55:36.589590528 -0600
+@@ -23,6 +23,7 @@ include(CheckLibraryExists)
+ include(CheckFunctionExists)
+ include(CheckSymbolExists)
+ include(CheckCSourceRuns)
++include(CheckCXXSourceCompiles)
+ include(FindPkgConfig)
+ include(FindPackageHandleStandardArgs)
+
+@@ -302,6 +303,18 @@ if(PLPLOT_FOUND)
+ message(STATUS "warning, due to old plplot library, [XYZ]TICKFORMAT option for plot axis will not be supported.\n"
+ "you should upgrade to plplot version > 5.9.6")
+ endif(HAVE_PLPLOT_SLABELFUNC)
++ set(CMAKE_REQUIRED_INCLUDES "${PLPLOT_INCLUDE_DIR}")
++ set(CMAKE_REQUIRED_LIBRARIES "${PLPLOT_LIBRARIES}")
++ check_cxx_source_compiles("
++#include <plplot/plstream.h>
++int main(int argc, char **argv) {
++ plstream *p = new plstream();
++ PLFLT w = 0.5;
++ p->width(w);
++}" HAVE_PLPLOT_WIDTH)
++ if(HAVE_PLPLOT_WIDTH)
++ set(HAVE_PLPLOT_WIDTH 1)
++ endif(HAVE_PLPLOT_WIDTH)
+ check_library_exists("${PLPLOT_LIBRARIES}" plstrl "" PLPLOT_PRIVATE_NOT_HIDDEN)
+ if(PLPLOT_PRIVATE_NOT_HIDDEN)
+ set(PLPLOT_PRIVATE_NOT_HIDDEN 1)
+diff -up gdl-0.9.3/config.h.cmake.plwidth gdl-0.9.3/config.h.cmake
+--- gdl-0.9.3/config.h.cmake.plwidth 2013-08-27 16:55:33.808600436 -0600
++++ gdl-0.9.3/config.h.cmake 2013-08-27 16:55:36.589590528 -0600
+@@ -28,6 +28,7 @@
+ #cmakedefine HAVE_NEXTTOWARD 1
+ #cmakedefine HAVE_OLDPLPLOT 1
+ #cmakedefine HAVE_PLPLOT_SLABELFUNC 1
++#cmakedefine HAVE_PLPLOT_WIDTH 1
+ #cmakedefine PLPLOT_PRIVATE_NOT_HIDDEN 1
+ #cmakedefine PLPLOT_HAS_LEGEND
+ #ifndef HAVE_STDINT_H
+diff -up gdl-0.9.3/src/plotting_contour.cpp.plwidth gdl-0.9.3/src/plotting_contour.cpp
+--- gdl-0.9.3/src/plotting_contour.cpp.plwidth 2013-08-27 16:55:33.883600169 -0600
++++ gdl-0.9.3/src/plotting_contour.cpp 2013-08-27 16:55:36.590590524 -0600
+@@ -705,7 +705,11 @@ namespace lib
+ actStream->pat(1,&ori,&spa);
+
+ if (docolors) actStream->Color ( ( *colors )[i%colors->N_Elements ( )], decomposed, (PLINT)colorindex_table_0_color );
++#if (HAVE_PLPLOT_WIDTH)
++ if (dothick) actStream->width ( static_cast<PLFLT>(( *thick )[i%thick->N_Elements ( )]));
++#else
+ if (dothick) actStream->wid ( ( *thick )[i%thick->N_Elements ( )]);
++#endif
+ if (dostyle) gdlLineStyle(actStream, ( *style )[i%style->N_Elements ( )]);
+ actStream->shade( map, xEl, yEl, isLog?doIt:NULL, xStart, xEnd, yStart, yEnd,
+ clevel[i], clevel[i+1],
+@@ -788,7 +792,11 @@ namespace lib
+ actStream->stransform(gdl3dTo2dTransformContour, &Data3d);
+ }
+ if (docolors) actStream->Color ( ( *colors )[i%colors->N_Elements ( )], decomposed, 2);
++#if (HAVE_PLPLOT_WIDTH)
++ if (dothick) actStream->width ( static_cast<PLFLT>(( *thick )[i%thick->N_Elements ( )]));
++#else
+ if (dothick) actStream->wid ( ( *thick )[i%thick->N_Elements ( )]);
++#endif
+ if (dostyle) gdlLineStyle(actStream, ( *style )[i%style->N_Elements ( )]);
+ if (dolabels) actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING,
+ (PLINT)(*labels)[i%labels->N_Elements()] );
+diff -up gdl-0.9.3/src/plotting.cpp.plwidth gdl-0.9.3/src/plotting.cpp
+--- gdl-0.9.3/src/plotting.cpp.plwidth 2013-08-27 16:55:33.886600158 -0600
++++ gdl-0.9.3/src/plotting.cpp 2013-08-27 16:58:33.707952697 -0600
+@@ -1891,7 +1891,11 @@ namespace lib
+ DFloatGDL* charthickVect=e->GetKWAs<DFloatGDL>( charthickIx );
+ charthick=(*charthickVect)[0];
+ }
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(charthick));
++#else
+ a->wid(charthick);
++#endif
+ }
+
+ void gdlSetAxisCharsize(EnvT *e, GDLGStream *a, string axis)
+@@ -1919,7 +1923,11 @@ namespace lib
+
+ e->AssureFloatScalarKWIfPresent("THICK", thick);
+ if ( thick<=0.0 ) thick=1.0;
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(thick));
++#else
+ a->wid(static_cast<PLINT>(floor(thick-0.5)));
++#endif
+ }
+
+ //LINESTYLE
+@@ -2932,7 +2940,11 @@ namespace lib
+ a->smaj((PLFLT)OtherAxisSizeInMm, 1.0); //set base ticks to default 0.02 viewport converted to mm.
+ a->smin((PLFLT)OtherAxisSizeInMm/2.0,1.0); //idem min (plplt defaults)
+ //thick for box and ticks.
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(Thick));
++#else
+ a->wid(Thick);
++#endif
+ //ticks or grid eventually with style and length:
+ if (abs(TickLen)<1e-6) Opt=""; else Opt="st"; //remove ticks if ticklen=0
+ if (TickLen<0) {Opt+="i"; TickLen=-TickLen;}
+@@ -2977,7 +2989,11 @@ namespace lib
+ else if (axis=="Y") a->box("", 0.0, 0 , Opt.c_str(), 0.0, 0);
+ }
+ //reset charsize & thick
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(1.0);
++#else
+ a->wid(1);
++#endif
+ a->sizeChar(1.0);
+ }
+ return 0;
+@@ -3120,7 +3136,11 @@ namespace lib
+ a->smaj((PLFLT)OtherAxisSizeInMm, 1.0); //set base ticks to default 0.02 viewport converted to mm.
+ a->smin((PLFLT)OtherAxisSizeInMm/2.0,1.0); //idem min (plplt defaults)
+ //thick for box and ticks.
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(static_cast<PLFLT>(Thick));
++#else
+ a->wid(Thick);
++#endif
+ //ticks or grid eventually with style and length:
+ if (abs(TickLen)<1e-6) Opt=""; else Opt="st"; //remove ticks if ticklen=0
+ if (TickLen<0) {Opt+="i"; TickLen=-TickLen;}
+@@ -3145,7 +3165,11 @@ namespace lib
+ else if (axis=="Z") a->box3("","",0,0,"","",0,0, Opt.c_str(), "", TickInterval, Minor);
+ }
+ //reset charsize & thick
++#if (HAVE_PLPLOT_WIDTH)
++ a->width(1.0);
++#else
+ a->wid(1);
++#endif
+ a->sizeChar(1.0);
+ }
+ return 0;
+diff -up gdl-0.9.3/src/plotting_xyouts.cpp.plwidth gdl-0.9.3/src/plotting_xyouts.cpp
+--- gdl-0.9.3/src/plotting_xyouts.cpp.plwidth 2013-08-27 16:55:33.892600137 -0600
++++ gdl-0.9.3/src/plotting_xyouts.cpp 2013-08-27 16:55:36.591590521 -0600
+@@ -339,7 +339,11 @@ namespace lib
+ //plot!
+ if (docharsize) actStream->sizeChar(( *size )[i%size->N_Elements ( )]);
+ if (docolor) actStream->Color ( ( *color )[i%color->N_Elements ( )], decomposed, 2);
++#if (HAVE_PLPLOT_WIDTH)
++ if (docharthick) actStream->width ( static_cast<PLFLT>(( *charthick )[i%charthick->N_Elements ( )]));
++#else
+ if (docharthick) actStream->wid ( ( *charthick )[i%charthick->N_Elements ( )]);
++#endif
+ //orientation word is not orientation page depending on axes increment direction [0..1] vs. [1..0]
+ PLFLT oriD=(( *orientation )[i%orientation->N_Elements ( )]); //ori DEVICE
+ PLFLT oriW=oriD; //ori WORLD
diff --git a/dev-lang/gdl/files/0.9.4-gsl.patch b/dev-lang/gdl/files/0.9.4-gsl.patch
new file mode 100644
index 00000000000..3a96a41adcd
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-gsl.patch
@@ -0,0 +1,62 @@
+diff -up gdl-0.9.4/src/gsl_matrix.cpp.gsl gdl-0.9.4/src/gsl_matrix.cpp
+--- gdl-0.9.4/src/gsl_matrix.cpp.gsl 2013-09-20 10:10:02.000000000 -0600
++++ gdl-0.9.4/src/gsl_matrix.cpp 2013-10-03 13:50:41.089660703 -0600
+@@ -41,10 +41,11 @@ namespace lib {
+ const int szdbl=sizeof(DDouble);
+ const int szflt=sizeof(DFloat);
+ const int szlng=sizeof(DLong);
++ const int szlng64=sizeof(DLong64);
+
+ void ludc_pro( EnvT* e)
+ {
+- // cout << szdbl << " " <<szflt << " " << szlng << endl;
++ // cout << szdbl << " " <<szflt << " " << szlng << " " szlng64 << endl;
+
+ SizeT nParam=e->NParam(1);
+ // if( nParam == 0)
+@@ -120,9 +121,15 @@ namespace lib {
+ dimension dim1(&n, (SizeT) 1);
+ BaseGDL** p1D = &e->GetPar( 1);
+ GDLDelete((*p1D));
+- *p1D = new DLongGDL(dim1, BaseGDL::NOZERO);
+- memcpy(&(*(DLongGDL*) *p1D)[0], p->data,
+- p0->Dim(0)*szlng);
++ if (sizeof(size_t) == szlng) {
++ *p1D = new DLongGDL(dim1, BaseGDL::NOZERO);
++ memcpy(&(*(DLongGDL*) *p1D)[0], p->data,
++ p0->Dim(0)*szlng);
++ } else {
++ *p1D = new DLong64GDL(dim1, BaseGDL::NOZERO);
++ memcpy(&(*(DLong64GDL*) *p1D)[0], p->data,
++ p0->Dim(0)*szlng64);
++ }
+
+ // gsl_matrix_free(mat);
+ // gsl_permutation_free(p);
+@@ -189,10 +196,15 @@ namespace lib {
+ GDLGuard<gsl_matrix> g1(mat,gsl_matrix_free);
+ memcpy(mat->data, &(*p0D)[0], nEl*szdbl);
+
+- DLongGDL* p1L =e->GetParAs<DLongGDL>(1);
+ gsl_permutation *p = gsl_permutation_alloc (nEl1);
+ GDLGuard<gsl_permutation> g2(p,gsl_permutation_free);
+- memcpy(p->data, &(*p1L)[0], nEl1*szlng);
++ if (sizeof(size_t) == szlng) {
++ DLongGDL* p1L =e->GetParAs<DLongGDL>(1);
++ memcpy(p->data, &(*p1L)[0], nEl1*szlng);
++ } else {
++ DLong64GDL* p1L =e->GetParAs<DLong64GDL>(1);
++ memcpy(p->data, &(*p1L)[0], nEl1*szlng64);
++ }
+
+ DDoubleGDL *p2D = e->GetParAs<DDoubleGDL>(2);
+ gsl_vector *b = gsl_vector_alloc(nEl2);
+@@ -222,7 +234,7 @@ namespace lib {
+ DDoubleGDL* res = new DDoubleGDL( p2->Dim(), BaseGDL::NOZERO);
+ memcpy(&(*res)[0], x->data, nEl1*szdbl);
+
+-// gsl_matrix_free(mat);
++// gsl_matrix_free(mat);Parameter
+ // gsl_vector_free(x);
+ // gsl_permutation_free(p);
+ // b ???
diff --git a/dev-lang/gdl/files/0.9.4-plplot.patch b/dev-lang/gdl/files/0.9.4-plplot.patch
new file mode 100644
index 00000000000..fac18ec5e69
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-plplot.patch
@@ -0,0 +1,18 @@
+ CMakeModules/FindPlplot.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeModules/FindPlplot.cmake b/CMakeModules/FindPlplot.cmake
+index a503f8c..cdaeb24 100644
+--- a/CMakeModules/FindPlplot.cmake
++++ b/CMakeModules/FindPlplot.cmake
+@@ -9,8 +9,8 @@
+ #
+
+
+-find_library(PLPLOT_LIBRARY NAMES plplotd)
+-find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++find_library(PLPLOT_LIBRARY NAMES plplotd plplot)
++find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd plplotcxx)
+ set(PLPLOT_LIBRARIES ${PLPLOT_LIBRARY} ${PLPLOTCXX_LIBRARY})
+ find_path(PLPLOT_INCLUDE_DIR NAMES plplot/plplot.h)
+ include(FindPackageHandleStandardArgs)
diff --git a/dev-lang/gdl/files/0.9.4-python.patch b/dev-lang/gdl/files/0.9.4-python.patch
new file mode 100644
index 00000000000..709f8c140cd
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-python.patch
@@ -0,0 +1,12 @@
+diff -up gdl-0.9.4/src/pythongdl.cpp.python gdl-0.9.4/src/pythongdl.cpp
+--- gdl-0.9.4/src/pythongdl.cpp.python 2013-07-26 03:30:32.000000000 -0600
++++ gdl-0.9.4/src/pythongdl.cpp 2013-09-30 10:24:27.092666180 -0600
+@@ -373,7 +373,7 @@ PyObject *GDLSub( PyObject *self, PyObje
+ if( libCall)
+ e = new EnvT( NULL, sub);
+ else
+- e = new EnvUDT( NULL, sub);
++ e = new EnvUDT( NULL, static_cast<DSubUD*>(sub));
+
+ Guard< EnvBaseT> e_guard( e);
+
diff --git a/dev-lang/gdl/files/0.9.4-python2.patch b/dev-lang/gdl/files/0.9.4-python2.patch
new file mode 100644
index 00000000000..8dc92324a58
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-python2.patch
@@ -0,0 +1,17 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1fda8ee..e2170b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -615,8 +615,8 @@ if(PYTHON OR PYTHON_MODULE)
+ else()
+ set(PythonLibs_FIND_VERSION 2)
+ endif()
+- find_package(PythonLibs)
+ include(FindPythonInterp)
++ find_package(PythonLibs)
+ endif()
+ set(USE_PYTHON ${PYTHONLIBS_FOUND})
+ if(PYTHONLIBS_FOUND)
diff --git a/dev-lang/gdl/files/0.9.4-reorder.patch b/dev-lang/gdl/files/0.9.4-reorder.patch
new file mode 100644
index 00000000000..d871757a29d
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.4-reorder.patch
@@ -0,0 +1,380 @@
+diff -up gdl-0.9.4/src/allix.hpp.reorder gdl-0.9.4/src/allix.hpp
+--- gdl-0.9.4/src/allix.hpp.reorder 2012-12-11 10:39:35.000000000 -0700
++++ gdl-0.9.4/src/allix.hpp 2013-10-04 10:59:22.666594845 -0600
+@@ -344,9 +344,9 @@ private:
+ public:
+ AllIxAllIndexedT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_)
+ : ixList( ixList_)
++ , varStride( varStride_)
+ , acRank( acRank_)
+ , nIx( nIx_)
+- , varStride( varStride_)
+ {}
+ ~AllIxAllIndexedT() {}
+
+@@ -384,11 +384,11 @@ private:
+ public:
+ AllIxNewMultiT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ {
+ add = 0;
+ assert( varStride[0] == 1);
+@@ -440,10 +440,10 @@ private:
+ public:
+ AllIxNewMulti2DT( ArrayIndexVectorT* ixList_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , nIx( nIx_)
+ {
+ add = 0;
+ if( !(*ixList)[0]->Indexed())
+@@ -499,11 +499,11 @@ private:
+ public:
+ AllIxNewMultiNoneIndexedT( ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ {
+ assert( varStride[0] == 1);
+ add = 0;
+@@ -548,10 +548,10 @@ private:
+ public:
+ AllIxNewMultiNoneIndexed2DT( ArrayIndexVectorT* ixList_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , nIx( nIx_)
+ {
+ assert( varStride[0] == 1);
+ ixListStride[0] = (*ixList)[0]->GetStride();
+@@ -593,11 +593,11 @@ public:
+ AllIxNewMultiOneVariableIndexNoIndexT( RankT gt1Rank, SizeT add_,
+ ArrayIndexVectorT* ixList_, SizeT acRank_, SizeT nIx_, const SizeT* varStride_, SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ , add( add_)
+ , variableIndex( gt1Rank)
+ {
+@@ -642,11 +642,11 @@ public:
+ SizeT acRank_, SizeT nIx_, const SizeT* varStride_,
+ SizeT* nIterLimit_, SizeT* stride_)
+ : ixList( ixList_)
+- , acRank( acRank_)
+- , nIx( nIx_)
+ , varStride( varStride_)
+ , nIterLimit( nIterLimit_)
+ , stride( stride_)
++ , acRank( acRank_)
++ , nIx( nIx_)
+ , add( add_)
+ , variableIndex( gt1Rank)
+ {
+diff -up gdl-0.9.4/src/arrayindex.hpp.reorder gdl-0.9.4/src/arrayindex.hpp
+--- gdl-0.9.4/src/arrayindex.hpp.reorder 2013-09-17 10:46:19.000000000 -0600
++++ gdl-0.9.4/src/arrayindex.hpp 2013-10-04 11:00:58.849879562 -0600
+@@ -303,7 +303,7 @@ private:
+ RangeT s;
+ BaseGDL* rawData; // for overloaded object indexing
+
+- CArrayIndexScalar( const CArrayIndexScalar& c): s( c.s), sInit( c.sInit)
++ CArrayIndexScalar( const CArrayIndexScalar& c): sInit( c.sInit), s( c.s)
+ {
+ assert( c.rawData != NULL);
+ rawData = c.rawData->Dup();
+diff -up gdl-0.9.4/src/arrayindexlistnoassoct.hpp.reorder gdl-0.9.4/src/arrayindexlistnoassoct.hpp
+--- gdl-0.9.4/src/arrayindexlistnoassoct.hpp.reorder 2013-07-04 17:24:44.000000000 -0600
++++ gdl-0.9.4/src/arrayindexlistnoassoct.hpp 2013-10-04 11:24:02.893867004 -0600
+@@ -59,8 +59,8 @@ public:
+ { nParam = 0;}
+
+ ArrayIndexListOneNoAssocT( const ArrayIndexListOneNoAssocT& cp):
+- cleanupIx(),
+ ArrayIndexListT( cp),
++ cleanupIx(),
+ ix( cp.ix->Dup()),
+ allIx( NULL)
+ {
+diff -up gdl-0.9.4/src/arrayindexlistt.hpp.reorder gdl-0.9.4/src/arrayindexlistt.hpp
+--- gdl-0.9.4/src/arrayindexlistt.hpp.reorder 2013-09-17 10:46:19.000000000 -0600
++++ gdl-0.9.4/src/arrayindexlistt.hpp 2013-10-04 11:23:35.607069888 -0600
+@@ -130,8 +130,8 @@ public:
+ { nParam = 0;}
+
+ ArrayIndexListOneT( const ArrayIndexListOneT& cp):
+- cleanupIx(),
+ ArrayIndexListT( cp),
++ cleanupIx(),
+ ix( cp.ix->Dup()),
+ allIx( NULL)
+ {
+diff -up gdl-0.9.4/src/deviceps.hpp.reorder gdl-0.9.4/src/deviceps.hpp
+--- gdl-0.9.4/src/deviceps.hpp.reorder 2013-07-03 15:48:06.000000000 -0600
++++ gdl-0.9.4/src/deviceps.hpp 2013-10-04 13:14:48.283746779 -0600
+@@ -441,9 +441,9 @@ private:
+ }
+
+ public:
+- DevicePS(): Graphics(), fileName( "gdl.ps"), actStream( NULL), color(0),
+- decomposed( 0), encapsulated(false), scale(1.), XPageSize(17.78), YPageSize(12.7),
+- XOffset(0.0),YOffset(0.0)
++ DevicePS(): Graphics(), fileName( "gdl.ps"), actStream( NULL),
++ XPageSize(17.78), YPageSize(12.7), XOffset(0.0),YOffset(0.0),
++ color(0), decomposed( 0), encapsulated(false), scale(1.)
+ {
+ name = "PS";
+
+diff -up gdl-0.9.4/src/dnode.cpp.reorder gdl-0.9.4/src/dnode.cpp
+--- gdl-0.9.4/src/dnode.cpp.reorder 2012-09-18 08:19:18.000000000 -0600
++++ gdl-0.9.4/src/dnode.cpp 2013-10-04 12:02:48.601416601 -0600
+@@ -55,9 +55,10 @@ DNode::DNode( const DNode& cp):
+ // keepRight( false),
+ CommonAST( cp), //down(), right(),
+ lineNumber( cp.getLine()), cData(NULL),
+- var(cp.var), arrIxList(NULL),arrIxListNoAssoc(NULL),
++ var(cp.var),
+ libFun( cp.libFun),
+ libPro( cp.libPro),
++ arrIxList(NULL),arrIxListNoAssoc(NULL),
+ labelStart( cp.labelStart), labelEnd( cp.labelEnd)
+ {
+ if( cp.cData != NULL) cData = cp.cData->Dup();
+diff -up gdl-0.9.4/src/dnode.hpp.reorder gdl-0.9.4/src/dnode.hpp
+diff -up gdl-0.9.4/src/dpro.cpp.reorder gdl-0.9.4/src/dpro.cpp
+--- gdl-0.9.4/src/dpro.cpp.reorder 2013-09-17 03:03:25.000000000 -0600
++++ gdl-0.9.4/src/dpro.cpp 2013-10-04 13:05:23.169223727 -0600
+@@ -200,8 +200,8 @@ DSubUD::~DSubUD()
+ DSubUD::DSubUD(const string& n,const string& o,const string& f) :
+ DSub(n,o), file(f),
+ tree( NULL),
+- labelList(),
+ compileOpt(GDLParser::NONE),
++ labelList(),
+ nForLoops( 0)
+ {
+ if( o != "")
+diff -up gdl-0.9.4/src/envt.cpp.reorder gdl-0.9.4/src/envt.cpp
+--- gdl-0.9.4/src/envt.cpp.reorder 2013-09-25 05:55:21.000000000 -0600
++++ gdl-0.9.4/src/envt.cpp 2013-10-04 13:08:17.081114086 -0600
+@@ -107,15 +107,15 @@ void EnvUDT::operator delete( void *ptr)
+
+
+ EnvBaseT::EnvBaseT( ProgNodeP cN, DSub* pro_):
+- env(),
+ toDestroy(),
++ env(),
+ pro(pro_),
+- extra(NULL),
+- newEnv(NULL),
+ callingNode( cN),
+ lineNumber( 0),
+- obj(false)
+- ,ptrToReturnValue(NULL)
++ obj(false),
++ extra(NULL),
++ newEnv(NULL),
++ ptrToReturnValue(NULL)
+ //, toDestroyInitialIndex( toDestroy.size())
+ {}
+
+diff -up gdl-0.9.4/src/envt.hpp.reorder gdl-0.9.4/src/envt.hpp
+--- gdl-0.9.4/src/envt.hpp.reorder 2013-09-26 04:47:48.000000000 -0600
++++ gdl-0.9.4/src/envt.hpp 2013-10-04 10:55:21.892428311 -0600
+@@ -863,7 +863,7 @@ public:
+ typedef SizeT size_type;
+ typedef EnvUDT* pointer_type;
+
+- EnvStackT(): sz(defaultStackDepth), top(0)
++ EnvStackT(): top(0), sz(defaultStackDepth)
+ {
+ envStackFrame = new EnvUDT* [ sz+1];
+ envStack = envStackFrame + 1;
+diff -up gdl-0.9.4/src/gdlexception.cpp.reorder gdl-0.9.4/src/gdlexception.cpp
+--- gdl-0.9.4/src/gdlexception.cpp.reorder 2013-06-23 17:07:32.000000000 -0600
++++ gdl-0.9.4/src/gdlexception.cpp 2013-10-04 14:00:32.102348401 -0600
+@@ -43,9 +43,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( pre),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(decorate && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -97,9 +97,9 @@ GDLException::GDLException(const RefDNod
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -122,9 +122,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -148,9 +148,9 @@ GDLException::GDLException(const ProgNod
+ errorNodeP( eN),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if( overWriteNode && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -177,9 +177,9 @@ GDLException::GDLException(DLong eC, con
+ errorNodeP( eN),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if( overWriteNode && interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -207,9 +207,9 @@ GDLException::GDLException(SizeT l, Size
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( l), col( c), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+@@ -232,8 +232,8 @@ GDLException::GDLException(DLong eC, Siz
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( l), col( c), prefix( true),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ arrayexprIndexeeFailed(false),
++ targetEnv( NULL)
+ {
+ if(interpreter!=NULL && interpreter->CallStack().size()>0)
+ {
+diff -up gdl-0.9.4/src/gdlexception.hpp.reorder gdl-0.9.4/src/gdlexception.hpp
+--- gdl-0.9.4/src/gdlexception.hpp.reorder 2013-06-23 17:07:32.000000000 -0600
++++ gdl-0.9.4/src/gdlexception.hpp 2013-10-04 11:12:58.332125288 -0600
+@@ -66,18 +66,18 @@ public:
+ errorNodeP( NULL),
+ errorCode(-1),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {}
+ GDLException( DLong eC): ANTLRException(),
+ errorNode(static_cast<RefDNode>(antlr::nullAST)),
+ errorNodeP( NULL),
+ errorCode(eC),
+ line( 0), col( 0), prefix( true),
++ arrayexprIndexeeFailed(false),
+ ioException( false),
+- targetEnv( NULL),
+- arrayexprIndexeeFailed(false)
++ targetEnv( NULL)
+ {}
+ GDLException(const std::string& s, bool pre = true, bool decorate=true);
+ GDLException(const RefDNode eN, const std::string& s);
+diff -up gdl-0.9.4/src/prognode.cpp.reorder gdl-0.9.4/src/prognode.cpp
+--- gdl-0.9.4/src/prognode.cpp.reorder 2013-09-27 18:47:49.000000000 -0600
++++ gdl-0.9.4/src/prognode.cpp 2013-10-04 14:01:11.490342867 -0600
+@@ -54,19 +54,19 @@ return nonCopyNodeLookupArray;
+
+ // tanslation RefDNode -> ProgNode
+ ProgNode::ProgNode( const RefDNode& refNode):
++ ttype( refNode->getType()),
++ text( refNode->getText()),
+ keepRight( false),
+ keepDown( false),
+ breakTarget( NULL),
+- ttype( refNode->getType()),
+- text( refNode->getText()),
+ down( NULL),
+ right( NULL),
+- lineNumber( refNode->getLine()),
+ cData( refNode->StealCData()), // stealing is crucial here because references might exist
++ var( refNode->var),
+ // as arrayindices
+- libPro( refNode->libPro),
+ libFun( refNode->libFun),
+- var( refNode->var),
++ libPro( refNode->libPro),
++ lineNumber( refNode->getLine()),
+ arrIxList( refNode->StealArrIxList()),
+ arrIxListNoAssoc( refNode->StealArrIxNoAssocList()),
+ // arrIxList( refNode->CloneArrIxList()),
+diff -up gdl-0.9.4/src/prognodeexpr.cpp.reorder gdl-0.9.4/src/prognodeexpr.cpp
+--- gdl-0.9.4/src/prognodeexpr.cpp.reorder 2013-09-26 05:08:39.000000000 -0600
++++ gdl-0.9.4/src/prognodeexpr.cpp 2013-10-04 13:20:36.660155916 -0600
+@@ -49,18 +49,18 @@ BinaryExprNC::BinaryExprNC( const RefDNo
+ }
+
+ ProgNode::ProgNode(): // for NULLProgNode
++ ttype( antlr::Token::NULL_TREE_LOOKAHEAD),
++ text( "NULLProgNode"),
+ keepRight( false),
+ keepDown( false),
+ breakTarget( NULL),
+- ttype( antlr::Token::NULL_TREE_LOOKAHEAD),
+- text( "NULLProgNode"),
+ down( NULL),
+ right( NULL),
+- lineNumber( 0),
+ cData( NULL),
+- libPro( NULL),
+- libFun( NULL),
+ var( NULL),
++ libFun( NULL),
++ libPro( NULL),
++ lineNumber( 0),
+ labelStart( 0),
+ labelEnd( 0)
+ {}
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 00000000000..f5b627ab444
--- /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-plplot.patch b/dev-lang/gdl/files/0.9.5-plplot.patch
new file mode 100644
index 00000000000..70ad1bd14ca
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-plplot.patch
@@ -0,0 +1,134 @@
+diff -up gdl-0.9.5/CMakeLists.txt.plplot gdl-0.9.5/CMakeLists.txt
+--- gdl-0.9.5/CMakeLists.txt.plplot 2014-10-07 07:21:14.000000000 -0600
++++ gdl-0.9.5/CMakeLists.txt 2015-04-24 14:29:15.588067694 -0600
+@@ -386,7 +386,7 @@ if(PLPLOT_FOUND)
+ #}" HAVE_PLPLOT_WIDTH)
+
+ #give it a 2nd try...
+- check_library_exists("${PLPLOT_LIBRARIES}" c_plwidth "" HAVE_PLPLOT_WIDTH)
++ check_library_exists("${PLPLOT_LIBRARIES}" c_plwidth "" HAVE_PLPLOT_WIDTH)
+ if(HAVE_PLPLOT_WIDTH)
+ set(HAVE_PLPLOT_WIDTH 1)
+ endif(HAVE_PLPLOT_WIDTH)
+@@ -402,6 +402,11 @@ if(PLPLOT_FOUND)
+ else(PLPLOT_HAS_LEGEND)
+ message(STATUS "Your plplot lib is too old for some gdl functions, please upgrade.")
+ endif(PLPLOT_HAS_LEGEND)
++ check_cxx_source_compiles("#include <plplot/plstream.h>
++ main(){PLINT n; PLFLT x,y;plcallback::fill(n,&x,&y);}" PLPLOT_HAS_PLCALLBACK)
++ if(PLPLOT_HAS_PLCALLBACK)
++ set(PLPLOT_HAS_PLCALLBACK 1)
++ endif(PLPLOT_HAS_PLCALLBACK)
+ endif(PLPLOT_FOUND)
+
+ # GRAPHICSMAGICK is an alternative to the classical ImageMagick Lib.
+diff -up gdl-0.9.5/CMakeModules/FindPlplot.cmake.plplot gdl-0.9.5/CMakeModules/FindPlplot.cmake
+--- gdl-0.9.5/CMakeModules/FindPlplot.cmake.plplot 2011-08-19 04:18:51.000000000 -0600
++++ gdl-0.9.5/CMakeModules/FindPlplot.cmake 2015-04-24 13:54:56.915632230 -0600
+@@ -9,8 +9,12 @@
+ #
+
+
+-find_library(PLPLOT_LIBRARY NAMES plplotd)
+-find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++find_library(PLPLOT_LIBRARY NAMES plplot)
++find_library(PLPLOTCXX_LIBRARY NAMES plplotcxx)
++if(NOT PLPLOT_LIBRARY)
++ find_library(PLPLOT_LIBRARY NAMES plplotd)
++ find_library(PLPLOTCXX_LIBRARY NAMES plplotcxxd)
++endif(NOT PLPLOT_LIBRARY)
+ set(PLPLOT_LIBRARIES ${PLPLOT_LIBRARY} ${PLPLOTCXX_LIBRARY})
+ find_path(PLPLOT_INCLUDE_DIR NAMES plplot/plplot.h)
+ include(FindPackageHandleStandardArgs)
+diff -up gdl-0.9.5/config.h.cmake.plplot gdl-0.9.5/config.h.cmake
+--- gdl-0.9.5/config.h.cmake.plplot 2014-08-30 14:13:43.000000000 -0600
++++ gdl-0.9.5/config.h.cmake 2015-04-24 13:39:22.259704608 -0600
+@@ -31,6 +31,12 @@
+ #cmakedefine HAVE_PLPLOT_WIDTH 1
+ #cmakedefine PLPLOT_PRIVATE_NOT_HIDDEN 1
+ #cmakedefine PLPLOT_HAS_LEGEND
++#cmakedefine PLPLOT_HAS_PLCALLBACK
++#ifdef PLPLOT_HAS_PLCALLBACK
++#define PLCALLBACK plcallback
++#else
++#define PLCALLBACK plstream
++#endif
+ #ifndef HAVE_STDINT_H
+ #cmakedefine HAVE_STDINT_H 1
+ #endif
+diff -up gdl-0.9.5/src/plotting_contour.cpp.plplot gdl-0.9.5/src/plotting_contour.cpp
+--- gdl-0.9.5/src/plotting_contour.cpp.plplot 2014-09-29 11:03:12.000000000 -0600
++++ gdl-0.9.5/src/plotting_contour.cpp 2015-04-24 13:39:22.267705191 -0600
+@@ -789,8 +789,8 @@ namespace lib
+ 1, value,
+ static_cast<PLFLT>(( *thick )[i%thick->N_Elements()]),
+ 0,0,0,0,
+- (plstream::fill), (oneDim),
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (PLCALLBACK::fill), (oneDim),
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ actStream->psty(0);
+ // if (docolors) gdlSetGraphicsForegroundColorFromKw( e, actStream );
+@@ -808,8 +808,8 @@ namespace lib
+ clevel[i], maxmax,
+ 1,value,
+ 0,0,0,0,0,
+- plstream::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ PLCALLBACK::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ } else { //every other case of fill
+ // note that plshades is not protected against 1 level (color formula is
+@@ -818,8 +818,8 @@ namespace lib
+ if (nlevel>2 && !(docolors)) { //acceleration with shades when no c_colors are given. use continuous table1, decomposed or not.
+ //acceleration is most sensible when a (x,y) transform (rotate, stretch) is in place since plplot does not recompute the map.
+ actStream->shades( map, xEl, yEl, isLog?doIt:NULL, xStart, xEnd, yStart, yEnd,
+- clevel, nlevel, 1, 0, 0, plstream::fill, (oneDim),
+- (oneDim)?(plstream::tr1):(plstream::tr2),
++ clevel, nlevel, 1, 0, 0, PLCALLBACK::fill, (oneDim),
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2),
+ (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ else { //fill with colors defined with c_colors or n<=2
+@@ -832,8 +832,8 @@ namespace lib
+ clevel[i], maxmax,
+ 1,value,
+ 0,0,0,0,0,
+- plstream::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ PLCALLBACK::fill, (oneDim), //Onedim is accelerator since rectangles are kept rectangles see plplot doc
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ } else
+ printf(" Problem, sorry! plplot doesn't like to FILL with a single level!");
+ }
+@@ -854,7 +854,7 @@ namespace lib
+ if (doT3d) { //no label in T3D , bug in plplot...
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING, 0 );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ } else {
+ if (dolabels && i<labels->N_Elements())
+ {
+@@ -862,16 +862,16 @@ namespace lib
+ //else (lables thicker than contours) impossible with plplot...
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING, 0 );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2); //thick contours, no label
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2); //thick contours, no label
+ actStream->Thick(label_thick);
+ }
+ actStream->setcontlabelparam ( LABELOFFSET, (PLFLT) label_size, LABELSPACING*sqrt(label_size),(PLINT)(*labels)[i] );
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ if (!dothick) gdlSetPenThickness(e, actStream);
+ } else {
+ actStream->cont ( map, xEl, yEl, 1, xEl, 1, yEl, &( clevel[i] ), 1,
+- (oneDim)?(plstream::tr1):(plstream::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
++ (oneDim)?(PLCALLBACK::tr1):(PLCALLBACK::tr2), (oneDim)?(void *)&cgrid1:(void *)&cgrid2);
+ }
+ }
+ }
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 00000000000..1140fcc9ac7
--- /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.5-proj4.patch b/dev-lang/gdl/files/0.9.5-proj4.patch
new file mode 100644
index 00000000000..4b2ebcca0a0
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-proj4.patch
@@ -0,0 +1,41 @@
+ CMakeLists.txt | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c4b3278..f9ed49d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -637,17 +637,17 @@ if(LIBPROJ4)
+ if(LIBPROJ4_FOUND)
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBPROJ4_LIBRARIES} ${GSL_LIBRARIES} m)
+
+- check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
+- if(USE_LIBPROJ4_NEW)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4)
++ if(USE_LIBPROJ4)
+ # check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
+ # if(USE_LIBPROJ4)
+
+ # define USE_LIB_PROJ4 in any case
+ set(USE_LIBPROJ4 1)
+
+- else(USE_LIBPROJ4_NEW)
+- check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
+- if(NOT USE_LIBPROJ4)
++ else(USE_LIBPROJ4)
++ check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4_NEW)
++ if(NOT USE_LIBPROJ4_NEW)
+ # else(USE_LIBPROJ4)
+ # check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
+ # if(NOT USE_LIBPROJ4_NEW)
+@@ -656,8 +656,8 @@ if(LIBPROJ4)
+ "Use -DLIBPROJ4DIR=DIR to specify the Libproj4 directory tree.\n"
+ "Use -DLIBPRJ4=OFF to not use it.")
+
+- endif(NOT USE_LIBPROJ4)
+- endif(USE_LIBPROJ4_NEW)
++ endif(NOT USE_LIBPROJ4_NEW)
++ endif(USE_LIBPROJ4)
+ # endif(NOT USE_LIBPROJ4_NEW)
+ # endif(USE_LIBPROJ4)
+
diff --git a/dev-lang/gdl/gdl-0.9.4.ebuild b/dev-lang/gdl/gdl-0.9.4.ebuild
new file mode 100644
index 00000000000..05382dcb70e
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.4.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp
+ proj postscript python static-libs udunits wxwidgets"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:5=
+ 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? (
+ || (
+ media-gfx/graphicsmagick[cxx]
+ media-gfx/imagemagick[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:2.8[X,-odbc] )"
+
+DEPEND="${RDEPEND}
+ >=dev-java/antlr-2.7.7-r5:0[cxx,java,script]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.2-antlr.patch
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.2-proj4.patch
+ "${FILESDIR}"/0.9.2-semaphore.patch
+ "${FILESDIR}"/0.9.3-plwidth.patch
+ "${FILESDIR}"/0.9.4-gsl.patch
+ "${FILESDIR}"/0.9.4-python.patch
+ "${FILESDIR}"/0.9.4-reorder.patch
+ "${FILESDIR}"/0.9.4-plplot.patch
+ "${FILESDIR}"/0.9.4-python2.patch
+)
+
+pkg_setup() {
+ use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current g++ does not support it"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ 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
+ local i
+ for i in *.g; do antlr ${i} || die ; done
+ popd > /dev/null
+
+ # gentoo: use proj instead of libproj4 (libproj4 last update: 2004)
+ sed -i \
+ -e 's:proj4:proj:' \
+ -e 's:lib_proj\.h:proj_api\.h:g' \
+ CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die
+
+ # gentoo: avoid install files in datadir directory
+ sed -i \
+ -e '/AUTHORS/d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ $(cmake-utils_use fftw)
+ $(cmake-utils_use eigen EIGEN3)
+ $(cmake-utils_use grib)
+ $(cmake-utils_use gshhs)
+ $(cmake-utils_use hdf)
+ $(cmake-utils_use hdf5)
+ $(cmake-utils_use netcdf)
+ $(cmake-utils_use openmp)
+ $(cmake-utils_use proj LIBPROJ4)
+ $(cmake-utils_use postscript PSLIB)
+ $(cmake-utils_use udunits)
+ $(cmake-utils_use wxwidgets)
+ )
+ if use imagemagick; then
+ if has_version media-gfx/graphicsmagick[cxx]; 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
+ Xemake -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
+
+ echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
+ doenvd 50gdl
+}
diff --git a/dev-lang/gdl/gdl-0.9.5.ebuild b/dev-lang/gdl/gdl-0.9.5.ebuild
new file mode 100644
index 00000000000..1f195bab8ec
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.5.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+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}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp
+ png proj postscript python static-libs udunits wxwidgets"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:5=
+ 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? (
+ || (
+ media-gfx/graphicsmagick[cxx]
+ media-gfx/imagemagick[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:2.8[X,-odbc] )"
+
+DEPEND="${RDEPEND}
+ >=dev-java/antlr-2.7.7-r5:0[cxx,java,script]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.5-antlr.patch
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.5-plplot.patch
+ "${FILESDIR}"/0.9.5-png.patch
+)
+
+pkg_setup() {
+ use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current g++ does not support it"
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ 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
+ local i
+ for i in *.g; do antlr ${i} || die ; done
+ popd > /dev/null
+
+ # gentoo: use proj instead of libproj4 (libproj4 last update: 2004)
+ sed -i \
+ -e 's:proj4:proj:' \
+ -e 's:lib_proj\.h:proj_api\.h:g' \
+ CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die
+
+ # gentoo: avoid install files in datadir directory
+ sed -i \
+ -e '/AUTHORS/d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ $(cmake-utils_use fftw)
+ $(cmake-utils_use eigen EIGEN3)
+ $(cmake-utils_use grib)
+ $(cmake-utils_use gshhs)
+ $(cmake-utils_use hdf)
+ $(cmake-utils_use hdf5)
+ $(cmake-utils_use netcdf)
+ $(cmake-utils_use openmp)
+ $(cmake-utils_use png PNGLIB)
+ $(cmake-utils_use proj LIBPROJ4)
+ $(cmake-utils_use postscript PSLIB)
+ $(cmake-utils_use udunits)
+ $(cmake-utils_use wxwidgets)
+ )
+ if use imagemagick; then
+ if has_version media-gfx/graphicsmagick[cxx]; 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
+ Xemake -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
+
+ echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl
+ doenvd 50gdl
+}
diff --git a/dev-lang/gdl/metadata.xml b/dev-lang/gdl/metadata.xml
new file mode 100644
index 00000000000..8b80e5e849d
--- /dev/null
+++ b/dev-lang/gdl/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ A free IDL (Interactive Data Language) compatible incremental compiler
+ (ie. runs IDL programs). IDL is a registered trademark of ITT Visual
+ Information Solutions.
+</longdescription>
+ <use>
+ <flag name="eigen">Build matrix manipulation with <pkg>dev-cpp/eigen</pkg></flag>
+ <flag name="hdf">Add support for the Hierarchical Data Format v.4</flag>
+ <flag name="gshhs">Add support for projection adn continent maps with <pkg>sci-geosciences/gshhs-data</pkg></flag>
+ <flag name="grib">Add support for the meteorological GRIB format with <pkg>sci-libs/grib_api</pkg></flag>
+ <flag name="proj">Add support for <pkg>sci-libs/proj</pkg> (geographic projections)</flag>
+ <flag name="udunits">Add support for manipulating units of physical quantities</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gnudatalanguage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/gforth/Manifest b/dev-lang/gforth/Manifest
new file mode 100644
index 00000000000..c0c5e507f63
--- /dev/null
+++ b/dev-lang/gforth/Manifest
@@ -0,0 +1 @@
+DIST gforth-0.7.3.tar.gz 2523433 SHA256 2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0 SHA512 f034234acfb0fc727f28b564432219a100b916c6df4b847794a55b2fc3b8ed8714eca6de0df67c7c427b7c2bb4dd00f65cfd34e6eb60181e41ab84fea30304e4 WHIRLPOOL e16e1dfcccc1f02855da9f53407feaeca66fbe64586373aa4e8916c6b9f1dbbd023e4cd7908c8e943d0700c094dbd5e387f6c0b92492bf4e1ecc23692cc63932
diff --git a/dev-lang/gforth/files/0.6.2-c-to-forth-to-c.patch b/dev-lang/gforth/files/0.6.2-c-to-forth-to-c.patch
new file mode 100644
index 00000000000..28ab2e5f572
--- /dev/null
+++ b/dev-lang/gforth/files/0.6.2-c-to-forth-to-c.patch
@@ -0,0 +1,30 @@
+Index: engine/main.c
+===================================================================
+RCS file: /usr/local/lib/cvs-repository/src-master/gforth/engine/main.c,v
+retrieving revision 1.139
+retrieving revision 1.140
+diff -u -r1.139 -r1.140
+--- engine/main.c.old 2004/01/20 19:07:41 1.139
++++ engine/main.c 2004/04/10 00:16:55 1.140
+@@ -70,8 +70,21 @@
+
+ void engine_callback(Xt* fcall, void * alist)
+ {
++ /* save global valiables */
++ Cell *rp = RP;
++ Cell *sp = SP;
++ Float *fp = FP;
++ Address lp = LP;
++
+ clist = (va_alist)alist;
+- engine(fcall, SP, RP, FP, LP);
++
++ engine(fcall, sp, rp, fp, lp);
++
++ /* restore global variables */
++ RP = rp;
++ SP = sp;
++ FP = fp;
++ LP = lp;
+ }
+ #endif \ No newline at end of file
diff --git a/dev-lang/gforth/files/0.6.2-ppc-configure-gentoo.patch b/dev-lang/gforth/files/0.6.2-ppc-configure-gentoo.patch
new file mode 100644
index 00000000000..30061aa702f
--- /dev/null
+++ b/dev-lang/gforth/files/0.6.2-ppc-configure-gentoo.patch
@@ -0,0 +1,13 @@
+diff -ur gforth-0.6.2.orig/configure gforth-0.6.2/configure
+--- gforth-0.6.2.orig/configure 2003-08-25 03:03:42.000000000 -0500
++++ gforth-0.6.2/configure 2006-05-12 15:10:52.000000000 -0500
+@@ -3586,7 +3586,8 @@
+ fi
+
+ #long long is broken on (at least) gcc-2.95.* for PPC
+- test x$ac_cv_sizeof_long_long = x && ac_cv_sizeof_long_long=0
++ # XXX this was fixed long ago
++# test x$ac_cv_sizeof_long_long = x && ac_cv_sizeof_long_long=0
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: Using a generic machine description" >&5
diff --git a/dev-lang/gforth/files/50gforth-gentoo.el b/dev-lang/gforth/files/50gforth-gentoo.el
new file mode 100644
index 00000000000..b2be92698bb
--- /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 00000000000..fa558407c25
--- /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/files/gforth.el-gentoo.patch b/dev-lang/gforth/files/gforth.el-gentoo.patch
new file mode 100644
index 00000000000..cc98537e766
--- /dev/null
+++ b/dev-lang/gforth/files/gforth.el-gentoo.patch
@@ -0,0 +1,37 @@
+--- gforth-0.6.2-orig/gforth.el 2003-08-05 11:12:47.000000000 +0200
++++ gforth-0.6.2/gforth.el 2008-09-06 08:29:44.000000000 +0200
+@@ -61,9 +61,10 @@
+ (progn (string-match "^[0-9]+" emacs-version)
+ (string-to-int (match-string 0 emacs-version)))))
+
+-(defun forth-emacs-older (major minor)
+- (or (< emacs-major-version major)
+- (and (= emacs-major-version major) (< emacs-minor-version minor))))
++(eval-when-compile
++ (defun forth-emacs-older (major minor)
++ (or (< emacs-major-version major)
++ (and (= emacs-major-version major) (< emacs-minor-version minor)))))
+
+ ;; Code ripped from `subr.el' for compatability with Emacs versions
+ ;; prior to 20.1
+@@ -79,8 +80,9 @@
+
+ ;; `no-error' argument of require not supported in Emacs versions
+ ;; prior to 20.4 :-(
+-(defun forth-require (feature)
+- (condition-case err (require feature) (error nil)))
++(eval-and-compile
++ (defun forth-require (feature)
++ (condition-case err (require feature) (error nil))))
+
+ (require 'font-lock)
+
+@@ -1702,6 +1704,6 @@
+ (error "No current process. See variable `forth-process-buffer'"))))
+ ) ; (memq 'comint features)
+
+-(provide 'forth-mode)
++(provide 'gforth)
+
+ ;;; gforth.el ends here
+
diff --git a/dev-lang/gforth/gforth-0.7.3.ebuild b/dev-lang/gforth/gforth-0.7.3.ebuild
new file mode 100644
index 00000000000..9b5acae069e
--- /dev/null
+++ b/dev-lang/gforth/gforth-0.7.3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit elisp-common eutils
+
+DESCRIPTION="GNU Forth is a fast and portable implementation of the ANSI Forth language"
+HOMEPAGE="http://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-freebsd ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE="emacs"
+
+DEPEND="dev-libs/ffcall
+ emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.7.0-make-elc.patch"
+ epatch_user
+}
+
+src_configure() {
+ # May want to add a USE flag for --enable-force-cdiv, if necessary
+ # At this point I do not know when that is appropriate, and I don't
+ # want to add an ebuild-specific USE flag without understanding.
+ econf \
+ --without-check \
+ $(use emacs || echo "--without-lispdir")
+}
+
+src_compile() {
+ # Parallel make breaks here
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS BUGS ChangeLog NEWS* README* ToDo doc/glossaries.doc doc/*.ps
+
+ if use emacs; then
+ elisp-install ${PN} gforth.el gforth.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/gforth/metadata.xml b/dev-lang/gforth/metadata.xml
new file mode 100644
index 00000000000..e0c579bfd1d
--- /dev/null
+++ b/dev-lang/gforth/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>carsten@strotmann.de</email>
+ <name>Carsten Strotmann</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
new file mode 100644
index 00000000000..7406de315e9
--- /dev/null
+++ b/dev-lang/ghc/Manifest
@@ -0,0 +1,34 @@
+DIST binary-0.7.5.0.tar.gz 45764 SHA256 4709c5aa7cc99cb4a465a68de1648968208d0c60c368e2fece476d977530ef19 SHA512 232e7c3da1c0055f3e9f211a86e81c76bc44ab1b70cabd23c93634dbaa42eed8bd9314fbedc16b9703d3ca92b0bbf232e6c30bb1384687dad0e6e85c9abb8947 WHIRLPOOL 1d8dcf9d5125ff398375f4024c0e43fa168004811db7824e2739ec5c0451b38dae9ad74f757c7708427deed0044580b182e35d1c7ecffec25f7b10c70bd32075
+DIST ghc-7.10.2-src.tar.bz2 12651156 SHA256 908a01ca86238318f4e880fda400ea399d0a0008d699c912b85d0e0f746e5689 SHA512 e3f99a9e848c12b728212da24bf9029ec8cde88cdfa7eeb4ee2ea223ad8bcaae3e7c27456d09d60a3d21efa8f907ccd2490caf5630ca5fe3ce87f04901275a66 WHIRLPOOL dee757e79de8ac6bcf127212703985282ce96d050be50e78c3f249f13dc0212c9fd96899502748ceb26b9fc3a804379a456e19a9bedfef72f6890992b00492da
+DIST ghc-7.4.2-src.tar.bz2 25836446 SHA256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d SHA512 5a3d06a36702fa7e337b482c9de92ce1f84a68f18d8560bcc11f3617d6d46f93167fee27e786de6483a9ef0eab3b1ac6909a71dd53908d36156df4e465075050 WHIRLPOOL 61865eed2bf92728e7c4c4a0c48be44081bf728cfd824760d643e2fad838d96c19e173052d3aac073e0795b5efa3720ba5ddf13cca1ec7952b7524bbe1f204bc
+DIST ghc-7.6.3-src.tar.bz2 110763823 SHA256 bd43823d31f6b5d0b2ca7b74151a8f98336ab0800be85f45bb591c9c26aac998 SHA512 ac86f18b4feeb0bdc9e867261600b210caf62740d73ae657259bbe8149b8c2c4f5a73d09d74d944d4e50f85cc87503485365f0a0ae65befe8d2b6844e5e1253a WHIRLPOOL 0fe1f5f2987699067494559e6a679d28f027eee8fb2a00c683161dbce5443b1faeebfb51572209b75231cee24c7f0c929cabbc82a93f70e16d05e351fdfe2eaf
+DIST ghc-7.8.3-src.tar.xz 9160092 SHA256 b0cd96a549ba3b5e512847a4a8cd1a3174e4b2b75dadfc41c568fb812887b958 SHA512 2cc8c2aa6f18ba565c1e2aa637045e246f1214c2a77e95c2a97dfb97203b8983e4ad3cc13178b4b51aff70c58d59a1f68f94cd813d043745cb02411bad04bb00 WHIRLPOOL 3a2e8eea0db7a150e4732efed488a3a5eb56da00a9a90a3379afcb4090323925a2a7485fec6676e784139f112d7c825e8d18a576c34c760af4a7f3adb22c021a
+DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
+DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
+DIST ghc-bin-7.10.2-amd64.tbz2 112028560 SHA256 536297ac402da44ec1aafb1a937960883d12d192db16715ca34ab6469773a4c7 SHA512 207d8032c99d52bf4215ddeea2dbcd5816bb8d4caf2c3c31190e3ca92b49667d98a4f97aaf4cd6b40090f150854d520f75b5420dfe1ade7f036cf35d3dcb5100 WHIRLPOOL 8e43956a61c2c0fead242e3b179cde4918c04f3db7dbb27cc986f00f981261d98028ead82548b87d183d8da928635d5db4aa62ff1161f4077e5370483530a316
+DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
+DIST ghc-bin-7.4.2-alpha.tbz2 130483507 SHA256 cd8e72e569574f137bf10fcdb4337bb0dc320deb2a2c4d72529a821735c53ae6 SHA512 6fb99dea706965afa60f4aeb68da3da1c69dda477f5fcfb4e67b73d75b78583193148ce9f623a356679a57f1a740f8010f28a22f08e56ace50f3fcd42142f83f WHIRLPOOL e5ec69ab24dc963ac709f13928c0e35931d5d50ca6b21dfb0aa79f9088c0ce1196b64bb4d9668e35d73dcdf9e2df9c3da59c95eaf3db8b793a6bb65b1f4ba6c0
+DIST ghc-bin-7.4.2-amd64-stable-glibc.tbz2 93139900 SHA256 f06dff00585cc1a8ecc8ac29aeca7fdc601d272eed29d7613f7a2f2924cad585 SHA512 9b725f2613dd9013851a16eaea4000ea424c51cbafa97d3860f120fdb9936247f8c65208775a80a2f49b74946ddda2e843a54dec00b78c521197374aa3dd2d50 WHIRLPOOL 9e2630b1de40a059c324be38a1fe68b16ea484bc7afc2a397ea05192263d1964aed1d29fde543622ceab12ed2df111204576fdc72b7e35b2bbf9c6b9519901d1
+DIST ghc-bin-7.4.2-ia64.tbz2 155787636 SHA256 a1d89221645832cc5d11cde4937cce75d564e6a79eba334b92a4c465eb3f161f SHA512 c7138ed8eaf40ee7e7559b6063096351b64fc35cbd1adb4c734b2f2c6b77fb98368b1296fcb67c1a0b21b0faf053a82f8f98c3656b89c593e677ce78165d0c74 WHIRLPOOL 7ff2db2932a6d56961dcca386c9ec8f8eb1ee12e1b84230fbb089ff137eeb216117eecaa37b33b4c037ebee0063a07cd380077b754e64ef0219759b54a4f7fe2
+DIST ghc-bin-7.4.2-ppc.tbz2 89396808 SHA256 ebf6083a1f3256a978a9408cffa2562e837b641136e5d6ad41a8ab5c2f50e804 SHA512 d7abd4a2612f26b6937dd20c11d2081b2c846178347a8e09f4ef5d8b1ef2ad3eabb9d5429fd0c214f6c5bd53eb194ccf199745904d6b861650c9eef681a48bc1 WHIRLPOOL e2f8a4c8e3209432a744fd8587be39591d7b4fb026dca36755933f49e6f650e1b34e6087d9260aee65206a700f9d70e2fb6cbe42d29645b52f060729845a347e
+DIST ghc-bin-7.4.2-ppc64.tbz2 105431655 SHA256 d0aecf47749a9862085aec6403f25197465d99a02a3c721dffd5314bf81d74eb SHA512 f220fb91b1856da37f72166fe050d4908049845eec03626d09c5b6e88701b0002835c3343c3584baf9f9d9efb5c7cbc210eb64c6eb711a58764d0fea92e8ac9f WHIRLPOOL e27022a72c254fd189995fd1b39629d5328927b83237ae4e61e97ab5efb5c451c92fe77f944c724bf9d14130d5a6cd2e0896a7cd6052de1ef7091531aa39fa0f
+DIST ghc-bin-7.4.2-sparc.tbz2 121224130 SHA256 e5eaf1f31ddc4790e0226f0075236af340ec9674d98701452d5c51455ca1cb52 SHA512 a3647d82bbb36fe0ca55185ebc9479a264e785eb5a8a33be6c37b8a6cbcf8c55373374801c685eef004de78db5aa1c96760b2bedb2ca0ac9097d39fe286984e9 WHIRLPOOL d2d5f8c5abb001fb5425e68d3d26d941569b832c373e40b5a96aaa11f589db9e2b72eb1cbcf8df7b8d4473e2cc1c61498b284d8b006cc20822c3a203fd0fe2cd
+DIST ghc-bin-7.4.2-x86-stable-glibc.tbz2 92394017 SHA256 2c42257a60aec03ae622c1a600cd210a6094f26ac310fbd307006e7f2260e2a4 SHA512 9e8ef72d2aeb5681e6bb71e2eb875587ddd51089cfc3443c33c69f93274a29e5680de4bf4884af05cd84f0e9cea13d66d20f1e89994460137910cbc987b64359 WHIRLPOOL 5722824af91f1191e6a38a8eb4696e765468e3bf54ad411b1d387ae4bcc7cd4cb772bdf2054d7013a3cff41feaaf5607f051b3c0d9f609ca19f1a1f92dd02586
+DIST ghc-bin-7.6.3-amd64.tbz2 94441516 SHA256 3ef747e96a40c9d5021e88b8afee0a97838c27b00619d9187783d95279c31779 SHA512 89f6c693d83d6309a0e44fcc68e30279c858adb0a0ea9317dd168b2e632c22a8507da78ed953523f5d7156db98e06c6df56d6edc19c0c50b3941ea578263dc64 WHIRLPOOL 891dfbfc9d88fa579b6a837651f7cc6d9aecef8b8752ec7bcebbdfef2a6d8929d0edaceff27ec61d6160d36d1b0e8406b7829a04a858ed64210b5c57b9c98940
+DIST ghc-bin-7.6.3-r1-alpha.tbz2 123486983 SHA256 fb6828d9dff7b90563cc7b3277ed38801907930aebd6042a7e5ba61e5f50db73 SHA512 7821bdf7490283dc062be090d224138dd34641e014cc6742edaa51dcc9cb1de9724d575955b596c9273b878dfe79023daf172b132b124f67567132649cf9a30d WHIRLPOOL 4e51a7e7f54fcb4aeb7a4ade4140533413348f9aacf04f683fe7cc5e20843dc6a95bdd6d79a995e5e1085747be9e584df6ada61430662f06eb600abae0c7eabd
+DIST ghc-bin-7.6.3-r1-ia64.tbz2 154480728 SHA256 9a176312f796a189c0354deab9a7c446db274f75f40554963c2f86597a5951fb SHA512 2aa945cebcd3d0c26af5ddb53cf2002ec6d263d071173495905dd52898bd2ab6605370b0025554c1f6afbd28e276abc708708e4add9a9b8cb08b4bb39f8f50a1 WHIRLPOOL 6371531141e707618577e924c01102481a12d91e2c85e24694ba64f9b2545869c248999138146f63ca379a4243ccd0dfa322ea01a23d222b9757584787c5a899
+DIST ghc-bin-7.6.3-r1-ppc.tbz2 91800558 SHA256 c9b2262957585c9f02136014aa05423e1b7674c8eb0731a6d991e400e053e33a SHA512 2a101a30a4324780f1a614e044ba614f9094cd57d026c56f2b3ba514ae049c26ce8e4acbc89e93229da451b6fbe05ba0980b500cdd785bb2bce968a60434403a WHIRLPOOL 3a3b7e1eb945be01ab195880c7709514d2d11d25bab12fc15c2257207da48a37e6d6d7699c9ed5c1cc32d01057240a4d795e43cdf9d9d2748a1d94b93fb283ed
+DIST ghc-bin-7.6.3-r1-ppc64.tbz2 121213680 SHA256 7d820988a762dc56ec471c9fcb5510f2e0bb47560181aa7dea8a934e73952477 SHA512 17fb269a2eae326db927b8734cd8326061b059ecd50a377c51c37cd657380be1ae61964df299009259de6e4e00aa71a525a9224f8fa607d6cc7994c221848358 WHIRLPOOL 76e9664a535e6be54c5288be683959ab6aadafb04d03c5d2f08f8ee663868b3ed390e2a0c8e6d233a532af694709e03dc0f78d16dfe51b87e201655219da4704
+DIST ghc-bin-7.6.3-r1-sparc.tbz2 121641337 SHA256 0fb31b9584c1c6caafb44a51158bfd3d85c28d2313f8201855f58c019a1692c0 SHA512 d71efc47769efb091f93cb288b54a1fadfd4184053149b1cd7c219a0c9c95ed97c32b101c712e20643fea12546357b70a11f2852bebeac2141e961a3e4bf8764 WHIRLPOOL 37d320e01d8e43ecba6e90f8d0a9c440d30ea31ff79d9094a8205d9ce892570f81b8641080034215fdddf71131de1acc364e2a485383af8346190c36201c1e91
+DIST ghc-bin-7.6.3-x86.tbz2 93718672 SHA256 a55024f66a048437fcd6ef0f33cdb994a43628998a2f0fe4d094cc9ba83d1615 SHA512 624f2a3238dee15853018d45632d1363e42d34099a77e5e9ce5c8da976cb4c33578144f7c39dbf25ee68c17d8d42910db2347186849eeeda6bc20053ce2be990 WHIRLPOOL bc646fc19906b59416358fb7558b6e2c3f7ad069c2fcf443be36b621894cfcecb0844acf5b5f9c383e034dfff3e24d312a7da0d7a629836134ec5dc1ecd6f139
+DIST ghc-bin-7.8.3-amd64.tbz2 100786052 SHA256 af49f547336a4f9f13cd625155d5a6a998e52ae7da8bbbddc856f88b00b6aff4 SHA512 b1826095b67fa2028678057f70909bff4e082b82f3b70f1aedbc91073efad54334fa1864bc8248c9249eec6edab3671dc38ac1650be86f1245e2fecf92528952 WHIRLPOOL 5b44fff77a0d79c6f7c5c8ca792eb6b36987d1de58d5ebc0a9b05da9c19a2c312eca6b9d40e7e63437742b7f9c28c925feb3bea7f9803dda95fac7acaa7a3132
+DIST ghc-bin-7.8.3-x86.tbz2 102583755 SHA256 c67f0d2471e594b4fdfc5b219bb6b61e57e6ba75132aa3f63d171550af8cbe3c SHA512 badabbba2f46b5ab3a2601e53997ce6533162afeec7dc36eeb877a62680a9f599aeb05dd3682f45d3e273d71d28b8bd01eee37dcad3c7354e8f83b7be4e58536 WHIRLPOOL 7b99b6bbeb4ad6d203f270d8446285825ad0857a8ab058d8c126155b49e8819e0efc2f6c42b5ff775dc0ece5488e97fcc7ae2459fe87fdceef43d63a75443430
+DIST ghc-bin-7.8.4-alpha.tbz2 210691009 SHA256 23c9e5ef97b444fa87d3b9509a7b2b7b68c526ca4139739dd60c08fb1279d48a SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f WHIRLPOOL d624b4d5eac8aa68f389b81e68d7fa2ea960c9b9c5fabb27ddf4da5140c18fd0ee9080725fb645e2c532bb0a01ade32da2cf6aac08707f9d89a94ea9752b8e72
+DIST ghc-bin-7.8.4-amd64.tbz2 100573133 SHA256 bd9d144c08caa0ff345ada8d7eed7592531b8f8b9ef2f94d0b9a42fd747440aa SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954 WHIRLPOOL ab0bd6219d68e08cb473cf2f3f15538d65940f28e84f026361032c3a6bc09f7820faf67629e915f27c2afda7de41fa9c6010a1b5cd487df0936d968c7e58a3a4
+DIST ghc-bin-7.8.4-ia64.tbz2 222789275 SHA256 8bbbc11ba64d08bad691593afafc4c6a7cf078b10cf33cb8508bf0a0b3ccf523 SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e WHIRLPOOL 181d48bbb53d181c8febf63ddae620bec1a6c212a5b5bf938228689df2ff45ba68d7d4a99ebb1b68aa516d5633be41125321e3f8fdef6e5f0cd1e4a7f9b8774c
+DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d456d49da6ba8cde990173f4b3be8d SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0 WHIRLPOOL 4904414cbfafdb48f0539b071fe80568da74beb174948ee426da5c22acf1d0c35ade89d2e160ddd109d2fbc0a508459a8e249f3b732b88735070b9522b417108
+DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
+DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
+DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
+DIST hoopl-3.10.1.0.tar.gz 241582 SHA256 7af615dfd4051670dccf31e5a7e1e71a9ae5f301e6a0668557fd84f61f6bc2d4 SHA512 943fe7034c89f4f914617cf1bccf7f66c3e660328fbbd9ae40f78a3f78a4a5b6fdd86c2afd40c11d4c4c4a34bc8fd47ab7e6227cdf9f3f4887b5cc796720e7aa WHIRLPOOL 3a410081f70c4ebbb563a48d71ec6f1e226a13b965ea12d01ca521b32041308394c7da6d3b3e36e75d1322c188b81fc08f4b2bf6037df5d8ac4998a944326be2
+DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b
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 00000000000..682c573c90a
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch
@@ -0,0 +1,17 @@
+Strip versioning components from *HOST for Darwin and Solaris
+
+--- aclocal.m4
++++ aclocal.m4
+@@ -1358,6 +1358,12 @@
+ freebsd*)
+ $2="freebsd"
+ ;;
++ darwin*)
++ $2="darwin"
++ ;;
++ solaris2.*)
++ $2="solaris2"
++ ;;
+ *)
+ echo "Unknown OS $1"
+ exit 1
diff --git a/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch b/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch
new file mode 100644
index 00000000000..bfbee41b4f9
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.0.4-darwin8.patch
@@ -0,0 +1,18 @@
+Workaround headers problem in Darwin 8 as well.
+
+--- rts/PosixSource.h
++++ rts/PosixSource.h
+@@ -11,6 +11,13 @@
+
+ #include <ghcplatform.h>
+
++#if defined(darwin_HOST_OS)
++/* unfortunately the hack below only works for Darwin 9 and
++ * above, so as hack include sys/types early (before setting
++ * _POSIX_C_SOURCE) (this obviously obsoletes the hack below) */
++#include <sys/types.h>
++#endif
++
+ #if defined(freebsd_HOST_OS)
+ #define _POSIX_C_SOURCE 200112L
+ #define _XOPEN_SOURCE 600
diff --git a/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch b/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch
new file mode 100644
index 00000000000..be0f7a05b1e
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch
@@ -0,0 +1,89 @@
+diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
+index 3b206ff..08c031c 100644
+--- a/rts/RaiseAsync.c
++++ b/rts/RaiseAsync.c
+@@ -56,7 +56,8 @@ static void throwToSendMsg (Capability *cap USED_IF_THREADS,
+
+ static void
+ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
+- rtsBool stop_at_atomically, StgUpdateFrame *stop_here)
++ rtsBool stop_at_atomically, StgUpdateFrame *stop_here,
++ rtsBool dequeue)
+ {
+ // Thread already dead?
+ if (tso->what_next == ThreadComplete || tso->what_next == ThreadKilled) {
+@@ -64,7 +65,9 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
+ }
+
+ // Remove it from any blocking queues
+- removeFromQueues(cap,tso);
++ if (dequeue) {
++ removeFromQueues(cap,tso);
++ }
+
+ raiseAsync(cap, tso, exception, stop_at_atomically, stop_here);
+ }
+@@ -72,20 +75,26 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
+ void
+ throwToSingleThreaded (Capability *cap, StgTSO *tso, StgClosure *exception)
+ {
+- throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL);
++ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsTrue);
++}
++
++void
++throwToSingleThreadedNoDequeue (Capability *cap, StgTSO *tso, StgClosure *exception)
++{
++ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsFalse);
+ }
+
+ void
+ throwToSingleThreaded_ (Capability *cap, StgTSO *tso, StgClosure *exception,
+ rtsBool stop_at_atomically)
+ {
+- throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL);
++ throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL, rtsTrue);
+ }
+
+ void // cannot return a different TSO
+ suspendComputation (Capability *cap, StgTSO *tso, StgUpdateFrame *stop_here)
+ {
+- throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here);
++ throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here, rtsTrue);
+ }
+
+ /* -----------------------------------------------------------------------------
+diff --git a/rts/RaiseAsync.h b/rts/RaiseAsync.h
+index 6bfed8d..2e8a7a3 100644
+--- a/rts/RaiseAsync.h
++++ b/rts/RaiseAsync.h
+@@ -23,6 +23,10 @@ void throwToSingleThreaded (Capability *cap,
+ StgTSO *tso,
+ StgClosure *exception);
+
++void throwToSingleThreadedNoDequeue (Capability *cap,
++ StgTSO *tso,
++ StgClosure *exception);
++
+ void throwToSingleThreaded_ (Capability *cap,
+ StgTSO *tso,
+ StgClosure *exception,
+diff --git a/rts/posix/Select.c b/rts/posix/Select.c
+index 4b19235..6889499 100644
+--- a/rts/posix/Select.c
++++ b/rts/posix/Select.c
+@@ -412,8 +412,12 @@ awaitEvent(rtsBool wait)
+ IF_DEBUG(scheduler,
+ debugBelch("Killing blocked thread %lu on bad fd=%i\n",
+ (unsigned long)tso->id, fd));
+- throwToSingleThreaded(&MainCapability, tso,
+- (StgClosure *)blockedOnBadFD_closure);
++ /*
++ * We can't use throwToSingleThreaded() here
++ * as 'RTS_FD_IS_READY' breaks blocked_queue_hd list
++ */
++ throwToSingleThreadedNoDequeue(&MainCapability, tso,
++ (StgClosure *)blockedOnBadFD_closure);
+ break;
+ case RTS_FD_IS_READY:
+ IF_DEBUG(scheduler,
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 00000000000..60db34b8b36
--- /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.2.1-freebsd-CHOST.patch b/dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch
new file mode 100644
index 00000000000..da59cd789f9
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.2.1-freebsd-CHOST.patch
@@ -0,0 +1,13 @@
+diff --git a/aclocal.m4 b/aclocal.m4
+index 11bb003..52df243 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1545,7 +1545,7 @@ case "$1" in
+ freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
+ $2="$1"
+ ;;
+- freebsd8) # like i686-gentoo-freebsd8
++ freebsd*) # like i686-gentoo-freebsd8 or i686-gentoo-freebsd8.2
+ $2="freebsd"
+ ;;
+ darwin*)
diff --git a/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch b/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch
new file mode 100644
index 00000000000..770fd650606
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.4-rc2-macos-prefix-respect-gcc.patch
@@ -0,0 +1,23 @@
+diff --git a/aclocal.m4 b/aclocal.m4
+index a377cb9..4f8fd69 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1950,17 +1950,7 @@ AC_DEFUN([XCODE_VERSION],[
+ # --------------------------------
+ # Finds where gcc is
+ AC_DEFUN([FIND_GCC],[
+- if test "$TargetOS_CPP" = "darwin" &&
+- test "$XCodeVersion1" -eq 4 &&
+- test "$XCodeVersion2" -lt 2
+- then
+- # In Xcode 4.1, 'gcc-4.2' is the gcc legacy backend (rather
+- # than the LLVM backend). We prefer the legacy gcc, but in
+- # Xcode 4.2 'gcc-4.2' was removed.
+- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
+- else
+- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
+- fi
++ FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
+ export CC
+ WhatGccIsCalled="$CC"
+ AC_SUBST(WhatGccIsCalled)
diff --git a/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch b/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch
new file mode 100644
index 00000000000..348158882aa
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.4.1-darwin-CHOST.patch
@@ -0,0 +1,18 @@
+like the other CHOST patches, but this one catches another case where
+$host is used (instead of the cannonicalised variables)
+
+--- aclocal.m4
++++ aclocal.m4
+@@ -93,10 +93,10 @@
+ exeext='.exe'
+ soext='.dll'
+ ;;
+- i386-apple-darwin|powerpc-apple-darwin)
++ i386-apple-darwin*|powerpc-apple-darwin*)
+ soext='.dylib'
+ ;;
+- x86_64-apple-darwin)
++ x86_64-apple-darwin*)
+ soext='.dylib'
+ ;;
+ esac
diff --git a/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch b/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch
new file mode 100644
index 00000000000..f2f19f1bbab
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.4.1-ticket-7339-fix-unaligned-unreg.patch
@@ -0,0 +1,28 @@
+From 26f8466507bd9383e0a7d1e62e397eca4a13822a Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue, 13 Nov 2012 01:39:14 +0300
+Subject: [PATCH] Fix unaligned access on alpha and friends (ticket #7339)
+
+Assume unknown arch (alpha and mips) an alignment sensitive target.
+Otherwise on alpha it causes ghc-7.4.1 to generate invalud lexers.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ compiler/cmm/PprC.hs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
+index 21826f8..8cdcde6 100644
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -963,6 +963,7 @@ cLoad platform expr rep
+ | otherwise
+ = char '*' <> parens (cCast platform (machRepPtrCType rep) expr)
+ where -- On these platforms, unaligned loads are known to cause problems
++ bewareLoadStoreAlignment ArchUnknown = True -- like alpha or mips
+ bewareLoadStoreAlignment (ArchARM {}) = True
+ bewareLoadStoreAlignment _ = False
+
+--
+1.8.0
+
diff --git a/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch b/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch
new file mode 100644
index 00000000000..73c4aa278dd
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.4.2-system-libffi.patch
@@ -0,0 +1,119 @@
+Make ghc use the libffi installed on the system instead of the bundled one.
+
+This patch is based on the one used by Debian and Fedora, but was
+augmented by additional lines to identify the libffi include directory
+using pkg-config, as libffi on Gentoo installs into a subdirectory of
+the system include directory.
+
+2012-04-24 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/411925
+http://hackage.haskell.org/trac/ghc/ticket/5743
+
+Index: ghc-7.4.1/ghc.mk
+===================================================================
+--- ghc-7.4.1.orig/ghc.mk
++++ ghc-7.4.1/ghc.mk
+@@ -579,7 +579,6 @@ BUILD_DIRS += \
+ driver/ghci \
+ driver/ghc \
+ driver/haddock \
+- libffi \
+ includes \
+ rts
+
+Index: ghc-7.4.1/rts/ghc.mk
+===================================================================
+--- ghc-7.4.1.orig/rts/ghc.mk
++++ ghc-7.4.1/rts/ghc.mk
+@@ -86,8 +86,7 @@
+ ALL_RTS_DEF_LIBNAMES = base ghc-prim
+ ALL_RTS_DEF_LIBS = \
+ rts/dist/build/win32/libHSbase.dll.a \
+- rts/dist/build/win32/libHSghc-prim.dll.a \
+- libffi/build/inst/lib/libffi.dll.a
++ rts/dist/build/win32/libHSghc-prim.dll.a
+
+ # -- import libs for the regular Haskell libraries
+ define make-importlib-def # args $1 = lib name
+@@ -172,12 +171,12 @@
+ # Making a shared library for the RTS.
+ ifneq "$$(findstring dyn, $1)" ""
+ ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.dll
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
+ "$$(RM)" $$(RM_OPTS) $$@
+ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
+ -no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
+ else
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
+ "$$(RM)" $$(RM_OPTS) $$@
+ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
+ -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
+@@ -188,9 +187,9 @@
+ endif
+ endif
+ else
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
+ "$$(RM)" $$(RM_OPTS) $$@
+- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
++ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
+ $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
+ endif
+
+@@ -403,6 +402,12 @@
+ rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
+ rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
+
++# Use system libffi
++libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
++rts/Adjustor_CC_OPTS += $(libffi_include_flags)
++rts/Interpreter_CC_OPTS += $(libffi_include_flags)
++rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
++
+ #-----------------------------------------------------------------------------
+ # Add PAPI library if needed
+
+@@ -504,10 +509,8 @@
+ # installing
+
+ INSTALL_LIBS += $(ALL_RTS_LIBS)
+-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
+-INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
+
+-install: install_libffi_headers
++install:
+
+ .PHONY: install_libffi_headers
+ install_libffi_headers :
+Index: ghc-7.4.1/rts/package.conf.in
+===================================================================
+--- ghc-7.4.1.orig/rts/package.conf.in
++++ ghc-7.4.1/rts/package.conf.in
+@@ -24,8 +24,9 @@
+ hs-libraries: "HSrts"
+
+ extra-libraries:
++ "ffi"
+ #ifdef HAVE_LIBM
+- "m" /* for ldexp() */
++ , "m" /* for ldexp() */
+ #endif
+ #ifdef HAVE_LIBRT
+ , "rt"
+Index: ghc-7.4.1/compiler/ghc.mk
+===================================================================
+--- ghc-7.4.1.orig/compiler/ghc.mk
++++ ghc-7.4.1/compiler/ghc.mk
+@@ -260,6 +260,8 @@
+
+ compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
+ compiler_CPP_OPTS += ${GhcCppOpts}
++libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
++compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
+
+ $(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
+ $(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
diff --git a/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch b/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch
new file mode 100644
index 00000000000..f3b0c71c545
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.5.20120505-system-libffi.patch
@@ -0,0 +1,88 @@
+--- ghc-7.5.20120505-orig/ghc.mk 2012-05-06 03:01:29.000000000 +1000
++++ ghc-7.5.20120505/ghc.mk 2012-05-06 17:22:01.023416003 +1000
+@@ -584,7 +584,6 @@
+ $(MAYBE_GHCI) \
+ driver/ghc \
+ driver/haddock \
+- libffi \
+ includes \
+ rts
+
+--- ghc-7.5.20120505-orig/rts/ghc.mk 2012-05-06 03:01:30.000000000 +1000
++++ ghc-7.5.20120505/rts/ghc.mk 2012-05-06 17:28:31.925897226 +1000
+@@ -171,12 +171,12 @@
+ # Making a shared library for the RTS.
+ ifneq "$$(findstring dyn, $1)" ""
+ ifeq "$$(HostOS_CPP)" "mingw32"
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL)
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
+ "$$(RM)" $$(RM_OPTS) $$@
+ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
+ -no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
+ else
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
+ "$$(RM)" $$(RM_OPTS) $$@
+ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
+ -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
+@@ -187,9 +187,9 @@
+ endif
+ endif
+ else
+-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
+ "$$(RM)" $$(RM_OPTS) $$@
+- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
++ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
+ $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
+ endif
+
+@@ -407,6 +407,12 @@
+ rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
+ rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
+
++# Use system libffi
++libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
++rts/Adjustor_CC_OPTS += $(libffi_include_flags)
++rts/Interpreter_CC_OPTS += $(libffi_include_flags)
++rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
++
+ #-----------------------------------------------------------------------------
+ # Add PAPI library if needed
+
+@@ -508,10 +514,8 @@
+ # installing
+
+ INSTALL_LIBS += $(ALL_RTS_LIBS)
+-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
+-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
+
+-install: install_libffi_headers
++install:
+
+ .PHONY: install_libffi_headers
+ install_libffi_headers :
+--- ghc-7.5.20120505-orig/rts/package.conf.in 2012-05-06 03:01:30.000000000 +1000
++++ ghc-7.5.20120505/rts/package.conf.in 2012-05-06 17:22:01.025416056 +1000
+@@ -24,8 +24,9 @@
+ hs-libraries: "HSrts"
+
+ extra-libraries:
++ "ffi"
+ #ifdef HAVE_LIBM
+- "m" /* for ldexp() */
++ , "m" /* for ldexp() */
+ #endif
+ #ifdef HAVE_LIBRT
+ , "rt"
+--- ghc-7.5.20120505-orig/compiler/ghc.mk 2012-05-06 03:01:29.000000000 +1000
++++ ghc-7.5.20120505/compiler/ghc.mk 2012-05-06 17:22:01.026416083 +1000
+@@ -260,6 +260,8 @@
+
+ compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
+ compiler_CPP_OPTS += ${GhcCppOpts}
++libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
++compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
+
+ $(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
+ $(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
diff --git a/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch b/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch
new file mode 100644
index 00000000000..0dc5391678f
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.6.2-integer-simple-div-mod.patch
@@ -0,0 +1,57 @@
+commit de13417726b90b0945aaaf0b9cfbaf8ab975d8b5
+Author: Gabor Greif <ggreif@gmail.com>
+Date: Tue Jul 24 14:31:36 2012 +0200
+
+ track integer-gmp and add 'divInteger', 'modInteger'
+
+diff --git a/libraries/integer-simple/GHC/Integer.hs b/libraries/integer-simple/GHC/Integer.hs
+index c9b50a7..4122d38 100644
+--- a/libraries/integer-simple/GHC/Integer.hs
++++ b/libraries/integer-simple/GHC/Integer.hs
+@@ -4,7 +4,7 @@
+ -----------------------------------------------------------------------------
+ -- |
+ -- Module : GHC.Integer
+--- Copyright : (c) Ian Lynagh 2007-2008
++-- Copyright : (c) Ian Lynagh 2007-2012
+ -- License : BSD3
+ --
+ -- Maintainer : igloo@earth.li
+@@ -27,6 +27,7 @@ module GHC.Integer (
+ plusInteger, minusInteger, timesInteger, negateInteger,
+ eqInteger, neqInteger, absInteger, signumInteger,
+ leInteger, gtInteger, ltInteger, geInteger, compareInteger,
++ divInteger, modInteger,
+ divModInteger, quotRemInteger, quotInteger, remInteger,
+ encodeFloatInteger, decodeFloatInteger, floatFromInteger,
+ encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger,
+diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs
+index c3d812c..67ed19c 100644
+--- a/libraries/integer-simple/GHC/Integer/Type.hs
++++ b/libraries/integer-simple/GHC/Integer/Type.hs
+@@ -7,7 +7,7 @@
+ -----------------------------------------------------------------------------
+ -- |
+ -- Module : GHC.Integer.Type
+--- Copyright : (c) Ian Lynagh 2007-2008
++-- Copyright : (c) Ian Lynagh 2007-2012
+ -- License : BSD3
+ --
+ -- Maintainer : igloo@earth.li
+@@ -370,6 +370,16 @@ n `divModInteger` d =
+ then (# q `minusInteger` oneInteger, r `plusInteger` d #)
+ else (# q, r #)
+
++{-# NOINLINE divInteger #-}
++divInteger :: Integer -> Integer -> Integer
++n `divInteger` d = quotient
++ where (# quotient, _ #) = n `divModInteger` d
++
++{-# NOINLINE modInteger #-}
++modInteger :: Integer -> Integer -> Integer
++n `modInteger` d = modulus
++ where (# _, modulus #) = n `divModInteger` d
++
+ {-# NOINLINE quotRemInteger #-}
+ quotRemInteger :: Integer -> Integer -> (# Integer, Integer #)
+ Naught `quotRemInteger` (!_) = (# Naught, Naught #)
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 00000000000..08410fa0cd9
--- /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.6.3-trac-3333-weak-syms.patch b/dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch
new file mode 100644
index 00000000000..c3184a68c1e
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.6.3-trac-3333-weak-syms.patch
@@ -0,0 +1,387 @@
+The patch set adds support for weak symbols to ghci.
+
+For gentoo it fixes nonworking ghci / template haskell
+for package base.
+
+Steps to reproduce:
+ 1. CFLAGS=-Os emerge ghc
+ 2. ghci -package base
+ Loading package base ... linking ... ghc: /usr/lib64/ghc-7.6.3/base-4.6.0.1/HSbase-4.6.0.1.o: unknown symbol `stat'
+
+When built with -O2 weak 'stat' resolved to '__xstat' and we don't see any errors.
+But on olwer optimization levels 'stat' remains.
+
+Patches-by: akio
+Gentoo-bug: http://bugs.gentoo.org/452442
+Upstream-bug: http://ghc.haskell.org/trac/ghc/ticket/3333
+
+From 500d57d3a18412c78cab5abc4d91f1564edc964d Mon Sep 17 00:00:00 2001
+From: Takano Akio <aljee@hyper.cx>
+Date: Sat, 29 Dec 2012 11:47:22 +0900
+Subject: [PATCH 1/3] Linker.c: remove stablehash, which is no longer used
+
+---
+ includes/rts/Linker.h | 3 ---
+ rts/Linker.c | 31 ++-----------------------------
+ 2 files changed, 2 insertions(+), 32 deletions(-)
+
+diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
+index e900e85..d20ebc2 100644
+--- a/includes/rts/Linker.h
++++ b/includes/rts/Linker.h
+@@ -23,9 +23,6 @@ typedef char pathchar;
+ /* initialize the object linker */
+ void initLinker( void );
+
+-/* insert a stable symbol in the hash table */
+-void insertStableSymbol(pathchar* obj_name, char* key, StgPtr data);
+-
+ /* insert a symbol in the hash table */
+ void insertSymbol(pathchar* obj_name, char* key, void* data);
+
+diff --git a/rts/Linker.c b/rts/Linker.c
+index fa1de89..513fe3f 100644
+--- a/rts/Linker.c
++++ b/rts/Linker.c
+@@ -30,1 +30,0 @@
+-#include "Stable.h"
+@@ -150,9 +149,6 @@ int dynamicByDefault = 0;
+ /* Hash table mapping symbol names to Symbol */
+ static /*Str*/HashTable *symhash;
+
+-/* Hash table mapping symbol names to StgStablePtr */
+-static /*Str*/HashTable *stablehash;
+-
+ /* List of currently loaded objects */
+ ObjectCode *objects = NULL; /* initially empty */
+
+@@ -1126,1 +1126,0 @@ typedef struct _RtsSymbolVal {
+- SymI_HasProto(insertStableSymbol) \
+@@ -1488,7 +1483,6 @@ initLinker( void )
+ #if defined(THREADED_RTS) && (defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO))
+ initMutex(&dl_mutex);
+ #endif
+- stablehash = allocStrHashTable();
+ symhash = allocStrHashTable();
+
+ /* populate the symbol table with stuff from the RTS */
+@@ -1817,17 +1811,6 @@ error:
+ }
+
+ /* -----------------------------------------------------------------------------
+- * insert a stable symbol in the hash table
+- */
+-
+-void
+-insertStableSymbol(pathchar* obj_name, char* key, StgPtr p)
+-{
+- ghciInsertStrHashTable(obj_name, stablehash, key, getStablePtr(p));
+-}
+-
+-
+-/* -----------------------------------------------------------------------------
+ * insert a symbol in the hash table
+ */
+ void
+@@ -4749,8 +4732,6 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
+ #ifdef i386_HOST_ARCH
+ Elf_Addr value;
+ #endif
+- StgStablePtr stablePtr;
+- StgPtr stableVal;
+ #ifdef arm_HOST_ARCH
+ int is_target_thm=0, T=0;
+ #endif
+@@ -4773,16 +4754,8 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
+
+ } else {
+ symbol = strtab + sym.st_name;
+- stablePtr = (StgStablePtr)lookupHashTable(stablehash, (StgWord)symbol);
+- if (NULL == stablePtr) {
+- /* No, so look up the name in our global table. */
+- S_tmp = lookupSymbol( symbol );
+- S = (Elf_Addr)S_tmp;
+- } else {
+- stableVal = deRefStablePtr( stablePtr );
+- S_tmp = stableVal;
+- S = (Elf_Addr)S_tmp;
+- }
++ S_tmp = lookupSymbol( symbol );
++ S = (Elf_Addr)S_tmp;
+ }
+ if (!S) {
+ errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol);
+--
+1.7.9.5
+
+From 2e5e0f7a90dd390adc5ae5fb2a3bc6e879aa42d6 Mon Sep 17 00:00:00 2001
+From: Takano Akio <aljee@hyper.cx>
+Date: Sat, 29 Dec 2012 11:59:34 +0900
+Subject: [PATCH 2/3] ghci: add support for ELF weak symbols
+
+---
+ rts/Linker.c | 102 ++++++++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 78 insertions(+), 24 deletions(-)
+
+diff --git a/rts/Linker.c b/rts/Linker.c
+index 513fe3f..5105085 100644
+--- a/rts/Linker.c
++++ b/rts/Linker.c
+@@ -146,7 +146,13 @@ int dynamicByDefault = 1;
+ int dynamicByDefault = 0;
+ #endif
+
+-/* Hash table mapping symbol names to Symbol */
++typedef struct _RtsSymbolInfo {
++ void *value;
++ const ObjectCode *owner;
++ HsBool weak;
++} RtsSymbolInfo;
++
++/* Hash table mapping symbol names to RtsSymbolInfo */
+ static /*Str*/HashTable *symhash;
+
+ /* List of currently loaded objects */
+@@ -1415,15 +1421,31 @@ static RtsSymbolVal rtsSyms[] = {
+ * Insert symbols into hash tables, checking for duplicates.
+ */
+
+-static void ghciInsertStrHashTable ( pathchar* obj_name,
+- HashTable *table,
+- char* key,
+- void *data
+- )
++static void ghciInsertSymbolTable(
++ pathchar* obj_name,
++ HashTable *table,
++ char* key,
++ void *data,
++ HsBool weak,
++ ObjectCode *owner)
+ {
+- if (lookupHashTable(table, (StgWord)key) == NULL)
++ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
++ if (!pinfo) /* new entry */
++ {
++ pinfo = stgMallocBytes(sizeof (*pinfo), "ghciInsertToSymbolTable");
++ pinfo->value = data;
++ pinfo->owner = owner;
++ pinfo->weak = weak;
++ insertStrHashTable(table, key, pinfo);
++ return;
++ } else if ((!pinfo->weak || pinfo->value) && weak) {
++ return; /* duplicate weak symbol, throw it away */
++ } else if (pinfo->weak) /* weak symbol is in the table */
+ {
+- insertStrHashTable(table, (StgWord)key, data);
++ /* override the weak definition with the non-weak one */
++ pinfo->value = data;
++ pinfo->owner = owner;
++ pinfo->weak = HS_BOOL_FALSE;
+ return;
+ }
+ debugBelch(
+@@ -1444,6 +1466,32 @@ static void ghciInsertStrHashTable ( pathchar* obj_name,
+ );
+ stg_exit(1);
+ }
++
++static HsBool ghciLookupSymbolTable(HashTable *table,
++ const char *key, void **result)
++{
++ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
++ if (!pinfo) {
++ *result = NULL;
++ return HS_BOOL_FALSE;
++ }
++ if (pinfo->weak)
++ IF_DEBUG(linker, debugBelch("lookup: promoting %s\n", key));
++ /* Once it's looked up, it can no longer be overridden */
++ pinfo->weak = HS_BOOL_FALSE;
++
++ *result = pinfo->value;
++ return HS_BOOL_TRUE;
++}
++
++static void ghciRemoveSymbolTable(HashTable *table, const char *key,
++ ObjectCode *owner)
++{
++ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
++ if (!pinfo || owner != pinfo->owner) return;
++ removeStrHashTable(table, key, NULL);
++ stgFree(pinfo);
++}
+ /* -----------------------------------------------------------------------------
+ * initialize the object linker
+ */
+@@ -1487,8 +1535,8 @@ initLinker( void )
+
+ /* populate the symbol table with stuff from the RTS */
+ for (sym = rtsSyms; sym->lbl != NULL; sym++) {
+- ghciInsertStrHashTable(WSTR("(GHCi built-in symbols)"),
+- symhash, sym->lbl, sym->addr);
++ ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"),
++ symhash, sym->lbl, sym->addr, HS_BOOL_FALSE, NULL);
+ IF_DEBUG(linker, debugBelch("initLinker: inserting rts symbol %s, %p\n", sym->lbl, sym->addr));
+ }
+ # if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
+@@ -1816,7 +1864,7 @@ error:
+ void
+ insertSymbol(pathchar* obj_name, char* key, void* data)
+ {
+- ghciInsertStrHashTable(obj_name, symhash, key, data);
++ ghciInsertSymbolTable(obj_name, symhash, key, data, HS_BOOL_FALSE, NULL);
+ }
+
+ /* -----------------------------------------------------------------------------
+@@ -1829,9 +1877,8 @@ lookupSymbol( char *lbl )
+ IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s\n", lbl));
+ initLinker() ;
+ ASSERT(symhash != NULL);
+- val = lookupStrHashTable(symhash, lbl);
+
+- if (val == NULL) {
++ if (!ghciLookupSymbolTable(symhash, lbl, &val)) {
+ IF_DEBUG(linker, debugBelch("lookupSymbol: symbol not found\n"));
+ # if defined(OBJFORMAT_ELF)
+ return internal_dlsym(dl_prog_handle, lbl);
+@@ -1903,7 +1950,7 @@ void ghci_enquire ( char* addr )
+ if (sym == NULL) continue;
+ a = NULL;
+ if (a == NULL) {
+- a = lookupStrHashTable(symhash, sym);
++ ghciLookupSymbolTable(symhash, sym, (void **)&a);
+ }
+ if (a == NULL) {
+ // debugBelch("ghci_enquire: can't find %s\n", sym);
+@@ -2715,7 +2762,7 @@ unloadObj( pathchar *path )
+ int i;
+ for (i = 0; i < oc->n_symbols; i++) {
+ if (oc->symbols[i] != NULL) {
+- removeStrHashTable(symhash, oc->symbols[i], NULL);
++ ghciRemoveSymbolTable(symhash, oc->symbols[i], oc);
+ }
+ }
+ }
+@@ -3802,7 +3849,8 @@ ocGetNames_PEi386 ( ObjectCode* oc )
+ ASSERT(i >= 0 && i < oc->n_symbols);
+ /* cstring_from_COFF_symbol_name always succeeds. */
+ oc->symbols[i] = (char*)sname;
+- ghciInsertStrHashTable(oc->fileName, symhash, (char*)sname, addr);
++ ghciInsertSymbolTable(oc->fileName, symhash, (char*)sname, addr,
++ HS_BOOL_FALSE, oc);
+ } else {
+ # if 0
+ debugBelch(
+@@ -4595,6 +4643,7 @@ ocGetNames_ELF ( ObjectCode* oc )
+ for (j = 0; j < nent; j++) {
+
+ char isLocal = FALSE; /* avoids uninit-var warning */
++ HsBool isWeak = HS_BOOL_FALSE;
+ char* ad = NULL;
+ char* nm = strtab + stab[j].st_name;
+ int secno = stab[j].st_shndx;
+@@ -4615,6 +4664,7 @@ ocGetNames_ELF ( ObjectCode* oc )
+ else
+ if ( ( ELF_ST_BIND(stab[j].st_info)==STB_GLOBAL
+ || ELF_ST_BIND(stab[j].st_info)==STB_LOCAL
++ || ELF_ST_BIND(stab[j].st_info)==STB_WEAK
+ )
+ /* and not an undefined symbol */
+ && stab[j].st_shndx != SHN_UNDEF
+@@ -4638,7 +4688,8 @@ ocGetNames_ELF ( ObjectCode* oc )
+ ad = ehdrC + shdr[ secno ].sh_offset + stab[j].st_value;
+ if (ELF_ST_BIND(stab[j].st_info)==STB_LOCAL) {
+ isLocal = TRUE;
+- } else {
++ isWeak = FALSE;
++ } else { /* STB_GLOBAL or STB_WEAK */
+ #ifdef ELF_FUNCTION_DESC
+ /* dlsym() and the initialisation table both give us function
+ * descriptors, so to be consistent we store function descriptors
+@@ -4649,6 +4700,7 @@ ocGetNames_ELF ( ObjectCode* oc )
+ IF_DEBUG(linker,debugBelch( "addOTabName(GLOB): %10p %s %s\n",
+ ad, oc->fileName, nm ));
+ isLocal = FALSE;
++ isWeak = (ELF_ST_BIND(stab[j].st_info)==STB_WEAK);
+ }
+ }
+
+@@ -4661,7 +4713,7 @@ ocGetNames_ELF ( ObjectCode* oc )
+ if (isLocal) {
+ /* Ignore entirely. */
+ } else {
+- ghciInsertStrHashTable(oc->fileName, symhash, nm, ad);
++ ghciInsertSymbolTable(oc->fileName, symhash, nm, ad, isWeak, oc);
+ }
+ } else {
+ /* Skip. */
+@@ -6306,11 +6358,13 @@ ocGetNames_MachO(ObjectCode* oc)
+ else
+ {
+ IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm));
+- ghciInsertStrHashTable(oc->fileName, symhash, nm,
++ ghciInsertSymbolTable(oc->fileName, symhash, nm,
+ image
+ + sections[nlist[i].n_sect-1].offset
+ - sections[nlist[i].n_sect-1].addr
+- + nlist[i].n_value);
++ + nlist[i].n_value,
++ HS_BOOL_FALSE,
++ oc);
+ oc->symbols[curSymbol++] = nm;
+ }
+ }
+@@ -6341,8 +6395,8 @@ ocGetNames_MachO(ObjectCode* oc)
+ nlist[i].n_value = commonCounter;
+
+ IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm));
+- ghciInsertStrHashTable(oc->fileName, symhash, nm,
+- (void*)commonCounter);
++ ghciInsertSymbolTable(oc->fileName, symhash, nm,
++ (void*)commonCounter, HS_BOOL_FALSE, oc);
+ oc->symbols[curSymbol++] = nm;
+
+ commonCounter += sz;
+@@ -6466,7 +6520,7 @@ machoInitSymbolsWithoutUnderscore(void)
+
+ #undef SymI_NeedsProto
+ #define SymI_NeedsProto(x) \
+- ghciInsertStrHashTable("(GHCi built-in symbols)", symhash, #x, *p++);
++ ghciInsertSymbolTable("(GHCi built-in symbols)", symhash, #x, *p++, HS_BOOL_FALSE, NULL);
+
+ RTS_MACHO_NOUNDERLINE_SYMBOLS
+
+--
+1.7.9.5
+
+From 916d7713b34b529ae7ec24eaa836a4eaca7724fc Mon Sep 17 00:00:00 2001
+From: Takano Akio <aljee@hyper.cx>
+Date: Sun, 6 Jan 2013 17:51:19 +0900
+Subject: [PATCH 3/3] Linker.c: add dso_handle to the symbol table
+
+---
+ rts/Linker.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/rts/Linker.c b/rts/Linker.c
+index 5105085..0b2bf63 100644
+--- a/rts/Linker.c
++++ b/rts/Linker.c
+@@ -1542,6 +1542,13 @@ initLinker( void )
+ # if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
+ machoInitSymbolsWithoutUnderscore();
+ # endif
++ /* GCC defines a special symbol __dso_handle which is resolved to NULL if
++ referenced from a statically linked module. We need to mimic this, but
++ we cannot use NULL because we use it to mean nonexistent symbols. So we
++ use an arbitrary (hopefully unique) address here.
++ */
++ ghciInsertSymbolTable(WSTR("(GHCi special symbols)"),
++ symhash, "__dso_handle", (void *)0x12345687, HS_BOOL_FALSE, NULL);
+
+ # if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO)
+ # if defined(RTLD_DEFAULT)
+--
+1.7.9.5
+
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 00000000000..d01cb49affb
--- /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 00000000000..efdd54fbf3f
--- /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-cc-lang.patch b/dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch
new file mode 100644
index 00000000000..032dc9a6762
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-cc-lang.patch
@@ -0,0 +1,129 @@
+commit 4d4d07704ee78221607a18b8118294b0aea1bac4
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue Sep 2 00:06:56 2014 +0300
+
+ systools: fix gcc version detecton on non-english locale
+
+ Summary:
+ ghc runs 'gcc -v' to check if we run under vanilla gcc
+ or disaguised clang by checking for string
+
+ "gcc version <something>"
+
+ But this check does not always work as gcc has that string
+ localized via gettext mechanism:
+
+ (some gcc's locale strings)
+ be.po-msgstr "версія gcc %s\n"
+ da.po-msgstr "GCC version %s\n"
+ de.po-msgstr "gcc-Version %s %s\n"
+ el.po-msgstr "έκδοση gcc %s\n"
+ ...
+
+ To ping gcc to English locale we now override environment
+ variable with 'LANGUAGE=en' value.
+
+ Fixes Issue #8825
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ Test Plan: validate
+
+ Reviewers: austin
+
+ Reviewed By: austin
+
+ Subscribers: simonmar, ezyang, carter
+
+ Differential Revision: https://phabricator.haskell.org/D185
+
+ GHC Trac Issues: #8825
+
+diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
+index 72fa19b..67926f5 100644
+--- a/compiler/main/SysTools.lhs
++++ b/compiler/main/SysTools.lhs
+@@ -492,6 +492,51 @@ readCreateProcess proc = do
+
+ return (ex, output)
+
++readProcessEnvWithExitCode
++ :: String -- ^ program path
++ -> [String] -- ^ program args
++ -> [(String, String)] -- ^ environment to override
++ -> IO (ExitCode, String, String) -- ^ (exit_code, stdout, stderr)
++readProcessEnvWithExitCode prog args env_update = do
++ current_env <- getEnvironment
++ let new_env = env_update ++ [ (k, v)
++ | let overriden_keys = map fst env_update
++ , (k, v) <- current_env
++ , k `notElem` overriden_keys
++ ]
++ p = proc prog args
++
++ (_stdin, Just stdoh, Just stdeh, pid) <-
++ createProcess p{ std_out = CreatePipe
++ , std_err = CreatePipe
++ , env = Just new_env
++ }
++
++ outMVar <- newEmptyMVar
++ errMVar <- newEmptyMVar
++
++ _ <- forkIO $ do
++ stdo <- hGetContents stdoh
++ _ <- evaluate (length stdo)
++ putMVar outMVar stdo
++
++ _ <- forkIO $ do
++ stde <- hGetContents stdeh
++ _ <- evaluate (length stde)
++ putMVar errMVar stde
++
++ out <- takeMVar outMVar
++ hClose stdoh
++ err <- takeMVar errMVar
++ hClose stdeh
++
++ ex <- waitForProcess pid
++
++ return (ex, out, err)
++
++-- Don't let gcc localize version info string, #8825
++en_locale_env :: [(String, String)]
++en_locale_env = [("LANGUAGE", "en")]
+
+ -- If the -B<dir> option is set, add <dir> to PATH. This works around
+ -- a bug in gcc on Windows Vista where it can't find its auxiliary
+@@ -746,8 +791,9 @@ getLinkerInfo' dflags = do
+ _ -> do
+ -- In practice, we use the compiler as the linker here. Pass
+ -- -Wl,--version to get linker version info.
+- (exitc, stdo, stde) <- readProcessWithExitCode pgm
+- ["-Wl,--version"] ""
++ (exitc, stdo, stde) <- readProcessEnvWithExitCode pgm
++ ["-Wl,--version"]
++ en_locale_env
+ -- Split the output by lines to make certain kinds
+ -- of processing easier. In particular, 'clang' and 'gcc'
+ -- have slightly different outputs for '-Wl,--version', but
+@@ -802,7 +848,8 @@ getCompilerInfo' dflags = do
+
+ -- Process the executable call
+ info <- catchIO (do
+- (exitc, stdo, stde) <- readProcessWithExitCode pgm ["-v"] ""
++ (exitc, stdo, stde) <-
++ readProcessEnvWithExitCode pgm ["-v"] en_locale_env
+ -- Split the output by lines to make certain kinds
+ -- of processing easier.
+ parseCompilerInfo (lines stdo) (lines stde) exitc
+@@ -952,7 +999,8 @@ readElfSection _dflags section exe = do
+ prog = "readelf"
+ args = [Option "-p", Option section, FileOption "" exe]
+ --
+- r <- readProcessWithExitCode prog (filter notNull (map showOpt args)) ""
++ r <- readProcessEnvWithExitCode prog (filter notNull (map showOpt args))
++ en_locale_env
+ case r of
+ (ExitSuccess, out, _err) -> return (doFilter (lines out))
+ _ -> return Nothing
diff --git a/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch b/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch
new file mode 100644
index 00000000000..8deec21edc5
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-deRefStablePtr.patch
@@ -0,0 +1,38 @@
+commit 104a66a461f4f89b8e5ad9c829923bb7ca8ceddb
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat Aug 23 13:11:23 2014 +0300
+
+ rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbol
+
+ $ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \
+ testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS
+
+ *Main> main
+ <interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr'
+
+ The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs':
+ the_cfun
+ = case maybe_target of
+ Nothing -> text "(StgClosure*)deRefStablePtr(the_stableptr)"
+ Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure"
+
+ Patch fixes all broken tests using 'import wrapper':
+ TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038"
+
+ Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds,
+ where GHCi's custom linker is used instead of system's linker.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/rts/Linker.c b/rts/Linker.c
+index e97580d..b24be58 100644
+--- a/rts/Linker.c
++++ b/rts/Linker.c
+@@ -1092,6 +1092,7 @@ typedef struct _RtsSymbolVal {
+ SymI_HasProto(__word_encodeFloat) \
+ SymI_HasProto(stg_atomicallyzh) \
+ SymI_HasProto(barf) \
++ SymI_HasProto(deRefStablePtr) \
+ SymI_HasProto(debugBelch) \
+ SymI_HasProto(errorBelch) \
+ SymI_HasProto(sysErrorBelch) \
diff --git a/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch b/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch
new file mode 100644
index 00000000000..9026ecfdf4b
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-ia64-prim.patch
@@ -0,0 +1,69 @@
+commit e2a8801b9779949010f30db6f6ef66f3c3a70776
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu Sep 4 17:50:45 2014 +0300
+
+ pprC: declare extern cmm primitives as functions, not data
+
+ Summary:
+ The commit fixes incorrect code generation of
+ integer-gmp package on ia64 due to C prototype mismatch.
+ Before patch prototype was
+ StgWord poizh[];
+ After patch it became
+ StgFunPtr poizh();
+
+ Long story:
+
+ Consider the following simple example:
+
+ {-# LANGUAGE MagicHash, GHCForeignImportPrim, UnliftedFFITypes #-}
+ module M where
+ import GHC.Prim -- Int#
+ foreign import prim "poizh" poi# :: Int# -> Int#
+
+ Before the patch Unregisterised build generated the
+ following 'poizh' reference:
+ EI_(poizh); /* StgWord poizh[]; */
+ FN_(M_poizh_entry) {
+ // ...
+ JMP_((W_)&poizh);
+ }
+
+ After the patch it looks this way:
+ EF_(poizh); /* StgFunPtr poizh(); */
+ FN_(M_poizh_entry) {
+ // ...
+ JMP_((W_)&poizh);
+ }
+
+ On ia64 it leads to different relocation types being generated:
+ incorrect one:
+ addl r14 = @ltoffx(poizh#)
+ ld8.mov r14 = [r14], poizh#
+ correct one:
+ addl r14 = @ltoff(@fptr(poizh#)), gp
+ ld8 r14 = [r14]
+
+ '@fptr(poizh#)' basically instructs assembler to creates
+ another obect consisting of real address to 'poizh' instructions
+ and module address. That '@fptr' object is used as a function "address".
+ This object is different for every module referencing 'poizh' symbol.
+
+ All indirect function calls expect '@fptr' object. That way
+ call site can read real destination address and set destination
+ module address in 'gp' register.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
+index 02ad026..0f2c0ae 100644
+--- a/compiler/cmm/CLabel.hs
++++ b/compiler/cmm/CLabel.hs
+@@ -813,6 +813,7 @@ labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
+ labelType (CmmLabel _ _ CmmCode) = CodeLabel
+ labelType (CmmLabel _ _ CmmInfo) = DataLabel
+ labelType (CmmLabel _ _ CmmEntry) = CodeLabel
++labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
+ labelType (CmmLabel _ _ CmmRetInfo) = DataLabel
+ labelType (CmmLabel _ _ CmmRet) = CodeLabel
+ labelType (RtsLabel (RtsSelectorInfoTable _ _)) = DataLabel
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 00000000000..c8570c06940
--- /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-asm.patch b/dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch
new file mode 100644
index 00000000000..10c41d5b29f
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-pic-asm.patch
@@ -0,0 +1,107 @@
+commit a93ab43ab5f40cadbedea2f6342b93c245e91434
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed Aug 27 22:19:52 2014 +0300
+
+ driver: pass '-fPIC' option to assembler as well
+
+ Summary:
+ Before the patch '-fPIC' was passed only to C compiler,
+ but not to assembler itself.
+
+ It led to runtime crash in GHC_DYNAMIC_PROGRAMS=YES mode
+ on sparc32.
+
+ Technical details are in 'Note [-fPIC for assembler]'.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ Test Plan: validate on sparc
+
+ Reviewers: simonmar, austin, kgardas
+
+ Reviewed By: austin
+
+ Subscribers: simonmar, ezyang, carter
+
+ Differential Revision: https://phabricator.haskell.org/D177
+
+diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
+index 183f435..5a18e6e 100644
+--- a/compiler/main/DriverPipeline.hs
++++ b/compiler/main/DriverPipeline.hs
+@@ -1199,6 +1199,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
+
+ as_prog <- whichAsProg
+ let cmdline_include_paths = includePaths dflags
++ let pic_c_flags = picCCOpts dflags
+
+ next_phase <- maybeMergeStub
+ output_fn <- phaseOutputFilename next_phase
+@@ -1212,6 +1213,9 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
+ = liftIO $ as_prog dflags
+ ([ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ]
+
++ -- See Note [-fPIC for assembler]
++ ++ map SysTools.Option pic_c_flags
++
+ -- We only support SparcV9 and better because V8 lacks an atomic CAS
+ -- instruction so we have to make sure that the assembler accepts the
+ -- instruction set. Note that the user can still override this
+@@ -1253,6 +1257,8 @@ runPhase (RealPhase SplitAs) _input_fn dflags
+ osuf = objectSuf dflags
+ split_odir = base_o ++ "_" ++ osuf ++ "_split"
+
++ let pic_c_flags = picCCOpts dflags
++
+ -- this also creates the hierarchy
+ liftIO $ createDirectoryIfMissing True split_odir
+
+@@ -1286,6 +1292,9 @@ runPhase (RealPhase SplitAs) _input_fn dflags
+ then [SysTools.Option "-mcpu=v9"]
+ else []) ++
+
++ -- See Note [-fPIC for assembler]
++ map SysTools.Option pic_c_flags ++
++
+ [ SysTools.Option "-c"
+ , SysTools.Option "-o"
+ , SysTools.FileOption "" (split_obj n)
+@@ -2203,3 +2212,38 @@ haveRtsOptsFlags dflags =
+ isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of
+ RtsOptsSafeOnly -> False
+ _ -> True
++
++-- Note [-fPIC for assembler]
++-- When compiling .c source file GHC's driver pipeline basically
++-- does the following two things:
++-- 1. ${CC} -S 'PIC_CFLAGS' source.c
++-- 2. ${CC} -x assembler -c 'PIC_CFLAGS' source.S
++--
++-- Why do we need to pass 'PIC_CFLAGS' both to C compiler and assembler?
++-- Because on some architectures (at least sparc32) assembler also choses
++-- relocation type!
++-- Consider the following C module:
++--
++-- /* pic-sample.c */
++-- int v;
++-- void set_v (int n) { v = n; }
++-- int get_v (void) { return v; }
++--
++-- $ gcc -S -fPIC pic-sample.c
++-- $ gcc -c pic-sample.s -o pic-sample.no-pic.o # incorrect binary
++-- $ gcc -c -fPIC pic-sample.s -o pic-sample.pic.o # correct binary
++--
++-- $ objdump -r -d pic-sample.pic.o > pic-sample.pic.o.od
++-- $ objdump -r -d pic-sample.no-pic.o > pic-sample.no-pic.o.od
++-- $ diff -u pic-sample.pic.o.od pic-sample.no-pic.o.od
++--
++-- Most of architectures won't show any difference in this test, but on sparc32
++-- the following assembly snippet:
++--
++-- sethi %hi(_GLOBAL_OFFSET_TABLE_-8), %l7
++--
++-- generates two kinds or relocations, only 'R_SPARC_PC22' is correct:
++--
++-- 3c: 2f 00 00 00 sethi %hi(0), %l7
++-- - 3c: R_SPARC_PC22 _GLOBAL_OFFSET_TABLE_-0x8
++-- + 3c: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_-0x8
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 00000000000..16a552fdd4b
--- /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 00000000000..434be8b1bda
--- /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 00000000000..3ef2313fcec
--- /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.3-unreg-lit.patch b/dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch
new file mode 100644
index 00000000000..632696d6fde
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-unreg-lit.patch
@@ -0,0 +1,84 @@
+commit a6ea05e21e175407dc9e45f18c56c1d727fd0f26
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Fri Aug 22 23:24:32 2014 +0300
+
+ UNREG: fix emission of large Integer literals in C codegen
+
+ Summary:
+ On amd64/UNREG build there is many failing tests trying
+ to deal with 'Integer' types.
+
+ Looking at 'overflow1' test I've observed invalid C code generated by
+ GHC.
+
+ Cmm code
+ CInt a = -1; (a == -1)
+ yields 'False' with optimisations enabled via the following C code:
+ StgWord64 a = (StgWord32)0xFFFFffffFFFFffffu; (a == 0xFFFFffffFFFFffffu)
+
+ The patch fixes it by shrinking emitted literals to required sizes:
+ StgWord64 a = (StgWord32)0xFFFFffffu; (a == 0xFFFFffffu)
+
+ Thanks to Reid Barton for tracking down and fixing the issue.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ Test Plan: validate on UNREG build (amd64)
+
+ Reviewers: simonmar, rwbarton, austin
+
+ Subscribers: simonmar, ezyang, carter
+
+ Differential Revision: https://phabricator.haskell.org/D173
+
+diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
+index 93a5d06..8605988 100644
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -1221,8 +1221,9 @@ commafy xs = hsep $ punctuate comma xs
+ pprHexVal :: Integer -> Width -> SDoc
+ pprHexVal 0 _ = ptext (sLit "0x0")
+ pprHexVal w rep
+- | w < 0 = parens (char '-' <> ptext (sLit "0x") <> go (-w) <> repsuffix rep)
+- | otherwise = ptext (sLit "0x") <> go w <> repsuffix rep
++ | w < 0 = parens (char '-' <>
++ ptext (sLit "0x") <> intToDoc (-w) <> repsuffix rep)
++ | otherwise = ptext (sLit "0x") <> intToDoc w <> repsuffix rep
+ where
+ -- type suffix for literals:
+ -- Integer literals are unsigned in Cmm/C. We explicitly cast to
+@@ -1237,10 +1238,33 @@ pprHexVal w rep
+ else panic "pprHexVal: Can't find a 64-bit type"
+ repsuffix _ = char 'U'
+
++ intToDoc :: Integer -> SDoc
++ intToDoc i = go (truncInt i)
++
++ -- We need to truncate value as Cmm backend does not drop
++ -- redundant bits to ease handling of negative values.
++ -- Thus the following Cmm code on 64-bit arch, like amd64:
++ -- CInt v;
++ -- v = {something};
++ -- if (v == %lobits32(-1)) { ...
++ -- leads to the following C code:
++ -- StgWord64 v = (StgWord32)({something});
++ -- if (v == 0xFFFFffffFFFFffffU) { ...
++ -- Such code is incorrect as it promotes both operands to StgWord64
++ -- and the whole condition is always false.
++ truncInt :: Integer -> Integer
++ truncInt i =
++ case rep of
++ W8 -> i `rem` (2^(8 :: Int))
++ W16 -> i `rem` (2^(16 :: Int))
++ W32 -> i `rem` (2^(32 :: Int))
++ W64 -> i `rem` (2^(64 :: Int))
++ _ -> panic ("pprHexVal/truncInt: C backend can't encode "
++ ++ show rep ++ " literals")
++
+ go 0 = empty
+ go w' = go q <> dig
+ where
+ (q,r) = w' `quotRem` 16
+ dig | r < 10 = char (chr (fromInteger r + ord '0'))
+ | otherwise = char (chr (fromInteger r - 10 + ord 'a'))
+-
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 00000000000..a8e9b1e6c85
--- /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 00000000000..9d50792bcf4
--- /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-bash-completion b/dev-lang/ghc/files/ghc-bash-completion
new file mode 100644
index 00000000000..0ee2149cd81
--- /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/files/terminfo-0.3.2.5-tinfo.patch b/dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch
new file mode 100644
index 00000000000..ca10da2e03a
--- /dev/null
+++ b/dev-lang/ghc/files/terminfo-0.3.2.5-tinfo.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/454216
+
+Mon Jan 7 16:34:47 FET 2013 Judah Jacobson <judah.jacobson@gmail.com>
+ * Search for terminfo in libtinfo; fixes GHC #7281.
+
+ Patch from Paul Johnson.
+diff -rN -u old-terminfo/configure.ac new-terminfo/configure.ac
+--- old-terminfo/configure.ac 2013-02-14 00:16:11.816111434 +0300
++++ new-terminfo/configure.ac 2013-02-14 00:16:11.819111434 +0300
+@@ -39,10 +39,11 @@
+ TERMINFO_INCLUDES="$CursesIncludes term.h"
+ fi
+
+-AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
+- [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
+- [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
+- HaveLibCurses=NO; LibCurses=not-installed)])])
++AC_CHECK_LIB(tinfo, setupterm, HaveLibCurses=YES; LibCurses=tinfo,
++ [AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
++ [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
++ [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
++ HaveLibCurses=NO; LibCurses=not-installed)])])])
+
+ if test "x$HaveLibCurses" = "xNO" ; then
+ AC_MSG_FAILURE([curses library not found, so this package cannot be built])
diff --git a/dev-lang/ghc/ghc-7.10.2.ebuild b/dev-lang/ghc/ghc-7.10.2.ebuild
new file mode 100644
index 00000000000..9aab30fd6f2
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.10.2.ebuild
@@ -0,0 +1,643 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ #alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ #ia64) return 0 ;;
+ #ppc) return 0 ;;
+ #ppc64) return 0 ;;
+ #sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.10.1.20150630 # 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 )"
+# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
+# many users
+SRC_URI="!binary? ( http://dev.gentoo.org/~slyfox/distfiles/${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.5.0"
+ "hoopl 3.10.1.0"
+ "transformers 0.4.3.0"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~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:=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+ !kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
+ kernel_linux? ( >=sys-devel/binutils-2.17:* )
+ kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
+"
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.17
+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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
+use binary && QA_PREBUILT="*"
+
+# 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
+}
+
+# $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}"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # hardened-gcc needs to be disabled, because the mangler doesn't accept
+ # its output.
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
+
+ # prevent from failind building unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+ # currently ghc fails to build haddock
+ # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+ use ia64 && append-ghc-cflags persistent compile -G0
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ [[ ${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.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.1-T10590-dequeue.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
+
+ elog "Final mk/build.mk:"
+ cat mk/build.mk || die
+
+ 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}"
+ 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)/${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/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
+ newbashcomp utils/completion/ghc.bash ghc
+ 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'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ 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-7.4.2.ebuild b/dev-lang/ghc/ghc-7.4.2.ebuild
new file mode 100644
index 00000000000..0706220fa15
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.4.2.ebuild
@@ -0,0 +1,639 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Brief explanation of the bootstrap logic:
+#
+# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
+# where ghc-bin was primarily used for bootstrapping purposes.
+# From now on, these two ebuilds have been combined, with the
+# binary USE flag used to determine whether or not the pre-built
+# binary package should be emerged or whether ghc should be compiled
+# from source. If the latter, then the relevant ghc-bin for the
+# arch in question will be used in the working directory to compile
+# ghc from source.
+#
+# This solution has the advantage of allowing us to retain the one
+# ebuild for both packages, and thus phase out virtual/ghc.
+
+# Note to users of hardened gcc-3.x:
+#
+# If you emerge ghc with hardened gcc it should work fine (because we
+# turn off the hardened features that would otherwise break ghc).
+# However, emerging ghc while using a vanilla gcc and then switching to
+# hardened gcc (using gcc-config) will leave you with a broken ghc. To
+# fix it you would need to either switch back to vanilla gcc or re-emerge
+# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
+# you switch to gcc-4.x that this will also break ghc and you'll need to
+# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
+# gcc-3.x and 4.x with no problems.
+
+EAPI="5"
+
+inherit base autotools bash-completion-r1 eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64-stable-glibc.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86-stable-glibc.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+LICENSE="BSD"
+SLOT="0/${PV}"
+# ghc on ia64 needs gcc to support -mcmodel=medium (or some dark hackery) to avoid TOC overflow
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
+IUSE+=" binary" # don't forget about me later!
+IUSE+=" elibc_glibc" # system stuff
+
+RDEPEND="
+ !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
+ kernel_linux? ( >=sys-devel/binutils-2.17 )
+ kernel_SunOS? ( >=sys-devel/binutils-2.17 )
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/gmp-5
+ virtual/libffi
+ !<dev-haskell/haddock-2.10.0
+ sys-libs/ncurses[unicode]"
+# earlier versions than 2.4.2 of haddock only works with older ghc releases
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.14
+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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.14 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+PDEPEND="
+ ${PDEPEND}
+ llvm? ( sys-devel/llvm )"
+
+# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
+REQUIRED_USE="ia64? ( !gmp )"
+
+use binary && QA_PREBUILT="*"
+
+append-ghc-cflags() {
+ local flag compile assemble link
+ for flag in $*; do
+ case ${flag} in
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
+ [[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
+ [[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
+ esac
+ done
+}
+
+ghc_setup_cflags() {
+ # 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=""
+ 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};;
+
+ # Debugging flags don't help either. You can't debug Haskell code
+ # at the C source level and the mangler discards the debug info.
+ -g*) ;;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ FILTERED_LDFLAGS=""
+ for flag in ${LDFLAGS}; do
+ case ${flag} in
+ # Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
+ "-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
+
+ # Ignore all other flags
+ esac
+ done
+
+ # hardened-gcc needs to be disabled, because the mangler doesn't accept
+ # its output.
+ gcc-specs-pie && append-ghc-cflags compile link -nopie
+ gcc-specs-ssp && append-ghc-cflags 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 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 compile -G0
+
+ # Unfortunately driver/split/ghc-split.lprl is dumb
+ # enough to preserve stack marking for each split object
+ # and it flags stack marking violation:
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
+ case $($(tc-getAS) -v 2>&1 </dev/null) in
+ *"GNU Binutils"*) # GNU ld
+ append-ghc-cflags compile assemble -Wa,--noexecstack
+ ;;
+ esac
+}
+
+# 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
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${PV}" \
+ "${WORKDIR}/usr/bin/ghci-${PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it shoult point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${PV}" \
+ "${WORKDIR}/usr/bin/ghci-${PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages for"
+ ewarn "use with the ghc ebuild's USE=\"binary\" feature."
+ use binary && \
+ die "USE=\"ghcbootstrap binary\" is not a valid combination."
+ [[ -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=${P}-src.tar.bz2 ;;
+ 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_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
+ "${WORKDIR}/usr/bin/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)/${P}/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*)
+ 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_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
+ # failed to apply. FIXME
+ #epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
+
+ epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
+ epatch "${FILESDIR}"/${PN}-7.4.1-darwin-CHOST.patch
+ epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
+
+ we_want_libffi_workaround() {
+ use ghcmakebinary && return 1
+
+ # pick only registerised arches
+ # http://bugs.gentoo.org/463814
+ use amd64 && return 0
+ use x86 && return 0
+ return 1
+ }
+ # one mode external depend with unstable ABI be careful to stash it
+ # avoid external libffi runtime when we build binaries
+ we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.4.2-system-libffi.patch
+
+ epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
+
+ if use prefix; then
+ # Make configure find docbook-xsl-stylesheets from Prefix
+ sed -i -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' utils/haddock/doc/configure.ac || die
+ fi
+
+ cd "${S}"/libraries/terminfo
+ # bug #454216
+ epatch "${FILESDIR}"/terminfo-0.3.2.5-tinfo.patch
+
+ cd "${S}"
+ # 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-${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+=${FILTERED_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
+ 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
+
+ # circumvent a very strange bug that seems related with ghc producing
+ # too much output while being filtered through tee (e.g. due to
+ # portage logging) reported as bug #111183
+ echo "SRC_HC_OPTS+=-w" >> mk/build.mk
+
+ # some arches do not support ELF parsing for ghci module loading
+ # PPC64: never worked (should be easy to implement)
+ # alpha: never worked
+ # arm: unimplemented or never worked
+ if use alpha || use ppc64 || use arm; then
+ echo "GhcWithInterpreter=NO" >> mk/build.mk
+ fi
+
+ # we have to tell it to build unregisterised on some arches
+ # ppc64: EvilMangler currently does not understand some TOCs
+ # ia64: EvilMangler bitrot
+ if use alpha || use ia64 || use ppc64; then
+ echo "GhcUnregisterised=YES" >> mk/build.mk
+ echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
+ echo "SplitObjs=NO" >> mk/build.mk
+ echo "GhcRTSWays := debug" >> mk/build.mk
+ echo "GhcNotThreaded=YES" >> mk/build.mk
+ fi
+
+ # arm: no EvilMangler support, no NCG support
+ if use arm; then
+ echo "GhcUnregisterised=YES" >> mk/build.mk
+ echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
+ fi
+
+ # Have "ld -r --relax" problem with split-objs on sparc:
+ if use sparc; then
+ echo "SplitObjs=NO" >> mk/build.mk
+ fi
+
+ if ! use llvm; then
+ echo "GhcWithLlvmCodeGen=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
+
+ # Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
+ # compiled with, by saving the path to it. The purpose is to make sure
+ # that GHC will use the very same gcc version when it compiles haskell
+ # sources, as the extra-gcc-opts files contains extra gcc options which
+ # match only this GCC version.
+ # However, this is not required in Gentoo, as only modern GCCs are used
+ # (>4).
+ # Instead, this causes trouble when for example ccache is used during
+ # compilation, but we don't want the wrappers to point to ccache.
+ # Due to the above, we simply set GCC to be "gcc". When compiling ghc it
+ # might point to ccache, once installed it will point to the users
+ # regular gcc.
+
+ econf --with-gcc=gcc || die "econf failed"
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ limit_jobs() {
+ if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
+ ewarn "You have requested parallel build which is known to break."
+ ewarn "Please report all breakages upstream."
+ return
+ fi
+ echo $@
+ }
+ # ghc massively parallel make: #409631, #409873
+ # but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
+ emake $(limit_jobs -j1) 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
+ local insttarget="install"
+
+ # We only built 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}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
+ fi
+
+ emake -j1 ${insttarget} \
+ DESTDIR="${D}" \
+ || die "make ${insttarget} failed"
+
+ # remove wrapper and linker
+ rm -f "${ED}"/usr/bin/haddock*
+
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ # so mark resulting binary
+ pax-mark -m "${ED}/usr/$(get_libdir)/${P}/ghc"
+
+ dobashcomp "${FILESDIR}/ghc-bash-completion"
+
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/${P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+
+ 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)/${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 ${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)/${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.6.3-r1.ebuild b/dev-lang/ghc/ghc-7.6.3-r1.ebuild
new file mode 100644
index 00000000000..5292d7ce2a3
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.6.3-r1.ebuild
@@ -0,0 +1,828 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Brief explanation of the bootstrap logic:
+#
+# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
+# where ghc-bin was primarily used for bootstrapping purposes.
+# From now on, these two ebuilds have been combined, with the
+# binary USE flag used to determine whether or not the pre-built
+# binary package should be emerged or whether ghc should be compiled
+# from source. If the latter, then the relevant ghc-bin for the
+# arch in question will be used in the working directory to compile
+# ghc from source.
+#
+# This solution has the advantage of allowing us to retain the one
+# ebuild for both packages, and thus phase out virtual/ghc.
+
+# Note to users of hardened gcc-3.x:
+#
+# If you emerge ghc with hardened gcc it should work fine (because we
+# turn off the hardened features that would otherwise break ghc).
+# However, emerging ghc while using a vanilla gcc and then switching to
+# hardened gcc (using gcc-config) will leave you with a broken ghc. To
+# fix it you would need to either switch back to vanilla gcc or re-emerge
+# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
+# you switch to gcc-4.x that this will also break ghc and you'll need to
+# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
+# gcc-3.x and 4.x with no problems.
+
+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 multiprocessing pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-r1-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-r1-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-r1-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-r1-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-r1-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
+IUSE+=" binary" # don't forget about me later!
+IUSE+=" elibc_glibc" # system stuff
+
+RDEPEND="
+ !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
+ kernel_linux? ( >=sys-devel/binutils-2.17 )
+ kernel_SunOS? ( >=sys-devel/binutils-2.17 )
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/gmp-5
+ virtual/libffi
+ !<dev-haskell/haddock-2.4.2
+ sys-libs/ncurses[unicode]"
+# earlier versions than 2.4.2 of haddock only works with older ghc releases
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.14
+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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.15 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+PDEPEND="
+ ${PDEPEND}
+ llvm? ( sys-devel/llvm )"
+
+# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
+REQUIRED_USE="ia64? ( !gmp )"
+
+use binary && QA_PREBUILT="*"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+append-ghc-cflags() {
+ local flag compile assemble link
+ for flag in $*; do
+ case ${flag} in
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
+ [[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
+ [[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
+ 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=""
+ 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
+
+ FILTERED_LDFLAGS=""
+ for flag in ${LDFLAGS}; do
+ case ${flag} in
+ # Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
+ "-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
+
+ # Ignore all other flags
+ esac
+ done
+
+ # hardened-gcc needs to be disabled, because the mangler doesn't accept
+ # its output.
+ gcc-specs-pie && append-ghc-cflags compile link -nopie
+ gcc-specs-ssp && append-ghc-cflags 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 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 compile -G0 -Os
+
+ # Unfortunately driver/split/ghc-split.lprl is dumb
+ # enough to preserve stack marking for each split object
+ # and it flags stack marking violation:
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
+ # * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
+ case $($(tc-getAS) -v 2>&1 </dev/null) in
+ *"GNU Binutils"*) # GNU ld
+ append-ghc-cflags compile assemble -Wa,--noexecstack
+ ;;
+ esac
+}
+
+# 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-${PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${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-${PV}" \
+ "${WORKDIR}/usr/bin/ghci-${PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${PV}" \
+ "${WORKDIR}/usr/bin/ghci-${PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${PV}" \
+ "${WORKDIR}/usr/bin/ghci-${PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${PV}" \
+ "$gp_back" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages for"
+ ewarn "use with the ghc ebuild's USE=\"binary\" feature."
+ use binary && \
+ die "USE=\"ghcbootstrap binary\" is not a valid combination."
+ [[ -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=${P}-src.tar.bz2 ;;
+ 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_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
+ "${WORKDIR}/usr/bin/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)/${P}/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_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+ # epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
+ # failed to apply. FIXME
+ #epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
+
+ # epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
+ # epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
+
+ we_want_libffi_workaround() {
+ use ghcmakebinary && return 1
+
+ # pick only registerised arches
+ # http://bugs.gentoo.org/463814
+ use amd64 && return 0
+ use x86 && return 0
+ return 1
+ }
+ # one mode external depend with unstable ABI be careful to stash it
+ # avoid external libffi runtime when we build binaries
+ we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.5.20120505-system-libffi.patch
+
+ epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
+ epatch "${FILESDIR}"/${PN}-7.6.2-integer-simple-div-mod.patch
+ # ghc-7.8 changed linker code and likely fixed it
+ epatch "${FILESDIR}"/${PN}-7.6.3-trac-3333-weak-syms.patch
+ # bug 518734
+ epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.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() {
+ GHC_PV=${PV} # overrided in live ebuilds
+
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/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+=${FILTERED_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
+ if is_crosscompile; then
+ # TODO this is a workaround for this build error with the live ebuild with haddock:
+ # make[1]: *** No rule to make target `compiler/stage2/build/Module.hi',
+ # needed by `utils/haddock/dist/build/Main.o'. Stop.
+ echo "HADDOCK_DOCS = NO" >> mk/build.mk
+ else
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+ fi
+ 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
+
+ # circumvent a very strange bug that seems related with ghc producing
+ # too much output while being filtered through tee (e.g. due to
+ # portage logging) reported as bug #111183
+ echo "SRC_HC_OPTS+=-w" >> mk/build.mk
+
+ # some arches do not support ELF parsing for ghci module loading
+ # PPC64: never worked (should be easy to implement)
+ # alpha: never worked
+ # arm: http://hackage.haskell.org/trac/ghc/changeset/27302c9094909e04eb73f200d52d5e9370c34a8a
+ if use alpha || use ppc64; then
+ echo "GhcWithInterpreter=NO" >> mk/build.mk
+ fi
+
+ # we have to tell it to build unregisterised on some arches
+ # ppc64: EvilMangler currently does not understand some TOCs
+ # ia64: EvilMangler bitrot
+ # set GHC_IS_UNREG if you like to build slow unregisterised
+ # host compiler. Handy if you plan to user resulting
+ # host compiler as a booting compiler for crosscompiler
+ # which can work only in unregisterised mode.
+ if use alpha || use ia64 || use ppc64 || [[ -n ${GHC_IS_UNREG} ]]; then
+ echo "GhcUnregisterised=YES" >> mk/build.mk
+ echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
+ echo "SplitObjs=NO" >> mk/build.mk
+ echo "GhcRTSWays := debug" >> mk/build.mk
+ echo "GhcNotThreaded=YES" >> mk/build.mk
+ fi
+
+ # arm: no EvilMangler support, no NCG support
+ if use arm; then
+ echo "GhcUnregisterised=YES" >> mk/build.mk
+ echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
+ fi
+
+ # Have "ld -r --relax" problem with split-objs on sparc:
+ if use sparc; then
+ echo "SplitObjs=NO" >> mk/build.mk
+ fi
+
+ if ! use llvm; then
+ echo "GhcWithLlvmCodeGen=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
+
+ # Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
+ # compiled with, by saving the path to it. The purpose is to make sure
+ # that GHC will use the very same gcc version when it compiles haskell
+ # sources, as the extra-gcc-opts files contains extra gcc options which
+ # match only this GCC version.
+ # However, this is not required in Gentoo, as only modern GCCs are used
+ # (>4).
+ # Instead, this causes trouble when for example ccache is used during
+ # compilation, but we don't want the wrappers to point to ccache.
+ # Due to the above, we simply set GCC to be "gcc". When compiling ghc it
+ # might point to ccache, once installed it will point to the users
+ # regular gcc.
+
+ local econf_args=()
+
+ is_crosscompile || econf_args+=--with-gcc=${CHOST}-gcc
+
+ econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot \
+ || die "econf failed"
+
+ [[ ${PV} == *9999* ]] && GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ limit_jobs() {
+ local user_jobs=$(makeopts_jobs)
+ local max_nonbreaking_jobs=$1
+
+ [[ ${user_jobs} -le ${max_nonbreaking_jobs} ]] && return
+
+ if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
+ ewarn "You have requested parallel build which is known to break."
+ ewarn "Please report all breakages upstream."
+ return
+ else
+ ewarn "Limiting MAKEOPTS -j${user_jobs} -> -j${max_nonbreaking_jobs} (bug #456386)"
+ user_jobs=${max_nonbreaking_jobs}
+ fi
+ echo -j${user_jobs}
+ }
+ # ghc massively parallel make: #409631, #409873
+ # but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
+ # 4 parallel jobs usually does not break
+
+ # 1. build compiler binary first
+ emake $(limit_jobs 4) ghc/stage2/build/tmp/ghc-stage2 V=1
+ # 2. pax-mark (bug #516430)
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 3. and then all the rest
+ emake $(limit_jobs 4) all V=1
+
+ if is_crosscompile; then
+ # runghc does not work for a stage1 compiler, we can build it anyway
+ # so it will print the error message: not built for interactive use
+ pushd "${S}/utils/runghc" || die "Could not cd to utils/runghc"
+ if [ ! -f Setup.hs ]; then
+ echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
+ > Setup.hs || die "failed to create default Setup.hs"
+ fi
+ ghc -o setup --make Setup.hs || die "setup build failed"
+ ./setup configure || die "runghc configure failed"
+ sed -e "s@VERSION@\"${GHC_PV}\"@" -i runghc.hs
+ ./setup build || die "runghc build failed"
+ popd
+ fi
+ fi # ! use binary
+}
+
+add-c_nonshared-to-ghci-libs() {
+ local ghci_lib
+ local nonshared_dir=${T}/libc_nonshared_objects
+
+ is_crosscompile && return
+ use elibc_glibc || return
+ use prefix && return
+
+ # we expect 'libc.a' bits be self-sufficient
+ if gcc-specs-pie; then
+ use x86 && return # but on x86 pie means linker support: #486140
+ fi
+
+ get-nonshared-objects() {
+ # ns - 'nonshared'
+ local ns_objects=" "
+ local ns_sym
+ local ns_srco
+ local ns_dsto
+
+ # extract
+ mkdir "${nonshared_dir}" || die
+ pushd "${nonshared_dir}" >/dev/null || die
+ $(tc-getAR) x "${ROOT}"/usr/$(get_libdir)/libc.a
+ popd >/dev/null || die
+
+ # they are mostly contents of /usr/$(get_libdir)/libc_nonstahed.a
+ # but 'c_nonstahed' contains PIC variants of symbols.
+ # ghci uses non-PIC ones
+ for ns_sym in \
+ stat fstat lstat mknod \
+ stat64 fstat64 lstat64 \
+ fstatat fstatat64 mknodat
+ do
+ ns_srco=${nonshared_dir}/${ns_sym}.o
+ ns_dsto=${nonshared_dir}/${ns_sym}_weakened.o
+ [[ -f ${ns_srco} ]] || continue
+ # here we do The Magic:
+ # 1. --keep-global-symbol= hides everything to adoid double definition
+ # of stuff like __stat, __fstat and
+ # 2. --weaken converts exported symbols to weak symbols to be available
+ # for redefinition
+ $(tc-getOBJCOPY) \
+ --weaken --keep-global-symbol=${ns_sym} \
+ "${ns_srco}" "${ns_dsto}" || die
+
+ ns_objects+=" ${ns_dsto}"
+ done
+
+ echo "${ns_objects}"
+ }
+ # bug #452442: when building libraries for ghci
+ # ghc basically glues them together:
+ # $ ld -r -o result foo.o bar.o ...
+ # that way some symbols defined in libc_nonshared.a
+ # do not get included into final HS*.o files
+ # We piggyback on one of early loaded wired-in library
+ # loaded before 'base'.
+ while read ghci_lib
+ do
+ einfo "relinking '${ghci_lib}' with c_includes"
+ mv "${ghci_lib}" "${ghci_lib}".unrelinked.o || die
+ $(tc-getLD) -r -o "${ghci_lib}" \
+ "${ghci_lib}".unrelinked.o \
+ $(get-nonshared-objects) || die
+ rm -r "${nonshared_dir}" || die
+ rm "${ghci_lib}".unrelinked.o || die
+ done < <(find "${ED}"/usr/$(get_libdir)/${P}/ -name 'HSghc-prim*.o')
+}
+
+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
+ local insttarget="install"
+
+ # We only built 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}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
+ fi
+
+ emake -j1 ${insttarget} \
+ DESTDIR="${D}" \
+ || die "make ${insttarget} failed"
+
+ # remove wrapper and link
+ rm -f "${ED}"/usr/bin/haddock*
+
+ add-c_nonshared-to-ghci-libs
+
+ if [[ ! -f "${S}/VERSION" ]]; then
+ echo "${GHC_PV}" > "${S}/VERSION" \
+ || die "Could not create file ${S}/VERSION"
+ fi
+ dobashcomp "${FILESDIR}/ghc-bash-completion"
+
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/${PN}-${GHC_PV}/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)/${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
+ if is_crosscompile; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "GHC built as a cross compiler. The interpreter, ghci and runghc, do"
+ ewarn "not work for a cross compiler."
+ ewarn "For the ghci error: \"<command line>: not built for interactive use\" see:"
+ ewarn "http://www.haskell.org/haskellwiki/GHC:FAQ#When_I_try_to_start_ghci_.28probably_one_I_compiled_myself.29_it_says_ghc-5.02:_not_built_for_interactive_use"
+ 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 ${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)/${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.3.ebuild b/dev-lang/ghc/ghc-7.8.3.ebuild
new file mode 100644
index 00000000000..2831f4df44c
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.8.3.ebuild
@@ -0,0 +1,615 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ #alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ #ia64) return 0 ;;
+ #ppc) return 0 ;;
+ #ppc64) return 0 ;;
+ #sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.8.0.20140228 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~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:=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+ !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
+ kernel_linux? ( >=sys-devel/binutils-2.17 )
+ kernel_SunOS? ( >=sys-devel/binutils-2.17 )
+"
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.17
+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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
+use binary && QA_PREBUILT="*"
+
+# 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 -Os
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ 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
+ epatch "${FILESDIR}"/${PN}-7.8.3-unreg-lit.patch
+
+ # upstream backports
+ epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-deRefStablePtr.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-pic-asm.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-cc-lang.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-ia64-prim.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
+ dobashcomp "${FILESDIR}/ghc-bash-completion"
+
+ 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-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
new file mode 100644
index 00000000000..729fafe44fc
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -0,0 +1,618 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.8.3.20141119 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+SRC_URI+=" http://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:=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+ !kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
+ kernel_linux? ( >=sys-devel/binutils-2.17 )
+ kernel_SunOS? ( >=sys-devel/binutils-2.17 )
+"
+
+# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
+# that we want the binaries to use the latest versioun available, and not to be
+# built against gmp-4
+
+# similar for glibc. we have bootstrapped binaries against glibc-2.17
+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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# yeah, top-level 'use' sucks. I'd like to have it in 'src_install()'
+use binary && QA_PREBUILT="*"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+ghc_setup_cflags() {
+ if is_crosscompile; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # hardened-gcc needs to be disabled, because the mangler doesn't accept
+ # its output.
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
+
+ # prevent from failind building unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+ # currently ghc fails to build haddock
+ # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+ use ia64 && append-ghc-cflags persistent compile -G0
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ [[ ${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/metadata.xml b/dev-lang/ghc/metadata.xml
new file mode 100644
index 00000000000..873a999955e
--- /dev/null
+++ b/dev-lang/ghc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <use>
+ <flag name='binary'>Install the binary version directly, rather than using it to build the source version.</flag>
+ <flag name='ghcbootstrap'>Bootstrap from an existing GHC installation.</flag>
+ <flag name='ghcmakebinary'>Build with less runtime depends (bundle libffi for building bootstrap binaries).</flag>
+ <flag name='llvm'>Enable llvm code generator for ghc (-fllvm).</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/gnat-gcc/Manifest b/dev-lang/gnat-gcc/Manifest
new file mode 100644
index 00000000000..e56cb5acf9c
--- /dev/null
+++ b/dev-lang/gnat-gcc/Manifest
@@ -0,0 +1,28 @@
+DIST gcc-ada-3.4.6.tar.bz2 3784327 SHA256 d5bfb166b2ad287ba85ebba533cca4453b521479cffc1bd3c6d273f6b3d794e2
+DIST gcc-ada-4.1.2.tar.bz2 4589609 SHA256 703125c4d033c666b52db2aeee0a05e3461467fe8ff6e5e588b5cdb8c6928bb0
+DIST gcc-ada-4.2.3.tar.bz2 4740243 SHA256 08956727415fb1721c5c89ef33ebe94ab718459e88f7cd4589fc1c2b7e98cb4c
+DIST gcc-ada-4.3.5.tar.bz2 5231691 SHA256 e3e4a0836820e8b1b7b4b00b529568a2d51ed9ec3933fbd44c7b1c04ad3076de SHA512 37619e5e925865f920debe6f2fe66c5e38c91ecd1e9e83c5f60ea31750164d947459e764f574c91f4e7c56c73a0b3e8f32fc1ec95af48177743b9dbaeaa5a458 WHIRLPOOL d0c10883c7b3b62433133d48d4bd0eb332d523bb958425fbcb93a26c398d8cfb3f3d0886914a706fbf4fcb040966203d6d504a1ce51583fb97546244642cc0a6
+DIST gcc-ada-4.3.6.tar.bz2 5309618 SHA256 a2721a41965f361938bc9d86e3cc7ba12dc6b7efa24cbe5d9f9c84882b9caf31 SHA512 c9f253050bc355a5dca27fcef41f93772f41cfe2dfd41eecf390019318eded36c897f40812dbe32f14e3f7a4e0625f0fc87461bb03dba2f1385f396aa53e8f64 WHIRLPOOL 143ba164866e35c69dcbe9dfdb44b4473731ef11d0b36e281f29b357b2ccc6d3f826a938539c788afe31b648493fea394b8a28577913105e47740c582cad181f
+DIST gcc-ada-4.4.7.tar.bz2 5492474 SHA256 fb9f30b85d48838390554b948d137487f0db09ad5f8ba73ca4d7ca35765c6ed8 SHA512 4447dfb2353018108ffc88a0fdeccca224a5fc9e4cbb75d8ee136c38c2937a368a677ff6e4df1a1431338fc1adc26fcd1f0f9cf963e5e98e4e28bc22e7e72cb5 WHIRLPOOL 5f6d7356d74725c0658e79ba1022df187cc08588835dae49867dc29c62b9b61d11e265b1a4636fe3e152b45a0bc65bb45ae69cac4ed1cd0447cc7603398adf44
+DIST gcc-ada-4.5.4.tar.bz2 5755385 SHA256 8abddae15be65572b4d639bd9818057019bb4a45da4decfc6451511c8d580c5e SHA512 9d160fba38e4482c01eb66735559086527ce9032ecd73a90fc0eea5e96f960cc11f7ed2dded1d8eb70a10a7706ea8f80b48b61db25fdda8724ba3a32f4d464fc WHIRLPOOL 8349c8be9e4805bf61d28db540469060ab851e2a3c6eada3ce3937805a59e8c8c3344c84b322d334e72e475988c12f4d30b63860514ab68af449d425d7b446c4
+DIST gcc-ada-4.6.4.tar.bz2 6084085 SHA256 2a09bbf942b2557839722d4807e67559123037356f5cb1a3b12f44539968d0ad SHA512 889ae05b809413e40f765dcf56100601d4969b82631e7a842146ebbc27c3dde519793f8cee03f03fa4dee87fcbd6814f2a3b8ab79295a824282ee913cc7dc590 WHIRLPOOL 2434bca1a838fc874afe0d3c18ce4a3fad8e57853a5aa6bd1b87e2d063b75840ceda770eb3552b62dd83654ab02b807475161907e5791ab37a27670a6c06a1ca
+DIST gcc-core-3.4.6.tar.bz2 13366790 SHA256 3aab171d86e5a6c14cb9de35467a0472a7d5ef1d5b79a1df72ca533f8e82a133
+DIST gcc-core-4.1.2.tar.bz2 17485561 SHA256 7be9c5df8000ae35d0928f0a254bfb5e8478cad5e5e57fd07820530c03b3711d
+DIST gcc-core-4.2.3.tar.bz2 19319213 SHA256 99ec052e13e8c2bc7d1db86d1c98fb651d45fd3e8ea90b0981c47f6e8826c813
+DIST gcc-core-4.3.5.tar.bz2 24828441 SHA256 ca57b06732a9a4123d6685fe58f3550afadf063107016e3f15c2b32447612711 SHA512 f18d4f71b3be9784701b620ab67006231d330e2178ce91399051f8acf52d44478571a7c53af714c2a4207d81e49f7e94309fd963b16f982a428e834bfda7bd87 WHIRLPOOL 483220abd40c45c858a31ab8cf7aa0792e3230c49ab2c328ec59f412ea298dc02cd8002f27d8459a4c5b7cd9ce5551a0aaf8f613cf049bc4b6ce1b3080a7240b
+DIST gcc-core-4.3.6.tar.bz2 24448503 SHA256 86af1703be5cc7f40270a66ac15ebcf6088706a789ae1bf18488dc070777f979 SHA512 6bc477282a72dca697db4b4bafb221a77f95945eb867cd109c9593f6ec7471152d9cabdb62ce84761d624d196a5da0ad5f3218e959ba1b86506ba54b095b62aa WHIRLPOOL a9a21920f3d860f9d1aace6c53dd9e5b6c29102bfb432ea7c2d1819a37fe77c29a92d652f4a4cd74adb850f79fa5e58e79a1c1c77d9c61df38f1af68c6015c5d
+DIST gcc-core-4.4.7.tar.bz2 25784094 SHA256 c4663b7023909a4a075d3c2b2e17f6e082a9625aebfd0ce7f1d7817e44bf5542 SHA512 318522e170a9e54d051311416dc221d8d727a85d6e24a97fdbd9125d9dea1530930efd04b846c06ddbe3c5acaeef8810e0d4e79b8e9af535f0b08f1f20e5b10b WHIRLPOOL c2964330c174236e734d78ad80462a050b27d23f6b96a66bd5a4c1fce0d5cd4d35c9fba759ffe94b542805fb405071cd05e0945a4806fd8551c285eae7247ffd
+DIST gcc-core-4.5.4.tar.bz2 28265185 SHA256 894d90f72cbfc8707e330fa2b1847c443fa97cf9b7f26e86be554709510e624a SHA512 82f81a6860155e78cecac846038ceb5a5ec68e399f3ab058c5d569745e47460761f162e92f627d0275a37ff24cbc6582a018b5057d57fc01107f615e59192451 WHIRLPOOL 42324f6da6897e6fac4a4b3476fb1cf46b4461164b84c9f24e5a793e37c211246f9d9bed9f03ee170dc4dd7896579e0f1d1ba11e73e3ec0b92a2caa9191c82f8
+DIST gcc-core-4.6.4.tar.bz2 30353380 SHA256 48b566f1288f099dff8fba868499a320f83586245ec69b8c82a9042566a5bf62 SHA512 93b1dfb945256ab08d4cadd43237da09b5b37ebc9d82b6ba4072df253f139ae0795860cd58d9fde83018b0b5ce6e23bc679dfb22ca76813a9a29c8129fd2854d WHIRLPOOL b810c19de92980d93cc374647c3f9b4b72b04ac2508168f798b51cfefcb54dc677f04c7d1583de123b2e01ee203ef975bda17d99acfeb87cc9687f021e63041f
+DIST gnatboot-3.4-amd64-r2.tar.bz2 12063245 SHA256 c0c2fe91f6c38483193415690a4f90ac205e3aa9cf42ab3ab3e5d2a3ec269d8d
+DIST gnatboot-3.4-i386.tar.bz2 10629373 SHA256 7b4300e72b7f00d2fd9d0dad6940c3e6b4e19eeaf4696e92d7c92e2a38e8b049
+DIST gnatboot-3.4-ppc.tar.bz2 10996302 SHA256 1f164834e377604a943b230196d9f2a40e8e6753bac4c980d5ca2c00c7674363
+DIST gnatboot-4.1-amd64.tar.bz2 15314736 SHA256 a4016920b84f5934ec7120c7bb17c1028b193d5e146a46a9d1ceae4a456924d2 SHA512 ddeaa365ef3d127cc0bce0d7d242804dfc3a2d5612d89f08fc0ffaf63501a326168935facf359a963dda1484b76bdad01e42629c03d123f3693324038d8e5f75 WHIRLPOOL e845041091b2dddf3b4adf6628b5fd132e47758a75332715f0f99c9363d7840e66fbde92cc717a450a49cf8b736bd47bdb6e0c2e9528130c01ef8827c4348bc5
+DIST gnatboot-4.1-i386.tar.bz2 15367514 SHA256 597b4a16f38fb173b1eecc259c1566ccf81291e13b88e2160102a512cefcc518
+DIST gnatboot-4.1-ppc.tar.bz2 13651598 SHA256 2c9ed035b964a7dfcc427cb5c16dc30d3b99276fb424d25b0ebfde23a68013eb
+DIST gnatboot-4.3-amd64.tar.bz2 20294401 SHA256 3506500b4cda06eaaf9bb70ec26fbe9be2a05b1f8edf0b2f7aeceb451a558333 SHA512 29a74d636d3566cd01ae3ed99c7b71146ee971639ad119dfacc4b502c76f8556cbf7a7f2d1d95b4dc85dcaebff1ab89244e2ee6c063ce0888f915bd7c8a6faeb WHIRLPOOL c4b83d27063b5a888f705d3c8ec404bb11573e9376d3e0704a47be59e057fa5b9a62e6807ae72a0fd2b7c198bcc1584fb6b4e1d2d09054a03cc73a8a16a4b17a
+DIST gnatboot-4.3-i686.tar.bz2 16065767 SHA256 7afbea3216c24dde950d7d511e5fc897db5e5c8099ff4a524048519abc54f0b9 SHA512 5e3efd9e6974f2f47cc61937e5fb347cf27c9bc172b74422612a45dae8f4db89907b2b1ba15a0dad4c9a0fe244d43b99f664c2c23eb7050932747d0768c0c543 WHIRLPOOL 9d1473811aff2e2c45de30ad4557ce7ca4db1c7f38f9ef600cb7cb65823046fcf85a42a208dcb59bac796fc70cbfe3e5eccf9cb141ba3fe5a8178d38e4f0e6db
+DIST gnatboot-4.3-sparc.tar.bz2 13065130 SHA256 e234336123fd65c0f73cd25af99dbb439ea08f0286fe7f5b1e05dd414b9878e7
+DIST gnatboot-4.4-amd64.tar.bz2 26117669 SHA256 fd6c6ea6e4d57eb178d239a8b1e4d99d6638cb9d7d322c0789b37e8ed6a49b67 SHA512 bf68582e8e8ecc9c4f4dbec90ef47edf10769ca7a2dd197b065f44e5ad1e40b81c44592bb362651654b187ebad972095176509273b5e98edc1a26c2164075d80 WHIRLPOOL 59d714a3ea70dae7c4b9e6d177336810bbb5ea7bcdbe038c7c34d543ef8c45f40d240ecbc58de1b49c88904b245cdd3ef9121bc88fa3bdecf413762f67301cde
+DIST gnatboot-4.4-i686.tar.bz2 17194327 SHA256 1081cdf2514fd1c03b40f0923d0046ffd2886b3bc6eabd217eaa40da1765ba5b SHA512 29a4e32d178f065ceef88efc9bae3bd2b68553e34d485b929e055733ceabdaf172c58ab92f24340d8a46fdbb1565e5f7573b744e3931ed261aaeb488c40501e6 WHIRLPOOL 80987d40ddf7589a74c6280dd687ad442ee7a560c5bb2eece950c50fcf0bfaa38e2befeec72e6fbf2695bb9d89ecfe905cf894152a56b22c7384926a59ce4f11
+DIST gnatboot-4.4-sparc.tar.bz2 13962662 SHA256 467fa1da5ee4c769a10b2c870e132e1bf7827688e88860fdd27259e9b258109b SHA512 d02b07824da718d5a3c41a4d5c848b872cecbcf3ec04e59ba922fed0549e1d6901c07122038c286f6627d6f4edb1a71a6e52b8a5e52e8c788d9d51ac96f225b4 WHIRLPOOL 9164527588573ba1b5088c7835e739e3518bbdb099e0b85f205ca7602da87bd20646f8bd9fa12a14417ff18fe90041288be3647ecd900f300cf33621c5fb48fb
diff --git a/dev-lang/gnat-gcc/files/gcc-configure-LANG.patch b/dev-lang/gnat-gcc/files/gcc-configure-LANG.patch
new file mode 100644
index 00000000000..3ef76ef911c
--- /dev/null
+++ b/dev-lang/gnat-gcc/files/gcc-configure-LANG.patch
@@ -0,0 +1,41 @@
+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,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# 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
++
+ # 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.
diff --git a/dev-lang/gnat-gcc/files/gnat-Make-lang.in.patch b/dev-lang/gnat-gcc/files/gnat-Make-lang.in.patch
new file mode 100644
index 00000000000..ccb4e273d6e
--- /dev/null
+++ b/dev-lang/gnat-gcc/files/gnat-Make-lang.in.patch
@@ -0,0 +1,14 @@
+--- Make-lang.in-orig 2005-12-14 19:11:41.538266250 +0100
++++ Make-lang.in 2005-12-14 19:12:50.358567250 +0100
+@@ -341,9 +341,9 @@
+ gnatlib-shared: force
+ $(MAKE) -C ada $(FLAGS_TO_PASS) \
+ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
+- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
++ GNATLIBCFLAGS="$(GNATLIBCFLAGS) -fPIC" \
+ GNATLIBLDFLAGS="$(GNATLIBLDFLAGS)" \
+- TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
++ TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS) -fPIC" \
+ THREAD_KIND="$(THREAD_KIND)" \
+ TRACE="$(TRACE)" \
+ gnatlib-shared
diff --git a/dev-lang/gnat-gcc/files/gnat-gcc-4.5.4-tex-version-workaround.patch b/dev-lang/gnat-gcc/files/gnat-gcc-4.5.4-tex-version-workaround.patch
new file mode 100644
index 00000000000..46f4d5c3de5
--- /dev/null
+++ b/dev-lang/gnat-gcc/files/gnat-gcc-4.5.4-tex-version-workaround.patch
@@ -0,0 +1,75 @@
+Index: gcc-4.5.4/configure
+===================================================================
+--- gcc-4.5.4.orig/configure
++++ gcc-4.5.4/configure
+@@ -8384,9 +8384,9 @@ case " $build_configdirs " in
+ *)
+
+ # For an installed makeinfo, we require it to be from texinfo 4.7 or
+- # higher, else we use the "missing" dummy.
++ # some higher 4.x, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9]))' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+Index: gcc-4.5.4/gcc/configure
+===================================================================
+--- gcc-4.5.4.orig/gcc/configure
++++ gcc-4.5.4/gcc/configure
+@@ -7401,8 +7401,8 @@ fi
+
+ if test -n "$MAKEINFO"; then
+ # Found it, now check the version.
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern makeinfo" >&5
+-$as_echo_n "checking for modern makeinfo... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 4.7+ makeinfo" >&5
++$as_echo_n "checking for 4.7+ makeinfo... " >&6; }
+ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+ else
+@@ -7411,7 +7411,7 @@ else
+
+ case $ac_prog_version in
+ '') gcc_cv_prog_makeinfo_modern=no;;
+- 4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
++ 4.[7-9]*|4.[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;;
+ *) gcc_cv_prog_makeinfo_modern=no;;
+ esac
+
+@@ -7427,10 +7427,10 @@ $as_echo "$gcc_cv_prog_makeinfo_modern"
+
+ if test $gcc_cv_prog_makeinfo_modern = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+-*** Makeinfo is missing or too old.
++*** Makeinfo is missing, too old or too new.
+ *** Info documentation will not be built." >&5
+ $as_echo "$as_me: WARNING:
+-*** Makeinfo is missing or too old.
++*** Makeinfo is missing, too old or too new.
+ *** Info documentation will not be built." >&2;}
+ BUILD_INFO=
+ else
+Index: gcc-4.5.4/libiberty/configure
+===================================================================
+--- gcc-4.5.4.orig/libiberty/configure
++++ gcc-4.5.4/libiberty/configure
+@@ -2440,13 +2440,13 @@ $as_echo "$as_me: WARNING:
+ ;;
+ *)
+ case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
+- x*\ [1-3].* )
+- MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
++ x*\ [1-35-9].* )
++ MAKEINFO="@echo $MAKEINFO is not 4.x; true"
+ BUILD_INFO=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+-*** Makeinfo is too old. Info documentation will not be built." >&5
++*** Makeinfo is not 4.x. Info documentation will not be built." >&5
+ $as_echo "$as_me: WARNING:
+-*** Makeinfo is too old. Info documentation will not be built." >&2;}
++*** Makeinfo is not 4.x. Info documentation will not be built." >&2;}
+ ;;
+ esac
+ ;;
diff --git a/dev-lang/gnat-gcc/files/patches/4.3/01-siginfo.patch b/dev-lang/gnat-gcc/files/patches/4.3/01-siginfo.patch
new file mode 100644
index 00000000000..dd12d0437f4
--- /dev/null
+++ b/dev-lang/gnat-gcc/files/patches/4.3/01-siginfo.patch
@@ -0,0 +1,121 @@
+--- gcc/config/alpha/linux-unwind.h
++++ gcc/config/alpha/linux-unwind.h
+@@ -52,7 +52,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
+ {
+ struct rt_sigframe {
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+
+--- gcc/config/bfin/linux-unwind.h
++++ gcc/config/bfin/linux-unwind.h
+@@ -52,10 +52,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ int sig;
+- struct siginfo *pinfo;
++ siginfo_t *pinfo;
+ void *puc;
+ char retcode[8];
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+
+--- gcc/config/i386/linux-unwind.h
++++ gcc/config/i386/linux-unwind.h
+@@ -137,9 +137,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ int sig;
+- struct siginfo *pinfo;
++ siginfo_t *pinfo;
+ void *puc;
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+
+--- gcc/config/ia64/linux-unwind.h
++++ gcc/config/ia64/linux-unwind.h
+@@ -51,7 +51,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigframe {
+ char scratch[16];
+ unsigned long sig_number;
+- struct siginfo *info;
++ siginfo_t *info;
+ struct sigcontext *sc;
+ } *frame_ = (struct sigframe *)context->psp;
+ struct sigcontext *sc = frame_->sc;
+@@ -130,7 +130,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
+ struct sigframe {
+ char scratch[16];
+ unsigned long sig_number;
+- struct siginfo *info;
++ siginfo_t *info;
+ struct sigcontext *sc;
+ } *frame = (struct sigframe *)context->psp;
+ struct sigcontext *sc = frame->sc;
+
+--- gcc/config/mips/linux-unwind.h
++++ gcc/config/mips/linux-unwind.h
+@@ -79,7 +79,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ u_int32_t ass[4]; /* Argument save space for o32. */
+ u_int32_t trampoline[2];
+- struct siginfo info;
++ siginfo_t info;
+ _sig_ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+
+--- gcc/config/pa/linux-unwind.h
++++ gcc/config/pa/linux-unwind.h
+@@ -66,7 +66,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ int i;
+ struct sigcontext *sc;
+ struct rt_sigframe {
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *frame;
+
+--- gcc/config/sh/linux-unwind.h
++++ gcc/config/sh/linux-unwind.h
+@@ -80,9 +80,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
+ && (*(unsigned long *) (pc+11) == 0x6ff0fff0))
+ {
+ struct rt_sigframe {
+- struct siginfo *pinfo;
++ siginfo_t *pinfo;
+ void *puc;
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+@@ -179,7 +179,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ && (*(unsigned short *) (pc+14) == 0x00ad))))
+ {
+ struct rt_sigframe {
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+
+--- gcc/config/xtensa/linux-unwind.h
++++ gcc/config/xtensa/linux-unwind.h
+@@ -66,7 +66,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+
+ struct rt_sigframe {
+- struct siginfo info;
++ siginfo_t info;
+ struct ucontext uc;
+ } *rt_;
+
diff --git a/dev-lang/gnat-gcc/gnat-gcc-3.4.6.ebuild b/dev-lang/gnat-gcc/gnat-gcc-3.4.6.ebuild
new file mode 100644
index 00000000000..bb1f03a8ced
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-3.4.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+WANT_AUTOCONF=2.1
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE=""
+
+# BOOT_SLOT is defined in gnatbuild.eclass and depends only on $PV
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ ppc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64-r2.tar.bz2 )"
+
+KEYWORDS="amd64 x86"
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+ ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+ sed -i -e "s:CFLAGS = -O2:CFLAGS = ${CFLAGS}:" \
+ Makefile.adalib || die "patching Makefile.adalib failed"
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.1.2.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.1.2.ebuild
new file mode 100644
index 00000000000..dd3026b165f
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.1.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE=""
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ x86? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ amd64? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )"
+
+KEYWORDS="amd64 ~ppc x86"
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+ ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check or even produces wrong code..
+ #
+ # The sed in makegpr.adb is actually not for the line length but rather to
+ # "undo" the fixing, Last3 is matching just that - the last three characters
+ # of the compiler name.
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' makegpr.adb &&
+ sed -i -e 's:and Nam is "gnatgcc":and Nam is "gcc":' osint.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.2.3.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.2.3.ebuild
new file mode 100644
index 00000000000..3c89f16b6f0
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.2.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE=""
+
+# overriding the BOOT_SLOT, as 4.1 should do fine, no need for bootstrap duplication
+BOOT_SLOT="4.1"
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ x86? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ amd64? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )"
+
+KEYWORDS="amd64 ppc x86"
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+ ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ # The sed in makegpr.adb is actually not for the line length but rather to
+ # "undo" the fixing, Last3 is matching just that - the last three characters
+ # of the compiler name.
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' makegpr.adb &&
+ sed -i -e 's:and Nam is "gnatgcc":and Nam is "gcc":' osint.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.3.5.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.3.5.ebuild
new file mode 100644
index 00000000000..80622264930
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.3.5.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Need to let configure know where to find stddef.h
+#EXTRA_CONFGCC="${WORKDIR}/usr/lib/include/"
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE=""
+
+# using new bootstrap
+BOOT_SLOT="4.3"
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )
+ sparc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-sparc.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i686.tar.bz2 )
+ ppc? ( http://dev.gentoo.org/~george/src/gnatboot-4.1-ppc.tar.bz2 )"
+
+KEYWORDS="amd64 ~ppc x86"
+
+# starting with 4.3.0 gnat needs these libs
+DEPEND=">=dev-libs/mpfr-2.3.1
+ <sys-apps/texinfo-5.1
+ >=dev-libs/gmp-4.2.2"
+RDEPEND="${DEPEND}"
+
+#QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+# ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ # newly added zlib dir is processed by configure even with
+ # --with-systtem-zlib passed, causing toruble on multilib
+ rm -rf "${S}"/zlib
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ # The sed in makegpr.adb is actually not for the line length but rather to
+ # "undo" the fixing, Last3 is matching just that - the last three characters
+ # of the compiler name.
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' makegpr.adb &&
+ sed -i -e 's:and Nam is "gnatgcc":and Nam is "gcc":' osint.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+
+ # looks like wrapper has problems with all the quotation
+ sed -i -e "/-DREVISION/d" -e "/-DDEVPHASE/d" \
+ -e "s: -DDATESTAMP=\$(DATESTAMP_s)::" "${S}"/gcc/Makefile.in
+ sed -i -e "s: DATESTAMP DEVPHASE REVISION::" \
+ -e "s:PKGVERSION:\"\":" "${S}"/gcc/version.c
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.3.6.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.3.6.ebuild
new file mode 100644
index 00000000000..88334d93516
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.3.6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE="doc lto" # doc and lto from gnatbuild.eclass
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${SLOT}-amd64.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${SLOT}-i686.tar.bz2 )
+ ppc? ( http://dev.gentoo.org/~george/src/gnatboot-4.1-ppc.tar.bz2 )"
+# sparc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-sparc.tar.bz2 )
+
+KEYWORDS="amd64 ~ppc x86"
+
+# starting with 4.3.0 gnat needs these libs
+RDEPEND=">=dev-libs/mpfr-2.3.1
+ >=dev-libs/gmp-4.2.2
+ >=sys-libs/zlib-1.1.4
+ >=sys-libs/ncurses-5.2-r2"
+
+DEPEND="${RDEPEND}
+ <sys-apps/texinfo-5.1
+ >=sys-devel/bison-1.875
+ >=sys-libs/glibc-2.8
+ >=sys-devel/binutils-2.15.94"
+
+#QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+# ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ # newly added zlib dir is processed by configure even with
+ # --with-systtem-zlib passed, causing toruble on multilib
+ rm -rf "${S}"/zlib
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ # The sed in makegpr.adb is actually not for the line length but rather to
+ # "undo" the fixing, Last3 is matching just that - the last three characters
+ # of the compiler name.
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' makegpr.adb &&
+ sed -i -e 's:and Nam is "gnatgcc":and Nam is "gcc":' osint.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.4.7.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.4.7.ebuild
new file mode 100644
index 00000000000..54648818679
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.4.7.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE=""
+
+BOOT_SLOT="4.3"
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${SLOT}-amd64.tar.bz2 )
+ sparc? ( http://dev.gentoo.org/~george/src/gnatboot-${SLOT}-sparc.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${SLOT}-i686.tar.bz2 )"
+# ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+
+KEYWORDS="~amd64 ~x86"
+
+# starting with 4.3.0 gnat needs these libs
+RDEPEND=">=dev-libs/mpfr-3.0.1
+ >=dev-libs/gmp-5.0
+ >=sys-libs/zlib-1.2
+ >=sys-libs/ncurses-5.7"
+
+DEPEND="${RDEPEND}
+ <sys-apps/texinfo-5.1
+ >=sys-devel/bison-1.875
+ >=sys-libs/glibc-2.8
+ >=sys-devel/binutils-2.20"
+
+#QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+# ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ sed -i -e 's:and Nam is "gnatgcc":and Nam is "gcc":' osint.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+
+ # gcc pretty much ignores --with-system-zlib. At least it still descends
+ # into zlib and does configure and build there (gcc bug@7125?). For whatever
+ # reason this conflicts with multilib in gcc-4.4..
+ sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.5.4.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.5.4.ebuild
new file mode 100644
index 00000000000..69ad9cd3613
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.5.4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE="doc"
+
+BOOT_SLOT="4.4"
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )
+ sparc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-sparc.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i686.tar.bz2 )"
+# ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+
+KEYWORDS="amd64 x86"
+
+# starting with 4.3.0 gnat needs these libs
+RDEPEND=">=dev-libs/mpfr-3.0.1
+ >=dev-libs/gmp-5.0
+ >=sys-libs/zlib-1.2
+ >=sys-libs/ncurses-5.7"
+
+DEPEND="${RDEPEND}
+ doc? ( sys-apps/texinfo )
+ >=sys-devel/bison-1.875
+ >=sys-libs/glibc-2.8
+ >=sys-devel/binutils-2.20"
+
+#QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+# ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ sed -i -e 's:gnatgcc:gcc:' osint.ads switch.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+
+ # gcc pretty much ignores --with-system-zlib. At least it still descends
+ # into zlib and does configure and build there (gcc bug@7125?). For whatever
+ # reason this conflicts with multilib in gcc-4.4..
+ sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
+}
+
+src_compile() {
+ # work-around for downgrading texinfo. See bug #483192
+ if use doc ; then
+ if has_version ">=sys-apps/texinfo-5.1" ; then
+ ewarn "Disabling info docs. Please downgrade texinfo to less than 5.x or"
+ ewarn "use ${PN}-4.6 instead (as upstream has only patched 4.6 and higher)."
+ epatch "${FILESDIR}"/${P}-tex-version-workaround.patch
+ fi
+ else
+ elog "Disabling info docs."
+ epatch "${FILESDIR}"/${P}-tex-version-workaround.patch
+ fi
+
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/gnat-gcc-4.6.4.ebuild b/dev-lang/gnat-gcc/gnat-gcc-4.6.4.ebuild
new file mode 100644
index 00000000000..76335e085e6
--- /dev/null
+++ b/dev-lang/gnat-gcc/gnat-gcc-4.6.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - gcc version"
+HOMEPAGE="http://gcc.gnu.org/"
+LICENSE="GMGPL"
+
+IUSE="doc lto openmp"
+
+BOOT_SLOT="4.4"
+
+# SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
+# so the URI's are static.
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )
+ sparc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-sparc.tar.bz2 )
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i686.tar.bz2 )"
+# ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+
+KEYWORDS="amd64 x86"
+
+# starting with 4.3.0 gnat needs these libs
+RDEPEND=">=dev-libs/mpfr-3.1.2
+ >=dev-libs/gmp-5.1.3
+ >=dev-libs/mpc-1.0.1
+ >=sys-libs/zlib-1.2
+ >=sys-libs/ncurses-5.7"
+
+DEPEND="${RDEPEND}
+ doc? ( >=sys-apps/texinfo-5 )
+ >=sys-devel/bison-1.875
+ >=sys-libs/glibc-2.8
+ >=sys-devel/binutils-2.20"
+
+src_unpack() {
+ gnatbuild_src_unpack
+
+ #fixup some hardwired flags
+ cd "${S}"/gcc/ada
+
+ # universal gcc -> gnatgcc substitution occasionally produces lines too long
+ # and then build halts on the style check.
+ #
+ sed -i -e 's:gnatgcc:gcc:' osint.ads switch.ads ||
+ die "reversing [gnat]gcc substitution in comments failed"
+
+ # gcc pretty much ignores --with-system-zlib. At least it still descends
+ # into zlib and does configure and build there (gcc bug@7125?). For whatever
+ # reason this conflicts with multilib in gcc-4.4..
+ sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
+}
+
+src_compile() {
+ # looks like gnatlib_and_tools and gnatlib_shared have become part of
+ # bootstrap
+ gnatbuild_src_compile configure make-tools bootstrap
+}
diff --git a/dev-lang/gnat-gcc/metadata.xml b/dev-lang/gnat-gcc/metadata.xml
new file mode 100644
index 00000000000..0e96d8b594e
--- /dev/null
+++ b/dev-lang/gnat-gcc/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ada</herd>
+ <use>
+ <flag name="lto">Add support for link-time optimizations (unsupported, use
+ at your own risk).</flag>
+ </use>
+<longdescription>
+GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95
+development environment based on the mature GCC compiler technology. It
+implements the full Ada 95 language defined by the ISO standard and is upward
+compatible with Ada 83. This is an FSF supported version, integrated with gcc.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest
new file mode 100644
index 00000000000..e45f6c976a8
--- /dev/null
+++ b/dev-lang/gnat-gpl/Manifest
@@ -0,0 +1,16 @@
+DIST RM-05-Html.zip 1506487 SHA256 e7ba344dc796e66c8104d059161b6b5033b91c0f732d1f35e7bcf8400df498d6 SHA512 daaf6edc9a0839146b4d3f4d4791f8de495d370e8527b92e0724a415e64f850bd57f758a3208ceaeae4c1cf9db35570be95af8d82ecf6056cc794a8704033886 WHIRLPOOL 43b25eea69b24d4e79647d0d34232d048e3bd4aff339c1d42de67a770d21badaeff5856c772731ea6ec9890aef44d3c3935126a2c8681e99eeda36150aba685b
+DIST gcc-branch-4.1.3.tar.bz2 21242772 SHA256 24d976bcc7545ae5452b38be5f4ae0ebdc7c3cf122ed602c8c58e96ac16edb77
+DIST gcc-core-3.4.5.tar.bz2 13397308 SHA256 8a2824b12a1cae8b68de3be0a8fd2da14918462e6afa27c3578ccfc8ab10d0fc SHA512 997289b39e5605bac84c2a5d80a4e5dc2d24d4f1c742b494e4fbee4d0f16f64ae9ce860ccdc99c9764a29ec92ad066fd4faf5789fc5d7f49173eace263fe5c01 WHIRLPOOL bf9834d2b7a48d99f7ac5a901bea636e547fbe77eb1e38d39f7ea0484025837f0c49ffd2544f6ce8c2f2639687d3daec59a2b97b430f53b78c773abba8e783f4
+DIST gcc-core-3.4.6.tar.bz2 13366790 SHA256 3aab171d86e5a6c14cb9de35467a0472a7d5ef1d5b79a1df72ca533f8e82a133
+DIST gnat-gpl-3.4.5.1-src.tar.bz2 5057268 SHA256 b831f83c879b22da735b1c759db1d576aaaf3547771d560f1cf8ed24e0284242
+DIST gnat-gpl-3.4.6.1-src.tar.bz2 5042218 SHA256 105fcd76e880625077243139c546c120e745d702255b7450a1c22a651f852c43
+DIST gnat-gpl-4.1.3.2007.tar.bz2 840749 SHA256 e498b0ddaaeb6a93ff017bc15896e35b9ecc8edb78aca40574b7c2dd2b6d423c
+DIST gnat-gpl-4.1.3.2008.tar.bz2 22184293 SHA256 3be9cc3dd82668e155e51054c3c182a7364c8aab4e21efc1195b78625a6b0469 SHA512 c506004bcc33ecb55c101365f02f820969c271f18267be4ce1d18711ba0511eae63e3709d5459ac2f549240c30d1e62d15d9deb0abae3aa3a0dac6acbe816008 WHIRLPOOL ec7f2563005331082e7a5dbdc4de01b5ce302be5043d7132d077f659dd0adefa3fce09040e2474c763109af35f8e1b33aa1e189bd304587309b0ba5fe7a4478b
+DIST gnat-gpl-gcc-3.4.6.1.diff.bz2 118229 SHA256 d722059d1f13f79e323d10e3d9ff30ef0a6c4a9fd4ad06ba5c3a34f8e4ebb874
+DIST gnat-gpl-gcc-3.4.diff.bz2 76642 SHA256 fc90a356baf483d0aab489ce2ea8278a155f48fa84950f71360657e4bc8103d5
+DIST gnatboot-3.4-amd64-r2.tar.bz2 12063245 SHA256 c0c2fe91f6c38483193415690a4f90ac205e3aa9cf42ab3ab3e5d2a3ec269d8d
+DIST gnatboot-3.4-i386.tar.bz2 10629373 SHA256 7b4300e72b7f00d2fd9d0dad6940c3e6b4e19eeaf4696e92d7c92e2a38e8b049
+DIST gnatboot-3.4-ppc.tar.bz2 10996302 SHA256 1f164834e377604a943b230196d9f2a40e8e6753bac4c980d5ca2c00c7674363
+DIST gnatboot-4.1-amd64.tar.bz2 15314736 SHA256 a4016920b84f5934ec7120c7bb17c1028b193d5e146a46a9d1ceae4a456924d2 SHA512 ddeaa365ef3d127cc0bce0d7d242804dfc3a2d5612d89f08fc0ffaf63501a326168935facf359a963dda1484b76bdad01e42629c03d123f3693324038d8e5f75 WHIRLPOOL e845041091b2dddf3b4adf6628b5fd132e47758a75332715f0f99c9363d7840e66fbde92cc717a450a49cf8b736bd47bdb6e0c2e9528130c01ef8827c4348bc5
+DIST gnatboot-4.1-i386.tar.bz2 15367514 SHA256 597b4a16f38fb173b1eecc259c1566ccf81291e13b88e2160102a512cefcc518
+DIST gnatboot-4.1-ppc.tar.bz2 13651598 SHA256 2c9ed035b964a7dfcc427cb5c16dc30d3b99276fb424d25b0ebfde23a68013eb SHA512 d57e3bd9350dde62972ca270f9a0f7a7ce8fad961a2c1aad016d99259baeb3f2aea8b83cb4729d2f87e1614c19c636537bd43e771a19e90d28b191ce68de6dfa WHIRLPOOL bab53a81bb1d969c919da3b447c67dc377860ba10a86a86bfecdd3a262156f0f877a8b659a688e3198910053534076fd0898b4f8090803b40ba18b18a7b1f6f6
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 00000000000..3ef76ef911c
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch
@@ -0,0 +1,41 @@
+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,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# 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
++
+ # 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.
diff --git a/dev-lang/gnat-gpl/files/gnat-Make-lang.in.patch b/dev-lang/gnat-gpl/files/gnat-Make-lang.in.patch
new file mode 100644
index 00000000000..ccb4e273d6e
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-Make-lang.in.patch
@@ -0,0 +1,14 @@
+--- Make-lang.in-orig 2005-12-14 19:11:41.538266250 +0100
++++ Make-lang.in 2005-12-14 19:12:50.358567250 +0100
+@@ -341,9 +341,9 @@
+ gnatlib-shared: force
+ $(MAKE) -C ada $(FLAGS_TO_PASS) \
+ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
+- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
++ GNATLIBCFLAGS="$(GNATLIBCFLAGS) -fPIC" \
+ GNATLIBLDFLAGS="$(GNATLIBLDFLAGS)" \
+- TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
++ TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS) -fPIC" \
+ THREAD_KIND="$(THREAD_KIND)" \
+ TRACE="$(TRACE)" \
+ gnatlib-shared
diff --git a/dev-lang/gnat-gpl/files/patches/51_all_gcc-3.4-libiberty-pic.patch b/dev-lang/gnat-gpl/files/patches/51_all_gcc-3.4-libiberty-pic.patch
new file mode 100644
index 00000000000..d9a95a21b10
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/patches/51_all_gcc-3.4-libiberty-pic.patch
@@ -0,0 +1,10 @@
+--- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500
++++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500
+@@ -232,6 +232,7 @@
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ $(RANLIB) $(TARGETLIB); \
++ cp $(TARGETLIB) ../ ; \
+ cd ..; \
+ else true; fi
+
diff --git a/dev-lang/gnat-gpl/files/patches/74_all_sh-pr24836.patch b/dev-lang/gnat-gpl/files/patches/74_all_sh-pr24836.patch
new file mode 100644
index 00000000000..9bad985a264
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/patches/74_all_sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/configure.ac (revision 106699)
++++ gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/configure
++++ gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/dev-lang/gnat-gpl/gnat-gpl-3.4.5.2005.ebuild b/dev-lang/gnat-gpl/gnat-gpl-3.4.5.2005.ebuild
new file mode 100644
index 00000000000..cd421cea5f9
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-3.4.5.2005.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - AdaCore GPL version"
+HOMEPAGE="https://libre2.adacore.com/"
+LICENSE="GPL-2"
+
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2
+ http://www.adaic.org/standards/05rm/RM-05-Html.zip
+ mirror://gentoo/${PN}-3.4.5.1-src.tar.bz2
+ mirror://gentoo/${PN}-gcc-${SLOT}.diff.bz2
+ x86? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ amd64? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-amd64-r2.tar.bz2 )"
+# ${BOOT_SLOT} and ${GCCVER} are defined in gnatbuild.eclass and depend
+# only on $PV, so should be safe to use in DEPEND/SRC_URI
+
+KEYWORDS="~amd64 ~x86"
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+IUSE=""
+
+GNATSOURCE="${WORKDIR}/${P}-src"
+
+src_unpack() {
+ gnatbuild_src_unpack base_unpack
+
+ # prep gcc sources for Ada
+ mv "${GNATSOURCE}/src/ada" "${S}/gcc"
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}-gcc-${SLOT}.diff
+
+ gnatbuild_src_unpack common_prep
+
+ # one of the converted gcc->gnatgcc in common_prep needs to stay gcc in
+ # fact in this version
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' "${S}/gcc/ada/makegpr.adb"
+}
+
+src_install() {
+ gnatbuild_src_install install
+
+ # there is something strange with provided Makefiles, causing an
+ # access violation on gprmake. Have to do funny things..
+ make DESTDIR="${D}" bindir="${D}${BINPATH}" install || die
+ mv "${D}${D}${PREFIX}/${CTARGET}" "${D}${PREFIX}"
+ rm -rf "${D}var"
+
+ gnatbuild_src_install move_libs cleanup prep_env
+
+ # docs have to be fetched from 3rd place, quite messy package
+ dodir /usr/share/doc/${PF}/html
+ dohtml "${WORKDIR}"/*.html
+
+ # misc notes and examples
+ cd ${GNATSOURCE}
+ dodoc README features-503 features-ada0y known-problems-503a
+ cp -pPR examples/ "${D}/usr/share/doc/${PF}/"
+
+ # this version of gnat does not provide info files yet
+ rm -f "${D}"${DATAPATH}/info/gnat.info
+}
+
+pkg_postinst() {
+ gnatbuild_pkg_postinst
+
+ elog
+ elog "This is an experimental issue of the gnat-gpl compiler, supporting"
+ elog "some of the new features of Ada2005. You may consider registering with"
+ elog "AdaCore at https://libre2.adacore.com/."
+ elog
+ ewarn "Please note!!!"
+ ewarn "gnat-gpl is distributed under the GPL-2 license, without the GMGPL provision!!"
+ ewarn "For the GMGPL version you may look at the gnat-gcc compiler."
+ ewarn
+}
diff --git a/dev-lang/gnat-gpl/gnat-gpl-3.4.6.2006-r1.ebuild b/dev-lang/gnat-gpl/gnat-gpl-3.4.6.2006-r1.ebuild
new file mode 100644
index 00000000000..b160b5a73f9
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-3.4.6.2006-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - AdaCore GPL version"
+HOMEPAGE="https://libre2.adacore.com/"
+LICENSE="GPL-2"
+
+SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2
+ http://www.adaic.org/standards/05rm/RM-05-Html.zip
+ mirror://gentoo/${PN}-3.4.6.1-src.tar.bz2
+ mirror://gentoo/${PN}-gcc-3.4.6.1.diff.bz2
+ x86? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ amd64? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-amd64-r2.tar.bz2 )"
+# ${BOOT_SLOT} and ${GCCVER} are defined in gnatbuild.eclass and depend
+# only on $PV, so should be safe to use in DEPEND/SRC_URI
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
+ ${LIBEXECPATH:1}/gnat1
+ ${LIBPATH:1}/adalib/libgnat-2006.so"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+IUSE=""
+
+GNATSOURCE="${WORKDIR}/${PN}-2006-src"
+
+src_unpack() {
+ gnatbuild_src_unpack base_unpack
+
+ # prep gcc sources for Ada
+ mv "${GNATSOURCE}/src/ada" "${S}/gcc"
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}-gcc-3.4.6.1.diff
+
+ gnatbuild_src_unpack common_prep
+
+ # one of the converted gcc->gnatgcc in common_prep needs to stay gcc in
+ # fact in this version
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' "${S}"/gcc/ada/makegpr.adb
+ # reverting similar conversion in comment - line too long
+ sed -i -e 's:"gnatgcc":"gcc":' "${S}"/gcc/ada/osint.ads
+}
+
+src_install() {
+ gnatbuild_src_install
+
+# # there is something strange with provided Makefiles, causing an
+# # access violation on gprmake. Have to do funny things..
+# make DESTDIR=${D} bindir="${D}${BINPATH}" install || die
+# cp -dPr "${D}${D}${PREFIX}"/* "${D}${PREFIX}/"
+# rm -rf "${D}var"
+#
+# gnatbuild_src_install move_libs cleanup prep_env
+
+ # docs have to be fetched from 3rd place, quite messy package
+ dodir /usr/share/doc/${PF}/html
+ dohtml "${WORKDIR}"/*.html
+
+ # misc notes and examples
+ cd ${GNATSOURCE}
+ dodoc features* known-problems-504a
+ cp -pPR examples/ "${D}/usr/share/doc/${PF}/"
+
+ # this version of gnat does not provide info files yet
+ rm -f "${D}"${DATAPATH}/info/gnat.info
+}
+
+pkg_postinst() {
+ gnatbuild_pkg_postinst
+
+ elog
+ elog "This is an experimental issue of the gnat-gpl compiler, supporting"
+ elog "some of the new features of Ada2005. You may consider registering with"
+ elog "AdaCore at https://libre2.adacore.com/."
+ elog
+ ewarn "Please note!!!"
+ ewarn "gnat-gpl is distributed under the GPL-2 license, without the GMGPL provision!!"
+ ewarn "For the GMGPL version you may look at the gnat-gcc compiler."
+ ewarn
+}
diff --git a/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2007.ebuild b/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2007.ebuild
new file mode 100644
index 00000000000..bdc44167275
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2007.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - AdaCore GPL version"
+HOMEPAGE="https://libre.adacore.com/"
+LICENSE="GPL-2"
+
+SRC_URI="http://dev.gentoo.org/~george/src/gcc-branch-${GCCVER}.tar.bz2
+ http://www.adaic.org/standards/05rm/RM-05-Html.zip
+ http://dev.gentoo.org/~george/src/${P}.tar.bz2
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ ppc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )"
+# ${BOOT_SLOT} and ${GCCVER} are defined in gnatbuild.eclass and depend
+# only on $PV, so should be safe to use in DEPEND/SRC_URI
+
+KEYWORDS="amd64 ppc x86"
+DEPEND="app-arch/unzip"
+RDEPEND="virtual/blas
+ virtual/lapack"
+
+IUSE=""
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind
+ ${BINPATH:1}/gnatmake ${LIBEXECPATH:1}/gnat1
+ ${LIBPATH:1}/adalib/libgnat-2007.so
+ ${LIBPATH:1}/libffi.so.4.0.1 ${LIBPATH:1}/32/libffi.so.4.0.1 "
+
+GNATSOURCE="${WORKDIR}/${PN}-2007-src"
+
+src_unpack() {
+ gnatbuild_src_unpack base_unpack common_prep
+
+ # one of the converted gcc->gnatgcc in common_prep needs to stay gcc in
+ # fact in this version
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' "${S}"/gcc/ada/makegpr.adb
+ # reverting similar conversion in comment - line too long
+ sed -i -e 's:"gnatgcc":"gcc":' "${S}"/gcc/ada/osint.ads
+}
+
+src_install() {
+ gnatbuild_src_install
+
+ # docs have to be fetched from 3rd place, quite messy package
+ dodir /usr/share/doc/${PF}/html
+ dohtml "${WORKDIR}"/*.html
+
+ # misc notes and examples
+ cd ${GNATSOURCE}
+ dodoc features* known-problems-601
+ cp -pPR examples/ Contributors.html "${D}/usr/share/doc/${PF}/"
+
+ # this version of gnat does not provide info files yet
+ rm -rf "${D}${DATAPATH}/info/"
+}
+
+pkg_postinst() {
+ gnatbuild_pkg_postinst
+
+ ewarn "Please note!!!"
+ ewarn "gnat-gpl is distributed under the GPL-2 license, without the GMGPL provision!!"
+ ewarn "For the GMGPL version you may look at the gnat-gcc compiler."
+ ewarn
+}
diff --git a/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2008-r2.ebuild b/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2008-r2.ebuild
new file mode 100644
index 00000000000..a2e968fa40a
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-4.1.3.2008-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools gnatbuild
+
+DESCRIPTION="GNAT Ada Compiler - AdaCore GPL version"
+HOMEPAGE="https://libre.adacore.com/"
+LICENSE="GPL-2"
+
+SRC_URI="http://dev.gentoo.org/~george/src/${P}.tar.bz2
+ http://www.adaic.org/standards/05rm/RM-05-Html.zip
+ x86? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
+ ppc? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
+ amd64? ( http://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )"
+# ${BOOT_SLOT} and ${GCCVER} are defined in gnatbuild.eclass and depend
+# only on $PV, so should be safe to use in DEPEND/SRC_URI
+
+KEYWORDS="~amd64 ~ppc ~x86"
+DEPEND="app-arch/unzip"
+RDEPEND="virtual/blas
+ virtual/lapack"
+
+IUSE=""
+
+QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind
+ ${BINPATH:1}/gnatmake ${LIBEXECPATH:1}/gnat1
+ ${LIBPATH:1}/adalib/libgnat-2007.so
+ ${LIBPATH:1}/libffi.so.4.0.1 ${LIBPATH:1}/32/libffi.so.4.0.1 "
+
+GNATSOURCE="${S}/${PN}-2008-src"
+
+src_unpack() {
+ gnatbuild_src_unpack base_unpack
+ pushd "${S}"/gnattools &> /dev/null
+ eautoconf
+ popd &> /dev/null
+ gnatbuild_src_unpack common_prep
+
+ # one of the converted gcc->gnatgcc in common_prep needs to stay gcc in
+ # fact in this version
+ sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' "${S}"/gcc/ada/makegpr.adb
+ # reverting similar conversion in comment - line too long
+ sed -i -e 's:"gnatgcc":"gcc":' "${S}"/gcc/ada/osint.ads
+
+ # fixing some stupid misspelling issue
+ sed -i -e "s:the get some usefull:to get some useful:" \
+ "${GNATSOURCE}"/examples/options/README.testing
+}
+
+src_install() {
+ gnatbuild_src_install
+
+ # docs have to be fetched from 3rd place, quite messy package
+ dodir /usr/share/doc/${PF}/html
+ dohtml "${WORKDIR}"/*.html
+
+ # misc notes and examples
+ cd ${GNATSOURCE}
+ dodoc features* known-problems-601
+ cp -pPR examples/ Contributors.html "${D}/usr/share/doc/${PF}/"
+
+ # this version of gnat does not provide info files yet
+ rm -rf "${D}${DATAPATH}/info/"
+}
+
+pkg_postinst() {
+ gnatbuild_pkg_postinst
+
+ einfo
+ ewarn "Please note!!!"
+ ewarn "gnat-gpl is distributed under the GPL-2 license, without the GMGPL provision!!"
+ ewarn "For the GMGPL version you may look at the gnat-gcc compiler."
+ einfo
+}
diff --git a/dev-lang/gnat-gpl/metadata.xml b/dev-lang/gnat-gpl/metadata.xml
new file mode 100644
index 00000000000..75cf5c42edb
--- /dev/null
+++ b/dev-lang/gnat-gpl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ada</herd>
+<longdescription>
+GNAT, the (GN)U (A)da (T)oolchain, is a high performance Ada 95
+development environment based on the mature GCC compiler technology. It
+implements the full Ada 95 language defined by the ISO standard and is upward
+compatible with Ada 83. This is a newest development released by AdaCore under
+GPL. This is the first version implementing the Ada2005 standard.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/gnu-smalltalk/Manifest b/dev-lang/gnu-smalltalk/Manifest
new file mode 100644
index 00000000000..8f45cf092cf
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/Manifest
@@ -0,0 +1 @@
+DIST smalltalk-3.2.4.tar.gz 5877496 SHA256 901cc7090a1fa44bc60900a970d207de4aa3bdfdce72bea55114e243bc1eb1b3 SHA512 0854e95fb29c79a9844304651e9b2e3997ced88d7f1a704345f72aedfbae1562df0a2a2cc92ed7909e0ce22e275bb37d1592fe16079e3895cd8b79f3212cea3e WHIRLPOOL 461f07278737fbb0e5f08d18ef4f5c3678a19aef61c895e7ede7c1f74720e99bc44d347730e68a94827abfaf24c69317e2acc67ccc4bdc8cdb05ec164d5894cb
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 00000000000..e9e18d43bb3
--- /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/SequenceableCollection-size-3.2.4.patch b/dev-lang/gnu-smalltalk/files/SequenceableCollection-size-3.2.4.patch
new file mode 100644
index 00000000000..1842e4620f9
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/files/SequenceableCollection-size-3.2.4.patch
@@ -0,0 +1,23 @@
+--- a/kernel/SeqCollect.st
++++ b/kernel/SeqCollect.st
+@@ -1104,9 +1104,16 @@ some access and manipulation methods.'>
+ ^count
+ ]
+
++ size [
++ "Answer a dummy size of 0, so that SequenceableCollection>>#do: works."
++
++ <category: 'testing collections'>
++ ^0
++ ]
++
+ growSize [
+ <category: 'private methods'>
+- ^self size
++ ^(self size max: 8)
+ ]
+
+ swap: anIndex with: anotherIndex [
+--
+1.7.2.5
+
diff --git a/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.4.ebuild b/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.4.ebuild
new file mode 100644
index 00000000000..6fbbd56abba
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit elisp-common flag-o-matic eutils multilib
+
+DESCRIPTION="GNU Smalltalk"
+HOMEPAGE="http://smalltalk.gnu.org"
+SRC_URI="mirror://gnu/smalltalk/smalltalk-${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tk readline emacs gtk gmp"
+
+DEPEND="app-arch/zip
+ sys-libs/gdbm
+ sys-apps/debianutils
+ dev-libs/libsigsegv
+ virtual/libffi
+ emacs? ( virtual/emacs )
+ readline? ( sys-libs/readline )
+ tk? ( dev-lang/tk )
+ gtk? ( =x11-libs/gtk+-2* )
+ gmp? ( dev-libs/gmp )"
+RDEPEND=""
+
+S="${WORKDIR}/smalltalk-${PV}"
+
+SITEFILE=50gnu-smalltalk-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}"/SequenceableCollection-size-3.2.4.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
+}
+
+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 00000000000..4b958123a3f
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pchrist@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ GNU Smalltalk is a free implementation of the Smalltalk-80
+ language which runs on most versions on Unix and, in general,
+ everywhere you can find a POSIX-compliance library. An uncommon
+ feature of it is that it is well-versed to scripting tasks and
+ headless processing.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/go-bootstrap/Manifest b/dev-lang/go-bootstrap/Manifest
new file mode 100644
index 00000000000..dfae9c0a277
--- /dev/null
+++ b/dev-lang/go-bootstrap/Manifest
@@ -0,0 +1 @@
+DIST go1.4.2.src.tar.gz 10921896 SHA256 299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b SHA512 cda1a29d4418875dffaf3324004ddae8e1bbb573f7668e6e0c03d8b61284f4db7fca244c181f2859f8ccdd3db6391fb21e0d98a1a9fc15096c15883249d48a9c WHIRLPOOL d06c27f6ff3a6499a6c7cb3c5eccd53eb588896c4d837e1fe9855c22ee3caa5cc48fd68cbeceff105b7c47fafbbf0eb3dc28ee3af7196692c5bf18511c6760ef
diff --git a/dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild b/dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild
new file mode 100644
index 00000000000..2610ffedd63
--- /dev/null
+++ b/dev-lang/go-bootstrap/go-bootstrap-1.4.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CTARGET=${CTARGET:-${CHOST}}
+
+inherit eutils toolchain-funcs
+
+SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
+# Upstream only supports go on amd64, arm and x86 architectures.
+KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
+
+DESCRIPTION="Version of go compiler used for bootstrapping"
+HOMEPAGE="http://www.golang.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+# The go tools should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go1.4/pkg/tool/.*/.*"
+
+# The go language uses *.a files which are _NOT_ libraries and should not be
+# stripped.
+STRIP_MASK="/usr/lib/go1.4/pkg/linux*/*.a
+ /usr/lib/go1.4/pkg/freebsd*/*.a /usr/lib/go1.4/pkg/darwin*/*.a"
+
+S="${WORKDIR}"/go
+
+src_prepare()
+{
+ sed -i -e 's/"-Werror",//g' src/cmd/dist/build.c
+}
+
+src_compile()
+{
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go1.4
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+ if [[ $CTARGET = armv5* ]]
+ then
+ export GOARM=5
+ fi
+ tc-export CC
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash --no-rebuild --banner || die "tests failed"
+}
+
+src_install()
+{
+ dodir /usr/lib/go1.4
+ exeinto /usr/lib/go1.4/bin
+doexe bin/*
+ insinto /usr/lib/go1.4
+ doins -r lib pkg src
+ fperms -R +x /usr/lib/go1.4/pkg/tool
+}
+
+pkg_postinst()
+{
+ # If the go tool sees a package file timestamped older than a dependancy it
+ # will rebuild that file. So, in order to stop go from rebuilding lots of
+ # packages for every build we need to fix the timestamps. The compiler and
+ # linker are also checked - so we need to fix them too.
+ ebegin "fixing timestamps to avoid unnecessary rebuilds"
+ tref="usr/lib/go1.4/pkg/*/runtime.a"
+ find "${EROOT}"usr/lib/go1.4 -type f \
+ -exec touch -r "${EROOT}"${tref} {} \;
+ eend $?
+}
diff --git a/dev-lang/go-bootstrap/metadata.xml b/dev-lang/go-bootstrap/metadata.xml
new file mode 100644
index 00000000000..afdfdb99076
--- /dev/null
+++ b/dev-lang/go-bootstrap/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>
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ This package is only necessary until gccgo supports go-1.4. It
+ will be removed as soon as stable gcc supports this.
+ It is here so that >=dev-lang/go 1.5 can use it to bootstrap.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
new file mode 100644
index 00000000000..dfae9c0a277
--- /dev/null
+++ b/dev-lang/go/Manifest
@@ -0,0 +1 @@
+DIST go1.4.2.src.tar.gz 10921896 SHA256 299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b SHA512 cda1a29d4418875dffaf3324004ddae8e1bbb573f7668e6e0c03d8b61284f4db7fca244c181f2859f8ccdd3db6391fb21e0d98a1a9fc15096c15883249d48a9c WHIRLPOOL d06c27f6ff3a6499a6c7cb3c5eccd53eb588896c4d837e1fe9855c22ee3caa5cc48fd68cbeceff105b7c47fafbbf0eb3dc28ee3af7196692c5bf18511c6760ef
diff --git a/dev-lang/go/go-1.4.2.ebuild b/dev-lang/go/go-1.4.2.ebuild
new file mode 100644
index 00000000000..4de9d439bf4
--- /dev/null
+++ b/dev-lang/go/go-1.4.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CTARGET=${CTARGET:-${CHOST}}
+
+inherit eutils toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="git://github.com/golang/go.git"
+ inherit git-r3
+else
+ SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
+ # Upstream only supports go on amd64, arm and x86 architectures.
+ KEYWORDS="-* amd64 arm x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
+fi
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="http://www.golang.org"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/go-relocation-test-gcc482-aarch64.obj
+ usr/lib/go/src/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# The go language uses *.a files which are _NOT_ libraries and should not be
+# stripped.
+STRIP_MASK="/usr/lib/go/pkg/linux*/*.a /usr/lib/go/pkg/freebsd*/*.a /usr/lib/go/pkg/darwin*/*.a"
+
+if [[ ${PV} != 9999 ]]; then
+ S="${WORKDIR}"/go
+fi
+
+src_prepare()
+{
+ if [[ ${PV} != 9999 ]]; then
+ sed -i -e 's#"-Werror",##g' src/cmd/dist/build.c ||
+ die "sed failed"
+ fi
+ epatch_user
+}
+
+src_compile()
+{
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+ if [[ $CTARGET = armv5* ]]
+ then
+ export GOARM=5
+ fi
+ tc-export CC
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash --no-rebuild --banner || die "tests failed"
+}
+
+src_install()
+{
+ dobin bin/*
+ dodoc AUTHORS CONTRIBUTORS PATENTS README
+
+ dodir /usr/lib/go
+ insinto /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
+ doins -r doc include lib pkg src
+ fperms -R +x /usr/lib/go/pkg/tool
+}
+
+pkg_preinst()
+{
+ has_version '<dev-lang/go-1.4' &&
+ export had_support_files=true ||
+ export had_support_files=false
+}
+
+pkg_postinst()
+{
+ # If the go tool sees a package file timestamped older than a dependancy it
+ # will rebuild that file. So, in order to stop go from rebuilding lots of
+ # packages for every build we need to fix the timestamps. The compiler and
+ # linker are also checked - so we need to fix them too.
+ ebegin "fixing timestamps to avoid unnecessary rebuilds"
+ tref="usr/lib/go/pkg/*/runtime.a"
+ find "${EROOT}"usr/lib/go -type f \
+ -exec touch -r "${EROOT}"${tref} {} \;
+ eend $?
+
+ if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} &&
+ ${REPLACING_VERSIONS} != ${PV} ]]; then
+ elog "Release notes are located at http://golang.org/doc/go1.4"
+ fi
+
+ if $had_support_files; then
+ ewarn
+ ewarn "All editor support, IDE support, shell completion"
+ ewarn "support, etc has been removed from the go package"
+ ewarn "upstream."
+ ewarn "For more information on which support is available, see"
+ ewarn "the following URL:"
+ ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins"
+ fi
+}
diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
new file mode 100644
index 00000000000..28d6ec3d77c
--- /dev/null
+++ b/dev-lang/go/go-9999.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+export CTARGET=${CTARGET:-${CHOST}}
+
+inherit eutils toolchain-funcs
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="git://github.com/golang/go.git"
+ inherit git-r3
+else
+ SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz"
+ # Upstream only supports go on amd64, arm and x86 architectures.
+ KEYWORDS="-* ~amd64 ~arm ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
+fi
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="http://www.golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE=""
+
+DEPEND=">=dev-lang/go-bootstrap-1.4.1"
+RDEPEND=""
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/go-relocation-test-gcc482-aarch64.obj
+ usr/lib/go/src/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# The go language uses *.a files which are _NOT_ libraries and should not be
+# stripped.
+STRIP_MASK="/usr/lib/go/pkg/linux*/*.a /usr/lib/go/pkg/freebsd*/*.a /usr/lib/go/pkg/darwin*/*.a"
+
+if [[ ${PV} != 9999 ]]; then
+ S="${WORKDIR}"/go
+fi
+
+src_prepare()
+{
+ if [[ ${PV} != 9999 ]]; then
+ sed -i -e 's/"-Werror",//g' src/cmd/dist/build.go ||
+ die 'sed failed'
+ fi
+ epatch_user
+}
+
+src_compile()
+{
+ export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go1.4
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+ if [[ $CTARGET = armv5* ]]
+ then
+ export GOARM=5
+ fi
+ tc-export CC
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash --no-rebuild --banner || die "tests failed"
+}
+
+src_install()
+{
+ dobin bin/*
+ dodoc AUTHORS CONTRIBUTORS PATENTS README.md
+
+ dodir /usr/lib/go
+ insinto /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
+ doins -r doc lib pkg src
+ fperms -R +x /usr/lib/go/pkg/tool
+}
+
+pkg_preinst()
+{
+ has_version '<dev-lang/go-1.4' &&
+ export had_support_files=true ||
+ export had_support_files=false
+}
+
+pkg_postinst()
+{
+ # If the go tool sees a package file timestamped older than a dependancy it
+ # will rebuild that file. So, in order to stop go from rebuilding lots of
+ # packages for every build we need to fix the timestamps. The compiler and
+ # linker are also checked - so we need to fix them too.
+ ebegin "fixing timestamps to avoid unnecessary rebuilds"
+ tref="usr/lib/go/pkg/*/runtime.a"
+ find "${EROOT}"usr/lib/go -type f \
+ -exec touch -r "${EROOT}"${tref} {} \;
+ eend $?
+
+ if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} &&
+ ${REPLACING_VERSIONS} != ${PV} ]]; then
+ elog "Release notes are located at http://golang.org/doc/go${PV}"
+ fi
+
+ if $had_support_files; then
+ ewarn
+ ewarn "All editor support, IDE support, shell completion"
+ ewarn "support, etc has been removed from the go package"
+ ewarn "upstream."
+ ewarn "For more information on which support is available, see"
+ ewarn "the following URL:"
+ ewarn "https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins"
+ fi
+}
diff --git a/dev-lang/go/metadata.xml b/dev-lang/go/metadata.xml
new file mode 100644
index 00000000000..b8d86563d87
--- /dev/null
+++ b/dev-lang/go/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>
+ <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>
+</pkgmetadata>
diff --git a/dev-lang/gpc/Manifest b/dev-lang/gpc/Manifest
new file mode 100644
index 00000000000..80a438d5008
--- /dev/null
+++ b/dev-lang/gpc/Manifest
@@ -0,0 +1,3 @@
+DIST gcc-core-3.4.5.tar.bz2 13397308 SHA256 8a2824b12a1cae8b68de3be0a8fd2da14918462e6afa27c3578ccfc8ab10d0fc SHA512 997289b39e5605bac84c2a5d80a4e5dc2d24d4f1c742b494e4fbee4d0f16f64ae9ce860ccdc99c9764a29ec92ad066fd4faf5789fc5d7f49173eace263fe5c01 WHIRLPOOL bf9834d2b7a48d99f7ac5a901bea636e547fbe77eb1e38d39f7ea0484025837f0c49ffd2544f6ce8c2f2639687d3daec59a2b97b430f53b78c773abba8e783f4
+DIST gpc-20051104.tar.bz2 2616173 SHA256 55e5ecce73fcd06f6377c95be3cedc47cd70547ef32d5da18a4c7778bf2becca SHA512 bde9a9721e3a6e27dc5e3e72f513dfdf87a89dfd15c504e44320eab49733c58f85524ae2393b6003b392a9fdd4102584719a04c3909f711e73a591e7c32c84d3 WHIRLPOOL 5c0f3150f8632602b2cb508af7c27a36168d1017ffbb9afba58c135ae0b3d570f6e1e811c3c94bba0ac87cacd981da2fe72790a3c1faa15b34cbb39946a456e0
+DIST gpc-20070904.tar.bz2 2724008 SHA256 5158632503da0e237c28600dd9a6714d9036d5277ff025b16dcef83b4f492ae8 SHA512 1855f71c02f99c18e16de93e993d835f95610cc2e32d3b1d424645a3f3f4a4866774deedd1cb578b164b9f16d01db2faeb5de4fb90b99db6ca6aee286bcc2121 WHIRLPOOL 8a552a01f1f67835b0945f58fe03fce299bee3846f68efa4b658551d15cd9e514fe62823c2c5cc0161794b67f8f2066d2a336bfd985d66a2ea6b866d46ccacdb
diff --git a/dev-lang/gpc/gpc-20051104.ebuild b/dev-lang/gpc/gpc-20051104.ebuild
new file mode 100644
index 00000000000..7ca9e328155
--- /dev/null
+++ b/dev-lang/gpc/gpc-20051104.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic versionator
+
+strip-flags
+filter-flags "-pipe"
+
+#due to cache requirements we cannot dynamically match gcc version
+#so sticking to a particular (and working) one
+GCCVER="3.4.5"
+
+DESCRIPTION="Gnu Pascal Compiler"
+HOMEPAGE="http://gnu-pascal.de"
+SRC_URI="http://www.math.uni.wroc.pl/~hebisch/${PN}/${P}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="nls"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/gcc-${GCCVER}"
+
+# GCC version strings
+GCCMAJOR=$(get_version_component_range 1 "${GCCVER}")
+GCCMINOR=$(get_version_component_range 2 "${GCCVER}")
+GCCBRANCH=$(get_version_component_range 1-2 "${GCCVER}")
+GCCRELEASE=$(get_version_component_range 1-3 "${GCCVER}")
+
+# possible future crosscompilation support
+export CTARGET=${CTARGET:-${CHOST}}
+
+PREFIX="/usr"
+LIBPATH="${PREFIX}/lib/${PN}/${CTARGET}/${GCCBRANCH}"
+LIBEXECPATH="${PREFIX}/libexec/${PN}/${CTARGET}/${GCCBRANCH}"
+INCLUDEPATH="${LIBPATH}/include"
+DATAPATH="${PREFIX}/share"
+
+BUILDDIR="${WORKDIR}/build"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}/${P}/p"
+
+ #comment out read to let ebuild continue
+ sed -i -e "s:read:#read:" config-lang.in || die "seding autoreplies failed"
+ #and remove that P var (it doesn't seem to do much except to break a build)
+ sed -i -e "s:\$(P)::" Make-lang.in || die "seding Make-lan.in failed"
+
+ cd "${WORKDIR}"
+ mv ${P}/p "${S}/gcc/"
+
+ # Build in a separate build tree
+ mkdir -p ${BUILDDIR}
+}
+
+src_compile() {
+ local myconf
+
+ if use nls; then
+ myconf="${myconf} --enable-nls --without-included-gettext"
+ else
+ myconf="${myconf} --disable-nls"
+ fi
+
+ # reasonably sane globals (from toolchain)
+ myconf="${myconf} \
+ --with-system-zlib \
+ --disable-checking \
+ --disable-werror \
+ --disable-libunwind-exceptions"
+
+ use amd64 && myconf="${myconf} --disable-multilib"
+
+ cd ${BUILDDIR}
+
+ einfo "Configuring GCC for GPC build..."
+# addwrite "/dev/zero"
+ "${S}"/configure \
+ --prefix=${PREFIX} \
+ --libdir="${LIBPATH}" \
+ --libexecdir="${LIBEXECPATH}" \
+ --datadir=${DATAPATH} \
+ --mandir=${DATAPATH}/man \
+ --infodir=${DATAPATH}/info \
+ --program-prefix="" \
+ --enable-shared \
+ --host=${CHOST} \
+ --target=${CTARGET} \
+ --enable-languages="c,pascal" \
+ --enable-threads=posix \
+ --enable-long-long \
+ --enable-cstdio=stdio \
+ --enable-clocale=generic \
+ --enable-__cxa_atexit \
+ --enable-version-specific-runtime-libs \
+ --with-local-prefix=${PREFIX}/local \
+ ${myconf} || die "configure failed"
+
+ touch "${S}"/gcc/c-gperf.h
+
+ einfo "Building GPC..."
+ # Fix for our libtool-portage.patc
+ MAKEOPTS="${MAKEOPTS} -j1" emake LIBPATH="${LIBPATH}" bootstrap || die "make failed"
+}
+
+src_install () {
+ # Do not allow symlinks in ${PREFIX}/lib/gcc-lib/${CHOST}/${PV}/include as
+ # this can break the build.
+ for x in cd ${BUILDDIR}/gcc/include/*; do
+ if [ -L ${x} ]; then
+ rm -f ${x}
+ fi
+ done
+
+ einfo "Installing GPC..."
+ cd ${BUILDDIR}/gcc
+ make DESTDIR="${D}" \
+ pascal.install-with-gcc || die
+
+ # gcc insists on installing libs in its own place
+ mv "${D}${LIBPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBPATH}"
+ if [ "${ARCH}" == "amd64" ]; then
+ # ATTN! this may in fact be related to multilib, rather than amd64
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib64/libgcc_s* "${D}${LIBPATH}"
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib/libgcc_s* "${D}${LIBPATH}"/32/
+ fi
+ mv "${D}${LIBEXECPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBEXECPATH}"
+
+ rm -rf "${D}${LIBPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}"/install-tools/
+
+ # Install documentation.
+ dodir /usr/share/doc/${PF}
+ mv "${D}${PREFIX}"/doc/gpc/* "${D}"/usr/share/doc/${PF}
+ prepalldocs
+
+ # final cleanups
+ rmdir "${D}${PREFIX}"/include "${D}/${PREFIX}"/share/man/man7
+ rm -rf "${D}${PREFIX}"/doc
+
+ # create an env.d entry
+ dodir /etc/env.d
+ echo "PATH=${LIBEXECPATH}" > "${D}"etc/env.d/56gpc
+ echo "ROOTPATH=${LIBEXECPATH}" >> "${D}"etc/env.d/56gpc
+}
+
+pkg_postinst ()
+{
+ einfo
+ elog "Please don't forget to source /etc/profile"
+ einfo
+}
diff --git a/dev-lang/gpc/gpc-20070904.ebuild b/dev-lang/gpc/gpc-20070904.ebuild
new file mode 100644
index 00000000000..641bd3b7938
--- /dev/null
+++ b/dev-lang/gpc/gpc-20070904.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic versionator toolchain-funcs
+
+strip-flags
+filter-flags "-pipe"
+
+#due to cache requirements we cannot dynamically match gcc version
+#so sticking to a particular (and working) one
+GCCVER="3.4.5"
+
+DESCRIPTION="Gnu Pascal Compiler"
+HOMEPAGE="http://gnu-pascal.de"
+SRC_URI="http://www.math.uni.wroc.pl/~hebisch/${PN}/${P}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="nls"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/gcc-${GCCVER}"
+
+# GCC version strings
+GCCMAJOR=$(get_version_component_range 1 "${GCCVER}")
+GCCMINOR=$(get_version_component_range 2 "${GCCVER}")
+GCCBRANCH=$(get_version_component_range 1-2 "${GCCVER}")
+GCCRELEASE=$(get_version_component_range 1-3 "${GCCVER}")
+
+# possible future crosscompilation support
+export CTARGET=${CTARGET:-${CHOST}}
+
+PREFIX="/usr"
+LIBPATH="${PREFIX}/lib/${PN}/${CTARGET}/${GCCBRANCH}"
+LIBEXECPATH="${PREFIX}/libexec/${PN}/${CTARGET}/${GCCBRANCH}"
+INCLUDEPATH="${LIBPATH}/include"
+DATAPATH="${PREFIX}/share"
+
+BUILDDIR="${WORKDIR}/build"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}/${P}/p"
+
+ #comment out read to let ebuild continue
+ sed -i -e "s:read:#read:" config-lang.in || die "seding autoreplies failed"
+ #and remove that P var (it doesn't seem to do much except to break a build)
+ sed -i -e "s:\$(P)::" Make-lang.in || die "seding Make-lan.in failed"
+
+ cd "${WORKDIR}"
+ mv ${P}/p "${S}/gcc/"
+
+ # Build in a separate build tree
+ mkdir -p ${BUILDDIR}
+}
+
+src_compile() {
+ local myconf
+
+ if use nls; then
+ myconf="${myconf} --enable-nls --without-included-gettext"
+ else
+ myconf="${myconf} --disable-nls"
+ fi
+
+ # reasonably sane globals (from toolchain)
+ myconf="${myconf} \
+ --with-system-zlib \
+ --disable-checking \
+ --disable-werror \
+ --disable-libunwind-exceptions"
+
+ use amd64 && myconf="${myconf} --disable-multilib"
+
+ cd ${BUILDDIR}
+ tc-export CC
+
+ einfo "Configuring GCC for GPC build..."
+# addwrite "/dev/zero"
+ "${S}"/configure \
+ --prefix=${PREFIX} \
+ --libdir="${LIBPATH}" \
+ --libexecdir="${LIBEXECPATH}" \
+ --datadir=${DATAPATH} \
+ --mandir=${DATAPATH}/man \
+ --infodir=${DATAPATH}/info \
+ --program-prefix="" \
+ --enable-shared \
+ --host=${CHOST} \
+ --target=${CTARGET} \
+ --enable-languages="c,pascal" \
+ --enable-threads=posix \
+ --enable-long-long \
+ --enable-cstdio=stdio \
+ --enable-clocale=generic \
+ --enable-__cxa_atexit \
+ --enable-version-specific-runtime-libs \
+ --with-local-prefix=${PREFIX}/local \
+ ${myconf} || die "configure failed"
+
+ touch "${S}"/gcc/c-gperf.h
+
+ einfo "Building GPC..."
+ # Fix for our libtool-portage.patc
+ MAKEOPTS="${MAKEOPTS} -j1" emake LIBPATH="${LIBPATH}" bootstrap || die "make failed"
+}
+
+src_install () {
+ # Do not allow symlinks in ${PREFIX}/lib/gcc-lib/${CHOST}/${PV}/include as
+ # this can break the build.
+ for x in cd ${BUILDDIR}/gcc/include/*; do
+ if [ -L ${x} ]; then
+ rm -f ${x}
+ fi
+ done
+
+ einfo "Installing GPC..."
+ cd ${BUILDDIR}/gcc
+ make DESTDIR="${D}" \
+ pascal.install-with-gcc || die
+
+ # gcc insists on installing libs in its own place
+ mv "${D}${LIBPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBPATH}"
+ if [ "${ARCH}" == "amd64" ]; then
+ # ATTN! this may in fact be related to multilib, rather than amd64
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib64/libgcc_s* "${D}${LIBPATH}"
+ mv "${D}${LIBPATH}/gcc/${CTARGET}"/lib/libgcc_s* "${D}${LIBPATH}"/32/
+ fi
+ mv "${D}${LIBEXECPATH}/gcc/${CTARGET}/${GCCRELEASE}"/* "${D}${LIBEXECPATH}"
+
+ rm -rf "${D}${LIBPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}/gcc"
+ rm -rf "${D}${LIBEXECPATH}"/install-tools/
+
+ # Install documentation.
+ dodir /usr/share/doc/${PF}
+ mv "${D}${PREFIX}"/doc/gpc/* "${D}"/usr/share/doc/${PF}
+ prepalldocs
+
+ # final cleanups
+ rmdir "${D}${PREFIX}"/include "${D}/${PREFIX}"/share/man/man7
+ rm -rf "${D}${PREFIX}"/doc
+
+ # create an env.d entry
+ dodir /etc/env.d
+ echo "PATH=${LIBEXECPATH}" > "${D}"etc/env.d/56gpc
+ echo "ROOTPATH=${LIBEXECPATH}" >> "${D}"etc/env.d/56gpc
+}
+
+pkg_postinst ()
+{
+ einfo
+ elog "Please don't forget to source /etc/profile"
+ einfo
+}
diff --git a/dev-lang/gpc/metadata.xml b/dev-lang/gpc/metadata.xml
new file mode 100644
index 00000000000..3e4a847f9bd
--- /dev/null
+++ b/dev-lang/gpc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>lang-misc</herd>
+<maintainer>
+ <email>george@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/gprolog/Manifest b/dev-lang/gprolog/Manifest
new file mode 100644
index 00000000000..59ed9f2af7f
--- /dev/null
+++ b/dev-lang/gprolog/Manifest
@@ -0,0 +1 @@
+DIST gprolog-1.4.4.tar.gz 3538152 SHA256 18c0e9644b33afd4dd3cdf29f94c099ad820d65e0c99da5495b1ae43b4f2b18e SHA512 b6227a06794d31162f2c790a025f7372a6676c1891a76e880d2152aeab6322d3341aeab85e11d9be6d97ff1c69801bee73fa3ea6b0659af61f55990a455dc212 WHIRLPOOL cdcdd60a7ebd045fa9bad2692430577477fc3a42eca3c86b31ce6c7c26c1b7c9e9c6d60273b33d0ceaec85bab08cc30d482c9ff740ed1ca0fce37a4b2c0a191d
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 00000000000..21f256bf71c
--- /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 00000000000..25044ac9fc3
--- /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 00000000000..f5246e0302a
--- /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-txt-file.patch b/dev-lang/gprolog/files/gprolog-1.4.4-txt-file.patch
new file mode 100644
index 00000000000..adeb4428b58
--- /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 00000000000..5c305e99d72
--- /dev/null
+++ b/dev-lang/gprolog/gprolog-1.4.4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib
+
+DESCRIPTION="GNU Prolog is 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}-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
+
+ if gcc-specs-pie ; then
+ # gplc generates its own native ASM; disable PIE
+ append-ldflags -nopie
+ fi
+
+ 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 00000000000..1990bb86aac
--- /dev/null
+++ b/dev-lang/gprolog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+</pkgmetadata>
diff --git a/dev-lang/gwydion-dylan-bin/Manifest b/dev-lang/gwydion-dylan-bin/Manifest
new file mode 100644
index 00000000000..7ce67e0276d
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/Manifest
@@ -0,0 +1 @@
+DIST gwydion-dylan-bin-2.4.0-x86.tbz2 5846864 SHA256 2767f0bfa127eb57cc8cd52fa0446e43ec71d2bfc584a7d39b03c12f8c3ca0db SHA512 878c68f922fd02a2f5d6a64d94706d878502c143a02e34dc325e68f3881fcbea2a71a81f000ee0d40d494f6e7cf3f4aeef5208ea2efb62b24e6b7afdf7d87070 WHIRLPOOL 765f89606bd1b99cd40836a6dd42c844888a50f239ab0c94acdc001c7e3a465be218b6ca51efbe3d7db6c7ac67fce34036c547d74529d01fc7888d7270d01d43
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 00000000000..a5563a220b7
--- /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 00000000000..3048ca99890
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..b757f0bd18f
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/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>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+Dylan is an advanced, object-oriented, dynamic language which supports the rapid
+development of programs. When needed, the programmer can later optimize [his or
+her] programs for more efficient execution by supplying type information to the
+compiler. Nearly all entities in Dylan (including functions, classes, and basic
+data types such as integers) are first class objects. Additionally Dylan
+supports multiple inheritance, polymorphism, multiple dispatch, keyword
+arguments, object introspection, and many other advanced features.
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/helium/Manifest b/dev-lang/helium/Manifest
new file mode 100644
index 00000000000..03a5bf4aa86
--- /dev/null
+++ b/dev-lang/helium/Manifest
@@ -0,0 +1,3 @@
+DIST helium-1.6-ghc.patch.bz2 34579 SHA256 da463fe2a27689ec702eaf7c687446272f983845228cbb45d0fa91e1542cd7ab SHA512 ac86750a98d3c87cb00e8777ad0e5a838df9d87ebdd8540d1c5a297a8488c810acbecf4d665ef7754da0f99729785f48fb77d24fc09f3c963fe972e06dc952c8 WHIRLPOOL 516bba56183eeeede84d3974c725024d90df92f280692ba921cea627044fe95dc2fd93eb20aea94f3476569a68a7ea6fc4141274e3f5d38abd5637fe85a86e93
+DIST helium-1.6-src.tar.gz 960254 SHA256 a93632d031a16c0ea516f4fa7ce63acd0950543c74265e22abd0993856a0a053 SHA512 f102c5a4f669cb0b7fecdf3efdf9dacf0cddb97e9bf5cbdebd0801169802dbfefbe3de08d3f36c1c66a3839a3b080e241840f5135eea40860a91157815026a95 WHIRLPOOL c1f76f87e37d8bcf41a8c919ee5306dc9067a09af55b7bbd66363d14865eddf010d04d5fb9e01a15c71b2bcd6fea44cfb0399758e79aad905d72f879aec80a50
+DIST helium-1.8.1.tar.gz 774509 SHA256 b2c0c29c31f495c4d4ab55bec3cfa84dba19efc3cdf2e699bcc350ee0a44936f SHA512 4523d7323251354ea9f4fd0f6f5a112659119bef2fc0c790bb139cdcdf25e7f740ae4c7d584d0c93aabc3baaace8be49931808c59ad9133b81a64ae115e0f9b9 WHIRLPOOL 97de6fe8a2a0923300ebb7b9536f27144b7a0ae263ad36eae85c7bbc939cf1a37349e7485682d6f4f0e3171811b8e58bd11bb1268f0c9f7330dc72d21198ed6a
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 00000000000..6c035ad3b8f
--- /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-wrapper-1.6 b/dev-lang/helium/files/helium-wrapper-1.6
new file mode 100644
index 00000000000..926e18cc617
--- /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 00000000000..cef5513e8c7
--- /dev/null
+++ b/dev-lang/helium/helium-1.6.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+DESCRIPTION="Helium (for learning Haskell)"
+HOMEPAGE="http://www.cs.uu.nl/helium"
+SRC_URI="http://www.cs.uu.nl/helium/distr/${P}-src.tar.gz
+ mirror://gentoo/${P}-ghc.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+# compilation breaks on amd64, suspect lvm doesn't work properly
+KEYWORDS="-amd64 ~ppc -sparc ~x86"
+IUSE="readline"
+
+DEPEND=">=dev-lang/ghc-6.8
+ dev-haskell/mtl
+ dev-haskell/parsec
+ readline? ( dev-haskell/readline )"
+RDEPEND="dev-libs/gmp
+ readline? ( sys-libs/readline )"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${P}-ghc.patch"
+ epatch "${FILESDIR}/helium-1.6-respect-cflags-ldflags-nostrip.patch"
+
+ # split base only
+ sed -e 's/^GHCFLAGS =.*$/& -package containers/' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # file has non-ASCII syms and it's pulled to ghc for dependency generaton
+ # ghc w/UTF-8 dislikes it:
+ sed -e 's/\xCA//g' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # mangle evil 'rec' to 'rec_'. It's not very accurate, but less,
+ # than manually patching ~250 occurences. (ghc-6.10+ has rec as reserved word)
+ local bad_file
+
+ for bad_file in Top/src/Top/Types/Unification.hs \
+ Top/src/Top/Types/Quantification.hs \
+ Top/src/Top/Types/Primitive.hs \
+ Top/src/Top/Solver/PartitionCombinator.hs \
+ Top/src/Top/Repair/Repair.hs \
+ Top/src/Top/Ordering/Tree.hs \
+ Top/src/Top/Implementation/TypeGraph/Standard.hs \
+ Top/src/Top/Implementation/TypeGraph/Path.hs \
+ Top/src/Top/Implementation/TypeGraph/EquivalenceGroup.hs \
+ Top/src/Top/Implementation/TypeGraph/Basics.hs \
+ Top/src/Top/Implementation/TypeGraph/ApplyHeuristics.hs \
+ lvm/src/lib/lvm/LvmRead.hs \
+ lvm/src/lib/core/CoreNoShadow.hs \
+ helium/src/utils/LoggerEnabled.hs \
+ helium/src/staticanalysis/miscellaneous/TypesToAlignedDocs.hs \
+ helium/src/staticanalysis/miscellaneous/TypeConversion.hs \
+ helium/src/staticanalysis/inferencers/TypeInferencing.hs \
+ helium/src/staticanalysis/heuristics/RepairSystem.hs \
+ helium/src/staticanalysis/heuristics/RepairHeuristics.hs \
+ helium/src/staticanalysis/heuristics/ListOfHeuristics.hs \
+ helium/src/staticanalysis/directives/TS_PatternMatching.ag
+ do
+ # take all symbols from exactly this source. This set is not universal,
+ # but it aims to catch (same) lexeme separators on the left and on the right
+ sed -e 's/\([^a-zA-Z_0-9"]\|^\)rec\([^a-zA-Z_0-9"]\|$\)/\1rec_\2/g' \
+ -i "${S}/$bad_file"
+ done
+
+ # cabal is their friend (oneOf became polymorphic and breaks the test)
+ sed -e 's/Text.ParserCombinators.Parsec/&.Pos/g' \
+ -e 's/oneOf/newPos/g' \
+ -i "${S}/helium/configure.in"
+
+ cd "${S}/helium"
+ eautoreconf
+}
+
+src_compile() {
+ # helium consists of two components that have to be set up separately,
+ # lvm and the main compiler. both build systems are slightly strange.
+ # lvm uses a completely non-standard build system:
+ # the ./configure of lvm is not the usual autotools configure
+
+ cd "${S}/lvm/src" && ./configure || die "lvm configure failed"
+ echo "STRIP=echo" >> config/makefile || die "lvm postconfigure failed"
+ myconf="$(use_enable readline) --without-strip --without-upx --without-ag"
+ cd "${S}/helium" && econf --prefix="/usr/lib" ${myconf} || die "econf failed"
+ cd "${S}/helium/src" && make depend || die "make depend failed"
+
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ cd helium/src || die "cannot cd to helium/src"
+ make install bindir="/usr/lib/helium/bin" DESTDIR="${D}" || die "make install failed"
+
+ # create wrappers
+ newbin "${FILESDIR}/helium-wrapper-${PV}" helium-wrapper
+
+ dosym /usr/bin/helium-wrapper /usr/bin/texthint
+ dosym /usr/bin/helium-wrapper /usr/bin/helium
+ dosym /usr/bin/helium-wrapper /usr/bin/lvmrun
+}
diff --git a/dev-lang/helium/helium-1.8.1.ebuild b/dev-lang/helium/helium-1.8.1.ebuild
new file mode 100644
index 00000000000..f351f59ee72
--- /dev/null
+++ b/dev-lang/helium/helium-1.8.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+"
diff --git a/dev-lang/helium/metadata.xml b/dev-lang/helium/metadata.xml
new file mode 100644
index 00000000000..ddb2b453cd1
--- /dev/null
+++ b/dev-lang/helium/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+</pkgmetadata>
diff --git a/dev-lang/hy/Manifest b/dev-lang/hy/Manifest
new file mode 100644
index 00000000000..8f355589803
--- /dev/null
+++ b/dev-lang/hy/Manifest
@@ -0,0 +1,4 @@
+DIST hy-0.10.0.tar.gz 340981 SHA256 524c9f2a2e0e789fe8896e9c7bea16c9f42e99d5b662080ec95e94de564523b9 SHA512 4f994289a00f16ed9c914fe8f37332d1bea9ddf3d2f42c30793da1030983d66d368d4bf75853dd76be14e440fca72aa3cccd3ddb5544e1db2b892a543bb1093b WHIRLPOOL 063ab5cf8e4f687a6bbbed9728e38e6ede0d1d7aa08e761175132428120ba31ed5ac39eaed9321b61b4a0f6a208cb69af6dc187c85d6de0139e1ff59f8d0153e
+DIST hy-0.10.1.tar.gz 348807 SHA256 16247c2f776147a46cd6c3beed329836c8a7a98e7ccb4b1cc660fced9688e02c SHA512 d96a5857fc6985fe044a152b276572f7943d3c579cf54daa675ec5d3e5d44836c151eb58f8e5cea8811f3bcb32b724fb24f8d61dc9ba917972673630e9cff7dc WHIRLPOOL 72e73cf008379de0e7f734f9a2687c70143fbb11bbb377c131e22eabaad355a88ea034e2b659c9bd1fa168eabfd0b8a802d779ced84b99ea5adb0718339f54a1
+DIST hy-0.11.0.tar.gz 358413 SHA256 c462fcba2af7b009d317a372ba23c74e7209284578a13c4803e6bd60ae22760e SHA512 16e80560b3b0ef6d1d95f222d41a721a1e9b7623d3b7a544c90ed3aad9cf4dee2c34ddb669669e6da2091e0fdbac1697e9249e87d235262cfd8023f69eaf7e37 WHIRLPOOL 2fe42d2843df1e2135b9b36fc413816843c8a4c2e2984bfabfc69722b4dbd353c6815807b27d3c1e2fa1061bfb4442ca0b3bb4de33f3482010141b3dff32f712
+DIST hy-0.9.12.tar.gz 166882 SHA256 d9e6341132144f11fa53f4601de052b14cca276d52968b31bb7ca23b1cd2cfd5 SHA512 2791e0f0640b1b20a57de1e60dcffc67e73b81010a25139cab9cb84a396f238ae369eb585f107280cb0f9b1abd75af558a4e896bc9970477458cdfa5618ca3f7 WHIRLPOOL d27fa19e34b27d130c7d50f7d8f9c4824dc20ea51552105ce676b10b58e3790839af96dc1486d7165a072a9837675fd9a709b25b9a96793b33a3918bea09eabb
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 00000000000..0137b6d593e
--- /dev/null
+++ b/dev-lang/hy/hy-0.10.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python2_7 python3_3)
+
+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 00000000000..848e6f0f067
--- /dev/null
+++ b/dev-lang/hy/hy-0.10.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python2_7 python3_3 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.0.ebuild b/dev-lang/hy/hy-0.11.0.ebuild
new file mode 100644
index 00000000000..1979af0c3fa
--- /dev/null
+++ b/dev-lang/hy/hy-0.11.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python2_7 python3_3 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-0.5[${PYTHON_USEDEP}]
+ dev-python/clint[${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.9.12.ebuild b/dev-lang/hy/hy-0.9.12.ebuild
new file mode 100644
index 00000000000..a88c67a62d5
--- /dev/null
+++ b/dev-lang/hy/hy-0.9.12.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#RESTRICT="test" # needs some pointy sticks
+PYTHON_COMPAT=(python2_7 python3_3)
+
+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/metadata.xml b/dev-lang/hy/metadata.xml
new file mode 100644
index 00000000000..3dd71e9201a
--- /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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hylang/hy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/icc/Manifest b/dev-lang/icc/Manifest
new file mode 100644
index 00000000000..96c604666fd
--- /dev/null
+++ b/dev-lang/icc/Manifest
@@ -0,0 +1,23 @@
+DIST parallel_studio_xe_2013.tgz 2097190124 SHA256 22ac8d6dd1bf9fd646c1d1322c0a9051b89b6dba975112d492cccd8359f8dc0a SHA512 d49c519c0b2f82e6fc0db6820d5f84999d2a973d8caa0e103c0ad355644f52d209147a2b3a884effad9bbae117bd9ebbad4869f5440009355ffacb65cae274fa WHIRLPOOL bb5f05ceeae39f794dcd6c4fafafb2e5ebf8e5332083f7eaf357dddb9b2a1e94f52f82f850a8b0aefe1920f2fd21be67bfa8aafa9590707e25e84e9f2be07bd5
+DIST parallel_studio_xe_2013_ia32.tgz 1161979592 SHA256 3f0ff2ece4cfc5ec3d7c2fddefeda2b55b1295a0d62440c172a14d8e60b7b551 SHA512 9818d0e8ee1f36527f5899480381c252528274248974001f136e7aecc196ab4a049aeabed5835c18f0b08153d3a36a7fc8d850aec455bb9b5f71d95d17dc161e WHIRLPOOL 2772bb70b968f765af1c47ecb11a9e0b0220890ed37d0a81cb911f9ec43dda8cbdd85f3b0cacf1b1794ca239684f3381e54bada668b0b4a40244da684c3b04a5
+DIST parallel_studio_xe_2013_intel64.tgz 1448188683 SHA256 6d3f5a635e86bc6d71d970458d746df8f4f239e8892347d76b4eda18946048f3 SHA512 679abcb2089fc9570bad0fe8b7dd6aeb0e13831f2f79e485ce150e593e7c0d2c8c25c03520124261291f0fa418a9b873e86a81b6962ad8bbae60bc2acbc594b6 WHIRLPOOL 85ee892aac2691375edf4624842a6931b3eaab34be64b97282c025810cb2db4ea05426263af5249525724d3437da6337189e6a4af6a1efc8f7713a854b8e4ce1
+DIST parallel_studio_xe_2013_sp1.tgz 3294385739 SHA256 ba65fdf7afbac0276a948ef8d4e1578297a0115548d5f3465c7ed4012030f696 SHA512 ee7995d39b604de6fed0bb87535c48666ca9ffa13975b6adcce170d746f2ee648b5c4a428ed8ef196226f204b3b17a833f379ab4fa57b4a1ebe7c89cc899ea66 WHIRLPOOL 213c8261c161df80732d958bf9e13a286aca2dd6ce16be30fee92d626051bc855c4a1ffe82b12f1bf9095771ca5b128463d839c14748d086b50527e7d09b76a7
+DIST parallel_studio_xe_2013_sp1_update1.tgz 3402142370 SHA256 5d0147c6907ed7950d7f14b615785f5e3c7977c62368f4a8ec7b06be758d614a SHA512 ce3f7a9710b3ec6eba5d4f97c9d7bd4cc633119750962d4de5a89b328a22323f5df68f679289930fa8651ee45fb59f7af63d943f9ef175799ab55dfbcc6d8029 WHIRLPOOL eeeef9e46e73f6eb2a1b5f5b9c8c604ff3c4709a53004d9a1887dbe690e0c597dbc683f4b19a8c544ea706e6cefbeedc5d1e6f12ca103cc6bdc35927250f5626
+DIST parallel_studio_xe_2013_sp1_update2.tgz 3410174020 SHA256 235c0f54832879e27afa2c11d7a4cc72bd5bcc6241963024a28cc9e1c74342f0 SHA512 589dee0cf806ac54be473d0a8a0b9da818898f7b91fec88c07c61f45973b6e40fe4a247bb140110a0be0c1422ddcfc0cd1007f2dc58e5ead0e4c77b25806aa4d WHIRLPOOL efde8852a8a708df4c161666f44404157ce4af776c0f2e2ddfdb039a2ca23af5fa68411e2adeba17f7a97b1a11c7e3e74e6806d0a4dcbe614752715161aa7e24
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update1.tgz 2148568608 SHA256 870a9909e661aa75738c2d0851f7554c56696c40db2266ddd21fd6c5c6ae0986 SHA512 ce1b32be3e4efbedc43f17e0930e0c67d55129d756b7168e51a9a956c510df7e5c194a02813e42931ef21acbc1f07a6ecda0b79074c879281ddbd7e5da055400 WHIRLPOOL 059f2f27590079907bbc202dfe81a3900018133d46a28d383dd3960c247019b49e4cf767e90601ed11a8194a4c370269b831c9c780ee90b8d4104668cda0f4b0
+DIST parallel_studio_xe_2013_update1_ia32.tgz 1208336795 SHA256 e1e2ac8e1cf559a539aec1b9ab06b71d041e986bba6db69cbb5025ecaee90e89 SHA512 76e23d359ae8698496b605e006c3038a8e4bd38f15369fdb95e436279c60d41a1d14d74763459d5aead321fd3b4601ef527d674af87170bab7911d5338595b30 WHIRLPOOL b93e8a8ce5f1e3487c187d6c2cd835836abc03bbae19b7376910ea713da9efabb5703449ca397bd10c92334ff0c6fcc8e4674898e695479e13c6d9223e2b52c5
+DIST parallel_studio_xe_2013_update1_intel64.tgz 1493318875 SHA256 f39f63df9d0fc150643c753fcfdb788a75db64e266adca06bcf4f084f3210808 SHA512 d5524a89fbb327a61b7d983dfca8caedf904234c09a934373c38024b4af9955063c4c5c1895eff9b66de3c14d9d401a86634cef7cd80f923fc9196366cfc7a7e WHIRLPOOL 3d0294ab0d4daba28462066cbe8d46772192e55d0b6648202f9f85f49a6cf4ff90a999566b3575fd988df8afefb1cabc1a8146c16fe170c449253659f7b43805
+DIST parallel_studio_xe_2013_update2.tgz 2152945149 SHA256 e8ddf6141f7d84c1f242891fabe0882c40269c358c0b946fee22ee6caa37121c SHA512 633370f58bd9fc14140912d5b3dd251ca4819a926b004a8053f92c83de6f9fdfdad192b425c5224d8b5aee47042a1a99d49628e6e2bb53e623ae429eefcfaac4 WHIRLPOOL 5b4a7c0c9cab758885ccffab25f1aaf64a6f5576d02df81a4797a2b9ae2151efb5e564e43397a2b61040d4af66024107a5a9c537982d3e17723655414dcba166
+DIST parallel_studio_xe_2013_update2_ia32.tgz 1190613262 SHA256 13063ea9c47c781ea8f368566d328434351002e7321b2021b5f04ff741a5d55f SHA512 1488a1b8c9b84881041ccf42d9f856d44aa0654ce3171b0f92114a3408d8cb1f1a18a6d488db6bbfd7322d5a230748612b53378b6ac01b8b7b3e66b3b8f94333 WHIRLPOOL f7d2b307d2f4e226004ddfcf073db087fff6d68e94f849e85350dc18894db884b62362bb3929076fdd531e29f5c49e2cd94eba8685b13fc52e293226516d909d
+DIST parallel_studio_xe_2013_update2_intel64.tgz 1488277925 SHA256 6136774de466de19f4024eeb5a8176ffbf559143b048fecc83848c27008361d6 SHA512 8260ab223d9a959089ae66c8948d90ce119cceeb719ef18c1a9d258ccd77e9b6a67af1a3e203d96a1c3c774def9a6fc302c126001072b7c5aa2bb3cdc68bc4dd WHIRLPOOL 006dc0e925c8265abf174682cd54f2c2fc4c4f1e059e045407d523b3e3b659cadc47da005126236a8b01b882fd0b4dfa7dadce0c52f640d5c0ada8122a9d6d08
+DIST parallel_studio_xe_2013_update3.tgz 2173061577 SHA256 98b3bfe9feefa8caaa1bea533362f31bcfe96aa8f9e59fc89f6a453d50df7508 SHA512 c6115f01b045c840b61e3c2a17fd39142c814d4e387fa5bc935c5cc6ca365c3fedddb6d8c045b5c239b948b42c02254d8b73c42cfe16d046dcf14d3a4597bbde WHIRLPOOL e857fbf0fc73406f7d787400f8ed6e45e93825616fe3d2d10dcd26fa03d56cd956a0b598270724be4ab3886d77502e0f456077ed3008cffc6bdb4abe60acedce
+DIST parallel_studio_xe_2013_update3_ia32.tgz 1207596909 SHA256 57017db1b00345d46ef9dff67dd4e5754ed0fe67fae7335489447f948dbfe7a8 SHA512 f3656fcbda74f253c8cc0ca56e16a84d77854ef51ecc7f24db02c820270bef3954d0d97d1be2aa5cf2ea7703a6e442c3be15df28de570aac7062e5c5958581a4 WHIRLPOOL 0407b59697da8a69c8ac512dec4187bf27eeb2e80516cd6a99968ef3b30a31e55eeaa31ec4bcbd34fe23678e68c4f00cc5dfce579edfb0268b789e1e65285945
+DIST parallel_studio_xe_2013_update3_intel64.tgz 1508395753 SHA256 081bc3d617f04243d459d92d05398df1a3634faf3de554346f732ed83ed4ef06 SHA512 344678ba9c6029ab095cc656c2153b20f0f996dab45115296fb624eca3863763e4010b519595892ffeecfc1a0880901ef5ae53924e41e470aec46efd0abcd822 WHIRLPOOL 1295f579ecc50014b285d47ecf6b92d1b9d0c2cbadd1a5972a832178263a9b3d4cf4208153df40e270c259c1307ed21277239e70371b39eaf4e12171c25a3c1f
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
+DIST parallel_studio_xe_2015.tgz 3819862086 SHA256 31abe447b1db457b38547dfbf0fd7e434cb45d5734892ec3ef95ef5f4d2f8ae2 SHA512 889844fe067d1b1095283686f1b1657aab2bbda2a7e9014aec88a0ef1af8c8a0e1da3a4414600d4b450b2a1b4b13496b5165e495ccdf3187c27f58eaff07b13b WHIRLPOOL c2be966c8910d8995b845e25d60ceb700bfe9bc78daf60e97fd016de6e1abc60bb0f4fe33e2cd7c8960ebbf1540d418524414a351ed9256a80cdee4e29166961
+DIST parallel_studio_xe_2015_update1.tgz 4044230603 SHA256 84fdf48d1de20e1d580ba5d419a5bc1c55d217a4f5dc1807190ecffe0229a62b SHA512 894c911dce9d261fbe67d65c91c3b6c7117b183102fe7673a5e106d14994a082fdf03fdb573bbb1a9f0a01cf1539082b72ec75c39db7590bb2f63222f9a5b832 WHIRLPOOL f43b219ba82aa3f94c6818c54b971302f3693cb1c0266924f7ee79c67d6008699388afedaf4b2f72e969a73c8fd7d276309d80ff4dc8dfb1ba766cbe19b33872
+DIST parallel_studio_xe_2015_update2.tgz 4145283363 SHA256 8cbde4d4fb3bbfcc5096d5d924953121ca84e9a9bee7b00dfd07c029c1a89943 SHA512 1166eaa41c881059673dbf51194cf800fbc94a1080fc9eebbacc20cd762c3b2e92f83191cb1cdacc50da0c8522524b7132d269fc2a91615ba4fbda5c63cb7a47 WHIRLPOOL 95e93fc964f0ddbd81e87d3c8083adea3f8ab82fc0668dc00b10154ba8911bd50d07be9d2130a1b27c7ea66e5208e172055df4fee69f336ae777d629ca7874d4
+DIST parallel_studio_xe_2015_update3.tgz 4156836825 SHA256 ab7169989c87bbb0fe66221cb7eb3a26b17c8b9ceff38f1926e5607834306896 SHA512 eccc2bfe85ccd039a2ec9e334d370e49d43baa0522d095c087a5982aa08bddb4c97bfc3125bd09f5cd57d3ed252c598012e1f2670b8373a1b3bb455825d18f96 WHIRLPOOL d1fd8d1e46ce35150357a9452f04529d8a1f7e915e50a5d714895184aa37fb61186a5455e89b4750f444f0f6da94563e493d0821c661378551c3739f8d27d7b9
diff --git a/dev-lang/icc/icc-13.0.0.079.ebuild b/dev-lang/icc/icc-13.0.0.079.ebuild
new file mode 100644
index 00000000000..d026267569e
--- /dev/null
+++ b/dev-lang/icc/icc-13.0.0.079.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2749
+INTEL_DPV=2013
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+src_install() {
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/icc/icc-13.0.1.117.ebuild b/dev-lang/icc/icc-13.0.1.117.ebuild
new file mode 100644
index 00000000000..cb4a629a31f
--- /dev/null
+++ b/dev-lang/icc/icc-13.0.1.117.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2872
+INTEL_DPV=2013_update1
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+src_install() {
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/icc/icc-13.1.2.146.ebuild b/dev-lang/icc/icc-13.1.2.146.ebuild
new file mode 100644
index 00000000000..0b4bfc936a2
--- /dev/null
+++ b/dev-lang/icc/icc-13.1.2.146.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2987
+INTEL_DPV=2013_update2
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/icc/icc-13.1.3.163.ebuild b/dev-lang/icc/icc-13.1.3.163.ebuild
new file mode 100644
index 00000000000..359ce70fd70
--- /dev/null
+++ b/dev-lang/icc/icc-13.1.3.163.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3078
+INTEL_DPV=2013_update3
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/icc/icc-13.1.5.192.ebuild b/dev-lang/icc/icc-13.1.5.192.ebuild
new file mode 100644
index 00000000000..d0acf86b386
--- /dev/null
+++ b/dev-lang/icc/icc-13.1.5.192.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-14.0.0.080.ebuild b/dev-lang/icc/icc-14.0.0.080.ebuild
new file mode 100644
index 00000000000..35900759e4f
--- /dev/null
+++ b/dev-lang/icc/icc-14.0.0.080.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3447
+INTEL_DPV=2013_sp1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-14.0.1.106.ebuild b/dev-lang/icc/icc-14.0.1.106.ebuild
new file mode 100644
index 00000000000..8a952573c88
--- /dev/null
+++ b/dev-lang/icc/icc-14.0.1.106.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3644
+INTEL_DPV=2013_sp1_update1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-14.0.2.144.ebuild b/dev-lang/icc/icc-14.0.2.144.ebuild
new file mode 100644
index 00000000000..889533a557e
--- /dev/null
+++ b/dev-lang/icc/icc-14.0.2.144.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3949
+INTEL_DPV=2013_sp1_update2
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-14.0.3.174.ebuild b/dev-lang/icc/icc-14.0.3.174.ebuild
new file mode 100644
index 00000000000..42e5af94532
--- /dev/null
+++ b/dev-lang/icc/icc-14.0.3.174.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-15.0.0.090.ebuild b/dev-lang/icc/icc-15.0.0.090.ebuild
new file mode 100644
index 00000000000..44855aafa48
--- /dev/null
+++ b/dev-lang/icc/icc-15.0.0.090.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4584
+INTEL_DPV=2015
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common compilerproc-vars"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-15.0.1.133.ebuild b/dev-lang/icc/icc-15.0.1.133.ebuild
new file mode 100644
index 00000000000..1387245ff15
--- /dev/null
+++ b/dev-lang/icc/icc-15.0.1.133.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4992
+INTEL_DPV=2015_update1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common compilerproc-vars"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-15.0.2.164.ebuild b/dev-lang/icc/icc-15.0.2.164.ebuild
new file mode 100644
index 00000000000..dfcf4f4961a
--- /dev/null
+++ b/dev-lang/icc/icc-15.0.2.164.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=5207
+INTEL_DPV=2015_update2
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common compilerproc-vars"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-15.0.3.187.ebuild b/dev-lang/icc/icc-15.0.3.187.ebuild
new file mode 100644
index 00000000000..d24fe8f38e4
--- /dev/null
+++ b/dev-lang/icc/icc-15.0.3.187.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=7538
+INTEL_DPV=2015_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ !dev-lang/ifc[linguas_ja]
+ eclipse? ( dev-util/eclipse-sdk )"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common compilerproc-vars"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/metadata.xml b/dev-lang/icc/metadata.xml
new file mode 100644
index 00000000000..399b3f6d9ed
--- /dev/null
+++ b/dev-lang/icc/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ The Intel® C++ Compiler is a full featured C/C++ compiler for Intel
+ based architectures. The compiler supports multi-threading, automatic
+ processor dispatch, vectorization, auto-parallelization, OpenMP, data
+ prefetching, loop unrolling. The package comes with extensive
+ documentation. The product can be installed as a non-commercial as
+ well. License, terms of qualifications can be found on the web site.
+</longdescription>
+ <use>
+ <flag name="eclipse">Install the <pkg>dev-util/eclipse-sdk</pkg> plugins</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
new file mode 100644
index 00000000000..178e7a80889
--- /dev/null
+++ b/dev-lang/icon/Manifest
@@ -0,0 +1,2 @@
+DIST icon-v950src.tgz 3115766 SHA256 ceb558bcf5b2edc3252b2d1d4ed640d2a218196f73d299b052f1e0c50e9b1557 SHA512 32f01ca65863525d92846b505ea61f6fbad5a11991d0476c5e79647459dee12746b4448f8d32f2766c198b6713587e48eb0f7f2a942ce42a929f080a85039fa3 WHIRLPOOL 641db3d8d6cc384772649cd0a80884ea9bbb7027df772b19ea6216f164bc589ffc1331cc80447483455e05f54405ed18af0ce69d9d48d4ea7d42ff1b341811c0
+DIST icon.v943src.tgz 3218627 SHA256 d6b6dc508922251748c4ceefbc3a96b54a9f488e260f9f517b5e08dc21615bff SHA512 9f89c7f1aaea1caea586aeb1ef74346a0f258c26ae74581a9ce7b59c2b590eb79316bdb9530b70d9af59ad06e6c444eec92016d0e5b015f4d467bde0baac2695 WHIRLPOOL e776f088ed6a4db10f9defc11a71187cdef4c6ca50b89f80c035b2981c650999cc27bebeab57b99b495653d42af2e34ea5827d6744d4b8f265c7d1883e864437
diff --git a/dev-lang/icon/files/icon-9.4.3-flags.patch b/dev-lang/icon/files/icon-9.4.3-flags.patch
new file mode 100644
index 00000000000..cdb5adcd1b4
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.4.3-flags.patch
@@ -0,0 +1,62 @@
+--- icon.v943src/ipl/cfuncs/Makefile
++++ icon.v943src/ipl/cfuncs/Makefile
+@@ -25,7 +25,7 @@
+ # library
+
+ $(FUNCLIB): $(FUNCS) mklib.sh
+- CC="$(CC)" CFLAGS="$(CFLAGS)" sh mklib.sh $(FUNCLIB) $(FUNCS)
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" sh mklib.sh $(FUNCLIB) $(FUNCS)
+ $(FUNCS): icall.h
+
+
+--- icon.v943src/ipl/cfuncs/mklib.sh
++++ icon.v943src/ipl/cfuncs/mklib.sh
+@@ -11,7 +11,7 @@
+ set -x
+ case "$SYS" in
+ Linux*|*BSD*|GNU*)
+- gcc -shared -o $LIBNAME -fPIC "$@";;
++ $CC -shared -o $LIBNAME $CFLAGS $LDFLAGS -fPIC "$@";;
+ Darwin*)
+ cc -bundle -undefined suppress -flat_namespace -o $LIBNAME "$@";;
+ SunOS*)
+--- icon.v943src/src/common/Makefile
++++ icon.v943src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: doincl $(OBJS) gpxmaybe
+
+ doincl: doincl.c ../h/arch.h
+- $(CC) $(CFLAGS) -o doincl doincl.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o doincl doincl.c
+ -./doincl -o ../../bin/rt.h ../h/rt.h
+
+ patchstr: patchstr.c
+@@ -29,7 +29,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+@@ -46,7 +46,7 @@
+
+ # for rswitch, $(CFLAGS) is deliberately omitted (-O may cause problems)
+ rswitch.o: ../h/define.h ../h/arch.h $(RSW)
+- $(CC) -c $(RSW)
++ $(CC) $(CFLAGS) -O0 -c $(RSW)
+
+
+ # The following section is needed if changes are made to the Icon grammar,
+--- icon.v943src/src/runtime/Makefile
++++ icon.v943src/src/runtime/Makefile
+@@ -39,7 +39,7 @@
+
+ iconx: $(OBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
++ $(CC) $(LDFLAGS) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/files/icon-9.5.0-flags.patch b/dev-lang/icon/files/icon-9.5.0-flags.patch
new file mode 100644
index 00000000000..33fa9485c20
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.5.0-flags.patch
@@ -0,0 +1,75 @@
+--- icon-v950src/ipl/cfuncs/Makefile
++++ icon-v950src/ipl/cfuncs/Makefile
+@@ -25,7 +25,7 @@
+ # library
+
+ $(FUNCLIB): $(FUNCS) mklib.sh
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../bin" \
+ sh mklib.sh $(FUNCLIB) $(FUNCS)
+ $(FUNCS): icall.h
+
+--- icon-v950src/ipl/cfuncs/mklib.sh
++++ icon-v950src/ipl/cfuncs/mklib.sh
+@@ -12,7 +12,7 @@
+ set -x
+ case "$SYS" in
+ Linux*|*BSD*|GNU*)
+- $CC -shared -o $LIBNAME -fPIC "$@";;
++ $CC -shared -o $LIBNAME $CFLAGS $LDFLAGS -fPIC "$@";;
+ CYGWIN*)
+ # move the win32 import library for iconx.exe callbacks
+ # created when iconx.exe was built
+--- icon-v950src/ipl/packs/loadfunc/Makefile
++++ icon-v950src/ipl/packs/loadfunc/Makefile
+@@ -28,7 +28,7 @@
+ echo '$$define FUNCLIB "./$(FUNCLIB)"' >libnames.icn
+
+ $(FUNCLIB): $(FUNCS)
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../../bin" \
+ sh $(MKLIB) $(FUNCLIB) $(FUNCS)
+
+
+--- icon-v950src/src/common/Makefile
++++ icon-v950src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: $(OBJS) gpxmaybe
+
+ patchstr: patchstr.c
+- $(CC) $(CFLAGS) -o patchstr patchstr.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o patchstr patchstr.c
+
+ gpxmaybe:
+ -if [ "x$(XL)" != "x" ]; then $(MAKE) $(GDIR); fi
+@@ -25,7 +25,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+--- icon-v950src/src/rtt/Makefile
++++ icon-v950src/src/rtt/Makefile
+@@ -22,7 +22,7 @@
+
+
+ rtt: $(OBJ)
+- $(CC) $(LDFLAGS) -o rtt $(OBJ)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o rtt $(OBJ)
+
+ library: $(OBJ)
+ rm -rf rtt.a
+--- icon-v950src/src/runtime/Makefile
++++ icon-v950src/src/runtime/Makefile
+@@ -30,7 +30,7 @@
+
+ iconx: $(COBJS) $(XOBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/files/tests-943.patch b/dev-lang/icon/files/tests-943.patch
new file mode 100644
index 00000000000..75108cab193
--- /dev/null
+++ b/dev-lang/icon/files/tests-943.patch
@@ -0,0 +1,113 @@
+diff -uprN icon.v943src_base/tests/general/io.icn icon.v943src/tests/general/io.icn
+--- icon.v943src_base/tests/general/io.icn 2002-03-11 14:21:18.000000000 -0700
++++ icon.v943src/tests/general/io.icn 2006-04-01 10:35:14.590948251 -0700
+@@ -6,7 +6,7 @@ procedure main()
+ local L, f, m, n, t1, t2
+
+ L := [&input, &output, &errout,
+- m := open("/etc/motd") | stop("no /etc/motd"),
++ m := open("/etc/gentoo-release") | stop("no /etc/gentoo-release"),
+ n := open("/dev/null", "w") | stop("no /dev/null")]
+ L := sort(L)
+ every f := !L do
+@@ -21,10 +21,10 @@ procedure main()
+ every write(!&input) \ 2
+
+ write()
+- write("flush /etc/motd: ", image(flush(m)) | "FAILED")
+- write("close /etc/motd: ", image(close(m)) | "FAILED")
+- write("close /etc/motd: ", image(close(m)) | "FAILED")
+- write("flush /etc/motd: ", image(flush(m)) | "FAILED")
++ write("flush /etc/gentoo-release: ", image(flush(m)) | "FAILED")
++ write("close /etc/gentoo-release: ", image(close(m)) | "FAILED")
++ write("close /etc/gentoo-release: ", image(close(m)) | "FAILED")
++ write("flush /etc/gentoo-release: ", image(flush(m)) | "FAILED")
+
+ write()
+ write("flush /dev/null: ", image(flush(n)) | "FAILED")
+diff -uprN icon.v943src_base/tests/general/io.std icon.v943src/tests/general/io.std
+--- icon.v943src_base/tests/general/io.std 2002-03-11 14:21:18.000000000 -0700
++++ icon.v943src/tests/general/io.std 2006-04-01 10:35:31.071362086 -0700
+@@ -2,7 +2,7 @@ file: &errout
+ file: &input
+ file: &output
+ file: file(/dev/null)
+-file: file(/etc/motd)
++file: file(/etc/gentoo-release)
+
+ aaa
+ bbbb
+@@ -13,10 +13,10 @@ ffffffff
+ ggggggggg
+ hhhhhhhhhh
+
+-flush /etc/motd: file(/etc/motd)
+-close /etc/motd: file(/etc/motd)
+-close /etc/motd: file(/etc/motd)
+-flush /etc/motd: file(/etc/motd)
++flush /etc/gentoo-release: file(/etc/gentoo-release)
++close /etc/gentoo-release: file(/etc/gentoo-release)
++close /etc/gentoo-release: file(/etc/gentoo-release)
++flush /etc/gentoo-release: file(/etc/gentoo-release)
+
+ flush /dev/null: file(/dev/null)
+ close /dev/null: file(/dev/null)
+@@ -109,7 +109,7 @@ file(sed 's/^/=()= /' io.icn)
+ > =()= local L, f, m, n, t1, t2
+ > =()=
+ > =()= L := [&input, &output, &errout,
+-> =()= m := open("/etc/motd") | stop("no /etc/motd"),
++> =()= m := open("/etc/gentoo-release") | stop("no /etc/gentoo-release"),
+ > =()= n := open("/dev/null", "w") | stop("no /dev/null")]
+
+ file(ls io.i?n io.d?t io.s?d)
+diff -uprN icon.v943src_base/tests/general/kwds.std icon.v943src/tests/general/kwds.std
+--- icon.v943src_base/tests/general/kwds.std 2002-07-10 18:29:28.000000000 -0600
++++ icon.v943src/tests/general/kwds.std 2006-04-01 10:35:37.103317654 -0700
+@@ -20,8 +20,10 @@
+ &features: ASCII
+ &features: co-expressions
+ &features: environment variables
++ &features: event monitoring
+ &features: keyboard functions
+ &features: large integers
++ &features: multiple programs
+ &features: pipes
+ &features: system function
+ &input: &input
+diff -uprN icon.v943src_base/tests/general/nargs.std icon.v943src/tests/general/nargs.std
+--- icon.v943src_base/tests/general/nargs.std 2001-12-06 15:54:01.000000000 -0700
++++ icon.v943src/tests/general/nargs.std 2006-04-01 10:35:43.282223496 -0700
+@@ -15,7 +15,7 @@
+ 1 delay
+ 2 delete
+ -2 detab
+- 2 display
++ 3 display
+ 1 dtor
+ -2 entab
+ 0 errorclear
+@@ -43,12 +43,12 @@
+ 4 match
+ 2 member
+ 1 move
+- 1 name
++ 2 name
+ 1 numeric
+ 1 ord
+ 1 pop
+ 1 pos
+- 2 proc
++ 3 proc
+ 1 pull
+ -2 push
+ -2 put
+@@ -79,7 +79,7 @@
+ 2 trim
+ 1 type
+ 4 upto
+- 1 variable
++ 3 variable
+ 1 where
+ -1 write
+ -1 writes
diff --git a/dev-lang/icon/icon-9.4.3-r5.ebuild b/dev-lang/icon/icon-9.4.3-r5.ebuild
new file mode 100644
index 00000000000..520ba2f3ffe
--- /dev/null
+++ b/dev-lang/icon/icon-9.4.3-r5.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon.v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon.v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ sys-devel/gcc"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-flags.patch
+
+ # Patch the tests so that they do not fail
+ # The following files in tests/standard are patched..
+ # io.icn - change /etc/motd to /etc/gentoo-release
+ # io.std - change /etc/motd to /etc/gentoo-release
+ # kwds.std - add two lines for the two new added keywords
+ # nargs.std - a couple of functions picked up additional parameters
+ epatch "${FILESDIR}/tests-${MY_PV}.patch"
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_compile() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ echo "#define MultiThread 1" >> src/h/define.h
+ echo "#define EventMon 1" >> src/h/define.h
+ echo "#define Eve 1" >> src/h/define.h
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "Make Failed"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${D}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym /usr/$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym /usr/$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym /usr/$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym /usr/$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1"
+ doman icont.1
+ doman icon.1
+ rm -rf "${D}"/usr/$(get_libdir)/icon/man
+
+ cd "${S}/doc"
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${D}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${D}"/usr/share/doc/${PF}/html
+ rm -rf "${D}"/usr/$(get_libdir)/icon/{doc,README}
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}"
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm ipl/BuildBin
+ rm ipl/BuildExe
+ rm ipl/CheckAll
+ rm ipl/Makefile
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/icon-9.5.0.ebuild b/dev-lang/icon/icon-9.5.0.ebuild
new file mode 100644
index 00000000000..f8149886adb
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon-v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ || ( sys-devel/gcc sys-devel/gcc-apple )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags.patch
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_configure() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ # sanitise the Makedefs file generated by Configure
+ sed -i \
+ -e 's:-L/usr/X11R6/lib64::g' \
+ -e 's:-L/usr/X11R6/lib::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ Makedefs || die "sed of Makedefs failed"
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${ED}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym /usr/$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym /usr/$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym /usr/$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym /usr/$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1"
+ doman icont.1
+ doman icon.1
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/man
+
+ cd "${S}/doc"
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${ED}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${ED}"/usr/share/doc/${PF}/html
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README}
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}"
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm ipl/BuildBin
+ rm ipl/BuildExe
+ rm ipl/CheckAll
+ rm ipl/Makefile
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/metadata.xml b/dev-lang/icon/metadata.xml
new file mode 100644
index 00000000000..8595a9cf85b
--- /dev/null
+++ b/dev-lang/icon/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>lang-misc</herd>
+<use><flag name='iplsrc'>install the icon programming library source</flag></use>
+</pkgmetadata>
diff --git a/dev-lang/idb/Manifest b/dev-lang/idb/Manifest
new file mode 100644
index 00000000000..43fc94664c5
--- /dev/null
+++ b/dev-lang/idb/Manifest
@@ -0,0 +1,19 @@
+DIST parallel_studio_xe_2013.tgz 2097190124 SHA256 22ac8d6dd1bf9fd646c1d1322c0a9051b89b6dba975112d492cccd8359f8dc0a SHA512 d49c519c0b2f82e6fc0db6820d5f84999d2a973d8caa0e103c0ad355644f52d209147a2b3a884effad9bbae117bd9ebbad4869f5440009355ffacb65cae274fa WHIRLPOOL bb5f05ceeae39f794dcd6c4fafafb2e5ebf8e5332083f7eaf357dddb9b2a1e94f52f82f850a8b0aefe1920f2fd21be67bfa8aafa9590707e25e84e9f2be07bd5
+DIST parallel_studio_xe_2013_ia32.tgz 1161979592 SHA256 3f0ff2ece4cfc5ec3d7c2fddefeda2b55b1295a0d62440c172a14d8e60b7b551 SHA512 9818d0e8ee1f36527f5899480381c252528274248974001f136e7aecc196ab4a049aeabed5835c18f0b08153d3a36a7fc8d850aec455bb9b5f71d95d17dc161e WHIRLPOOL 2772bb70b968f765af1c47ecb11a9e0b0220890ed37d0a81cb911f9ec43dda8cbdd85f3b0cacf1b1794ca239684f3381e54bada668b0b4a40244da684c3b04a5
+DIST parallel_studio_xe_2013_intel64.tgz 1448188683 SHA256 6d3f5a635e86bc6d71d970458d746df8f4f239e8892347d76b4eda18946048f3 SHA512 679abcb2089fc9570bad0fe8b7dd6aeb0e13831f2f79e485ce150e593e7c0d2c8c25c03520124261291f0fa418a9b873e86a81b6962ad8bbae60bc2acbc594b6 WHIRLPOOL 85ee892aac2691375edf4624842a6931b3eaab34be64b97282c025810cb2db4ea05426263af5249525724d3437da6337189e6a4af6a1efc8f7713a854b8e4ce1
+DIST parallel_studio_xe_2013_sp1.tgz 3294385739 SHA256 ba65fdf7afbac0276a948ef8d4e1578297a0115548d5f3465c7ed4012030f696 SHA512 ee7995d39b604de6fed0bb87535c48666ca9ffa13975b6adcce170d746f2ee648b5c4a428ed8ef196226f204b3b17a833f379ab4fa57b4a1ebe7c89cc899ea66 WHIRLPOOL 213c8261c161df80732d958bf9e13a286aca2dd6ce16be30fee92d626051bc855c4a1ffe82b12f1bf9095771ca5b128463d839c14748d086b50527e7d09b76a7
+DIST parallel_studio_xe_2013_sp1_update1.tgz 3402142370 SHA256 5d0147c6907ed7950d7f14b615785f5e3c7977c62368f4a8ec7b06be758d614a SHA512 ce3f7a9710b3ec6eba5d4f97c9d7bd4cc633119750962d4de5a89b328a22323f5df68f679289930fa8651ee45fb59f7af63d943f9ef175799ab55dfbcc6d8029 WHIRLPOOL eeeef9e46e73f6eb2a1b5f5b9c8c604ff3c4709a53004d9a1887dbe690e0c597dbc683f4b19a8c544ea706e6cefbeedc5d1e6f12ca103cc6bdc35927250f5626
+DIST parallel_studio_xe_2013_sp1_update2.tgz 3410174020 SHA256 235c0f54832879e27afa2c11d7a4cc72bd5bcc6241963024a28cc9e1c74342f0 SHA512 589dee0cf806ac54be473d0a8a0b9da818898f7b91fec88c07c61f45973b6e40fe4a247bb140110a0be0c1422ddcfc0cd1007f2dc58e5ead0e4c77b25806aa4d WHIRLPOOL efde8852a8a708df4c161666f44404157ce4af776c0f2e2ddfdb039a2ca23af5fa68411e2adeba17f7a97b1a11c7e3e74e6806d0a4dcbe614752715161aa7e24
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update1.tgz 2148568608 SHA256 870a9909e661aa75738c2d0851f7554c56696c40db2266ddd21fd6c5c6ae0986 SHA512 ce1b32be3e4efbedc43f17e0930e0c67d55129d756b7168e51a9a956c510df7e5c194a02813e42931ef21acbc1f07a6ecda0b79074c879281ddbd7e5da055400 WHIRLPOOL 059f2f27590079907bbc202dfe81a3900018133d46a28d383dd3960c247019b49e4cf767e90601ed11a8194a4c370269b831c9c780ee90b8d4104668cda0f4b0
+DIST parallel_studio_xe_2013_update1_ia32.tgz 1208336795 SHA256 e1e2ac8e1cf559a539aec1b9ab06b71d041e986bba6db69cbb5025ecaee90e89 SHA512 76e23d359ae8698496b605e006c3038a8e4bd38f15369fdb95e436279c60d41a1d14d74763459d5aead321fd3b4601ef527d674af87170bab7911d5338595b30 WHIRLPOOL b93e8a8ce5f1e3487c187d6c2cd835836abc03bbae19b7376910ea713da9efabb5703449ca397bd10c92334ff0c6fcc8e4674898e695479e13c6d9223e2b52c5
+DIST parallel_studio_xe_2013_update1_intel64.tgz 1493318875 SHA256 f39f63df9d0fc150643c753fcfdb788a75db64e266adca06bcf4f084f3210808 SHA512 d5524a89fbb327a61b7d983dfca8caedf904234c09a934373c38024b4af9955063c4c5c1895eff9b66de3c14d9d401a86634cef7cd80f923fc9196366cfc7a7e WHIRLPOOL 3d0294ab0d4daba28462066cbe8d46772192e55d0b6648202f9f85f49a6cf4ff90a999566b3575fd988df8afefb1cabc1a8146c16fe170c449253659f7b43805
+DIST parallel_studio_xe_2013_update2.tgz 2152945149 SHA256 e8ddf6141f7d84c1f242891fabe0882c40269c358c0b946fee22ee6caa37121c SHA512 633370f58bd9fc14140912d5b3dd251ca4819a926b004a8053f92c83de6f9fdfdad192b425c5224d8b5aee47042a1a99d49628e6e2bb53e623ae429eefcfaac4 WHIRLPOOL 5b4a7c0c9cab758885ccffab25f1aaf64a6f5576d02df81a4797a2b9ae2151efb5e564e43397a2b61040d4af66024107a5a9c537982d3e17723655414dcba166
+DIST parallel_studio_xe_2013_update2_ia32.tgz 1190613262 SHA256 13063ea9c47c781ea8f368566d328434351002e7321b2021b5f04ff741a5d55f SHA512 1488a1b8c9b84881041ccf42d9f856d44aa0654ce3171b0f92114a3408d8cb1f1a18a6d488db6bbfd7322d5a230748612b53378b6ac01b8b7b3e66b3b8f94333 WHIRLPOOL f7d2b307d2f4e226004ddfcf073db087fff6d68e94f849e85350dc18894db884b62362bb3929076fdd531e29f5c49e2cd94eba8685b13fc52e293226516d909d
+DIST parallel_studio_xe_2013_update2_intel64.tgz 1488277925 SHA256 6136774de466de19f4024eeb5a8176ffbf559143b048fecc83848c27008361d6 SHA512 8260ab223d9a959089ae66c8948d90ce119cceeb719ef18c1a9d258ccd77e9b6a67af1a3e203d96a1c3c774def9a6fc302c126001072b7c5aa2bb3cdc68bc4dd WHIRLPOOL 006dc0e925c8265abf174682cd54f2c2fc4c4f1e059e045407d523b3e3b659cadc47da005126236a8b01b882fd0b4dfa7dadce0c52f640d5c0ada8122a9d6d08
+DIST parallel_studio_xe_2013_update3.tgz 2173061577 SHA256 98b3bfe9feefa8caaa1bea533362f31bcfe96aa8f9e59fc89f6a453d50df7508 SHA512 c6115f01b045c840b61e3c2a17fd39142c814d4e387fa5bc935c5cc6ca365c3fedddb6d8c045b5c239b948b42c02254d8b73c42cfe16d046dcf14d3a4597bbde WHIRLPOOL e857fbf0fc73406f7d787400f8ed6e45e93825616fe3d2d10dcd26fa03d56cd956a0b598270724be4ab3886d77502e0f456077ed3008cffc6bdb4abe60acedce
+DIST parallel_studio_xe_2013_update3_ia32.tgz 1207596909 SHA256 57017db1b00345d46ef9dff67dd4e5754ed0fe67fae7335489447f948dbfe7a8 SHA512 f3656fcbda74f253c8cc0ca56e16a84d77854ef51ecc7f24db02c820270bef3954d0d97d1be2aa5cf2ea7703a6e442c3be15df28de570aac7062e5c5958581a4 WHIRLPOOL 0407b59697da8a69c8ac512dec4187bf27eeb2e80516cd6a99968ef3b30a31e55eeaa31ec4bcbd34fe23678e68c4f00cc5dfce579edfb0268b789e1e65285945
+DIST parallel_studio_xe_2013_update3_intel64.tgz 1508395753 SHA256 081bc3d617f04243d459d92d05398df1a3634faf3de554346f732ed83ed4ef06 SHA512 344678ba9c6029ab095cc656c2153b20f0f996dab45115296fb624eca3863763e4010b519595892ffeecfc1a0880901ef5ae53924e41e470aec46efd0abcd822 WHIRLPOOL 1295f579ecc50014b285d47ecf6b92d1b9d0c2cbadd1a5972a832178263a9b3d4cf4208153df40e270c259c1307ed21277239e70371b39eaf4e12171c25a3c1f
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
diff --git a/dev-lang/idb/files/50idb-gentoo.el b/dev-lang/idb/files/50idb-gentoo.el
new file mode 100644
index 00000000000..55064c63a99
--- /dev/null
+++ b/dev-lang/idb/files/50idb-gentoo.el
@@ -0,0 +1,5 @@
+
+;;; idb site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'idb "idb" "Run idb on program <FILE> in buffer *gud-<FILE>*." t)
diff --git a/dev-lang/idb/idb-13.0.0.079.ebuild b/dev-lang/idb/idb-13.0.0.079.ebuild
new file mode 100644
index 00000000000..3fbc3478be9
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.0.079.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2749
+INTEL_DPV=2013
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="~dev-libs/intel-common-${PV}[compiler]"
+RDEPEND="${DEPEND}
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
diff --git a/dev-lang/idb/idb-13.0.1.117-r1.ebuild b/dev-lang/idb/idb-13.0.1.117-r1.ebuild
new file mode 100644
index 00000000000..b10f8517e17
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.1.117-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2872
+INTEL_DPV=2013_update1
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="~dev-libs/intel-common-${PV}[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-13.0.2.146.ebuild b/dev-lang/idb/idb-13.0.2.146.ebuild
new file mode 100644
index 00000000000..5d045fb66f1
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.2.146.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2987
+INTEL_DPV=2013_update2
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-13.0.3.163.ebuild b/dev-lang/idb/idb-13.0.3.163.ebuild
new file mode 100644
index 00000000000..dd2398c0239
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.3.163.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3078
+INTEL_DPV=2013_update3
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-13.0.5.192.ebuild b/dev-lang/idb/idb-13.0.5.192.ebuild
new file mode 100644
index 00000000000..fb194104244
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.5.192.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-14.0.0.080.ebuild b/dev-lang/idb/idb-14.0.0.080.ebuild
new file mode 100644
index 00000000000..7f145b6b909
--- /dev/null
+++ b/dev-lang/idb/idb-14.0.0.080.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3447
+INTEL_DPV=2013_sp1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+_INTEL_PV1=14
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+pkg_setup() {
+ _INTEL_PV1=13 intel-sdp_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-14.0.1.106.ebuild b/dev-lang/idb/idb-14.0.1.106.ebuild
new file mode 100644
index 00000000000..af1acbff6c0
--- /dev/null
+++ b/dev-lang/idb/idb-14.0.1.106.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3644
+INTEL_DPV=2013_sp1_update1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+_INTEL_PV1=14
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+pkg_setup() {
+ _INTEL_PV1=13 intel-sdp_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-14.0.2.144.ebuild b/dev-lang/idb/idb-14.0.2.144.ebuild
new file mode 100644
index 00000000000..c54969e51c1
--- /dev/null
+++ b/dev-lang/idb/idb-14.0.2.144.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3949
+INTEL_DPV=2013_sp1_update2
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+_INTEL_PV1=14
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+pkg_setup() {
+ _INTEL_PV1=13 intel-sdp_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-14.0.3.174.ebuild b/dev-lang/idb/idb-14.0.3.174.ebuild
new file mode 100644
index 00000000000..913301eb1be
--- /dev/null
+++ b/dev-lang/idb/idb-14.0.3.174.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+_INTEL_PV1=14
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="eclipse"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre
+ eclipse? ( dev-util/eclipse-sdk )"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+pkg_setup() {
+ _INTEL_PV1=13 intel-sdp_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/metadata.xml b/dev-lang/idb/metadata.xml
new file mode 100644
index 00000000000..18a2b8e270d
--- /dev/null
+++ b/dev-lang/idb/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ The Intel® Debugger is a command line debugger for Intel based
+ architectures. It is well suited with the Intel C++ or Intel FORTRAN
+ compilers. It also comes also with a graphical interface and extensive
+ documentation. The package is bundled in either compiler tar ball, and
+ has been split to produce this one.
+ The product can be installed as a non-commercial as
+ well. License, terms of qualifications can be found on the web
+ site and follow the one received in the Intel compilers.
+</longdescription>
+ <use>
+ <flag name="eclipse">Install the <pkg>dev-util/eclipse-sdk</pkg> plugins</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/ifc/Manifest b/dev-lang/ifc/Manifest
new file mode 100644
index 00000000000..96c604666fd
--- /dev/null
+++ b/dev-lang/ifc/Manifest
@@ -0,0 +1,23 @@
+DIST parallel_studio_xe_2013.tgz 2097190124 SHA256 22ac8d6dd1bf9fd646c1d1322c0a9051b89b6dba975112d492cccd8359f8dc0a SHA512 d49c519c0b2f82e6fc0db6820d5f84999d2a973d8caa0e103c0ad355644f52d209147a2b3a884effad9bbae117bd9ebbad4869f5440009355ffacb65cae274fa WHIRLPOOL bb5f05ceeae39f794dcd6c4fafafb2e5ebf8e5332083f7eaf357dddb9b2a1e94f52f82f850a8b0aefe1920f2fd21be67bfa8aafa9590707e25e84e9f2be07bd5
+DIST parallel_studio_xe_2013_ia32.tgz 1161979592 SHA256 3f0ff2ece4cfc5ec3d7c2fddefeda2b55b1295a0d62440c172a14d8e60b7b551 SHA512 9818d0e8ee1f36527f5899480381c252528274248974001f136e7aecc196ab4a049aeabed5835c18f0b08153d3a36a7fc8d850aec455bb9b5f71d95d17dc161e WHIRLPOOL 2772bb70b968f765af1c47ecb11a9e0b0220890ed37d0a81cb911f9ec43dda8cbdd85f3b0cacf1b1794ca239684f3381e54bada668b0b4a40244da684c3b04a5
+DIST parallel_studio_xe_2013_intel64.tgz 1448188683 SHA256 6d3f5a635e86bc6d71d970458d746df8f4f239e8892347d76b4eda18946048f3 SHA512 679abcb2089fc9570bad0fe8b7dd6aeb0e13831f2f79e485ce150e593e7c0d2c8c25c03520124261291f0fa418a9b873e86a81b6962ad8bbae60bc2acbc594b6 WHIRLPOOL 85ee892aac2691375edf4624842a6931b3eaab34be64b97282c025810cb2db4ea05426263af5249525724d3437da6337189e6a4af6a1efc8f7713a854b8e4ce1
+DIST parallel_studio_xe_2013_sp1.tgz 3294385739 SHA256 ba65fdf7afbac0276a948ef8d4e1578297a0115548d5f3465c7ed4012030f696 SHA512 ee7995d39b604de6fed0bb87535c48666ca9ffa13975b6adcce170d746f2ee648b5c4a428ed8ef196226f204b3b17a833f379ab4fa57b4a1ebe7c89cc899ea66 WHIRLPOOL 213c8261c161df80732d958bf9e13a286aca2dd6ce16be30fee92d626051bc855c4a1ffe82b12f1bf9095771ca5b128463d839c14748d086b50527e7d09b76a7
+DIST parallel_studio_xe_2013_sp1_update1.tgz 3402142370 SHA256 5d0147c6907ed7950d7f14b615785f5e3c7977c62368f4a8ec7b06be758d614a SHA512 ce3f7a9710b3ec6eba5d4f97c9d7bd4cc633119750962d4de5a89b328a22323f5df68f679289930fa8651ee45fb59f7af63d943f9ef175799ab55dfbcc6d8029 WHIRLPOOL eeeef9e46e73f6eb2a1b5f5b9c8c604ff3c4709a53004d9a1887dbe690e0c597dbc683f4b19a8c544ea706e6cefbeedc5d1e6f12ca103cc6bdc35927250f5626
+DIST parallel_studio_xe_2013_sp1_update2.tgz 3410174020 SHA256 235c0f54832879e27afa2c11d7a4cc72bd5bcc6241963024a28cc9e1c74342f0 SHA512 589dee0cf806ac54be473d0a8a0b9da818898f7b91fec88c07c61f45973b6e40fe4a247bb140110a0be0c1422ddcfc0cd1007f2dc58e5ead0e4c77b25806aa4d WHIRLPOOL efde8852a8a708df4c161666f44404157ce4af776c0f2e2ddfdb039a2ca23af5fa68411e2adeba17f7a97b1a11c7e3e74e6806d0a4dcbe614752715161aa7e24
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update1.tgz 2148568608 SHA256 870a9909e661aa75738c2d0851f7554c56696c40db2266ddd21fd6c5c6ae0986 SHA512 ce1b32be3e4efbedc43f17e0930e0c67d55129d756b7168e51a9a956c510df7e5c194a02813e42931ef21acbc1f07a6ecda0b79074c879281ddbd7e5da055400 WHIRLPOOL 059f2f27590079907bbc202dfe81a3900018133d46a28d383dd3960c247019b49e4cf767e90601ed11a8194a4c370269b831c9c780ee90b8d4104668cda0f4b0
+DIST parallel_studio_xe_2013_update1_ia32.tgz 1208336795 SHA256 e1e2ac8e1cf559a539aec1b9ab06b71d041e986bba6db69cbb5025ecaee90e89 SHA512 76e23d359ae8698496b605e006c3038a8e4bd38f15369fdb95e436279c60d41a1d14d74763459d5aead321fd3b4601ef527d674af87170bab7911d5338595b30 WHIRLPOOL b93e8a8ce5f1e3487c187d6c2cd835836abc03bbae19b7376910ea713da9efabb5703449ca397bd10c92334ff0c6fcc8e4674898e695479e13c6d9223e2b52c5
+DIST parallel_studio_xe_2013_update1_intel64.tgz 1493318875 SHA256 f39f63df9d0fc150643c753fcfdb788a75db64e266adca06bcf4f084f3210808 SHA512 d5524a89fbb327a61b7d983dfca8caedf904234c09a934373c38024b4af9955063c4c5c1895eff9b66de3c14d9d401a86634cef7cd80f923fc9196366cfc7a7e WHIRLPOOL 3d0294ab0d4daba28462066cbe8d46772192e55d0b6648202f9f85f49a6cf4ff90a999566b3575fd988df8afefb1cabc1a8146c16fe170c449253659f7b43805
+DIST parallel_studio_xe_2013_update2.tgz 2152945149 SHA256 e8ddf6141f7d84c1f242891fabe0882c40269c358c0b946fee22ee6caa37121c SHA512 633370f58bd9fc14140912d5b3dd251ca4819a926b004a8053f92c83de6f9fdfdad192b425c5224d8b5aee47042a1a99d49628e6e2bb53e623ae429eefcfaac4 WHIRLPOOL 5b4a7c0c9cab758885ccffab25f1aaf64a6f5576d02df81a4797a2b9ae2151efb5e564e43397a2b61040d4af66024107a5a9c537982d3e17723655414dcba166
+DIST parallel_studio_xe_2013_update2_ia32.tgz 1190613262 SHA256 13063ea9c47c781ea8f368566d328434351002e7321b2021b5f04ff741a5d55f SHA512 1488a1b8c9b84881041ccf42d9f856d44aa0654ce3171b0f92114a3408d8cb1f1a18a6d488db6bbfd7322d5a230748612b53378b6ac01b8b7b3e66b3b8f94333 WHIRLPOOL f7d2b307d2f4e226004ddfcf073db087fff6d68e94f849e85350dc18894db884b62362bb3929076fdd531e29f5c49e2cd94eba8685b13fc52e293226516d909d
+DIST parallel_studio_xe_2013_update2_intel64.tgz 1488277925 SHA256 6136774de466de19f4024eeb5a8176ffbf559143b048fecc83848c27008361d6 SHA512 8260ab223d9a959089ae66c8948d90ce119cceeb719ef18c1a9d258ccd77e9b6a67af1a3e203d96a1c3c774def9a6fc302c126001072b7c5aa2bb3cdc68bc4dd WHIRLPOOL 006dc0e925c8265abf174682cd54f2c2fc4c4f1e059e045407d523b3e3b659cadc47da005126236a8b01b882fd0b4dfa7dadce0c52f640d5c0ada8122a9d6d08
+DIST parallel_studio_xe_2013_update3.tgz 2173061577 SHA256 98b3bfe9feefa8caaa1bea533362f31bcfe96aa8f9e59fc89f6a453d50df7508 SHA512 c6115f01b045c840b61e3c2a17fd39142c814d4e387fa5bc935c5cc6ca365c3fedddb6d8c045b5c239b948b42c02254d8b73c42cfe16d046dcf14d3a4597bbde WHIRLPOOL e857fbf0fc73406f7d787400f8ed6e45e93825616fe3d2d10dcd26fa03d56cd956a0b598270724be4ab3886d77502e0f456077ed3008cffc6bdb4abe60acedce
+DIST parallel_studio_xe_2013_update3_ia32.tgz 1207596909 SHA256 57017db1b00345d46ef9dff67dd4e5754ed0fe67fae7335489447f948dbfe7a8 SHA512 f3656fcbda74f253c8cc0ca56e16a84d77854ef51ecc7f24db02c820270bef3954d0d97d1be2aa5cf2ea7703a6e442c3be15df28de570aac7062e5c5958581a4 WHIRLPOOL 0407b59697da8a69c8ac512dec4187bf27eeb2e80516cd6a99968ef3b30a31e55eeaa31ec4bcbd34fe23678e68c4f00cc5dfce579edfb0268b789e1e65285945
+DIST parallel_studio_xe_2013_update3_intel64.tgz 1508395753 SHA256 081bc3d617f04243d459d92d05398df1a3634faf3de554346f732ed83ed4ef06 SHA512 344678ba9c6029ab095cc656c2153b20f0f996dab45115296fb624eca3863763e4010b519595892ffeecfc1a0880901ef5ae53924e41e470aec46efd0abcd822 WHIRLPOOL 1295f579ecc50014b285d47ecf6b92d1b9d0c2cbadd1a5972a832178263a9b3d4cf4208153df40e270c259c1307ed21277239e70371b39eaf4e12171c25a3c1f
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
+DIST parallel_studio_xe_2015.tgz 3819862086 SHA256 31abe447b1db457b38547dfbf0fd7e434cb45d5734892ec3ef95ef5f4d2f8ae2 SHA512 889844fe067d1b1095283686f1b1657aab2bbda2a7e9014aec88a0ef1af8c8a0e1da3a4414600d4b450b2a1b4b13496b5165e495ccdf3187c27f58eaff07b13b WHIRLPOOL c2be966c8910d8995b845e25d60ceb700bfe9bc78daf60e97fd016de6e1abc60bb0f4fe33e2cd7c8960ebbf1540d418524414a351ed9256a80cdee4e29166961
+DIST parallel_studio_xe_2015_update1.tgz 4044230603 SHA256 84fdf48d1de20e1d580ba5d419a5bc1c55d217a4f5dc1807190ecffe0229a62b SHA512 894c911dce9d261fbe67d65c91c3b6c7117b183102fe7673a5e106d14994a082fdf03fdb573bbb1a9f0a01cf1539082b72ec75c39db7590bb2f63222f9a5b832 WHIRLPOOL f43b219ba82aa3f94c6818c54b971302f3693cb1c0266924f7ee79c67d6008699388afedaf4b2f72e969a73c8fd7d276309d80ff4dc8dfb1ba766cbe19b33872
+DIST parallel_studio_xe_2015_update2.tgz 4145283363 SHA256 8cbde4d4fb3bbfcc5096d5d924953121ca84e9a9bee7b00dfd07c029c1a89943 SHA512 1166eaa41c881059673dbf51194cf800fbc94a1080fc9eebbacc20cd762c3b2e92f83191cb1cdacc50da0c8522524b7132d269fc2a91615ba4fbda5c63cb7a47 WHIRLPOOL 95e93fc964f0ddbd81e87d3c8083adea3f8ab82fc0668dc00b10154ba8911bd50d07be9d2130a1b27c7ea66e5208e172055df4fee69f336ae777d629ca7874d4
+DIST parallel_studio_xe_2015_update3.tgz 4156836825 SHA256 ab7169989c87bbb0fe66221cb7eb3a26b17c8b9ceff38f1926e5607834306896 SHA512 eccc2bfe85ccd039a2ec9e334d370e49d43baa0522d095c087a5982aa08bddb4c97bfc3125bd09f5cd57d3ed252c598012e1f2670b8373a1b3bb455825d18f96 WHIRLPOOL d1fd8d1e46ce35150357a9452f04529d8a1f7e915e50a5d714895184aa37fb61186a5455e89b4750f444f0f6da94563e493d0821c661378551c3739f8d27d7b9
diff --git a/dev-lang/ifc/ifc-13.0.0.079-r1.ebuild b/dev-lang/ifc/ifc-13.0.0.079-r1.ebuild
new file mode 100644
index 00000000000..0417a65d9d5
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.0.0.079-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2749
+INTEL_DPV=2013
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="~dev-libs/intel-common-${PV}[compiler,multilib=]"
+DEPEND="${RDEPEND}"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=300M
+
+src_install() {
+ rm ${INTEL_SDP_DIR}/Documentation/en_US/gs_resources/intel_logo.gif || die
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/ifc/ifc-13.0.1.117.ebuild b/dev-lang/ifc/ifc-13.0.1.117.ebuild
new file mode 100644
index 00000000000..4376644594c
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.0.1.117.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2872
+INTEL_DPV=2013_update1
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="~dev-libs/intel-common-${PV}[compiler,multilib=]"
+DEPEND="${RDEPEND}"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=300M
+
+src_install() {
+ rm ${INTEL_SDP_DIR}/Documentation/ja_JP/gs_resources/intel_logo.gif || die
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/ifc/ifc-13.1.2.146.ebuild b/dev-lang/ifc/ifc-13.1.2.146.ebuild
new file mode 100644
index 00000000000..bdb68484469
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.1.2.146.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=2987
+INTEL_DPV=2013_update2
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="~dev-libs/intel-common-${PV}[compiler,multilib=]"
+DEPEND="${RDEPEND}"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ rm ${INTEL_SDP_DIR}/Documentation/ja_JP/gs_resources/intel_logo.gif || die
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/ifc/ifc-13.1.3.163.ebuild b/dev-lang/ifc/ifc-13.1.3.163.ebuild
new file mode 100644
index 00000000000..ce9886550d7
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.1.3.163.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3078
+INTEL_DPV=2013_update3
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="~dev-libs/intel-common-${PV}[compiler,multilib=]"
+DEPEND="${RDEPEND}"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ rm ${INTEL_SDP_DIR}/Documentation/ja_JP/gs_resources/intel_logo.gif || die
+ intel-sdp_src_install
+ local i
+ local idir=${INTEL_SDP_EDIR}/compiler/lib
+ for i in ${idir}/{ia32,intel64}/locale/ja_JP/{diagspt,flexnet,helpxi}.cat; do
+ if [[ -e "${i}" ]]; then
+ rm -rvf "${D}${i}" || die
+ fi
+ done
+}
diff --git a/dev-lang/ifc/ifc-13.1.5.192.ebuild b/dev-lang/ifc/ifc-13.1.5.192.ebuild
new file mode 100644
index 00000000000..48de8640a94
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.1.5.192.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-14.0.0.080.ebuild b/dev-lang/ifc/ifc-14.0.0.080.ebuild
new file mode 100644
index 00000000000..eb7b3151b5f
--- /dev/null
+++ b/dev-lang/ifc/ifc-14.0.0.080.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3447
+INTEL_DPV=2013_sp1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-14.0.1.106.ebuild b/dev-lang/ifc/ifc-14.0.1.106.ebuild
new file mode 100644
index 00000000000..b071b9dfc80
--- /dev/null
+++ b/dev-lang/ifc/ifc-14.0.1.106.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3644
+INTEL_DPV=2013_sp1_update1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-14.0.2.144.ebuild b/dev-lang/ifc/ifc-14.0.2.144.ebuild
new file mode 100644
index 00000000000..ca81b2d218f
--- /dev/null
+++ b/dev-lang/ifc/ifc-14.0.2.144.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3949
+INTEL_DPV=2013_sp1_update2
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-14.0.3.174.ebuild b/dev-lang/ifc/ifc-14.0.3.174.ebuild
new file mode 100644
index 00000000000..e96687ef9f7
--- /dev/null
+++ b/dev-lang/ifc/ifc-14.0.3.174.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-15.0.0.090.ebuild b/dev-lang/ifc/ifc-15.0.0.090.ebuild
new file mode 100644
index 00000000000..52c9ec4426e
--- /dev/null
+++ b/dev-lang/ifc/ifc-15.0.0.090.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4584
+INTEL_DPV=2015
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common compilerprof-vars"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-15.0.1.133.ebuild b/dev-lang/ifc/ifc-15.0.1.133.ebuild
new file mode 100644
index 00000000000..4ecbfbece4e
--- /dev/null
+++ b/dev-lang/ifc/ifc-15.0.1.133.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4992
+INTEL_DPV=2015_update1
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common compilerprof-vars"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-15.0.2.164.ebuild b/dev-lang/ifc/ifc-15.0.2.164.ebuild
new file mode 100644
index 00000000000..627c1bcd278
--- /dev/null
+++ b/dev-lang/ifc/ifc-15.0.2.164.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=5207
+INTEL_DPV=2015_update2
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common compilerprof-vars"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+
+ rm opt/intel/composerxe-2015_update2.2.164/documentation/en_US/third-party-programs.txt || die
+
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-15.0.3.187.ebuild b/dev-lang/ifc/ifc-15.0.3.187.ebuild
new file mode 100644
index 00000000000..6c8fb8c97ed
--- /dev/null
+++ b/dev-lang/ifc/ifc-15.0.3.187.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=7538
+INTEL_DPV=2015_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common compilerprof-vars"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/metadata.xml b/dev-lang/ifc/metadata.xml
new file mode 100644
index 00000000000..8fd3709b970
--- /dev/null
+++ b/dev-lang/ifc/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ The Intel® Fortran Compiler is a full featured FORTRAN 77/95 and
+ substantial FORTRAN 2003 compiler for Intel based architectures. The
+ compiler supports multi-threading with automatic processor dispatch,
+ vectorization, auto-parallelization, OpenMP, data prefetching, loop
+ unrolling. The package comes with extensive documentation.
+ The product can be installed as a non-commercial as well. License,
+ terms of qualifications can be found on the web site.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/inform/Manifest b/dev-lang/inform/Manifest
new file mode 100644
index 00000000000..55290db9a3f
--- /dev/null
+++ b/dev-lang/inform/Manifest
@@ -0,0 +1 @@
+DIST inform-6.33.1-b2.tar.gz 1822648 SHA256 5e260d5114507b8294ab74f2dac35d5681fa294629a842d57811d04fa5833f8c SHA512 12cc10b7dae4118600a4d19d0aa44c3a7c93dfc8aa17bd56df7b9237f21df0ae99db6840eefaa5b11ff346369c6f6f2f128167b3479c8f540c29e3e36666c368 WHIRLPOOL e96bae2f9570ef91aacfd72ff26102f02d7b3bbcca4b345bb67c37627accfbebcac09e4cf05642a1b1832cb2f3369b32f193ad4d36c1ac1dc1de00fa578f9915
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 00000000000..fd47585811b
--- /dev/null
+++ b/dev-lang/inform/inform-6.33.1_p2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..d3e2854ee36
--- /dev/null
+++ b/dev-lang/inform/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+ <longdescription>
+A Design System for Interactive Fiction
+
+Just as film might be called a form of literature which needs technology to be
+read (a cinema projector or a television set) and to be written (a camera),
+interactive fiction is read with the aid of a computer. On this analogy, Inform
+is a piece of software enabling any modern computer to be used as the camera, or
+the film studio, to create works of interactive fiction. To read the resulting
+works, you and your audience need only a simpler piece of software called an
+interpreter.
+
+In this genre of fiction, the computer describes a world and the player types
+instructions like touch the mirror for the protagonist character to follow; the
+computer responds by describing the result, and so on until a story is told.
+
+Interactive fiction emerged from the old-style "adventure game" (c.1975) and
+tends to be a playful genre, which must sometimes be teased out as though it were
+a cryptic crossword puzzle. But this doesn't prevent it from being an artistic
+medium, which has attracted (for instance) the former U.S. Poet Laureate, Robert
+Pinsky, and the novelists Thomas M. Disch and Michael Crichton. An interactive
+fiction is not a child's puzzle-book, with a maze on one page and a rebus on the
+next, but nor is it a novel. Neither pure interaction nor pure fiction, it lies
+in a strange and still largely unexplored land in between.
+
+Since its invention (by Graham Nelson in 1993), Inform has been used to design
+some hundreds of works of interactive fiction, in eight languages, reviewed in
+periodicals ranging in specialisation from XYZZYnews to The New York Times. It
+accounts for around ten thousand postings per year to Internet newsgroups.
+Commercially, Inform has been used as a multimedia games prototyping tool.
+Academically, it has turned up in syllabuses and seminars from computer science
+to theoretical architecture, and appears in books such as Cybertext: Perspectives
+on Ergodic Literature (E. J. Aarseth, Johns Hopkins Press, 1997). Having started
+as a revival of the then-disused Infocom adventure game format, the Z-Machine,
+Inform came full circle when it produced Infocom's only text game of the 1990s:
+Zork: The Undiscovered Underground, by Mike Berlyn and Marc Blank.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/interprolog/Manifest b/dev-lang/interprolog/Manifest
new file mode 100644
index 00000000000..8136b616c1d
--- /dev/null
+++ b/dev-lang/interprolog/Manifest
@@ -0,0 +1 @@
+DIST interprolog212.zip 1066931 SHA256 cf5b463576a51624703300a3966f1d3619d1ccd1011b59950b7b37365de8f182 SHA512 e3d8b216f7e76d5d95ad9d27a96720075575fd717c89ddf9403376a72e18d56fd68afa2b1e6e70da55b99cd84043a16695ff37a59ec3366115cd4c36ed1ff50c WHIRLPOOL 1aa842d432bb1bd6834c9961dd65c16354d3e37087df49758cea26b9d6917f49149a957a2f97cdf03f53418d5c5ff0f8b6f7f62cc786f90c36cc90e14d474032
diff --git a/dev-lang/interprolog/files/build.xml b/dev-lang/interprolog/files/build.xml
new file mode 100644
index 00000000000..a24536d8936
--- /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 00000000000..614b2f2a1ed
--- /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 00000000000..f3c2deccdf5
--- /dev/null
+++ b/dev-lang/interprolog/interprolog-2.1.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ppc ~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 00000000000..1990bb86aac
--- /dev/null
+++ b/dev-lang/interprolog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+</pkgmetadata>
diff --git a/dev-lang/io/Manifest b/dev-lang/io/Manifest
new file mode 100644
index 00000000000..b135e8f1c08
--- /dev/null
+++ b/dev-lang/io/Manifest
@@ -0,0 +1 @@
+DIST io-2011.09.12.tar.gz 9213332 SHA256 cdcf10745de2cd0aaa0c08f4ab31ac3aacfe942a8e1c2d52d5b50258862b5209 SHA512 15c994e5ca1c80b90523573000e402d60367f40692d01b9fcbaf0a00fba2a35939ea086cff25bae3533f1b89edc2cdae82f2c600a6d0c3e7792e5e57d92e4b72 WHIRLPOOL fe0d8d66e54104af5dd6e4ec0d44173cbd4e810b10f554f94037fb73d55887904002d236ff5f0da1307553650dd7204f8bff2eb3a74adf47bd2be3e02aa8752e
diff --git a/dev-lang/io/files/io-2011.09.12-gentoo-fixes.patch b/dev-lang/io/files/io-2011.09.12-gentoo-fixes.patch
new file mode 100644
index 00000000000..ff2e9115270
--- /dev/null
+++ b/dev-lang/io/files/io-2011.09.12-gentoo-fixes.patch
@@ -0,0 +1,160 @@
+diff -Nurwp io-2011.09.12-orig/addons/CMakeLists.txt io-2011.09.12-chag/addons/CMakeLists.txt
+--- io-2011.09.12-orig/addons/CMakeLists.txt 2011-09-12 18:14:12.000000000 -0400
++++ io-2011.09.12-chag/addons/CMakeLists.txt 2012-04-29 08:16:56.000000000 -0400
+@@ -52,71 +52,135 @@ add_subdirectory(BigNum)
+ add_subdirectory(Bitly)
+ add_subdirectory(Blowfish)
+ add_subdirectory(Box)
++if(ENABLE_CFFI)
+ add_subdirectory(CFFI)
++endif(ENABLE_CFFI)
++if(ENABLE_CGI)
+ add_subdirectory(CGI)
++endif(ENABLE_CGI)
+ #add_subdirectory(Cairo) # XXX: Broken on OSX: ld: library not found for -lpng12
++if(ENABLE_CLUTTER)
+ add_subdirectory(Clutter)
++endif(ENABLE_CLUTTER)
+ add_subdirectory(ContinuedFraction)
++if(ENABLE_CURSES)
+ add_subdirectory(Curses)
++endif(ENABLE_CURSES)
++if(ENABLE_DBI)
+ add_subdirectory(DBI)
++endif(ENABLE_DBI)
+ add_subdirectory(DistributedObjects)
++if(ENABLE_EDITLINE)
+ add_subdirectory(EditLine)
++endif(ENABLE_EDITLINE)
+ add_subdirectory(Facebook)
++if(ENABLE_FLUX)
+ add_subdirectory(Flux)
++endif(ENABLE_FLUX)
+ add_subdirectory(Fnmatch)
++if(ENABLE_FONT)
+ add_subdirectory(Font)
++endif(ENABLE_FONT)
+ add_subdirectory(GLFW) # XXX: Can't meet dependencies
++if(ENABLE_GOOGLESEARCH)
+ add_subdirectory(GoogleSearch)
++endif(ENABLE_GOOGLESEARCH)
++if(ENABLE_HTTPCLIENT)
+ add_subdirectory(HttpClient)
++endif(ENABLE_HTTPCLIENT)
++if(ENABLE_IMAGE)
+ add_subdirectory(Image)
++endif(ENABLE_IMAGE)
++if(ENABLE_LZO)
+ add_subdirectory(LZO)
++endif(ENABLE_LZO)
++if(ENABLE_LIBSNDFILE)
+ add_subdirectory(LibSndFile)
++endif(ENABLE_LIBSNDFILE)
++if(ENABLE_LIBXML2)
+ add_subdirectory(Libxml2)
++endif(ENABLE_LIBXML2)
+ add_subdirectory(Loki)
++if(ENABLE_LOUDMOUTH)
+ add_subdirectory(Loudmouth)
++endif(ENABLE_LOUDMOUTH)
++if(ENABLE_MD5SUM)
+ add_subdirectory(MD5)
++endif(ENABLE_MD5SUM)
+ add_subdirectory(Memcached)
++if(ENABLE_MYSQL)
+ add_subdirectory(MySQL)
++endif(ENABLE_MYSQL)
+ #add_subdirectory(NetworkAdapter)
+ add_subdirectory(NotificationCenter)
+ #add_subdirectory(Oauth) # OAuth should no longer break CMake configuration on Windows now.
+ #add_subdirectory(ODE) # XXX: Can't meet dependencies
+ add_subdirectory(ObjcBridge) # XXX: Broken for me -- Objective-C 2.0 not supported
+ add_subdirectory(Obsidian)
++if(ENABLE_OGG)
+ add_subdirectory(Ogg)
++endif(ENABLE_OGG)
++if(ENABLE_OPENGL)
+ add_subdirectory(OpenGL)
++endif(ENABLE_OPENGL)
+ #add_subdirectory(PortAudio) # XXX: Dependency broken for me
++if(ENABLE_POSTGRESQL)
+ add_subdirectory(PostgreSQL)
++endif(ENABLE_POSTGRESQL)
+ #add_subdirectory(Postgres)
++if(ENABLE_PYTHON)
+ add_subdirectory(Python)
++endif(ENABLE_PYTHON)
+ add_subdirectory(QDBM)
+ add_subdirectory(Random)
+ add_subdirectory(Range)
+ add_subdirectory(Rational)
++if(ENABLE_READLINE)
+ add_subdirectory(ReadLine)
++endif(ENABLE_READLINE)
++if(ENABLE_REGEX)
+ add_subdirectory(Regex)
++endif(ENABLE_REGEX)
+ add_subdirectory(SGML)
++if(ENABLE_SHA1)
+ add_subdirectory(SHA1)
++endif(ENABLE_SHA1)
+ #add_subdirectory(SQLite) # XXX: Want to delete in favour of SQLite3
++if(ENABLE_SQLITE3)
+ add_subdirectory(SQLite3)
++endif(ENABLE_SQLITE3)
+ #add_subdirectory(SampleRateConverter)
+ add_subdirectory(SecureSocket)
+ #add_subdirectory(SkipDB) # XXX: Disabled...why?
++if(ENABLE_SOCKET)
+ add_subdirectory(Socket)
++endif(ENABLE_SOCKET)
+ #add_subdirectory(SoundTouch) # XXX: I can't meet dependencies
+ add_subdirectory(SqlDatabase)
++if(ENABLE_SYSLOG)
+ add_subdirectory(Syslog)
++endif(ENABLE_SYSLOG)
+ add_subdirectory(SystemCall)
+ #add_subdirectory(TagDB) # XXX: I can't meet dependencies
+ #add_subdirectory(TagLib)
++if(ENABLE_THEORA)
+ add_subdirectory(Theora)
++endif(ENABLE_THEORA)
++if(ENABLE_THREAD)
+ add_subdirectory(Thread)
++endif(ENABLE_THREAD)
+ add_subdirectory(TokyoCabinet)
++if(ENABLE_TWITTER)
+ add_subdirectory(Twitter)
++endif(ENABLE_TWITTER)
+ add_subdirectory(UUID)
+ add_subdirectory(User)
+ add_subdirectory(VertexDB)
+ add_subdirectory(Volcano)
++if(ENABLE_VORBIS)
+ add_subdirectory(Vorbis)
++endif(ENABLE_VORBIS)
+ add_subdirectory(Yajl)
++if(ENABLE_ZLIB)
+ add_subdirectory(Zlib)
++endif(ENABLE_ZLIB)
+diff -Nurwp io-2011.09.12-orig/libs/basekit/CMakeLists.txt io-2011.09.12-chag/libs/basekit/CMakeLists.txt
+--- io-2011.09.12-orig/libs/basekit/CMakeLists.txt 2011-09-12 18:14:12.000000000 -0400
++++ io-2011.09.12-chag/libs/basekit/CMakeLists.txt 2012-04-21 22:06:47.000000000 -0400
+@@ -24,3 +24,6 @@ add_library(basekit SHARED ${SRCS})
+ # The following add the install target, so we put libbasekit.* in our
+ # install prefix.
+ install(TARGETS basekit DESTINATION lib)
++
++# Link basekit library against libdl (required by as-needed linking).
++target_link_libraries(basekit dl)
+diff -Nurwp io-2011.09.12-orig/libs/coroutine/source/asm.S io-2011.09.12-chag/libs/coroutine/source/asm.S
+--- io-2011.09.12-orig/libs/coroutine/source/asm.S 2011-09-12 18:14:12.000000000 -0400
++++ io-2011.09.12-chag/libs/coroutine/source/asm.S 2012-04-21 23:20:26.000000000 -0400
+@@ -258,3 +258,7 @@ SET:
+ ldr r0, [r0]
+ mov pc, lr
+ #endif
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/dev-lang/io/io-2011.09.12-r2.ebuild b/dev-lang/io/io-2011.09.12-r2.ebuild
new file mode 100644
index 00000000000..82c52db4f76
--- /dev/null
+++ b/dev-lang/io/io-2011.09.12-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+DESCRIPTION="Io is a small, prototype-based programming language"
+HOMEPAGE="http://www.iolanguage.com"
+SRC_URI="mirror://gentoo/${P}.tar.gz
+ http://dev.gentoo.org/~araujo/snapshots/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="cgi clutter dbi doc editline google gui http image libffi libxml2
+ lzo md5sum ncurses ogg opengl postgres pcre python readline sha1 sndfile sockets
+ sqlite syslog theora threads truetype twitter vorbis xmpp zlib"
+DEPEND="clutter? ( media-libs/clutter )
+ dbi? ( dev-db/libdbi )
+ editline? ( dev-libs/libedit )
+ image? ( virtual/jpeg
+ media-libs/tiff
+ media-libs/libpng )
+ xmpp? ( net-libs/loudmouth )
+ libffi? ( virtual/libffi )
+ libxml2? ( dev-libs/libxml2 )
+ lzo? ( dev-libs/lzo )
+ ncurses? ( sys-libs/ncurses )
+ ogg? ( media-libs/libogg )
+ opengl? ( virtual/opengl )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql[server] )
+ readline? ( sys-libs/readline )
+ sndfile? ( media-libs/libsndfile )
+ sqlite? ( >=dev-db/sqlite-3.0.0 )
+ theora? ( media-libs/libtheora )
+ truetype? ( media-libs/freetype )
+ vorbis? ( media-libs/libvorbis )
+ zlib? ( sys-libs/zlib )"
+RDEPEND=""
+REQUIRED_USE="vorbis? ( ogg )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gentoo-fixes.patch"
+ # Fix multilib strict check (bug #430496)
+ sed -i 's/DESTINATION lib/DESTINATION lib${LIB_SUFFIX}/' \
+ addons/*/CMakeLists.txt \
+ libs/*/CMakeLists.txt
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable cgi CGI)
+ $(cmake-utils_use_enable clutter CLUTTER)
+ $(cmake-utils_use_enable dbi DBI)
+ $(cmake-utils_use_enable editline EDITLINE)
+ $(cmake-utils_use_enable libffi CFFI)
+ $(cmake-utils_use_enable gui FLUX)
+ $(cmake-utils_use_enable google GOOGLESEARCH)
+ $(cmake-utils_use_enable http HTTPCLIENT)
+ $(cmake-utils_use_enable xmpp LOUDMOUTH)
+ $(cmake-utils_use_enable image IMAGE)
+ $(cmake-utils_use_enable libxml2 LIBXML2)
+ $(cmake-utils_use_enable lzo LZO)
+ $(cmake-utils_use_enable md5sum MD5SUM)
+ $(cmake-utils_use_enable ncurses CURSES)
+ $(cmake-utils_use_enable ogg OGG)
+ $(cmake-utils_use_enable opengl OPENGL)
+ $(cmake-utils_use_enable postgres POSTGRESQL)
+ $(cmake-utils_use_enable python PYTHON)
+ $(cmake-utils_use_enable readline READLINE)
+ $(cmake-utils_use_enable pcre REGEX)
+ $(cmake-utils_use_enable sndfile LIBSNDFILE)
+ $(cmake-utils_use_enable sha1 SHA1)
+ $(cmake-utils_use_enable sockets SOCKET)
+ $(cmake-utils_use_enable sqlite SQLITE3)
+ $(cmake-utils_use_enable syslog SYSLOG)
+ $(cmake-utils_use_enable theora THEORA)
+ $(cmake-utils_use_enable threads THREADS)
+ $(cmake-utils_use_enable truetype FONT)
+ $(cmake-utils_use_enable twitter TWITTER )
+ $(cmake-utils_use_enable vorbis VORBIS)
+ $(cmake-utils_use_enable zlib ZLIB)
+ -DCMAKE_SKIP_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Fix bug #414421
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use doc; then
+ dodoc docs/docs.css docs/*.html
+ fi
+}
diff --git a/dev-lang/io/metadata.xml b/dev-lang/io/metadata.xml
new file mode 100644
index 00000000000..39a9737f1bb
--- /dev/null
+++ b/dev-lang/io/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>
+<email>araujo@gentoo.org</email>
+</maintainer>
+<use>
+<flag name="clutter">Build add-on for <pkg>media-libs/clutter</pkg></flag>
+<flag name="editline">Build add-on for <pkg>dev-libs/libedit</pkg></flag>
+<flag name="gui">Build the Flux GUI add-on</flag>
+<flag name="google">Build the google search add-on</flag>
+<flag name="http">Build http client add-on</flag>
+<flag name="image">Build add-on for images support (jpeg, png, tiff)</flag>
+<flag name="libxml2">Build add-on for <pkg>dev-libs/libxml2</pkg></flag>
+<flag name="md5sum">Build md5sum add-on</flag>
+<flag name="sha1">Build sha1 add-on</flag>
+<flag name="twitter">Build twitter add-on</flag>
+</use>
+<longdescription lang="en">
+Io is a small, prototype-based programming language. The ideas in Io are mostly
+inspired by Smalltalk (all values are objects), Self (prototype-based),
+NewtonScript (differential inheritance), Act1 (actors and futures for
+concurrency), LISP (code is a runtime inspectable/modifiable tree) and Lua
+(small, embeddable).
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest
new file mode 100644
index 00000000000..c2e4eb5e261
--- /dev/null
+++ b/dev-lang/ispc/Manifest
@@ -0,0 +1,2 @@
+DIST ispc-1.8.1.tar.gz 19222737 SHA256 adef83008bf9e2eb1947f0fbc38670d8bf801ddb36b1f22c4429a1c394e31f60 SHA512 515fd08d416f2f94444ae8771d1f5922b06c87fbebb552ab4003bf961307c1637eab35c46dcd9c356ce6ec159b441ff001edb4488c3dd6629496960a92bafe75 WHIRLPOOL ace2600866156e11a8cf90bb9e6c73a6cdcd1992d72761d9f3c64b16c6a34055410ac3172d6fb746a2a057704d6531e03f91bdbc7f7f480fa4884cbf91d75c3a
+DIST ispc-1.8.2.tar.gz 19259133 SHA256 d17ea68b7192d261a2830d6e00df656a73fbccd08a249433fcaf24a886902a9d SHA512 bb1f64afe41af138c386fb12a2a7f477f7bc8df2543191bbe7e5d7624e6b00dfec11ba422f6f396cd91af1c7b4cb5d2b3febf7902740d85c6d068de8ab94765a WHIRLPOOL 45ba7c52b3ada111f518b2a94d71d8c259040114ae84881c693f6e3491bd4b6897563eba4bccb6ae83a7cb90901bf1723bcbfeb9a124267ed235b1b8fdf61d69
diff --git a/dev-lang/ispc/ispc-1.8.1.ebuild b/dev-lang/ispc/ispc-1.8.1.ebuild
new file mode 100644
index 00000000000..34d7401e69a
--- /dev/null
+++ b/dev-lang/ispc/ispc-1.8.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs python-any-r1
+
+DESCRIPTION="Intel SPMD Program Compiler"
+HOMEPAGE="http://ispc.github.com/"
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/ispc/ispc.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD BSD-2 UoI-NCSA"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="
+ >=sys-devel/clang-3.0
+ >=sys-devel/llvm-3.0
+ "
+DEPEND="
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ sys-devel/bison
+ sys-devel/flex
+ "
+
+src_compile() {
+ sed -i '/^\t@/s/@//' Makefile || die #make all slient commands ("@") verbose
+ emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
+}
+
+src_install() {
+ dobin ispc
+ dodoc README.rst
+
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ docompress -x "/usr/share/doc/${PF}/examples"
+ doins -r examples/*
+ fi
+}
diff --git a/dev-lang/ispc/ispc-1.8.2.ebuild b/dev-lang/ispc/ispc-1.8.2.ebuild
new file mode 100644
index 00000000000..34d7401e69a
--- /dev/null
+++ b/dev-lang/ispc/ispc-1.8.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs python-any-r1
+
+DESCRIPTION="Intel SPMD Program Compiler"
+HOMEPAGE="http://ispc.github.com/"
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/ispc/ispc.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD BSD-2 UoI-NCSA"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="
+ >=sys-devel/clang-3.0
+ >=sys-devel/llvm-3.0
+ "
+DEPEND="
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ sys-devel/bison
+ sys-devel/flex
+ "
+
+src_compile() {
+ sed -i '/^\t@/s/@//' Makefile || die #make all slient commands ("@") verbose
+ emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
+}
+
+src_install() {
+ dobin ispc
+ dodoc README.rst
+
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ docompress -x "/usr/share/doc/${PF}/examples"
+ doins -r examples/*
+ fi
+}
diff --git a/dev-lang/ispc/metadata.xml b/dev-lang/ispc/metadata.xml
new file mode 100644
index 00000000000..bd1ea10f8af
--- /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>
+ <email>ottxor@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ispc/ispc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/j/Manifest b/dev-lang/j/Manifest
new file mode 100644
index 00000000000..bba6e603997
--- /dev/null
+++ b/dev-lang/j/Manifest
@@ -0,0 +1 @@
+DIST j701_b_source.tar.gz 808367 SHA256 da3332589ed6fd01c15991991c9b45da2b0391b3bd110692e98798c6faa5b2be SHA512 f7ac035883098918ba4baa374a856a281a94adb83e7fb4828ef95d1a24aedc648b23593cc6ef6932e6ac546b0ba8215a8018265a3cb39c5008053c5ab7f74d57 WHIRLPOOL a8cc104419d5e26853d769d7d20b156b5da4ad5cbd50551ddac3e4789bc2819991664e504ede6f3f8a90c9aa1b6a7f5c8a61d903b68acc512773f60c53d5fbdf
diff --git a/dev-lang/j/j-701-r2.ebuild b/dev-lang/j/j-701-r2.ebuild
new file mode 100644
index 00000000000..11ed50979db
--- /dev/null
+++ b/dev-lang/j/j-701-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..24cbb90cf0c
--- /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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/jimtcl/Manifest b/dev-lang/jimtcl/Manifest
new file mode 100644
index 00000000000..e682c0cf414
--- /dev/null
+++ b/dev-lang/jimtcl/Manifest
@@ -0,0 +1,5 @@
+DIST jimtcl-0.70_pre20110317.tar.gz 691917 SHA256 28998a03321ef64d23376057c1a3dfb0f2f552ddce19df54d1d1277d3487f70d SHA512 138000c97bf7f8c0c5d81cd98861684d382579ace0cb1f7b96f71dde721ca627bf4d7beeed2bc8528077da26353a41ee9bcdbabd44bd732082c42ad6c7f91c65 WHIRLPOOL f1bc3336e49fb8229d41ed289070fac9ac515c4a4ed314a3d166a59244c57860ad628dd2016ded75ca8ec780c68a7b664e3030df86e06e5534d2fb6eda8d2b51
+DIST jimtcl-0.73.zip 2286098 SHA256 3d7348ad7f853dd58ab3c05d5404ababde083eef95debca6c7cee2da047214d0 SHA512 9d99eff13292ed1db95ca673be88b14c87e9ce1e28d3fab0b08e0ca0473765fa2e8e305fd5f67768d94ae47cc3e0bc3d0cec8ba4a54ad3d5c1359ee8e2d36f81 WHIRLPOOL 8bb83acad304dc73abfeee8718713bcc5a613cfbc3f875d6c31d70778822b88cf0f415b038262125236884853d9c977bf7ff134fb166e2b83124f452d7b6cd29
+DIST jimtcl-0.74.zip 2304607 SHA256 72def814ce1bf6359568d87df4c27af313f606e9a043900e4f4b04c77c66dd8c SHA512 6c7a1d45c15ac533aa35adaf5099712ca4ef456280121610a6621d5abb94505e93b165d36bb8ae4c27733118e2590774051c716f4c6bcb9bddca4d937d770a7b WHIRLPOOL 14ee7066b9913d84dc8773cf86a6f7d15b30cbf2c21434bec3bf7672e4931c13f60b403771023b5dbb87ca3b87f4305045e595e5adbb4037e8028db5c72af30a
+DIST jimtcl-0.75.zip 2319459 SHA256 1e8c25166d32e19068d1f94cb36613b9776bee9e2393e77acbd985cc6ab49924 SHA512 f2ba7a3e97de0c49813594e8238fdbb4db426f0974e3441312bccc773984304bf5621d45a117f9e7bec1d2120b8797102a2ec38caf329fd3b42ba708e66fd84a WHIRLPOOL 636fd4f5449e7bf5f1530cd915e4da561ce8809dda8bd070be4efb4e436d4ff9d5c46228eaa473b0396457c7646e8d5b7b886a5ba964d8a1b5cfc67bb4b3cc0f
+DIST jimtcl-0.76.zip 2326715 SHA256 288babe4a4f2f4445113873001a28abc0b0b3a69f0acb7d0fa5da7405e4f3a17 SHA512 50763ea897fb5393083749cdd9e57a3f3d2d6dbebc40ee6371b1b86ebfc2f515e9775cd2acd6627f0f81b54bd72cd8c74be5aa9d0dbefc7c16372887e07f6ea4 WHIRLPOOL 54c739d29547a2149ccbf8f5a9c310d39a411f56392e332055aea275dfd6d66ca09f417fb9201983441027274c0ae0e3fe58f84ad58fa75b9b6e8e51578c3403
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 00000000000..60850e0b6d0
--- /dev/null
+++ b/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch
@@ -0,0 +1,15 @@
+always do a bootstrap w/local jimsh0 to avoid requiring tcl or jimtcl
+to be installed first. the bootstrap prog is small too.
+
+--- a/autosetup/find-tclsh
++++ b/autosetup/find-tclsh
+@@ -4,9 +4,6 @@
+ d=`dirname "$0"`
+ { "$d/jimsh0" "$d/test-tclsh"; } 2>/dev/null && exit 0
+ PATH="$PATH:$d"; export PATH
+-for tclsh in jimsh tclsh tclsh8.5 tclsh8.6; do
+- { $tclsh "$d/test-tclsh"; } 2>/dev/null && exit 0
+-done
+ echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
+ for cc in ${CC_FOR_BUILD:-cc} gcc; do
+ { $cc -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue
diff --git a/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild b/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild
new file mode 100644
index 00000000000..26da6e3cd6b
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.berlios.de/"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf} \
+ --with-jim-ext=nvp
+}
+
+src_compile() {
+ emake all docs || die
+}
+
+src_install() {
+ dobin jimsh || die "dobin failed"
+ use static-libs && {
+ dolib.a libjim.a || die "dolib failed"
+ } || {
+ dolib.so libjim.so || die "dolib failed"
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-nvp.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO || die "dodoc failed"
+ dohtml Tcl.html || die "dohtml failed"
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.73.ebuild b/dev-lang/jimtcl/jimtcl-0.73.ebuild
new file mode 100644
index 00000000000..5d52e554643
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.73.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/0.73 -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 m68k s390 sh x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="5b8ea68"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild b/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild
new file mode 100644
index 00000000000..1f23d127f34
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multilib
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~s390 ~sh ~x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="9a3562c"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so.${PV}
+ dosym /usr/$(get_libdir)/libjim.so.${PV} \
+ /usr/$(get_libdir)/libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild b/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild
new file mode 100644
index 00000000000..0df3011a082
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.75.ebuild b/dev-lang/jimtcl/jimtcl-0.75.ebuild
new file mode 100644
index 00000000000..88d46597524
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.75.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multilib
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="cffd1a5"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so.${PV}
+ dosym /usr/$(get_libdir)/libjim.so.${PV} \
+ /usr/$(get_libdir)/libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.76.ebuild b/dev-lang/jimtcl/jimtcl-0.76.ebuild
new file mode 100644
index 00000000000..d5c694e10a7
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.76.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="amd64 arm ~arm64 ~m68k ~mips ~s390 ~sh x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-9999.ebuild b/dev-lang/jimtcl/jimtcl-9999.ebuild
new file mode 100644
index 00000000000..0df3011a082
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-9999.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/metadata.xml b/dev-lang/jimtcl/metadata.xml
new file mode 100644
index 00000000000..164252c8fed
--- /dev/null
+++ b/dev-lang/jimtcl/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>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">msteveb/jimtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest
new file mode 100644
index 00000000000..0316e953921
--- /dev/null
+++ b/dev-lang/julia/Manifest
@@ -0,0 +1,10 @@
+DIST dSFMT-src-2.2.tar.gz 291253 SHA256 bc3947a9b2253a869fcbab8ff395416cb12958be9dba10793db2cd7e37b26899 SHA512 e59d54166dc2df9f6e6abd68658c3624082feabe445215256fead47a8944c41578d11c2b4ba57eac174587a45e445b2aabd867db24fd9e951842513cf914f60b WHIRLPOOL 986b24d8c302f21e305a6bbc6b33e42678c27018c71c566d3f052ce7600fd06c81d77375d08b2b40c0c4aa93ca74cad819a34d0350e33a61f5837f27de7cf193
+DIST double-conversion-1.1.1.tar.gz 7012946 SHA256 e1cabb73fd69e74f145aea91100cde483aef8b79dc730fcda0a34466730d4d1d SHA512 e116196eb60077565050995b060049747a3c72e743eea21c6c9fb68414adc533d456d19e1ca241f08895cca97a38511477bdc7d2e0cae38d149c83cb9d6896ad WHIRLPOOL d69604fbb6e1b5cac8d4dd0f8cf0af4621e32548e9e5061dcb843067a3f821c6f52e918e3e367988076b9ccf0be0ab68107cc6a21b02f4de424a1d98b399fc33
+DIST dsfmt-2.2.tar.gz 291253 SHA256 bc3947a9b2253a869fcbab8ff395416cb12958be9dba10793db2cd7e37b26899 SHA512 e59d54166dc2df9f6e6abd68658c3624082feabe445215256fead47a8944c41578d11c2b4ba57eac174587a45e445b2aabd867db24fd9e951842513cf914f60b WHIRLPOOL 986b24d8c302f21e305a6bbc6b33e42678c27018c71c566d3f052ce7600fd06c81d77375d08b2b40c0c4aa93ca74cad819a34d0350e33a61f5837f27de7cf193
+DIST julia-0.2.0.tar.bz2 4393404 SHA256 fecde7b4fbd26093dedd04564ce12b47a232525bf036c7b5f392f369ddc9a514 SHA512 3e0718c69936959dc717cf511f8fd7086eedb2fd4996519fcdb54a0b0c38d09b5b1c7d239e9e42234aab869446feec88bfd40b5419ae74c9f15bf523a757e898 WHIRLPOOL 265650e99028260d1dfe76c504468eca23bad0881790893d8b4b6cd98b0b5a936dc064ee1b661a04c762e2d78d4d23243158f594afef27001c8b4a0de259afff
+DIST julia-0.2.1.tar.gz 1899534 SHA256 be07283635b1bd73085f0152d3433762c1aaf115faa0e663a94d63f09c34f1b0 SHA512 67f89d88b2fca355482b2c979d50b865c9a772883bcec3b5cb82d0e096e168153972ada517d078fca1c13352b118ce9f031da162432308025f4437340d5d6635 WHIRLPOOL 22c12397e7bd217b628c3ba4e99f5e252011af1106c12abb4f796bcae544972e2d548f4858b30c7c5dfb6ef935fbc4181e3d5dbe3cc8a4bcac922f0b52d75fb3
+DIST julia-0.3.0.tar.gz 2271301 SHA256 1e9778129231aeff4e5f6100b0b71d2dbc4306cfc92cf533e527907d4a7a9aa1 SHA512 1f5affffc24a62ba791af5edfd1051435a20866fb5c46796e6ddb5037b0bea482a79b86bf77cf76565fd7833d87a9b8f3f03df7d5f537b72c5655bddaaf3e033 WHIRLPOOL b908a2c0bfbe649d102071b6a3207a60cafa38370c3ab7bb10eec3fe258f6d7da76f30bd71f8deba7ab3d40068816ddbf6c7ee42c6b154c0f873c5c67e975d4c
+DIST libuv-julia-0.2.1.tar.gz 652078 SHA256 60a98962ab7e10c924604ccd3373083e8c376a01fcac4bf568058b1f6b026f81 SHA512 73cc9903d1d9d8b8aa8c02543058f4c407aa6b125eb26506f55115cab212bcb7c1af0d215c2b9ca771f135d3913c1490a510294d658bf8d5a6dbee3dd397226f WHIRLPOOL 42b204b8cb071919b796ed745150b848fabe94668d7fb92a39505c86fefa98f52812ac2bec05821214c7e2c7120b06a47eb66e4a1a2a3acc209264244773faa3
+DIST libuv-julia-0.3.0.tar.bz2 13541514 SHA256 8bd7461a316ed67928f9bd0a83e9c45083500c9784561647f12bc05629519e26 SHA512 405df88e102d7a9700ff5c691059283b0509c5236855cba1cccd042493a4deda9397d010e4d6d8a2df8dd03cb6e82597471271bb6f2a58855c6bc6fe84caffcd WHIRLPOOL a4610ff4382767e02b24922ec8a5e8f7c2df7f53f7710a9270f0b32f53b5b015de64d8f1f466066fe4ce2305adb2bf996c903edb58345ea8e232bd9dd5bc6cfb
+DIST rmath-0_p20140821.tar.bz2 455123 SHA256 39ea3c27d757b811caeb36d3f5c40ba908365752fbf74e5fdeed42964df09947 SHA512 22442852e6042fe8ce78252af7e88718a33774d0f34f26dafcd4313bb077f718801d207dded7c5c3368bc7554074fdf5975c615dc35ea0b28b071f2d8f91baf8 WHIRLPOOL dd6de751c46a8e5ca84cf00ba19951b4f1fcc6b80375861f9eeaeea6d15f48cec77661318edc6542ec0bafeb9b05b2be27f5c97173171427c84f48eb24310d7e
+DIST utf8proc-v1.1.6.tar.gz 105825 SHA256 fedc8fa78022eb8f0584fbc85c9f9571bcd7fd510de0ce16955289c42f4199e7 SHA512 3bec2388298c201d9d6992cdd36330f1109d26a37b3411ba633f006f40da9e494ba0565051b763a7d3014e6113cd1e7754e6b95d5cbb2d7b50cee55193f0fdc1 WHIRLPOOL c211419407e80893b66fa7586a8148e9b2e45c89d2d31878658a4ae7f0b1ca72e269cef234ca8b30e27e4bac5a48715520dd546f6605af773d6e165ef76f81b0
diff --git a/dev-lang/julia/files/63julia-gentoo.el b/dev-lang/julia/files/63julia-gentoo.el
new file mode 100644
index 00000000000..6b60749020c
--- /dev/null
+++ b/dev-lang/julia/files/63julia-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.jl$" . julia-mode))
diff --git a/dev-lang/julia/files/julia-0.2.1-patchelf.patch b/dev-lang/julia/files/julia-0.2.1-patchelf.patch
new file mode 100644
index 00000000000..663cf04b77d
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.2.1-patchelf.patch
@@ -0,0 +1,16 @@
+--- deps/Makefile 2014-06-25 15:57:04.618463213 +0800
++++ deps/Makefile.new 2014-06-25 16:06:36.342318418 +0800
+@@ -42,14 +42,7 @@
+ endif
+ endif
+
+-ifeq ($(OS), Linux)
+-ifneq ($(shell patchelf --version 2>/dev/null), patchelf 0.6)
+-STAGE1_DEPS += patchelf
+-PATCHELF=$(BUILD)/bin/patchelf
+-else
+ PATCHELF=patchelf
+-endif
+-endif
+
+ ## USE_SYSTEM_LIBS options
diff --git a/dev-lang/julia/files/julia-0.2.1-readline63.patch b/dev-lang/julia/files/julia-0.2.1-readline63.patch
new file mode 100644
index 00000000000..cc9ede53f39
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.2.1-readline63.patch
@@ -0,0 +1,17 @@
+Description: Fix FTBFS against readline 6.3
+Origin: backport, https://github.com/JuliaLang/julia/commit/d2552e0f03d1dc23d6bb0c89c39da3d73c7aa4e5
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741824
+Last-Update: 2014-03-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ui/repl-readline.c
++++ b/ui/repl-readline.c
+@@ -831,7 +831,7 @@ void jl_init_repl(int history)
+ rl_instream = fopen("/dev/null","r");
+ prompt_length = 7; // == strlen("julia> ")
+ init_history();
+- rl_startup_hook = (Function*)init_rl;
++ rl_startup_hook = (rl_hook_func_t*)init_rl;
+ }
+
+ static char *prompt_string=NULL;
diff --git a/dev-lang/julia/julia-0.2.0-r1.ebuild b/dev-lang/julia/julia-0.2.0-r1.ebuild
new file mode 100644
index 00000000000..afc34d91736
--- /dev/null
+++ b/dev-lang/julia/julia-0.2.0-r1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit eutils multilib pax-utils
+
+DESCRIPTION="High-level, high-performance dynamic programming language for technical computing"
+
+HOMEPAGE="http://julialang.org/"
+
+# uses gfortran in some places, dependencies don't reflect that yet
+
+# tarball remade because upstream lacks submodules, so it's not able to build
+# soo ... they bundle a split out part of v8 that has no build system that makes sense
+# double-conversion nailed in to make build system happy
+# dSFMT is not meant to be packaged
+SRC_URI="http://gentooexperimental.org/~patrick/${P}.tar.bz2
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-2.2.tar.gz -> dsfmt-2.2.tar.gz
+ http://double-conversion.googlecode.com/files/double-conversion-1.1.1.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+S="${WORKDIR}"
+
+# Avoid fragile duplication - see compile and install phases
+JULIAMAKEARGS="QUIET_MAKE= USE_SYSTEM_LLVM=1 USE_SYSTEM_READLINE=1 USE_SYSTEM_PCRE=1 USE_SYSTEM_LIBM=1 \
+ USE_SYSTEM_GMP=1 USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_FFTW=1 USE_SYSTEM_ZLIB=1 \
+ USE_SYSTEM_MPFR=1 USE_SYSTEM_SUITESPARSE=1 USE_SYSTEM_ARPACK=1 USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 \
+ LLVM_CONFIG=/usr/bin/llvm-config USE_BLAS64=0"
+
+# Disabling use of 64-bit integers. If you want 64-bit integers then you need to use a BLAS implementation from the
+# science overlay, and julia-9999 also from the science overlay.
+
+# scons is a dep of double-conversion
+DEPEND="
+ =sys-devel/llvm-3.3*
+ dev-lang/perl
+ sys-libs/readline
+ dev-libs/libpcre
+ dev-util/scons
+ dev-libs/gmp
+ sys-libs/libunwind
+ dev-util/patchelf
+ sci-libs/fftw
+ sys-libs/zlib
+ dev-libs/mpfr
+ sci-libs/suitesparse
+ sci-libs/arpack
+ virtual/lapack
+ virtual/blas
+ "
+RDEPEND="sys-libs/readline"
+
+src_prepare() {
+ #uurgh, no fetching in ebuild
+ sed -i -e 's~$(JLDOWNLOAD)~/bin/true~' deps/Makefile || die "Oopsie"
+ sed -i -e 's~git submodule~/bin/true~g' deps/Makefile || die "Ooopsie"
+ # and we need to build stuff, so ... let's just copy around and pray!
+ mkdir -p deps/random
+ cp "${DISTDIR}/dsfmt-2.2.tar.gz" deps/random/
+ cp "${DISTDIR}/double-conversion-1.1.1.tar.gz" deps/
+ # Detect what BLAS and LAPACK implementations are being used
+ local BLAS_LIB="$($(tc-getPKG_CONFIG) --libs-only-l blas | sed 's/ .*$//')"
+ local LAPACK_LIB="$($(tc-getPKG_CONFIG) --libs-only-l lapack | sed 's/ .*$//')"
+ sed -e "s|-lblas|${BLAS_LIB}|" -i Make.inc || die
+ sed -e "s|libblas|${BLAS_LIB/-l/lib}.so|" -i Make.inc || die
+ sed -e "s|-llapack|${LAPACK_LIB}|" -i Make.inc || die
+ sed -e "s|liblapack|${LAPACK_LIB/-l/lib}.so|" -i Make.inc || die
+ sed -e "s|JL_PRIVATE_LIBDIR = lib/julia|JL_PRIVATE_LIBDIR = $(get_libdir)/julia|" \
+ -e "s|JL_LIBDIR = lib|JL_LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|/usr/$(get_libdir)|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ -i Make.inc || die
+ # Set version to package version instead of git commit number
+ sed -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" -i Make.inc || die
+ sed -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ -i Makefile || die
+}
+
+src_compile() {
+ mkdir -p usr/$(get_libdir) || die
+ pushd usr || die
+ ln -s $(get_libdir) lib || die
+ popd
+ emake $JULIAMAKEARGS julia-release || die
+ for i in usr/bin/julia-*
+ do
+ if file ${i} | grep ELF >/dev/null; then
+ pax-mark m ${i}
+ fi
+ done
+ emake $JULIAMAKEARGS || die
+ # makefile weirdness - avoid compile in src_install
+ emake $JULIAMAKEARGS debug || die
+}
+
+src_install() {
+ # config goes to /usr/etc/ - should be fixed
+ emake $JULIAMAKEARGS PREFIX="${D}/usr" install || die
+}
diff --git a/dev-lang/julia/julia-0.2.0.ebuild b/dev-lang/julia/julia-0.2.0.ebuild
new file mode 100644
index 00000000000..11b0f7bfa7b
--- /dev/null
+++ b/dev-lang/julia/julia-0.2.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="High-level, high-performance dynamic programming language for technical computing"
+
+HOMEPAGE="http://julialang.org/"
+
+# uses gfortran in some places, dependencies don't reflect that yet
+
+# tarball remade because upstream lacks submodules, so it's not able to build
+# soo ... they bundle a split out part of v8 that has no build system that makes sense
+# double-conversion nailed in to make build system happy
+# dSFMT is not meant to be packaged
+SRC_URI="http://gentooexperimental.org/~patrick/${P}.tar.bz2
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-2.2.tar.gz -> dsfmt-2.2.tar.gz
+ http://double-conversion.googlecode.com/files/double-conversion-1.1.1.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+S="${WORKDIR}"
+
+# Avoid fragile duplication - see compile and install phases
+JULIAMAKEARGS="QUIET_MAKE= USE_SYSTEM_LLVM=1 USE_SYSTEM_READLINE=1 USE_SYSTEM_PCRE=1 USE_SYSTEM_LIBM=1 \
+ USE_SYSTEM_GMP=1 USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_FFTW=1 USE_SYSTEM_ZLIB=1 \
+ USE_SYSTEM_MPFR=1 USE_SYSTEM_SUITESPARSE=1 USE_SYSTEM_ARPACK=1 USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 \
+ LLVM_CONFIG=/usr/bin/llvm-config"
+
+# scons is a dep of double-conversion
+DEPEND="
+ =sys-devel/llvm-3.3*
+ dev-lang/perl
+ sys-libs/readline
+ dev-libs/libpcre
+ dev-util/scons
+ dev-libs/gmp
+ sys-libs/libunwind
+ dev-util/patchelf
+ sci-libs/fftw
+ sys-libs/zlib
+ dev-libs/mpfr
+ sci-libs/suitesparse
+ sci-libs/arpack
+ virtual/lapack
+ virtual/blas
+ "
+RDEPEND="sys-libs/readline"
+
+src_prepare() {
+ #uurgh, no fetching in ebuild
+ sed -i -e 's~$(JLDOWNLOAD)~/bin/true~' deps/Makefile || die "Oopsie"
+ sed -i -e 's~git submodule~/bin/true~g' deps/Makefile || die "Ooopsie"
+ # and we need to build stuff, so ... let's just copy around and pray!
+ mkdir -p deps/random
+ cp "${DISTDIR}/dsfmt-2.2.tar.gz" deps/random/
+ cp "${DISTDIR}/double-conversion-1.1.1.tar.gz" deps/
+ # Some cleanups to avoid an OpenBlas dep, and remove some useless git errors
+ sed -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" Make.inc || die
+ sed -e 's/$(shell git rev-parse --short=10 HEAD)/v0.2.0/' Make.inc || die
+}
+
+src_compile() {
+ emake $JULIAMAKEARGS || die
+ # makefile weirdness - avoid compile in src_install
+ emake $JULIAMAKEARGS debug || die
+}
+
+src_install() {
+ # config goes to /usr/etc/ - should be fixed
+ emake $JULIAMAKEARGS PREFIX="${D}/usr" install || die
+}
diff --git a/dev-lang/julia/julia-0.2.1-r2.ebuild b/dev-lang/julia/julia-0.2.1-r2.ebuild
new file mode 100644
index 00000000000..fdc92d62120
--- /dev/null
+++ b/dev-lang/julia/julia-0.2.1-r2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit elisp-common eutils multilib pax-utils toolchain-funcs
+
+PDSFMT=dSFMT-src-2.2
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="http://julialang.org/"
+SRC_URI="
+ https://github.com/JuliaLang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/${PDSFMT}.tar.gz
+ http://dev.gentoo.org/~bicatali/distfiles/libuv-${P}.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="emacs"
+
+RDEPEND="
+ dev-lang/R:0=
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ dev-libs/libpcre:3=
+ dev-libs/mpfr:0=
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ sci-libs/umfpack:0=
+ sci-mathematics/glpk:0=
+ =sys-devel/llvm-3.3*
+ >=sys-libs/libunwind-1.1:7=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ virtual/blas
+ virtual/lapack
+ emacs? ( app-emacs/ess )"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-readline63.patch
+ epatch "${FILESDIR}"/${P}-patchelf.patch
+
+ ln -s "${DISTDIR}"/${PDSFMT}.tar.gz deps/random/dsfmt-2.2.tar.gz || die
+ rmdir deps/libuv && ln -s "${WORKDIR}"/libuv deps/libuv
+ # no fetching in ebuild
+ # /usr/include/suitesparse is for debian only
+ # respect prefix, flags
+ sed -i \
+ -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \
+ -e 's|^\(SUITESPARSE_INC\s*=\).*||g' \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e 's|/usr/bin/||g' \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ 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() {
+ # libuv is an incompatible fork from upstream, so don't use system one
+ cat <<-EOF > Make.user
+ LIBLAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+ LIBLAPACKNAME=$($(tc-getPKG_CONFIG) --libs lapack | sed -e "s/-l\([a-z0-9]*\).*/lib\1/")
+ 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_LIBM=1
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_RMATH=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ EOF
+}
+
+src_compile() {
+ # Not parallel-safe, #514882
+ emake -j1 cleanall
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p usr/$(get_libdir) || die
+ ln -s $(get_libdir) usr/lib || die
+ fi
+ emake -j1 julia-release
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+ use emacs && elisp-compile contrib/julia-mode.el
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake install PREFIX="${ED}/usr"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ if use emacs; then
+ elisp-install "${PN}" contrib/julia-mode.el
+ elisp-site-file-install "${FILESDIR}"/63julia-gentoo.el
+ fi
+ dodoc README.md
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/julia/julia-0.3.0.ebuild b/dev-lang/julia/julia-0.3.0.ebuild
new file mode 100644
index 00000000000..3634f875d34
--- /dev/null
+++ b/dev-lang/julia/julia-0.3.0.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+RESTRICT="test"
+
+inherit elisp-common eutils multilib pax-utils toolchain-funcs
+
+PDSFMT=dSFMT-src-2.2
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="http://julialang.org/"
+SRC_URI="
+ https://github.com/JuliaLang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/${PDSFMT}.tar.gz
+ http://dev.gentoo.org/~patrick/libuv-${P}.tar.bz2
+ http://dev.gentoo.org/~patrick/rmath-0_p20140821.tar.bz2
+ http://www.public-software-group.org/pub/projects/utf8proc/v1.1.6/utf8proc-v1.1.6.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="emacs"
+
+RDEPEND="
+ dev-lang/R:0=
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ dev-libs/libpcre:3=
+ dev-libs/mpfr:0=
+ dev-libs/openspecfun
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ sci-libs/umfpack:0=
+ sci-mathematics/glpk:0=
+ =sys-devel/llvm-3.4*
+ >=sys-libs/libunwind-1.1:7=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ virtual/blas
+ virtual/lapack
+ emacs? ( app-emacs/ess )"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig"
+
+src_prepare() {
+ ln -s "${DISTDIR}"/${PDSFMT}.tar.gz deps/dsfmt-2.2.tar.gz || die
+ ln -s "${DISTDIR}"/utf8proc-v1.1.6.tar.gz deps/utf8proc-v1.1.6.tar.gz || die
+ cp -ar "${WORKDIR}"/Rmath deps/ || die
+ rmdir deps/libuv && ln -s "${WORKDIR}"/libuv deps/libuv
+ # no fetching in ebuild
+ # /usr/include/suitesparse is for debian only
+ # respect prefix, flags
+ sed -i \
+ -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \
+ -e 's|^\(SUITESPARSE_INC\s*=\).*||g' \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e 's|/usr/bin/||g' \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ 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() {
+ # libuv is an incompatible fork from upstream, so don't use system one
+ cat <<-EOF > Make.user
+ 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_LIBM=1
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_OPENSPECFUN=1
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_RMATH=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ EOF
+}
+
+src_compile() {
+ # Not parallel-safe, #514882
+ emake -j1 cleanall
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p usr/$(get_libdir) || die
+ ln -s $(get_libdir) usr/lib || die
+ fi
+ emake -j1 julia-release prefix="/usr" DESTDIR="${D}"
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+ use emacs && elisp-compile contrib/julia-mode.el
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake install prefix="/usr" DESTDIR="${D}"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ if use emacs; then
+ elisp-install "${PN}" contrib/julia-mode.el
+ elisp-site-file-install "${FILESDIR}"/63julia-gentoo.el
+ fi
+ dodoc README.md
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml
new file mode 100644
index 00000000000..f0384bcaa09
--- /dev/null
+++ b/dev-lang/julia/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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ Julia is a high-level, high-performance dynamic programming language for
+ technical computing, with syntax that is familiar to users of other
+ technical computing environments. It provides a sophisticated
+ compiler, distributed parallel execution, numerical accuracy, and an
+ extensive mathematical function library. The library, mostly written
+ in Julia itself, also integrates mature, best-of-breed C and Fortran
+ libraries for linear algebra, random number generation, FFTs, and
+ string processing. Julia programs are organized around defining
+ functions, and overloading them for different combinations of
+ argument types (which can also be user-defined).
+</longdescription>
+ <upstream>
+ <remote-id type="github">JuliaLang/julia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/jwasm/Manifest b/dev-lang/jwasm/Manifest
new file mode 100644
index 00000000000..51d2814cdc0
--- /dev/null
+++ b/dev-lang/jwasm/Manifest
@@ -0,0 +1,2 @@
+DIST JWasm210s.zip 939008 SHA256 8d9a5ac95fa07a8e935423f3d1e44127c79d873e380f04d1ce8e1a65ca7daafd SHA512 fed6a02e9c58d8c8e4ad83cfd93207c99dc2cc73626188abc2f376465f72dea5ad2ac747b2832cfd8053220b76fdfd58b89d9e484f380c2eb0af2b541f24ca7e WHIRLPOOL 703f860303008cfadd6b42e36aee92e32d5b19af6f70040b083408e43ab5b7bbf83539c5ee96202c6a613ba8640ce2c8e18c465b853e1ac1727e03f30b2b10e8
+DIST JWasm211s.zip 1006791 SHA256 6d5ab10908fbedddf652b2c683e9fdf450caae9741082c1077100308d0879146 SHA512 acbe102b8c6c5d1fdc3ae80944cc3c0fcf287b6ee967b13251ea3e2bcf9547a772c7c658f4f90e8da70b60749add59d5ab321773dc317eac652325b2bd874dd6 WHIRLPOOL e2c28b46aa3d2d53e879f06931fa4ff3d7701541eb4fec7595b7df0c6682ddf72843ba04d072e2d55eb74139041c21a86298a03dad997c8f5b73cbc91958dbc6
diff --git a/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch b/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch
new file mode 100644
index 00000000000..88bbcb94723
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch
@@ -0,0 +1,41 @@
+From c2b789403a1ca833bcabada5347bb18d7bd095c2 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 15 May 2013 22:04:01 +0300
+Subject: [PATCH] fix build failure on gcc-4.8 (missing forward declaration)
+
+Fixes the following build error:
+> gcc -c -IH -D__UNIX__ -DNDEBUG -O2 -o GccUnixR/parser.o parser.c
+> In file included from parser.c:35:0:
+> H/parser.h:305:48: warning: 'struct expr' declared inside parameter list [enabled by default]
+> extern void EmitConstError( const struct expr * );
+> ^
+> H/parser.h:305:48: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
+> parser.c:790:6: error: conflicting types for 'EmitConstError'
+> void EmitConstError( const struct expr *opnd )
+> ^
+> In file included from parser.c:35:0:
+> H/parser.h:305:19: note: previous declaration of 'EmitConstError' was here
+> extern void EmitConstError( const struct expr * );
+> ^
+> make: *** [GccUnixR/parser.o] Error 1
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ H/parser.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/H/parser.h b/H/parser.h
+index 1744f0d..c2c7b99 100644
+--- a/H/parser.h
++++ b/H/parser.h
+@@ -302,6 +302,7 @@ extern int SizeFromMemtype( enum memtype, int, struct asym * );
+ extern ret_code MemtypeFromSize( int, enum memtype * );
+ extern int SizeFromRegister( int );
+ extern ret_code GetLangType( int *, struct asm_tok[], enum lang_type * );
++struct expr;
+ extern void EmitConstError( const struct expr * );
+
+ extern void sym_add_table( struct symbol_queue *, struct dsym * );
+--
+1.8.2.1
+
diff --git a/dev-lang/jwasm/files/jwasm-2.10-types-test.patch b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch
new file mode 100644
index 00000000000..e57c08afc83
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch
@@ -0,0 +1,60 @@
+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/GccUnix.mak b/GccUnix.mak
+index 567b842..bcb2fef 100644
+--- a/GccUnix.mak
++++ b/GccUnix.mak
+@@ -44,7 +44,7 @@ proj_obj = $(OUTD)/main.o $(OUTD)/assemble.o $(OUTD)/assume.o \
+ $(OUTD)/apiemu.o $(OUTD)/dbgcv.o $(OUTD)/end.o \
+ $(OUTD)/backptch.o $(OUTD)/msgtext.o $(OUTD)/tbyte.o \
+ $(OUTD)/cpumodel.o $(OUTD)/safeseh.o $(OUTD)/cmdline.o \
+- $(OUTD)/fastpass.o
++ $(OUTD)/fastpass.o $(OUTD)/checks.o
+ ######
+
+ #.c.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/files/jwasm-2.10-uint_32-on-amd64.patch b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch
new file mode 100644
index 00000000000..f6100f657fc
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch
@@ -0,0 +1,28 @@
+From 4399dabdd55fdf9da08c3604c5b3545391c1d44f Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 16 May 2013 12:24:44 +0300
+Subject: [PATCH 2/2] H/inttype.h: make uint_32 be a 32-bit int on x86_64-gcc
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ H/inttype.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/H/inttype.h b/H/inttype.h
+index 7316cbc..af2ef17 100644
+--- a/H/inttype.h
++++ b/H/inttype.h
+@@ -31,6 +31,10 @@
+
+ #ifndef _INTTYPE_H_INCLUDED_
+ #define _INTTYPE_H_INCLUDED_
++/* some autoconfiguration */
++#if defined(__LP64__)
++# define LONG_IS_64BITS 1
++#endif /* __LP64__ */
+
+ typedef unsigned uint;
+
+--
+1.8.2.1
+
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 00000000000..047d1d00551
--- /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.10-r1.ebuild b/dev-lang/jwasm/jwasm-2.10-r1.ebuild
new file mode 100644
index 00000000000..27c32ea82f5
--- /dev/null
+++ b/dev-lang/jwasm/jwasm-2.10-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://www.japheth.de/JWasm.html"
+SRC_URI="http://www.japheth.de/Download/${MY_PN}/${MY_P}.zip"
+LICENSE="Watcom-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc-4.8-fwdecl.patch
+ epatch "${FILESDIR}"/${P}-types-test.patch
+ epatch "${FILESDIR}"/${P}-uint_32-on-amd64.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/jwasm-2.11.ebuild b/dev-lang/jwasm/jwasm-2.11.ebuild
new file mode 100644
index 00000000000..4e4db2bbbc9
--- /dev/null
+++ b/dev-lang/jwasm/jwasm-2.11.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://www.japheth.de/JWasm.html"
+SRC_URI="http://www.japheth.de/Download/${MY_PN}/${MY_P}.zip"
+LICENSE="Watcom-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-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 00000000000..9406077f08b
--- /dev/null
+++ b/dev-lang/jwasm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ <description>Primary Maintainer</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/lazarus/Manifest b/dev-lang/lazarus/Manifest
new file mode 100644
index 00000000000..9e2a3cf9f80
--- /dev/null
+++ b/dev-lang/lazarus/Manifest
@@ -0,0 +1,4 @@
+DIST lazarus-1.0.12-0.tar.gz 47687878 SHA256 542ddd60f4a404d7020ed6962a545db910a1490588a70a26ed60a2b05b80177e SHA512 2a106c4bff2135ace815f789057f25fea1902edc972503e883547d7cc6d50b585ae54676cba734cce616064864ce535b3a4fcd7892763d15aafdf262dbe24293 WHIRLPOOL 6e0178d91dceef67c8419955f8e206223c76292acedabcf4370a47d3590d6ad2cfb0902e714deba0051e77199e7988f6c4f16358209dc0b0b9c496fb804153f0
+DIST lazarus-1.2.2-0.tar.gz 51558117 SHA256 ac2154c38b3918a08d762977073e606c272c5d4ba5cb4805bf8cd25965f3bd58 SHA512 ed6d228eae355860a8608263205ce00569785f8e39e06990fe8f17a5d070c05e2602d42e9258e42b0345f857e02b287083898f56dc5f4069157c9bace136988c WHIRLPOOL 514b9eac0bd59a0621d6c30f16d9d78f384dd6efddda163ee97b73ab24a42e6e630ec8fa17bc271b02a209618cd104ccb98d07637c67035a84141f148945cacb
+DIST lazarus-1.2.4-0.tar.gz 51606253 SHA256 e8622f2b29988514c9b7b7ff6cf2058a8b73e9ef0fd7998c82e1e958d2347d28 SHA512 c1858a2b89402d3cfb4baa704cdeb51dc541bf5dcac91230f93f62035988b5e5fec3851bf033876128db5da18713389a9eb6ca73c944dae36c0d6fb30e7727f8 WHIRLPOOL fddb4d650e3400b2fe1cfde1d431be3d752f81dbe715b821f55368628097225ce9156e4065f58c27346cba5a041127c25e7cc80ca15b77aab9e6188cfdd3b215
+DIST lazarus-1.2.6-0.tar.gz 51618690 SHA256 c0c7e648716f27edd6f1adf908fd5733654c3cd3db6458582ccd4343a8605eea SHA512 f7f227621ee69b7056dd87dab19e2217496ac2f280e3aa6dacdac890e55dfb9595a0562c06e50cb4b4f50d021739785d840eb19ec6d77040febb86fe78a5a47a WHIRLPOOL aff1abb59380553e92d956d35393689eed55bd8684a8c182b048cea774236defe9107b0449131a7868526721658f72e7d0c68578a55d56e53e3a68dc7d51fe3a
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 00000000000..8f9aee3fa42
--- /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 00000000000..a153a0d3968
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.0.12.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+RESTRICT="strip" #269221
+
+FPCVER="2.6.0"
+
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="amd64 ppc x86"
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="http://www.lazarus.freepascal.org/"
+IUSE="minimal"
+SRC_URI="http://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.2.2.ebuild b/dev-lang/lazarus/lazarus-1.2.2.ebuild
new file mode 100644
index 00000000000..66ccba19d97
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.2.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+FPCVER="2.6.4"
+
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="http://www.lazarus.freepascal.org/"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal"
+
+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"
+
+RESTRICT="strip" #269221
+
+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.2.4.ebuild b/dev-lang/lazarus/lazarus-1.2.4.ebuild
new file mode 100644
index 00000000000..66ccba19d97
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.2.4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+FPCVER="2.6.4"
+
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="http://www.lazarus.freepascal.org/"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal"
+
+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"
+
+RESTRICT="strip" #269221
+
+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.2.6.ebuild b/dev-lang/lazarus/lazarus-1.2.6.ebuild
new file mode 100644
index 00000000000..66ccba19d97
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.2.6.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+FPCVER="2.6.4"
+
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="http://www.lazarus.freepascal.org/"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="minimal"
+
+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"
+
+RESTRICT="strip" #269221
+
+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/metadata.xml b/dev-lang/lazarus/metadata.xml
new file mode 100644
index 00000000000..c12176fb07a
--- /dev/null
+++ b/dev-lang/lazarus/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>lang-misc</herd>
+ <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>
+</pkgmetadata>
+
diff --git a/dev-lang/lfe/Manifest b/dev-lang/lfe/Manifest
new file mode 100644
index 00000000000..7402bf47fd8
--- /dev/null
+++ b/dev-lang/lfe/Manifest
@@ -0,0 +1 @@
+DIST v0.7a.zip 216133 SHA256 c494135bf50a8dd62723e026a6b4cf4c5c4d6b8a01e59b6e41bbb6daf5c25dd3 SHA512 93f1b0e81275af21d3dbee73f364f4b67d4ce2d6beb7fe2c17e17d5f5330ec8762d63978ae291267ddd92d311b2ad7d2572854b5e3da9c884f4c706e23551aaa WHIRLPOOL 44067ac8e529d54e66cb18d0ae11c3f7d3a489b530f995e90eb000aae9e212ce79abc57388c515a681265a0242f568ae7efb3e1307e937c3aad55438b6d7b0da
diff --git a/dev-lang/lfe/lfe-0.7.ebuild b/dev-lang/lfe/lfe-0.7.ebuild
new file mode 100644
index 00000000000..44b5c441a41
--- /dev/null
+++ b/dev-lang/lfe/lfe-0.7.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Lisp-flavoured Erlang"
+HOMEPAGE="http://lfe.github.io/"
+SRC_URI="https://github.com/rvirding/lfe/archive/v0.7a.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/metadata.xml b/dev-lang/lfe/metadata.xml
new file mode 100644
index 00000000000..f4ebeba3f63
--- /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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rvirding/lfe</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/lisaac/Manifest b/dev-lang/lisaac/Manifest
new file mode 100644
index 00000000000..35f6f9e9a0f
--- /dev/null
+++ b/dev-lang/lisaac/Manifest
@@ -0,0 +1 @@
+DIST lisaac-0.13.1.tar.gz 2141871 SHA256 dc3ffe65e3be3f4ee4b77d3f362c22556afa842575f1b4dcf0951cf36f82f993 SHA512 079137d17fae09d57430d6576e9b2c149ca31ba47c0899513bfc447488ba2b0e3432fff8db4f6b141301798e23472738791cd99900c73a463d92397179a44aa9 WHIRLPOOL 6c878d53c341702439544a9267c19b93007b5cb83979ee448d95a38c090eef6fd4d0764dfd0beda9ec05e150ea68394b859b902991d76cb276d7f70a21a4464a
diff --git a/dev-lang/lisaac/files/50lisaac-gentoo.el b/dev-lang/lisaac/files/50lisaac-gentoo.el
new file mode 100644
index 00000000000..5d9af1ae420
--- /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 00000000000..bd690f467dd
--- /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 00000000000..9e5396a8b3e
--- /dev/null
+++ b/dev-lang/lisaac/lisaac-0.13.1-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..91f4e72fb54
--- /dev/null
+++ b/dev-lang/lisaac/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/logtalk/Manifest b/dev-lang/logtalk/Manifest
new file mode 100644
index 00000000000..1780f69f20e
--- /dev/null
+++ b/dev-lang/logtalk/Manifest
@@ -0,0 +1,3 @@
+DIST lgt2410.tar.bz2 621950 SHA256 ba083578b7b8665cec8a2123152f42b4f554d586f8422ef521e32eb7e7306267 SHA512 81377ef68cd9ed6fbcfb07c818efa1c9310c3918cfdd400886141c976a3eeea0086c00fa3e9a45475b8852c3cd3163ee56def12aa26c2c360ddf2999ba9501b7 WHIRLPOOL 6775f69b6d69835acf1dc585312c2ecc56292de9fe6068ccf881611d973ed493b9420ca958eb2ce9333889a780003f6b2f9ffdfbfc83c8e8624b0bf9d9db82f5
+DIST lgt2422.tar.bz2 690047 SHA256 e8204b3182e9062f23e05d6e492a250de12b93baa8586716c8572f2266365a2e SHA512 db976729ae8499ef128f9f7ad257f600f07cb867bfb9ac350ac2c846712d18ebfd5989c674cf0a65286c6f525f5c4273d9b04632ae3719efae7d8047c448c085 WHIRLPOOL 6d76474fa586cc1c10551b2d2db36954466668716c719ce793ed2db9f663272d60462c2f7cde3783010d482df479308d0e5c0da24fd0a0f806a2055b8401d8ce
+DIST logtalk-3.00.0.tar.bz2 1886297 SHA256 7462eaf8fd7fa865f8cccbb449a97981fbcb109a21536e2420f205b3b4b814b2 SHA512 bb4ecc709e71eee9a9a532bfcef764095e581189f3e17c9c0f2d80ceeaa4dd993d7da087b07e27f4a377a40d7a798378591d89ab6c801c7a26c1b1d646c7b76c WHIRLPOOL 21c3c9fc99e89173d3e0c109ca435847c2c735e17abca70e0f0c7646a3f8a8927e00aeb075386beec4e406faeb1ec7bc9ea7ec014933e5657c7c1d5c4d52099d
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 00000000000..d25f19347d6
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- logtalk-3.00.0.orig/scripts/logtalk_user_setup.sh 2015-01-08 14:04:03.000000000 +0100
++++ logtalk-3.00.0/scripts/logtalk_user_setup.sh 2015-01-08 14:05:05.000000000 +0100
+@@ -114,14 +114,12 @@
+
+ echo "Copying Logtalk files and directories..."
+ mkdir -p "$LOGTALKUSER"/contributions
+-mkdir -p "$LOGTALKUSER"/docs
+ mkdir -p "$LOGTALKUSER"/examples
+ mkdir -p "$LOGTALKUSER"/library
+ mkdir -p "$LOGTALKUSER"/scratch
+ mkdir -p "$LOGTALKUSER"/tests
+ mkdir -p "$LOGTALKUSER"/tools
+ cp -RL "$LOGTALKHOME"/contributions "$LOGTALKUSER"/
+-cp -RL "$LOGTALKHOME"/docs "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/examples "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/library "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/scratch "$LOGTALKUSER"/
+@@ -135,16 +133,7 @@
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2*
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.dtd
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.xsd
+-ln -sf "$LOGTALKHOME"/BIBLIOGRAPHY.bib "$LOGTALKUSER"/BIBLIOGRAPHY.bib
+-ln -sf "$LOGTALKHOME"/CUSTOMIZE.md "$LOGTALKUSER"/CUSTOMIZE.md
+-ln -sf "$LOGTALKHOME"/INSTALL.md "$LOGTALKUSER"/INSTALL.md
+-ln -sf "$LOGTALKHOME"/LICENSE.txt "$LOGTALKUSER"/LICENSE.txt
+-ln -sf "$LOGTALKHOME"/QUICK_START.md "$LOGTALKUSER"/QUICK_START.md
+-ln -sf "$LOGTALKHOME"/README.md "$LOGTALKUSER"/README.md
+-ln -sf "$LOGTALKHOME"/RELEASE_NOTES.md "$LOGTALKUSER"/RELEASE_NOTES.md
+-ln -sf "$LOGTALKHOME"/UPGRADING.md "$LOGTALKUSER"/UPGRADING.md
+ ln -sf "$LOGTALKHOME"/adapters "$LOGTALKUSER"/adapters
+-ln -sf "$LOGTALKHOME"/manuals "$LOGTALKUSER"/manuals
+ ln -sf "$LOGTALKHOME"/paths "$LOGTALKUSER"/paths
+ ln -sf "$LOGTALKHOME"/coding "$LOGTALKUSER"/coding
+ ln -sf "$LOGTALKHOME"/tools/lgtdoc/xml/lgt2html.sh "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2html
diff --git a/dev-lang/logtalk/logtalk-2.41.0.ebuild b/dev-lang/logtalk/logtalk-2.41.0.ebuild
new file mode 100644
index 00000000000..d60b0831d13
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-2.41.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+MY_PV="lgt$(delete_all_version_separators)"
+SRC_URI="http://logtalk.org/files/${MY_PV}.tar.bz2"
+LICENSE="Artistic-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gnupl qupl swipl xsbpl yappl xslt fop"
+
+DEPEND=""
+RDEPEND="
+ gnupl? ( dev-lang/gprolog )
+ qupl? ( !amd64? ( dev-lang/qu-prolog ) )
+ swipl? ( dev-lang/swi-prolog )
+ xsbpl? ( x86? ( dev-lang/xsb ) )
+ yappl? ( dev-lang/yap )
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+S="${WORKDIR}/${MY_PV}"
+
+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 compiler configs contributions VERSION.txt \
+ integration library wenv xml libpaths \
+ examples settings.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 BIBLIOGRAPHY.bib CUSTOMIZE.txt INSTALL.txt \
+ LICENSE.txt QUICK_START.txt README.txt \
+ RELEASE_NOTES.txt UPGRADING.txt VERSION.txt
+ dohtml -r manuals/* || die "Failed to install html manual"
+
+ 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
+ use gnupl && dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ use qupl && ! use amd64 && dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ use swipl && dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ use xsbpl && use x86 && dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ use yappl && dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/xml/lgt2xml.sh /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/xml/lgt2html.sh /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/xml/lgt2txt.sh /usr/bin/lgt2txt
+ use fop && dosym /usr/share/${P}/xml/lgt2pdf.sh /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "Before running logtalk, users should execute"
+ ewarn "logtalk_user_setup *once*."
+ ewarn "To start logtalk use one of the following:"
+ use gnupl && ewarn "GNU Prolog: /usr/bin/gplgt"
+ use qupl && ! use amd64 && ewarn "Qu Prolog: /usr/bin/qplgt"
+ use swipl && ewarn "SWI Prolog: /usr/bin/swilgt"
+ use xsbpl && use x86 && ewarn "XSB: /usr/bin/xsblgt"
+ use yappl && ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/logtalk-2.42.2.ebuild b/dev-lang/logtalk/logtalk-2.42.2.ebuild
new file mode 100644
index 00000000000..d60b0831d13
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-2.42.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+MY_PV="lgt$(delete_all_version_separators)"
+SRC_URI="http://logtalk.org/files/${MY_PV}.tar.bz2"
+LICENSE="Artistic-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gnupl qupl swipl xsbpl yappl xslt fop"
+
+DEPEND=""
+RDEPEND="
+ gnupl? ( dev-lang/gprolog )
+ qupl? ( !amd64? ( dev-lang/qu-prolog ) )
+ swipl? ( dev-lang/swi-prolog )
+ xsbpl? ( x86? ( dev-lang/xsb ) )
+ yappl? ( dev-lang/yap )
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+S="${WORKDIR}/${MY_PV}"
+
+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 compiler configs contributions VERSION.txt \
+ integration library wenv xml libpaths \
+ examples settings.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 BIBLIOGRAPHY.bib CUSTOMIZE.txt INSTALL.txt \
+ LICENSE.txt QUICK_START.txt README.txt \
+ RELEASE_NOTES.txt UPGRADING.txt VERSION.txt
+ dohtml -r manuals/* || die "Failed to install html manual"
+
+ 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
+ use gnupl && dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ use qupl && ! use amd64 && dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ use swipl && dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ use xsbpl && use x86 && dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ use yappl && dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/xml/lgt2xml.sh /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/xml/lgt2html.sh /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/xml/lgt2txt.sh /usr/bin/lgt2txt
+ use fop && dosym /usr/share/${P}/xml/lgt2pdf.sh /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "Before running logtalk, users should execute"
+ ewarn "logtalk_user_setup *once*."
+ ewarn "To start logtalk use one of the following:"
+ use gnupl && ewarn "GNU Prolog: /usr/bin/gplgt"
+ use qupl && ! use amd64 && ewarn "Qu Prolog: /usr/bin/qplgt"
+ use swipl && ewarn "SWI Prolog: /usr/bin/swilgt"
+ use xsbpl && use x86 && ewarn "XSB: /usr/bin/xsblgt"
+ use yappl && ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/logtalk-3.00.0.ebuild b/dev-lang/logtalk/logtalk-3.00.0.ebuild
new file mode 100644
index 00000000000..6af47a8d0c4
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.00.0.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
+LICENSE="logtalk"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc fop xslt"
+
+DEPEND=""
+RDEPEND="
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-user-docs.patch
+}
+
+src_install() {
+ # Look at scripts/install.sh for upstream installation process.
+ # Install logtalk base
+ mv scripts/logtalk_user_setup.sh integration/
+ mkdir -p "${D}/usr/share/${P}"
+ cp -r adapters coding contributions core examples integration \
+ library paths scratch tests tools VERSION.txt \
+ loader-sample.lgt settings-sample.lgt tester-sample.lgt \
+ "${D}/usr/share/${P}" \
+ || die "Failed to install files"
+
+ # Install mime file, the database will be updated later
+ insinto /usr/share/mime/packages
+ doins scripts/freedesktop/logtalk.xml
+
+ # Install documentation
+ dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
+ INSTALL.md LICENSE.txt QUICK_START.md README.md \
+ RELEASE_NOTES.md UPGRADING.md VERSION.txt
+ if use doc ; then
+ dohtml -r docs/* \
+ || die "Failed to install html core documentation"
+ dohtml -r manuals/* \
+ || die "Failed to install html manual"
+ fi
+
+ rm -f man/man1/logtalk_backend_select.1
+ rm -f man/man1/logtalk_version_select.1
+ doman man/man1/*.1 || die "Failed to install man pages"
+
+ # Integration symlinks
+ dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
+ /usr/bin/logtalk_user_setup
+ dosym /usr/share/${P}/integration/bplgt.sh \
+ /usr/bin/bplgt
+ dosym /usr/share/${P}/integration/cxlgt.sh \
+ /usr/bin/cxlgt
+ dosym /usr/share/${P}/integration/eclipselgt.sh \
+ /usr/bin/eclipselgt
+ dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ dosym /usr/share/${P}/integration/lplgt.sh \
+ /usr/bin/lplgt
+ dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ dosym /usr/share/${P}/integration/quintuslgt.sh \
+ /usr/bin/quintuslgt
+ dosym /usr/share/${P}/integration/sicstuslgt.sh \
+ /usr/bin/sicstuslgt
+ dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ dosym /usr/share/${P}/integration/xsbmtlgt.sh \
+ /usr/bin/xsbmtlgt
+ dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
+ /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
+ /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
+ /usr/bin/lgt2txt
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
+ /usr/bin/lgt2md
+ use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
+ /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "Before running logtalk, users should execute"
+ ewarn "logtalk_user_setup *once*."
+ ewarn ""
+ ewarn "The following integration scripts are installed"
+ ewarn "for running logtalk with selected Prolog compilers:"
+ ewarn "B-Prolog: /usr/bin/bplgt"
+ ewarn "CxProlog: /usr/bin/cxlgt"
+ ewarn "ECLiPSe: /usr/bin/eclipselgt"
+ ewarn "GNU Prolog: /usr/bin/gplgt"
+ ewarn "Lean Prolog: /usr/bin/lplgt"
+ ewarn "Qu-Prolog: /usr/bin/qplgt"
+ ewarn "Quintus Prolog: /usr/bin/quintuslgt"
+ ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
+ ewarn "SWI Prolog: /usr/bin/swilgt"
+ ewarn "XSB: /usr/bin/xsblgt"
+ ewarn "XSB MT: /usr/bin/xsbmtlgt"
+ ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/metadata.xml b/dev-lang/logtalk/metadata.xml
new file mode 100644
index 00000000000..c314a540f62
--- /dev/null
+++ b/dev-lang/logtalk/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+<use>
+ <flag name='gnupl'>Support GNU Prolog back-end compiler</flag>
+ <flag name='qupl'>Support Qu-Prolog back-end compiler</flag>
+ <flag name='swipl'>Support SWI-Prolog back-end compiler</flag>
+ <flag name='xsbpl'>Support XSB back-end compiler</flag>
+ <flag name='yappl'>Support YAP back-end compiler</flag>
+ <flag name='xslt'>Support for generating html documentation using xslt</flag>
+ <flag name='fop'>Support for generating pdf documentation using fop</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
new file mode 100644
index 00000000000..34049434a96
--- /dev/null
+++ b/dev-lang/lua/Manifest
@@ -0,0 +1,3 @@
+DIST lua-5.1.4.tar.gz 216679 SHA256 b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a SHA512 bc542fe8535826ac1e49b03a8f238cf049724b02c14718f8162cfeaf735a5e6c58412ff18dbe7a38e4cc4433f3d1e702554e9b24b5f021634b4280880980f40f WHIRLPOOL 2d8fdf77e31314eed68d8ace368a62a608a58114bea5c8797a2e2d327ca870dd4450ede494733d49c97bb447c97adf08610027df3206999a35fb49cde77448fd
+DIST lua-5.1.5.tar.gz 221213 SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 WHIRLPOOL 9dac93b73b9ad1ef6c69e0aa11fb53d5efe89274b65c55a1ac30bab23e8a255851b0e44306db54212b1d481e658cecd38e5ff22a25e1fa974858b7b03fb45b75
+DIST lua-5.2.3.tar.gz 251195 SHA256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449 WHIRLPOOL d278a1e38416bcf7f82eb3e7fd5fb423e60ccb69e9d57a937070516ff8be2d19a98bbfdaf37ec6fd6fb3ef2d625900977ca0cb47e46cb0ede5ebd5d37a9454ef
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 00000000000..f04eb85075a
--- /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 00000000000..9ffc1bb2884
--- /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 00000000000..fce4d47db8f
--- /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 00000000000..3c78525b0b2
--- /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 00000000000..5127507df9f
--- /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 00000000000..94634c59140
--- /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 00000000000..956e966817d
--- /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 00000000000..b74bafbebe4
--- /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 00000000000..000f78ccc7d
--- /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 00000000000..9fda24ad660
--- /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 00000000000..26519e378e6
--- /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 00000000000..e4ba8164bbb
--- /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 00000000000..8eecbdd4026
--- /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 00000000000..2905a62d0f9
--- /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.patch b/dev-lang/lua/files/lua-5.1-make.patch
new file mode 100644
index 00000000000..0c88bffedb2
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make.patch
@@ -0,0 +1,64 @@
+--- 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,22 @@
+ .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)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.a $(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
+@@ -176,3 +176,36 @@
+ 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)
++
++$(LIB_NAME:.la=.a): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $(LIB_NAME:.la=.a) $(LIB_OBJS)
++
++$(LUA_T): $(LUA_O) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -Wl,-E $(LDFLAGS) -o $@ $(LUA_O) $(LUA_LIBS) -llua
++
++lua_test: $(LUA_O) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E $(LDFLAGS) -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O) $(LIB_NAME)
++
++gentoo_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac
++
++gentoo_all: $(LIB_NAME) $(LIB_NAME:.la=.a) $(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 00000000000..e5fdc3a6bfa
--- /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-make_static.patch b/dev-lang/lua/files/lua-5.1-make_static.patch
new file mode 100644
index 00000000000..f0125686c2b
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make_static.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) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
+
+ $(LUA_T): $(LUA_O) $(LIB_NAME)
+- $(LIBTOOL) --mode=link $(CC) -Wl,-E $(LDFLAGS) -o $@ $(LUA_O) $(LUA_LIBS) -llua
++ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E $(LDFLAGS) -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS)
+
+ $(LUAC_T): $(LUAC_O) $(LIB_NAME)
+ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(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 00000000000..29ac4c3bf4b
--- /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 00000000000..f144861efb6
--- /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 00000000000..a88a991d053
--- /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 00000000000..99b4ad648cc
--- /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.2-make-r1.patch b/dev-lang/lua/files/lua-5.2-make-r1.patch
new file mode 100644
index 00000000000..a0624af9cc3
--- /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.2-make.patch b/dev-lang/lua/files/lua-5.2-make.patch
new file mode 100644
index 00000000000..431bbde3521
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.2-make.patch
@@ -0,0 +1,60 @@
+--- 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,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 = ../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 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)
+@@ -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 = ../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)
++
++$(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) $(LUAC_T)
diff --git a/dev-lang/lua/files/lua.pc b/dev-lang/lua/files/lua.pc
new file mode 100644
index 00000000000..e53971852c1
--- /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.4-r8.ebuild b/dev-lang/lua/lua-5.1.4-r8.ebuild
new file mode 100644
index 00000000000..b2f0b687718
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.4-r8.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils 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="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline )"
+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
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use deprecated ; then
+ epatch "${FILESDIR}"/${P}-deprecated.patch
+ epatch "${FILESDIR}"/${P}-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
+
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:/usr:' \
+ -e "s:/\<lib\>:/$(get_libdir):g" \
+ etc/lua.pc
+}
+
+# no need for a configure phase
+src_configure() { true; }
+
+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 || die "emake failed"
+
+ mv lua_test ../test/lua.static
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins etc/lua.pc
+
+ doman doc/lua.1 doc/luac.1
+}
+
+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 "${S}"
+ 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-r1.ebuild b/dev-lang/lua/lua-5.1.5-r1.ebuild
new file mode 100644
index 00000000000..2a4265993eb
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils 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="0"
+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 )"
+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
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ #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
+
+ # 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
+}
+
+# no need for a configure phase
+src_configure() { true; }
+
+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 || die "emake failed"
+
+ mv lua_test ../test/lua.static
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins etc/lua.pc
+
+ doman doc/lua.1 doc/luac.1
+}
+
+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 "${S}"
+ 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-r100.ebuild b/dev-lang/lua/lua-5.1.5-r100.ebuild
new file mode 100644
index 00000000000..a02c3a334c2
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r100.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~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-6.2_p5-r1[${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
+
+ #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-r2.ebuild b/dev-lang/lua/lua-5.1.5-r2.ebuild
new file mode 100644
index 00000000000..6af532c5d32
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils 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.1"
+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 )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+SAN_SLOT="${SLOT//.}"
+
+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
+
+ #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
+
+ # 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
+}
+
+# no need for a configure phase
+src_configure() { true; }
+
+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 || die "emake failed"
+
+ mv lua_test ../test/lua.static
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+ insinto /usr/$(get_libdir)/pkgconfig
+ newins etc/lua.pc lua${SLOT}.pc
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+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 "${S}"
+ 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-r3.ebuild b/dev-lang/lua/lua-5.1.5-r3.ebuild
new file mode 100644
index 00000000000..49edd5e7448
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r3.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 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-6.2_p5-r1[${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}"/${PN}-${PATCH_PV}-make-r1.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ #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.1.5.ebuild b/dev-lang/lua/lua-5.1.5.ebuild
new file mode 100644
index 00000000000..79a05acceab
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils 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="0"
+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 )"
+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
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ #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
+
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:/\<lib\>:/$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+# no need for a configure phase
+src_configure() { true; }
+
+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 || die "emake failed"
+
+ mv lua_test ../test/lua.static
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins etc/lua.pc
+
+ doman doc/lua.1 doc/luac.1
+}
+
+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 "${S}"
+ 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 00000000000..01c8f60d69a
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~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 )
+ 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
+
+ [ -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:^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 00000000000..98c1d825e4c
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 )
+ 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/metadata.xml b/dev-lang/lua/metadata.xml
new file mode 100644
index 00000000000..cfb994f96a0
--- /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>
+ <email>mabi@gentoo.org</email>
+ <name>Matti Bickel</name>
+</maintainer>
+<maintainer>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+</maintainer>
+<use><flag name='deprecated'>make deprecated data structures/routines available</flag></use>
+</pkgmetadata>
diff --git a/dev-lang/luajit/Manifest b/dev-lang/luajit/Manifest
new file mode 100644
index 00000000000..fe0ae4b2404
--- /dev/null
+++ b/dev-lang/luajit/Manifest
@@ -0,0 +1,4 @@
+DIST LuaJIT-1.1.6.tar.gz 364447 SHA256 c3dee987635540f64ebe834aa6c8ef17e0c0b8248324ee20953f50c98be2dd8a SHA512 5b08d0409bed23b3efd05d50007819c0023323fb0f921256fd33902b434221ebaa5ff4568813863ba3220271f7fd54720479ab8161b09d26ef5873030431592a WHIRLPOOL 6fa2504ccbeeb07434bf251b609df4a2834924da97c8efd5b5ca23a1d7215ca469b22fdd0aa166612606bc791a55b3ce150c6c1f2c3fae3598b0d1f4a75b2955
+DIST LuaJIT-2.0.2.tar.gz 843031 SHA256 c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38 SHA512 c1afea13ec61a59f37d1f61fc50bcac47208d9d4f0a80689b74e901ad2b34294b6c89a0b4eef54b43f3d2db411660da61b191b0bbfba4ba2f97743a9ee4484e3 WHIRLPOOL cb6e8ee6c5ac2293ca5d5452cda34769d3229e2d4681c0ce3c164659c2d2d781f8474e243747b197c10b3abc116e4145df6f5293317f1db871865f38ecd2b6cd
+DIST LuaJIT-2.0.3.tar.gz 844927 SHA256 55be6cb2d101ed38acca32c5b1f99ae345904b365b642203194c585d27bebd79 SHA512 7b3e3de22ac3602299b5918b60801e45a3278e547a15c16fdae7359538d4ada27ba664935d5f97c7409f330c2f8efeaae9ea03415f5e9d5a9d81e022cd5d36e0 WHIRLPOOL 1ba759b85048cfd57ebc02cfce477e9ddb327e7d27acd78f93fb2debfbf010a96e7b127324ebf6b81b1f35132f5a0a3a56ffca64fe0e66cba80c28b1cb49b433
+DIST LuaJIT-2.0.4.tar.gz 847615 SHA256 620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d SHA512 a72957bd85d8f457269e78bf08c19b28c5707df5d19920d61918f8a6913f55913ce13037fb9a6463c04cefde0c6644739f390e09d656e4bbc2c236927aa3f8f9 WHIRLPOOL 0d2b7d3dbede1e42afd820fb8b327f643282efd1549ae7288da82ed157ef34ac2ec6bee481ae3d02abdebb6528e42c12c4d6fa8e26774f1b59e17d3998e9f4c2
diff --git a/dev-lang/luajit/luajit-1.1.6.ebuild b/dev-lang/luajit/luajit-1.1.6.ebuild
new file mode 100644
index 00000000000..22c7d76bf94
--- /dev/null
+++ b/dev-lang/luajit/luajit-1.1.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit pax-utils
+
+MY_P="LuaJIT-${PV}"
+
+DESCRIPTION="A Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ # fixing prefix
+ sed -i -e "s#/usr/local#${D}/usr#" Makefile \
+ || die "failed to fix prefix in Makefile"
+ sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h \
+ || die "failed to fix prefix in luaconf.h"
+
+ # forcing the use of our CFLAGS
+ sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile \
+ || die "failed to force the use of the CFLAGS from the user"
+}
+
+src_compile(){
+ if use readline; then
+ emake linux_rl || die "emake failed."
+ else
+ emake linux || die "emake failed."
+ fi
+}
+
+src_install(){
+ einstall
+
+ # removing empty dir that was supposed to have the man pages.
+ # dev-lang/luajit:1 doesn't install man pages.
+ rm -rf "${D}usr/man"
+
+ mv "${D}usr/bin/luajit" "${D}usr/bin/luajit-${PV}" || die "mv failed!"
+ pax-mark m "${D}usr/bin/luajit-${PV}"
+ dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}"
+}
diff --git a/dev-lang/luajit/luajit-2.0.2.ebuild b/dev-lang/luajit/luajit-2.0.2.ebuild
new file mode 100644
index 00000000000..7c32a35b177
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..ed954241d1f
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.3-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..084d0fd978b
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..78856d0eb6c
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..e3ee128b8a2
--- /dev/null
+++ b/dev-lang/luajit/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>
+ <email>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <use>
+ <flag name='lua52compat'>
+ Enable some upwards-compatible features
+ from Lua 5.2 that are unlikely to break existing code.
+ </flag>
+ </use>
+ <longdescription lang="en">
+ LuaJIT is a Just-In-Time Compiler for the Lua programming language.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/maude/Manifest b/dev-lang/maude/Manifest
new file mode 100644
index 00000000000..5568f9fa317
--- /dev/null
+++ b/dev-lang/maude/Manifest
@@ -0,0 +1,2 @@
+DIST Maude-2.6.tar.gz 1600026 SHA256 a5ba79bf3d30565c874e80b3531b51a7e835b600e86cac82508a6eb9e15f4aa0 SHA512 3931a540f72acdf2de532eff7b55ba4c9496b38a4b036f4e37d16b860f87728d6df5b9e377fd3489e55f7c369bca5eb9cded9b7a75032c410eff9a6e85da3fab WHIRLPOOL 9bc2011cb167ac5a451fc043fcaccbbfbfb5cb71bbb804021c7286a6f315d8c6778b6a385c5c6e5566db18051e8c817f93f099f39e3077bd414b83cc8e78be9b
+DIST maude-2.6-extras.tar.xz 3157004 SHA256 64cd72026c345ff1c1edeca64f9a9fce8067e6df5eccdaeee4bfe7a0f07d3102 SHA512 0533f0f226057d2668052f360245f296d36129ec242ff0bfa91fada9db5bc347d276d3468c86fbac92f019f3a2f152c7cb4e58a7f1265c1fb5a8b1b496fac5cd WHIRLPOOL 7a5ea0bf49132ecb3b88f26432c8aedb7ce2f9632f4e9cbb5fa08ab36b65c9a165d58e4a880e8ea97eff91280e28fb01e224a61539b73b898f3e9b4cba34ce44
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 00000000000..5499af3eb76
--- /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-gcc47.patch b/dev-lang/maude/files/maude-2.6-gcc47.patch
new file mode 100644
index 00000000000..65dcc302ab3
--- /dev/null
+++ b/dev-lang/maude/files/maude-2.6-gcc47.patch
@@ -0,0 +1,25 @@
+Get maude to compile on amd64 with g++ 4.7
+bicatali@gentoo.org nov 2013
+
+--- Maude-2.6.orig/src/Mixfix/lexerAux.cc 2013-11-06 09:41:00.821049550 -0800
++++ Maude-2.6/src/Mixfix/lexerAux.cc 2013-11-06 09:41:33.174247429 -0800
+@@ -35,7 +35,7 @@
+ bool fakeNewlineStack[MAX_IN_DEPTH];
+
+ void
+-getInput(char* buf, int& result, int max_size)
++getInput(char* buf, size_t& result, int max_size)
+ {
+ result = YY_NULL;
+ if (UserLevelRewritingContext::interrupted())
+--- Maude-2.6.orig/src/Mixfix/lexerAux.hh 2013-11-06 09:41:00.821049550 -0800
++++ Maude-2.6/src/Mixfix/lexerAux.hh 2013-11-06 09:41:23.466187406 -0800
+@@ -27,7 +27,7 @@
+ //extern int inStackPtr;
+ //extern YY_BUFFER_STATE inStack[];
+
+-void getInput(char* buf, int& result, int max_size);
++void getInput(char* buf, size_t& result, int max_size);
+ void lexerIdMode();
+ void lexerTokenTreeMode(int terminatingTokens);
+ void lexerCmdMode();
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 00000000000..f5522eda2a0
--- /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/maude-2.6-r1.ebuild b/dev-lang/maude/maude-2.6-r1.ebuild
new file mode 100644
index 00000000000..775f2432006
--- /dev/null
+++ b/dev-lang/maude/maude-2.6-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils versionator
+
+MYP="${PN/m/M}-$(get_version_component_range 1-2)"
+
+DESCRIPTION="High-level specification language for equational and logic programming"
+HOMEPAGE="http://maude.cs.uiuc.edu/"
+SRC_URI="
+ http://maude.cs.uiuc.edu/download/current/${MYP}.tar.gz
+ http://dev.gentoo.org/~jlec/distfiles/${P}-extras.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="
+ >=dev-libs/gmp-4.1.3
+ dev-libs/libsigsegv
+ dev-libs/libtecla
+ sci-libs/buddy"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.5.0-prll.patch
+ "${FILESDIR}"/${PN}-2.6-search-datadir.patch
+ "${FILESDIR}"/${PN}-2.6-gcc47.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --datadir="${EPREFIX}/usr/share/${PN}"
+ )
+ sed -i -e "s:/usr:${EPREFIX}/usr:g" src/Mixfix/global.hh || die
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ # install data and full maude
+ insinto /usr/share/${PN}
+ doins -r src/Main/*.maude
+ doins "${WORKDIR}"/${P}-extras/full-maude.maude
+
+ # install docs and examples
+ use doc && doins -r "${WORKDIR}"/${P}-extras/pdfs/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${WORKDIR}"/${P}-extras/{manual,primer}-examples
+ fi
+}
diff --git a/dev-lang/maude/metadata.xml b/dev-lang/maude/metadata.xml
new file mode 100644
index 00000000000..5884f5601dd
--- /dev/null
+++ b/dev-lang/maude/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription>
+ Maude is a high-performance reflective language and system supporting
+ both equational and rewriting logic specification and programming for a
+ wide range of applications. Maude has been influenced in important ways
+ by the OBJ3 language, which can be regarded as an equational logic
+ sublanguage. Besides supporting equational specification and
+ programming, Maude also supports rewriting logic computation.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
new file mode 100644
index 00000000000..ca06916e9ef
--- /dev/null
+++ b/dev-lang/mercury-extras/Manifest
@@ -0,0 +1,14 @@
+DIST mercury-extras-11.01-gentoo-patchset-2.tar.gz 5005 SHA256 68e8a358a75527823a7c7f119ac0104acb0702263178f27be659c6b1d09cb46c SHA512 f8d434893cf63f6d49fcb2e527debf0f671a11249333afc3320c7e4c19efb5205606060350da93e57ba10bd27dacbe684e1c3b6909f049caa1b14acf292173ba WHIRLPOOL e2dd61ace52d0009109c16e1fbf1c1bf2afcb757977ae2c9247262a7ae7b6cc33cf6d51c83ce930f6fef5b9f3f7835cbbd559ccc6c50098d17c5737857ee5830
+DIST mercury-extras-11.01.tar.gz 777185 SHA256 52eb6758e2136eb288329917d4c352da98e9ce0e951d6a5c884919bf8e85b1b1 SHA512 790864bba746f53a7285ae648fcf86e7a14761ed8369536a7d05175fcf58dc67f95bcfbd13266e3b86b9475e871fd28e2b277910e4f0d72c3efe4b5f3cc16269 WHIRLPOOL fec77ffc070be51c6e5dfec1ffb18dfa4a622f87b36f062c7b5eb0175d0bf2275e37d2fd7c901b594ae1b4212eb5383c324640694db2a3adef70a615f2352a48
+DIST mercury-extras-11.07-gentoo-patchset-0.tar.gz 4886 SHA256 25452b2489ac260084735d738972c5d286c63e54ecd1a14cc26890f902714966 SHA512 dca2ae9ebae05f49ca79bd6fba510fdea25d94974d40835588174dac30667fffc5f982864888180434b7b35f6e545fbf3295caae2543f4f637a84e6ddf79a7c8 WHIRLPOOL 789fa90f8fcb75603290fb693335000f643cf6b3405242dc833e73baf53f82f5836f00c5fa4b92dfaeb076c36b853a02835e224c708d98e66012c8f8d332fa60
+DIST mercury-extras-11.07.1-gentoo-patchset-0.tar.gz 5114 SHA256 8236342a8e9fc36794401ccbe30c58d351fa6f3663cb5febbcb45742b978b49a SHA512 b9d0774466e68b9aa4b3e8a22347f8d41b8ea4cc0b328fcb794b158563dac448f46e5dc1638dae3d1345a71534debcf7bfcfe4a1597b235851bf77b58e7ed23c WHIRLPOOL de588622eefec04cce6d610defcba37bb95a2e0f7e0527d68c412c1d55529686fab3e801f2f81805ddb621d3ec2c1cbd9db16c5a736682a7ae142287f3054f00
+DIST mercury-extras-11.07.1.tar.gz 776828 SHA256 cda5891e6143f34ec0639f296c0080e252bc18e59c663143750945a033eaa54c SHA512 cfa7690f4399bff98c0b56705f6b85af7409a7770e3af8b3f7dbf622300b756b0878b9b1bf46bf3953d6318c6e9f8ba6c57b125d180619c1e98e92d225a7351f WHIRLPOOL 9eb64278188ab9cd0bf37ef32be639cb3c71b2aa24c4929dcd6f9b1f2045de4ee79045b8344716cc89ac1c2d174b852ee411a538c49f77e846ee0b0b970fe751
+DIST mercury-extras-11.07.2-gentoo-patchset-3.tar.gz 5320 SHA256 c6d0e12325e4bff9bd1d16c364c15d7c593c349bf175c08bab5d9a6214202110 SHA512 666fe82a34191d1ab68e23bf81fa1dd811ddda29033503a32432caee4610b8d0adbbb5950c344c4f6a9d74c15f6959a5d0d5179e6b8d4715ef45761a3d4b4e28 WHIRLPOOL 2d1731073b823a96e502fd798229d3748febaaff3bfe5f3c7160d3881ee4faa05da31018ebabdacdb179b3030bc723ed2e7edcd0b7c734787d81667640cec098
+DIST mercury-extras-11.07.2.tar.gz 774067 SHA256 424cd1e642a49f4c463e20851ba185ce60186c7c46aed96c7f32f55e41ae482b SHA512 162358a22f020f61310c29aa61c480fee0a02aff2749a89956493bed43aafe89e92427578697eb1e8e43e73acde1d19f1b9bc85705ff448e5fa8cdaf92b749c5 WHIRLPOOL 24b7093a2ed72441aafd3a1ffa84c5b9458d5fddaedb1eb46dcb66e52cc21dc0dd5ded14067c0b0be040ae5de0a14ebf5341b5c87720390b5892a872f32e9d11
+DIST mercury-extras-11.07.tar.gz 776589 SHA256 25eaf999666ceb4217cfe0f9fbcb38b892c57fb36efaa16099a471287a7a9019 SHA512 ea2c3231cbb32dc91f36d1d09a5bdac65b468bff64f79aab46baa0e7e9460f75fa5239c96b5b2a616aebb499954b62d8ac7acea93fa971df1e7d81955ca0c5ea WHIRLPOOL 9617163e15b44bf373d5e9204dd8882c4921ed56a38ec41aabd7a81eda1aebedade70e7cfa0eeb21d46349e64fc9ed565cb1eb12dd49c98b8d5dfacdb49fd229
+DIST mercury-extras-13.05-gentoo-patchset-0.tar.gz 6333 SHA256 36d286a20f70e21262ac8d19004400df0a356ef7a85763027ef36f16d7de17cc SHA512 78c1391607e1a8a76c091deef112e9c4e0004fb63b9fe461c3100f2dd6ca03efe069036b081b4de8b4399052a1b10f0ef02188cc2def3d47f6aceb1b61c168c3 WHIRLPOOL 72b16b5948b2fb8048496f094e0c2343af0723f33ebbd024a7e8c0785fc949b2226f3ef78fba16a65903b1675f1280f6a3d35dab1d276203b845f140ccd3e4a7
+DIST mercury-extras-13.05.1-gentoo-patchset-0.tar.gz 3423 SHA256 b15b87c86313e9a038f6ab55c9b47bc9f8eaca51aedf578a9d9e6ab1dc785d9b SHA512 51ade5a5c99fdd0417afb8c0f78c6a5c77d2161091894b62d570ad8d614f2f614e07bb07cbdf5212fd2ca8b6d67778717856a7939e506c56b1597ec05d18c6c4 WHIRLPOOL 7ed609dcde3ac5a89ddebc99365f4e13f50eddb8d6685e40fdf227842b5edfbcaf0bf6a8621696d1484970666fb303e828c5a0d4877e98fb6df6cca147b73a70
+DIST mercury-extras-13.05.2-gentoo-patchset-0.tar.gz 3434 SHA256 4c9d7bd5cd098a9e21981053d854307e8b27efcfd4ea86e4bc44532a1707a2c6 SHA512 7212bce048ac6cda4678bcf5f5046efab101c040324078ab01d5dea1436a495d19574c4d07810447795aec49d79b69a557f60a558e9b6837fe55ccaff80d3077 WHIRLPOOL 239461342b164209fd876f5925b7b03ff9082210cc1242c7fa897bad9029caa6dd6f457feb51e963bd2ce2839cba33146ee7c4daa45c204e6ef2a4f59fe3f7c2
+DIST mercury-srcdist-13.05.1.tar.gz 54558577 SHA256 a90de00fc5905a8421675b04dc3c9d5eda54bedaf8b2ebcefae4de551fbcfd2c SHA512 784069af3ba470e9618e5b7917873e8ad7f4e9dc27eb54afa74eb6d6e659dcfab7007ae93163937412f9eb1b997a327d4378dcd868810c08880d4fa4542dfade WHIRLPOOL ec7281a6e01523b296dcfce595189cb96ad693c9b36ab60cbc6b61672333f5c8d7d9def10cc3c5bba876fddf0eefea3e9c22c1b98ee577d1b6d6aab6d1267915
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86
+DIST mercury-srcdist-13.05.tar.gz 54533409 SHA256 71f1f97484eaecf2c2f91f6731e23afc5cee966e149b61a7525b2bd9a2712d55 SHA512 d76fd3a0c487b2c65168b19ec6a5ea6b792c96692e029afe0589f93132422fc39e0aec856ae02e676cc30dc83780f9c4d4e0ea5f71681442279b900146b58c47 WHIRLPOOL b2cc0f1b074d980701c6d364f30f8bb2dd2556cbc23dca5a982b7c16b71c6834d7c81ea76bfcea25e369f32d606698b77eea168e3b25d4850f924dfa4f6929f4
diff --git a/dev-lang/mercury-extras/mercury-extras-11.01.ebuild b/dev-lang/mercury-extras/mercury-extras-11.01.ebuild
new file mode 100644
index 00000000000..de7c5c698e8
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-11.01.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib
+
+PATCHSET_VER="2"
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.cs.mu.oz.au/download/files/${P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-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 )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${P}
+
+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 : graphics/mercury_cairo lex :" Mmakefile \
+ || die "sed cairo failed"
+ fi
+
+ if use glut; then
+ sed -i -e "s: lex : graphics/mercury_glut lex :" Mmakefile \
+ || die "sed glut failed"
+ fi
+
+ if use opengl; then
+ sed -i -e "s: lex : graphics/mercury_opengl lex :" Mmakefile \
+ || die "sed opengl failed"
+ fi
+
+ if use tcl && use tk; then
+ sed -i -e "s: lex : 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: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 posix/Mmakefile \
+ || die "sed libdir failed"
+
+ # disable broken packages
+ sed -i -e "s:lazy_evaluation::" -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"
+
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+}
+
+src_install() {
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ 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-11.07.1.ebuild b/dev-lang/mercury-extras/mercury-extras-11.07.1.ebuild
new file mode 100644
index 00000000000..b66a1808279
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-11.07.1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.cs.mu.oz.au/download/files/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-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 )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+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 posix/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"
+
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+}
+
+src_install() {
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ 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-11.07.2.ebuild b/dev-lang/mercury-extras/mercury-extras-11.07.2.ebuild
new file mode 100644
index 00000000000..306c7a818a9
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-11.07.2.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib
+
+PATCHSET_VER="3"
+MY_P=${PN}-${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 )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+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 posix/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"
+
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+}
+
+src_install() {
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ 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-11.07.ebuild b/dev-lang/mercury-extras/mercury-extras-11.07.ebuild
new file mode 100644
index 00000000000..b66a1808279
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-11.07.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.cs.mu.oz.au/download/files/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-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 )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+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 posix/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"
+
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+}
+
+src_install() {
+ mmake \
+ MMAKEFLAGS="${MAKEOPTS}" \
+ 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-13.05.1.ebuild b/dev-lang/mercury-extras/mercury-extras-13.05.1.ebuild
new file mode 100644
index 00000000000..effc7199e41
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-13.05.1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+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 )
+ 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-13.05.2.ebuild b/dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild
new file mode 100644
index 00000000000..effc7199e41
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+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 )
+ 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-13.05.ebuild b/dev-lang/mercury-extras/mercury-extras-13.05.ebuild
new file mode 100644
index 00000000000..effc7199e41
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-13.05.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+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 )
+ 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/metadata.xml b/dev-lang/mercury-extras/metadata.xml
new file mode 100644
index 00000000000..b60aa8b6a4a
--- /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>
+ <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 00000000000..ee92806a622
--- /dev/null
+++ b/dev-lang/mercury/Manifest
@@ -0,0 +1,18 @@
+DIST mercury-11.01-gentoo-patchset-1.tar.gz 7129 SHA256 43dbcb63add22b24da7515b7d42d8b4ad119d9923f80dbb29767d756436d0fa4 SHA512 0c6ca4d2705735ea2c60848223cccb68371dfb36ab1bfc124587b21231320e18b1fe287853a392604c2807caa126c422c34d8c6867539adc3f4411ff10a8c6f6 WHIRLPOOL b5c6668ac8b974caebc3a733565e6d3b23ba7b2a8fbe3ef5c0bf3376c14bbe1c7aa24cc11616dcb9e1ff9ab44659485c8156bcb6952ecb807a1ec855aa9ac32b
+DIST mercury-11.07-gentoo-patchset-0.tar.gz 6889 SHA256 2fce2c95b6cb8b5819fb576de8ce184293a926c52f120027e3195d14f0552d78 SHA512 adb182f4d020052db715e5beb2da6fa86470414735430393253c14240782f6a94e86d50b181cc8c7a9bf09fad62091ea5d53903bc8ddf09df7a85a5f0de3f631 WHIRLPOOL 908846defe2681086ee5cc93ccc86456696826abc9b2b8cdf80896616df053f8f812fcb45fd7fffb4f0062dc478c1b183b87f3d1276581e3a89feb5b6ef2cb0d
+DIST mercury-11.07.1-gentoo-patchset-4.tar.gz 7336 SHA256 477cde26b06650b96accdc32da4bb7edb382b8ad8a2ed3908a985d895070ad4a SHA512 1ae54d05cac374ac02f7368b19ba98567d7c513d471fc98e27f0d794137ff920d42acf7105e6652e6610b4ffec74c3f5b282e81668735a626f8d762d8192d1c4 WHIRLPOOL 529f6e4675b0437dffa83f6cdc5daf4d8c7e9a59e81dc0f6c54cc35be7255fca0ddb6afca4257bc960ded245b50b80cbeaf80c9d2b589fc92564845884f218c5
+DIST mercury-11.07.2-gentoo-patchset-0.tar.gz 7265 SHA256 d400e40ae62c5cb8e777c2409d70eee7f71f231733a95fd6549f82c6c2933500 SHA512 110e0aacd1ef274d9c7154b359267ec0277e680fe2bb9ec4942dfc167c4f02dfef85fbd205120875e485f1b186432157814891ea9f1d0d55f0cdf236b0a80257 WHIRLPOOL 9002362cc04943558399dc4350a9368d12ce6d9717afe42e7c150ad55c8b2fe326697bdea6e457c1b3611d448ecdf7b171219e23a123aec2d0e70f14ab443afa
+DIST mercury-13.05-gentoo-patchset-0.tar.gz 5947 SHA256 8af2076b571215e403079fab840bf4a769ff67ec1ebfdf7b92bf203a503acb99 SHA512 0662126b9802fe9cd6156b204dc28b4e02a7d55fc5f88e97717c7aeb764014ed537822c5a2d2a5520a6b78c092d2fe25b603f05e1e6d19821b7b2905aad53d0c WHIRLPOOL 56a10ac2503fe87099f29294d44a58902192c18a95d438908fbb31969050289ecd8461fc3188368309d1693bd89e1380c140e58d165d02bf5d8f10e4ccbf30e5
+DIST mercury-13.05.1-gentoo-patchset-0.tar.gz 6013 SHA256 d9cfe7017f234d361f51e0dad1a0f6cdcbf82bf841c312660ffd76d6cdada71a SHA512 8f0a8cd4bf814c8d6903843b4e264da4708cf352439116766a63d5d68ef1043543d53b5729f38e5fef0272c006913b3e6c839c37f1e3486fc6f8d382b280aaee WHIRLPOOL a89cf3170498af1f3ffbd5d56db216932f9c96109b4f2c1c267b51e3f81f1f9e0fe7e755a8d86e8a0cc7eb6c4487918ea2ae9738377a7dd4d369f328b3f7d208
+DIST mercury-13.05.2-gentoo-patchset-0.tar.gz 5155 SHA256 647fb5931a76b86a003063e7f17f929866bb2f2791c98a444a1e9765e70ab4c4 SHA512 8c7305be8c97eebb2107f9ec9debdb572e19b77dbc2e9b5879387322acf06bb0a0a200583d1f01f892640991817c3f17d7c723825c6c1a94d365415cf1d648c6 WHIRLPOOL ce41a9eb302416125816dc09df87b97daeb39253b6ef686ef7ae783366a15e387390b03d63a5ee582a1ddd0244bd109e9da4c6ebbfaa8ad8ee574c87b286a91f
+DIST mercury-compiler-11.01.tar.gz 25122699 SHA256 2d12dc9bfaed46b1b30689b0592177bc871b21cf8852c8326c86371258bb18b0 SHA512 628eb95cc647a3334ed6cc9cdb19256dece544cac34600db2a495815215b494db74b1f196e3c48ba1cbb37b51404158d5a583caa20fd3e53488111927615b666 WHIRLPOOL 6720586514dfa954e8e777986d7b62fd2fb10ce1a309034bdc4e40431762c834cba98e93b129e69ba5a78451cd0f776fe916bce2b15996d1621cab59215481a6
+DIST mercury-compiler-11.07.1.tar.gz 25308185 SHA256 f3f1d4f0fb34567a69aaa9fb6f4ecff52b97a66ab6c8a868c4e284eb61d3dc11 SHA512 c102a1f2c2ed4384919685e3e11ba3b7da0152f6fe8899c2124e9bbb056ab81a5e2fc1dbb07934ca011ed96e7c6af168308c64eb4901db7d247fffd2ff226c4f WHIRLPOOL 6df5a68a9c0adc6d5ae490bd909951d8330db2c4e0bb704ab9be0fe8cdf7177093cd0943256fcbea8d666793d3d53c20b8c703deca43121114d89f1a508f32d5
+DIST mercury-compiler-11.07.2.tar.gz 25311504 SHA256 8afee5732d6d52343fbba8d6b9dd3f87b819673743a408a564eede17956ea659 SHA512 144f496cdfbdb88e15a18b3c295d326ebb1054055c42cb1a5fd634b79797c8dbd46ef5d1731f4c4cb1add02795e9b7d1d72e0426c39e672e208f10068e65df8b WHIRLPOOL a443bad02d714737aa2e1875205915db78bc776cf75f01f98e99efab992a5a542c86772615e9a4066b1143977e354441f07a033ef81a2d8f464226004f5de198
+DIST mercury-compiler-11.07.tar.gz 25298643 SHA256 77940d03834a3967e4505c4a92253c19aaea0fed4650ee94e772078abd6be6a2 SHA512 671bebb67ceca8af0844c2ba0d9db538564d3b324a913141be29c7632adb7a343b93fe771533173d5460ac34d5a69fd18b3ef7f55b26c0d0ee70b7cc2e35f10d WHIRLPOOL 992f5f52292066b775b264401f25b5e8ef246ced9b79c0ec06701f715e22e068ad81a17dea49f62bd72bc9cc0539b2ef7beb9be1401391209e2ab1e3876d0bfc
+DIST mercury-srcdist-13.05.1.tar.gz 54558577 SHA256 a90de00fc5905a8421675b04dc3c9d5eda54bedaf8b2ebcefae4de551fbcfd2c SHA512 784069af3ba470e9618e5b7917873e8ad7f4e9dc27eb54afa74eb6d6e659dcfab7007ae93163937412f9eb1b997a327d4378dcd868810c08880d4fa4542dfade WHIRLPOOL ec7281a6e01523b296dcfce595189cb96ad693c9b36ab60cbc6b61672333f5c8d7d9def10cc3c5bba876fddf0eefea3e9c22c1b98ee577d1b6d6aab6d1267915
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86
+DIST mercury-srcdist-13.05.tar.gz 54533409 SHA256 71f1f97484eaecf2c2f91f6731e23afc5cee966e149b61a7525b2bd9a2712d55 SHA512 d76fd3a0c487b2c65168b19ec6a5ea6b792c96692e029afe0589f93132422fc39e0aec856ae02e676cc30dc83780f9c4d4e0ea5f71681442279b900146b58c47 WHIRLPOOL b2cc0f1b074d980701c6d364f30f8bb2dd2556cbc23dca5a982b7c16b71c6834d7c81ea76bfcea25e369f32d606698b77eea168e3b25d4850f924dfa4f6929f4
+DIST mercury-tests-11.01.tar.gz 1351134 SHA256 862b70a589eb2d36c9fd82dbd2e0490dc4556f6edff604a54dfd6fc0ad6cccad SHA512 7cd0c2a5f3ef2b05ea32ea8867f788c583a9da96b6e3b4ed9c2ec5705fc7384c0811da782ed50b6d7f60963680036e116684b5bcc3f5f72cf6f0b319480ad997 WHIRLPOOL 298a898b970da20f64530cf736b5f901cc61ef028117f2434135b9efc77223e120a71e97373d494cdb89b422ef9bbf02ef51db4be3c383ffd6facaabb2018c6a
+DIST mercury-tests-11.07.1.tar.gz 1648437 SHA256 01558a6ddd28d2f832d88da8bbf38fec542d091fc53b5adf92fac5e2564c2057 SHA512 1b8f3749091e6a3cd8d3f07ca7ff87c20d9c90761c6dbf35253f68f4cb4ccb42310d66ebc98742508a4e1f6fb4d6497e7e34f10b2601ffec73694702f1b363b5 WHIRLPOOL 66cd530de280d34a037cc191818abb6f11bf4ea8f6f3143629883ff2d885350bdd8841215b6076d5b6ea2102d6ef913a9324d997fd287af12eed0cbe708692b2
+DIST mercury-tests-11.07.2.tar.gz 1573648 SHA256 039b5ecf25412b7f867b4b41aa1e27fa8e381533b5641fe5520cca8ba782d78c SHA512 247fd2521257d1eed8d5a00efdaf85c1b30d5ec430ed09b605bb7596295775ed1b62c1274caca6fba66b28b51c92380f42f003bffab4054bfd755fbaa2c16888 WHIRLPOOL 5213e51dc95a35345e5005c03741bf90f35106f4974f7e25e9277e945a3b88411a561769cc6be80f84e9ac0b7cf7b5c8f32b17d9c22785991995fbe3fdf53002
+DIST mercury-tests-11.07.tar.gz 1647435 SHA256 9206c7ffaace2357367bb6f8c3efe9aeb05ccac6a02946f6579c6001f953501b SHA512 889c6dc4810fbe9cb55b32b0676b7f15ce0b92d1fd8b605e9576e6d69bcb7f02fefc40a504a47b49b3c3afd6abe57b405c81aac21a9ac7adb594dfcb4f740c85 WHIRLPOOL 096a54bb3d28a177ae7b31b4fbb9ff4b77abb434e8fcd9174aec486d8a0d2bceff4f5d4e81d0b8d4fbeed7fd9dbce1400ec48dcd677b6bf1ed561f0c41ce4cae
diff --git a/dev-lang/mercury/files/50mercury-gentoo.el b/dev-lang/mercury/files/50mercury-gentoo.el
new file mode 100644
index 00000000000..2ab3ddbc59f
--- /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-11.01.ebuild b/dev-lang/mercury/mercury-11.01.ebuild
new file mode 100644
index 00000000000..bb7c875926c
--- /dev/null
+++ b/dev-lang/mercury/mercury-11.01.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="1"
+MY_P=${PN}-compiler-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
+ test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="debug emacs erlang examples java minimal readline test 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}
+TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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"
+
+ if use test; then
+ epatch "${WORKDIR}"/${PV}-tests
+ fi
+
+ cd "${S}"
+ eautoconf
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-gcc-back-end \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(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() {
+ # Generate Mercury .m dependencies. This step will vacuously
+ # succeed if we do not have a bootstrappable instance of mmc
+ # already installed. This step is required as mmc does not wait
+ # for all dependencies to be generated before compiling .m files.
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ bootstrap_depend || die "emake depend failed"
+
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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} \
+ 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} \
+ 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 browser/mer_browser.init "${TWS}"/browser/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${TESTDIR}"
+ sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws \
+ || 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:"${TWS}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MERCURY_CONFIG_DIR="${TWS}" \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
+ -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library \
+ -I${TWS}/mdbcomp \
+ -I${TWS}/browser \
+ -I${TWS}/trace" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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 "make 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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-11.07.1.ebuild b/dev-lang/mercury/mercury-11.07.1.ebuild
new file mode 100644
index 00000000000..fbc3732e291
--- /dev/null
+++ b/dev-lang/mercury/mercury-11.07.1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="4"
+MY_P=${PN}-compiler-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
+ test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline test 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}
+TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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"
+
+ if use test; then
+ epatch "${WORKDIR}"/${PV}-tests
+ fi
+
+ cd "${S}"
+ eautoconf
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-gcc-back-end \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(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() {
+ # Generate Mercury .m dependencies. This step will vacuously
+ # succeed if we do not have a bootstrappable instance of mmc
+ # already installed. This step is required as mmc does not wait
+ # for all dependencies to be generated before compiling .m files.
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ bootstrap_depend || die "emake depend failed"
+
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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} \
+ 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} \
+ 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 browser/mer_browser.init "${TWS}"/browser/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${TESTDIR}"
+ sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws \
+ || 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:"${TWS}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MERCURY_CONFIG_DIR="${TWS}" \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
+ -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library \
+ -I${TWS}/mdbcomp \
+ -I${TWS}/browser \
+ -I${TWS}/trace" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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 "make 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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-11.07.2.ebuild b/dev-lang/mercury/mercury-11.07.2.ebuild
new file mode 100644
index 00000000000..9d8b6487a7e
--- /dev/null
+++ b/dev-lang/mercury/mercury-11.07.2.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-compiler-${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
+ test? ( mirror://gentoo/mercury-tests-${PV}.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline test 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}
+TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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"
+
+ if use test; then
+ epatch "${WORKDIR}"/${PV}-tests
+ fi
+
+ cd "${S}"
+ eautoconf
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-gcc-back-end \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(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() {
+ # Generate Mercury .m dependencies. This step will vacuously
+ # succeed if we do not have a bootstrappable instance of mmc
+ # already installed. This step is required as mmc does not wait
+ # for all dependencies to be generated before compiling .m files.
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ bootstrap_depend || die "emake depend failed"
+
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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} \
+ 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} \
+ 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 browser/mer_browser.init "${TWS}"/browser/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${TESTDIR}"
+ sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws \
+ || 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:"${TWS}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MERCURY_CONFIG_DIR="${TWS}" \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
+ -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library \
+ -I${TWS}/mdbcomp \
+ -I${TWS}/browser \
+ -I${TWS}/trace" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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 "make 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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-11.07.ebuild b/dev-lang/mercury/mercury-11.07.ebuild
new file mode 100644
index 00000000000..2792e67fc65
--- /dev/null
+++ b/dev-lang/mercury/mercury-11.07.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-compiler-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
+SRC_URI="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
+ test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline test 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}
+TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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"
+
+ if use test; then
+ epatch "${WORKDIR}"/${PV}-tests
+ fi
+
+ cd "${S}"
+ eautoconf
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-gcc-back-end \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(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() {
+ # Generate Mercury .m dependencies. This step will vacuously
+ # succeed if we do not have a bootstrappable instance of mmc
+ # already installed. This step is required as mmc does not wait
+ # for all dependencies to be generated before compiling .m files.
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ bootstrap_depend || die "emake depend failed"
+
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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} \
+ 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} \
+ 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 browser/mer_browser.init "${TWS}"/browser/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${TESTDIR}"
+ sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws \
+ || 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:"${TWS}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MERCURY_CONFIG_DIR="${TWS}" \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
+ -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library \
+ -I${TWS}/mdbcomp \
+ -I${TWS}/browser \
+ -I${TWS}/trace" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ 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 "make 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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-13.05.1.ebuild b/dev-lang/mercury/mercury-13.05.1.ebuild
new file mode 100644
index 00000000000..c0fcf9dd7b2
--- /dev/null
+++ b/dev-lang/mercury/mercury-13.05.1.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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}"
+ eautoconf
+}
+
+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
+ 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_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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
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 00000000000..c82ce14cb01
--- /dev/null
+++ b/dev-lang/mercury/mercury-13.05.2.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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}"
+ eautoconf
+}
+
+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
+ 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_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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-13.05.ebuild b/dev-lang/mercury/mercury-13.05.ebuild
new file mode 100644
index 00000000000..3092ceb6208
--- /dev/null
+++ b/dev-lang/mercury/mercury-13.05.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}"
+ 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}"
+ eautoconf
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(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} \
+ 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} \
+ 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} \
+ 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
+ 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} \
+ 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 "make 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
+
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
+ -name CVS -o -name .cvsignore)
+ 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 00000000000..1af61abf452
--- /dev/null
+++ b/dev-lang/mercury/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>
+ <email>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+</maintainer>
+<use>
+ <flag name='erlang'>Support Mercury Erlang grade</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/metadata.xml b/dev-lang/metadata.xml
new file mode 100644
index 00000000000..e19c9e95cee
--- /dev/null
+++ b/dev-lang/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-lang category contains various programming language
+ implementations and related tools.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-lang enthält verschiedene Programmiersprachen
+ und die damit verbundenen Werkzeuge.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-lang contiene varias implementaciones de lenguajes de
+ programación y sus respectivas herramientas.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-langカテゴリーには様々なプログラミング言語の実行環境とそれに関連した
+ ツールが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-lang categorie bevat implementaties van verschillende programmeertalen
+ en gerelateerde hulpmiddelen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-lang chứa các phiên bản cài đặt các ngôn ngữ
+ lập trình khác nhau và các công cụ liên quan.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-lang contiene varie implementazioni di linguaggi di programmazione e utilità correlate.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-lang contém várias implementações de linguagens
+ de programação e ferramentas relacionadas.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-lang zawiera różne implementacje języków programowania i
+ związane z nimi narzędzia.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest
new file mode 100644
index 00000000000..f3bcafd46ea
--- /dev/null
+++ b/dev-lang/mlton/Manifest
@@ -0,0 +1,3 @@
+DIST mlton-20130715-1.amd64-linux.tgz 19512324 SHA256 f6f912009b0946b73af88ff5f3e713b6be63b871696e2697ccf1564b56e7d03b SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf WHIRLPOOL 50d265fbfabba1c9ed840a3393bf80f3b86a094a2a4ca5be323fc369bffcc3f5763a7ea3574b0f64be551396d9dea7365d1263629d8b14ef5fefad203544bfbe
+DIST mlton-20130715-1.x86-linux.tgz 18065793 SHA256 92d89627cf760c56d0e9727f328b006341bf5be283fc7d616a6276c26d95b2cf SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859 WHIRLPOOL a010aca6ae07c1e824b1fbfabc9c00eca270422783715ed644b864916f604f77115d87130ab5c77f6163d1f24793aee4ca33cf425bde2b680563c03756ba44ec
+DIST mlton-20130715.src.tgz 25606142 SHA256 215857ad11d44f8d94c27f75e74017aa44b2c9703304bcec9e38c20433143d6c SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1 WHIRLPOOL 0c899b0cb17251ca345b73764a86e160ea5bdde5d35f5eb36b1f72202c87dcc251cfb19563744ad7cfe2e10eb76963df79dca023801f858441d5c745046df5be
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 00000000000..f4d4bdf540b
--- /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 00000000000..a059b1598be
--- /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 00000000000..3286d44e352
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
@@ -0,0 +1,11 @@
+--- mlton-20130715-orig/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/Makefile 2013-12-27 13:29:35.259563131 +1100
+@@ -58,7 +58,7 @@
+
+ .PHONY: all-no-docs
+ all-no-docs:
+- $(MAKE) dirs runtime compiler basis-no-check script mlbpathmap constants libraries tools
++ $(MAKE) basis-no-check script mlbpathmap constants libraries tools
+ # Remove $(AOUT) so that the $(MAKE) compiler below will remake MLton.
+ # We also want to re-run the just-built tools (mllex and mlyacc)
+ # because they may be better than those that were used for the first
diff --git a/dev-lang/mlton/metadata.xml b/dev-lang/mlton/metadata.xml
new file mode 100644
index 00000000000..60c86a1e2b3
--- /dev/null
+++ b/dev-lang/mlton/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ml</herd>
+ <use>
+ <flag name="binary">install a binary version (need to do this once to bootstrap, until smlnj is supported)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mlton</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/mlton/mlton-20130715.ebuild b/dev-lang/mlton/mlton-20130715.ebuild
new file mode 100644
index 00000000000..3518cff6b50
--- /dev/null
+++ b/dev-lang/mlton/mlton-20130715.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit check-reqs eutils pax-utils
+
+DESCRIPTION="Standard ML optimizing compiler and libraries"
+BASE_URI="mirror://sourceforge/${PN}"
+SRC_URI="!binary? ( ${BASE_URI}/${P}.src.tgz )
+ binary? ( amd64? ( ${BASE_URI}/${P}-1.amd64-linux.tgz )
+ x86? ( ${BASE_URI}/${P}-1.x86-linux.tgz ) )"
+
+HOMEPAGE="http://www.mlton.org"
+
+LICENSE="HPND MIT"
+SLOT="0/${PV}"
+# there is support for ppc64 and ia64, but no
+# binaries are provided and there is no native
+# code generation for these platforms
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="binary doc"
+
+DEPEND="dev-libs/gmp
+ doc? ( virtual/latex-base )"
+RDEPEND="dev-libs/gmp"
+
+QA_PRESTRIPPED="binary? (
+ usr/bin/mlnlffigen
+ usr/bin/mllex
+ usr/bin/mlprof
+ usr/bin/mlyacc
+ usr/lib/mlton/mlton-compile
+)"
+
+# The resident set size of mlton-compile is 10GB on amd64
+CHECKREQS_MEMORY="4G"
+
+pkg_pretend() {
+ if use !binary; then
+ check-reqs_pkg_pretend
+ fi
+}
+
+src_unpack() {
+ if use !binary; then
+ unpack ${A}
+ else
+ mkdir -p "${S}" || die "Could not create ${S} directory"
+ pushd "${S}" || die "Could not cd to ${S}"
+ unpack ${A}
+ popd
+ fi
+}
+
+src_prepare() {
+ if use !binary; then
+ # The patch removing executable permissions from mmap'd memory regions is not upstreamed:
+ # http://pkgs.fedoraproject.org/cgit/mlton.git/tree/mlton-20070826-no-execmem.patch
+ epatch "${FILESDIR}/${PN}-20070826-no-execmem.patch"
+ # PIE in hardened requires executables to be linked with -fPIC. mlton by default tries
+ # to link executables against the non PIC objects in libmlton.a. We may be bootstrapping
+ # with an old mlton install, if we tried to patch it (to link with libmlton-pic.a) we would
+ # need a patched binary.
+ # http://mlton.org/MLtonWorld says Executables that save and load worlds are incompatible
+ # with address space layout randomization (ASLR) of the executable.
+ epatch "${FILESDIR}/${PN}-20130715-no-PIE.patch"
+ # Remove dirs runtime compiler from all-no-docs to avoid repeating these steps.
+ # As we need to pax-mark the mlton-compiler executable.
+ epatch "${FILESDIR}/${PN}-20130715-split-make-for-pax-mark.patch"
+ fi
+}
+
+src_compile() {
+ if use !binary; then
+ has_version dev-lang/mlton || die "emerge with binary use flag first"
+
+ # Fix location in which to install man pages
+ sed -i 's@^MAN_PREFIX_EXTRA :=.*@MAN_PREFIX_EXTRA := /share@' \
+ Makefile || die 'sed Makefile failed'
+
+ emake -j1 dirs runtime compiler CFLAGS="${CFLAGS}" || die
+ pax-mark m "${S}/mlton/mlton-compile"
+ pax-mark m "${S}/build/lib/mlton-compile"
+
+ # Does not support parallel make
+ emake -j1 all-no-docs CFLAGS="${CFLAGS}" || die
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "failed to create documentation"
+ fi
+ fi
+}
+
+src_install() {
+ if use binary; then
+ # Fix location in which to install man pages
+ mv "${S}/usr/man" "${S}/usr/share" || die "mv man failed"
+ pax-mark m "${S}/usr/lib/mlton/mlton-compile"
+ pax-mark m "${S}/usr/bin/mllex"
+ pax-mark m "${S}/usr/bin/mlyacc"
+ mv "${S}/usr" "${D}" || die "mv failed"
+ else
+ emake DESTDIR="${D}" install-no-docs || die
+ if use doc; then emake DESTDIR="${D}" TDOC="${D}"/usr/share/doc/${P} install-docs || die; fi
+ fi
+}
+
+pkg_postinst() {
+ # There are PIC objects in libmlton-pic.a. -link-opt -lmlton-pic does not help as mlton
+ # specifies -lmlton before -lmlton-pic. It appears that it would be necessary to patch mlton
+ # to convince mlton to use the lib*-pic.a libraries when linking an executable.
+ ewarn 'PIE in Gentoo hardened requires executables to be linked with -fPIC. mlton by default links'
+ ewarn 'executables against the non PIC objects in libmlton.a. http://mlton.org/MLtonWorld notes:'
+ ewarn 'Executables that save and load worlds are incompatible with address space layout'
+ ewarn 'randomization (ASLR) of the executable.'
+ ewarn 'To suppress the generation of position-independent executables.'
+ ewarn '-link-opt -fno-PIE'
+}
diff --git a/dev-lang/mmix/Manifest b/dev-lang/mmix/Manifest
new file mode 100644
index 00000000000..54e8656685f
--- /dev/null
+++ b/dev-lang/mmix/Manifest
@@ -0,0 +1 @@
+DIST mmix-20131017.tgz 308016 SHA256 aa64c4b9dc3cf51f07b330791f8ce542b0ae8a1132e098fa95a19b31350050b4 SHA512 e816b1ee9205b9f4a2e25ff183c48736ea66e63721a49f0b574850c5872ae85a6e847d802a01b5aa120ac969638d5d05e9b3135512d9362a4d672564f1228922 WHIRLPOOL e93f29e0a640e219ee2ded0034cbf300e9f6deed2bf9ed04081406cdfaaa952e0b3566525b86e35dfb480288e0ceef1744fefdc533ad0126952603cd698bbb6a
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 00000000000..dab062b050f
--- /dev/null
+++ b/dev-lang/mmix/files/mmix-20110420-makefile.patch
@@ -0,0 +1,71 @@
+--- Makefile
++++ 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/metadata.xml b/dev-lang/mmix/metadata.xml
new file mode 100644
index 00000000000..2702f26660b
--- /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>
+ <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 00000000000..06ed8186c1c
--- /dev/null
+++ b/dev-lang/mmix/mmix-20131017.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Donald Knuth's MMIX Assembler and Simulator"
+HOMEPAGE="http://www-cs-faculty.stanford.edu/~knuth/mmix.html"
+SRC_URI="http://mmix.cs.hm.edu/src/${P}.tgz"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/tex-base
+ doc? ( dev-texlive/texlive-genericrecommended )"
+RDEPEND=""
+
+SLOT="0"
+LICENSE="${PN}"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20110420-makefile.patch
+}
+
+src_compile() {
+ emake all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+
+ if use doc ; then
+ emake doc
+ fi
+}
+
+src_install () {
+ dobin ${PN} ${PN}al m${PN} mmotype abstime
+ dodoc README ${PN}.1
+
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins *.ps
+ fi
+}
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
new file mode 100644
index 00000000000..141514ef532
--- /dev/null
+++ b/dev-lang/moarvm/Manifest
@@ -0,0 +1,7 @@
+DIST MoarVM-2015.01.tar.gz 2519960 SHA256 d02d09721bad73b8f2aa460bb731b6c59fb7bd9bf69beb5b80774a3d98065b93 SHA512 d5563272324f04b29fb8cb39d805c080cc7c0c560f9ac85e4150dd864d395b54247cedf750e378209d5a8836d35b2b32ae9083642706aca593c5926072755270 WHIRLPOOL 15f40bb32dab69d50218aab06870044578b6dd1f33b95cc1bbd437e1afd2f2206fc1529de899e5767730d477c9cb170a3a8af88adbd405067f057af80dacb969
+DIST MoarVM-2015.02.tar.gz 3069571 SHA256 4093ff80e6b40f215dd238282a464de59bbd5c2ef42cb9099e9ef68f07fe8d1b SHA512 af93287637d358ee0512a7c5259485dbc6f82fcd7c7e5eb6a8811c6ae6adfd9b3d064f43765f0ba73cd5647f19561f6abd837a273e41ae356e76e56c3bd8e892 WHIRLPOOL 642640572bc0e93afbce6164559ccbb75b6bf84cf086111c4d31b437ef0fc4f49d33dcc23f8a1d5a7ca010ac11dba140a9ba6f37dedf35ea2a1375115a59f189
+DIST MoarVM-2015.03.tar.gz 3071511 SHA256 fc4bfae9a004c9f266c53881ae375955daeb84936b9055ae486194e06caec4a0 SHA512 0b47bb47375fe8e4fe2e5d7d71c5e547723a0fc1845c93dedbdd294b4b3e82aa04fe6e2df1c730a2ee61695da876df54ec8d18c91030f0a4a9b0c99c6c9267f8 WHIRLPOOL 72b3796506413ccde83e3b705ceb8dc7c253e60a9b7bd5cab023644dde6fbeaa99a320781221f01fbaf24cbb35c50bc628e3ff574d5a006a09c006cd0262acb2
+DIST MoarVM-2015.04.tar.gz 3148539 SHA256 9dc9efc2e7d16e9d2adf5d17dc377ad22e66c4aa509225cdfec3bf37a817c89f SHA512 db653c9a2d28367f32c8bb8a8c8ed7a38aa9f4e4212b297dc73494fd90fe5982dff0f6251154e30264a53955f2b64a974ba6c76e4d3cac409d1603513f7c25da WHIRLPOOL d71991e827aecf524e576a962d06decc3fe9c50bc744996b01844253e5dea5356247b3378da63ab5832ecd98e29b67a9caeb848fca533cc04d60ff59a5f4d5f8
+DIST MoarVM-2015.05.tar.gz 3150053 SHA256 828843eb3da020ee24ff83933b63aebf4aa774b815a3dfa3a758d6334779565e SHA512 6db5eba4a6b6b6efc5b7a6b3e251428ebdfea9279fc15854238a943377a64f4db26f0e1c3cccf473d07f308f38e97b65983ddc0e1f884d9b6b6fc61034085474 WHIRLPOOL bf7770a67556e0830e6cf71e3e40d53cb41ef3c6970edbd88a2d8d843d98f30e578e7a83a950cffb31a17863efa1d99594737a1a1da8dfdc19dd60092d56b179
+DIST MoarVM-2015.06.tar.gz 3155073 SHA256 8dfe52630a3fcc749b653591f8a4e7fa723cd204cf0f6133b62b70d1b9c5980f SHA512 427e036fcee06b65642c9e07ea687c28593a432e2b6f1ee0bc503f6ce32f93f77219bb9e80aec1d1300dc0ba4b92cc467a04896a0ead4b2ef89656d6844913ad WHIRLPOOL cf6af05afd5eb872954d9e9fcb86d06061e9b7ab80799afdeb10f6e255d15766d6def2054c3e3e79be83fc61d036bc39b14cf57e9f32a7a6c47046a6b90d03e6
+DIST MoarVM-2015.07.tar.gz 3225835 SHA256 310a4ea6dbaacaf1837606edf6c42170143f60c8e29eb94c7e6fea810b6af10b SHA512 304d6ce5c50a5091daa02dab0fe328875d392fee29aed397db530324c51b909529ede9f703f18f43bbc398c70ec85958ffed3a8bc06d77e29ec193561165b581 WHIRLPOOL 6036fb9cba88a12edc3c5332d706cd11e6604d418217f880f9b409e16b22fd4610bc6c8e606888d69ccee9dbd7836d9ebcc3006a8bf6cce766334192ff3e7f52
diff --git a/dev-lang/moarvm/files/Configure-9999.patch b/dev-lang/moarvm/files/Configure-9999.patch
new file mode 100644
index 00000000000..85bbb5d81da
--- /dev/null
+++ b/dev-lang/moarvm/files/Configure-9999.patch
@@ -0,0 +1,15 @@
+--- Configure.pl 2014-01-09 16:48:13.989620752 +0800
++++ Configure.pl.new 2014-01-09 16:49:41.217885279 +0800
+@@ -94,11 +94,7 @@
+ $VERSION = <$fh>;
+ close($fh);
+ }
+-# .git is a file and not a directory in submodule
+-if (-e '.git' && open(my $GIT, '-|', "git describe --tags")) {
+- $VERSION = <$GIT>;
+- close($GIT);
+-}
++
+ chomp $VERSION;
+ $config{version} = $VERSION;
+ $config{versionmajor} = $VERSION =~ /^(\d+)/ ? $1 : 0;
diff --git a/dev-lang/moarvm/files/Configure.patch b/dev-lang/moarvm/files/Configure.patch
new file mode 100644
index 00000000000..42c6fb97feb
--- /dev/null
+++ b/dev-lang/moarvm/files/Configure.patch
@@ -0,0 +1,14 @@
+--- Configure.pl 2013-12-06 10:13:34.000000000 +0800
++++ Configure.pl.new 2013-12-06 10:22:28.360040309 +0800
+@@ -38,11 +38,6 @@
+
+ print "Welcome to MoarVM!\n\n";
+
+-print dots("Updating submodules");
+-my $msg = qx{git submodule --quiet update --init 2>&1};
+-if ($? >> 8 == 0) { print "OK\n" }
+-else { softfail("git error: $msg") }
+-
+ # fiddle with flags
+ $args{debug} //= 0 + !$args{optimize};
+ $args{optimize} //= 0 + !$args{debug};
diff --git a/dev-lang/moarvm/metadata.xml b/dev-lang/moarvm/metadata.xml
new file mode 100644
index 00000000000..001b40148f5
--- /dev/null
+++ b/dev-lang/moarvm/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">MoarVM/MoarVM</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/moarvm/moarvm-2015.01.ebuild b/dev-lang/moarvm/moarvm-2015.01.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.01.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.02.ebuild b/dev-lang/moarvm/moarvm-2015.02.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.02.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.03.ebuild b/dev-lang/moarvm/moarvm-2015.03.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.03.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.04.ebuild b/dev-lang/moarvm/moarvm-2015.04.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.04.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.05.ebuild b/dev-lang/moarvm/moarvm-2015.05.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.05.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.06.ebuild b/dev-lang/moarvm/moarvm-2015.06.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.06.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-2015.07.ebuild b/dev-lang/moarvm/moarvm-2015.07.ebuild
new file mode 100644
index 00000000000..af545660fe2
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2015.07.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libuv"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}/MoarVM-${PV}"
+
+src_configure() {
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ emake install
+}
diff --git a/dev-lang/moarvm/moarvm-9999.ebuild b/dev-lang/moarvm/moarvm-9999.ebuild
new file mode 100644
index 00000000000..0b704eb7b3c
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils git-r3
+
+MY_PN="MoarVM"
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="https://github.com/MoarVM/MoarVM"
+EGIT_REPO_URI="https://github.com/MoarVM/MoarVM.git"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}/Configure-9999.patch" || die
+}
+
+src_configure() {
+ # this is quite badong, but wtf build system
+ echo "2013.10-145-gec52026" >> VERSION
+ perl Configure.pl --prefix="${D}/usr"|| die
+}
+
+src_install() {
+ make install
+}
diff --git a/dev-lang/mono-basic/Manifest b/dev-lang/mono-basic/Manifest
new file mode 100644
index 00000000000..46b4a125bab
--- /dev/null
+++ b/dev-lang/mono-basic/Manifest
@@ -0,0 +1 @@
+DIST mono-basic-2.10.tar.bz2 1902672 SHA256 1cd87b634d4d862527c548bb827542d11a607569005df0123678e381ad12b186 SHA512 93d661053a14b1ef91c8e416aa7caf545b902d7ca58566516a463ce8115f96325b0afb1a7b52af37dd0eae022009cdabf742f42396da79464def127d86b06b6f WHIRLPOOL 26faae7f03a2c84221d529e1d63e8528a3e3b00ceca56e29b356c95e8255f92fbafae7d5815a91e82a93bf8b0c46ece01a308ef5cd75323a1d988b37173741c9
diff --git a/dev-lang/mono-basic/metadata.xml b/dev-lang/mono-basic/metadata.xml
new file mode 100644
index 00000000000..9b12b95d906
--- /dev/null
+++ b/dev-lang/mono-basic/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dotnet</herd>
+ <longdescription lang="en">
+ Visual Basic .NET compiler and runtime
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/mono-basic/mono-basic-2.10.ebuild b/dev-lang/mono-basic/mono-basic-2.10.ebuild
new file mode 100644
index 00000000000..05102ced718
--- /dev/null
+++ b/dev-lang/mono-basic/mono-basic-2.10.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit go-mono mono multilib
+
+DESCRIPTION="Visual Basic .NET Runtime and Class Libraries"
+HOMEPAGE="http://www.mono-project.com/VisualBasic.NET_support"
+
+LICENSE="LGPL-2 MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RESTRICT="test"
diff --git a/dev-lang/mono/Manifest b/dev-lang/mono/Manifest
new file mode 100644
index 00000000000..89fd30f3002
--- /dev/null
+++ b/dev-lang/mono/Manifest
@@ -0,0 +1,5 @@
+DIST mono-2.10.9.tar.bz2 34038017 SHA256 541038cd4edd4a1c485638d49697d45015ef7483bcb21bb6165e4d7eb770c9a5 SHA512 426881873e7f9aaf01e1306bed7b3ac220082ca40dce91fa4f4f331944e8d91453b3cdcc4918882ab039ed694ae8819eeb787edf6a2ad42cc661614076725c01 WHIRLPOOL 93f54fbbf032fb60467fd4317630588d349c3dfb50158bad478bd3e2650fd3e8f12d45be372873b57626d4ac48f798646c3650590bbf731dc2f005ee618b8548
+DIST mono-3.0.7.tar.bz2 81538605 SHA256 89357e58a1b5cb6ff3116d4ce8227dee61b1c0cb494fa2844da5b1fc55fb890b SHA512 b1cb57a38c22d9186fcc1cfbd344e05e24edc5d56391238311ac6b2841a4f971a32f46c3e064760045e8352140a7c4fe785a6108d945371af9de3730e186fbdd WHIRLPOOL 19f451194361d0f0fa3c403310c63cd2f444a2132693fc4b127311a57d0a1df18f917d4c373b8f8f9fbf217d5c6d85f3092ac75d6aede285ed80d3bb2b07f758
+DIST mono-3.12.1.tar.bz2 73487974 SHA256 5d8cf153af2948c06bc9fbf5088f6834868e4db8e5f41c7cff76da173732b60d SHA512 7ff87d95c347186347dc7a9ffb767112717de2b808f8f1b612c56c9eb70fdcc0c8f586989be44444509a2768e71854d8195567196c992cc2c5b184ecbe5ac190 WHIRLPOOL fe3a6cdb8bf4602ad1d1e43099b2a552005c315a232a7d2bddf0081a68e882228712af5301f18d3a890f454041c4a34d6f0926aaba34401ecfa702eecd9415c8
+DIST mono-3.2.3.tar.bz2 81810387 SHA256 b8c2f97d6a5232dbf5a8180e5c38d4722b81af748893649d7d9e82c5cf8ef41a SHA512 a40a03d09ce07d7f8c25ef872835f6f29458e02aa386e4097b2cffd918d3bece1205bb42beb51a1384eba884e4c6f9b6505421babf337ec64f670c7f90c6262d WHIRLPOOL 9781dd387ce57a54ae84c91b6bfc346c4607daa3738746db0f41515dfc6c0b271b6e7d2ec828f75dc6953d15fd965cd3ef1d88fe5925c6dc8019cc9d188d6982
+DIST mono-3.2.8.tar.bz2 77515552 SHA256 fdb48cad26149288dcb99a3d9b4ec89735706000242c50bdc21ce657af201a40 SHA512 822e9064b7f5897f960e3fbe9de5db31ac1825ecb6edb2b5b49d92fc658fe3ac2580458ecb26b6da7b6135e86a39d7376b8c0eb52d8c3298292a4dae7983f329 WHIRLPOOL 21e22fe0204ae9263f10fa5379d7c884519bb5cddf6f780f5ba6615db25954b1ea8ef1746ee8db738f7d461e93626656525da5cc6221061e8a53bdd0d0c5f62c
diff --git a/dev-lang/mono/files/mono-2.10.1-ppc-len.patch b/dev-lang/mono/files/mono-2.10.1-ppc-len.patch
new file mode 100644
index 00000000000..6cfd0882d03
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.1-ppc-len.patch
@@ -0,0 +1,13 @@
+diff --git a/mono/mini/cpu-ppc.md b/mono/mini/cpu-ppc.md
+index a9f679f..f21320c 100644
+--- a/mono/mini/cpu-ppc.md
++++ b/mono/mini/cpu-ppc.md
+@@ -48,7 +48,7 @@
+ memory_barrier: len:4
+ nop: len:4
+ relaxed_nop: len:4
+-break: len:4
++break: len:32
+ seq_point: len:24
+ jmp: len:108
+ tailcall: len:120 clob:c
diff --git a/dev-lang/mono/files/mono-2.10.2-threads-access.patch b/dev-lang/mono/files/mono-2.10.2-threads-access.patch
new file mode 100644
index 00000000000..d677b0113e2
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.2-threads-access.patch
@@ -0,0 +1,40 @@
+From 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 Mon Sep 17 00:00:00 2001
+From: Sebastien Pouliot <sebastien@ximian.com>
+Date: Wed, 6 Apr 2011 13:24:31 -0400
+Subject: [PATCH] Fix access to freed members of a dead thread
+
+* threads.c: Fix access to freed members of a dead thread. Found
+and fixed by Rodrigo Kumpera <rkumpera@novell.com>
+Ref: CVE-2011-0992
+---
+ mono/metadata/threads.c | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
+index 3fe4e93..a7a721d 100644
+--- a/mono/metadata/threads.c
++++ b/mono/metadata/threads.c
+@@ -1036,12 +1036,17 @@ void ves_icall_System_Threading_InternalThread_Thread_free_internal (MonoInterna
+ CloseHandle (thread);
+
+ if (this->synch_cs) {
+- DeleteCriticalSection (this->synch_cs);
+- g_free (this->synch_cs);
++ CRITICAL_SECTION *synch_cs = this->synch_cs;
+ this->synch_cs = NULL;
++ DeleteCriticalSection (synch_cs);
++ g_free (synch_cs);
+ }
+
+- g_free (this->name);
++ if (this->name) {
++ void *name = this->name;
++ this->name = NULL;
++ g_free (name);
++ }
+ }
+
+ static void mono_thread_start (MonoThread *thread)
+--
+1.7.5.4
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch
new file mode 100644
index 00000000000..434adf283d9
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch
@@ -0,0 +1,13 @@
+diff --git a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
+index af5ddf4..7e87d48 100644
+--- a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
++++ b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
+@@ -42,7 +42,7 @@ public void ProcessRequest (HttpContext context)
+
+ throw new HttpException (403,
+ "This type of page is not served.",
+- req != null ? req.Path : null,
++ req != null ? HttpUtility.HtmlEncode (req.Path) : null,
+ description);
+ }
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch
new file mode 100644
index 00000000000..307e10fb3ee
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch
@@ -0,0 +1,196 @@
+From 04245de5c480db5dff5983467f7a8606f1321ed6 Mon Sep 17 00:00:00 2001
+From: Marek Habersack <grendel@twistedcode.net>
+Date: Tue, 24 Jul 2012 18:49:34 -0400
+Subject: [PATCH] Fix for Novell bug #739119
+
+---
+ .../System.Web.Util/SecureHashCodeProvider.cs | 131 ++++++++++++++++++++
+ mcs/class/System.Web/System.Web.dll.sources | 1 +
+ mcs/class/System.Web/System.Web/WebROCollection.cs | 5 +-
+ 3 files changed, 136 insertions(+), 1 deletion(-)
+ create mode 100644 mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+
+diff --git a/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs b/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+new file mode 100644
+index 0000000..165022c
+--- /dev/null
++++ b/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+@@ -0,0 +1,131 @@
++//
++// System.Collections.SecureHashCodeProvider.cs
++//
++// Authors:
++// Sergey Chaban (serge@wildwestsoftware.com)
++// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
++// Sebastien Pouliot <sebastien@ximian.com>
++//
++// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
++// Copyright 2012 Xamarin, Inc (http://xamarin.com)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++using System.Collections;
++using System.Globalization;
++
++namespace System.Web.Util
++{
++ class SecureHashCodeProvider : IHashCodeProvider
++ {
++ static readonly SecureHashCodeProvider singletonInvariant = new SecureHashCodeProvider (CultureInfo.InvariantCulture);
++ static SecureHashCodeProvider singleton;
++ static readonly object sync = new object ();
++ static readonly int seed;
++
++ TextInfo m_text; // must match MS name for serialization
++
++ public static SecureHashCodeProvider Default {
++ get {
++ lock (sync) {
++ if (singleton == null) {
++ singleton = new SecureHashCodeProvider ();
++ } else if (singleton.m_text == null) {
++ if (!AreEqual (CultureInfo.CurrentCulture, CultureInfo.InvariantCulture))
++ singleton = new SecureHashCodeProvider ();
++ } else if (!AreEqual (singleton.m_text, CultureInfo.CurrentCulture)) {
++ singleton = new SecureHashCodeProvider ();
++ }
++ return singleton;
++ }
++ }
++ }
++
++ public static SecureHashCodeProvider DefaultInvariant {
++ get { return singletonInvariant; }
++ }
++
++ static SecureHashCodeProvider ()
++ {
++ // It should be enough to fend off the attack described in
++ // https://bugzilla.novell.com/show_bug.cgi?id=739119
++ // In order to predict value of the seed, the attacker would have to know the exact time when
++ // the server process started and since it's a remote attack, this is next to impossible.
++ // Using milliseconds instead of ticks here would make it easier for the attackers since there
++ // would only be as many as 1000 possible values
++ seed = (int)DateTime.UtcNow.Ticks;
++ }
++
++ // Public instance constructor
++ public SecureHashCodeProvider ()
++ {
++ CultureInfo culture = CultureInfo.CurrentCulture;
++ if (!AreEqual (culture, CultureInfo.InvariantCulture))
++ m_text = CultureInfo.CurrentCulture.TextInfo;
++ }
++
++ public SecureHashCodeProvider (CultureInfo culture)
++ {
++ if (culture == null)
++ throw new ArgumentNullException ("culture");
++ if (!AreEqual (culture, CultureInfo.InvariantCulture))
++ m_text = culture.TextInfo;
++ }
++
++ static bool AreEqual (CultureInfo a, CultureInfo b)
++ {
++ return a.LCID == b.LCID;
++ }
++
++ static bool AreEqual (TextInfo info, CultureInfo culture)
++ {
++ return info.LCID == culture.LCID;
++ }
++
++ public int GetHashCode (object obj)
++ {
++ if (obj == null)
++ throw new ArgumentNullException ("obj");
++
++ string str = obj as string;
++
++ if (str == null)
++ return obj.GetHashCode ();
++
++ int h = seed;
++ char c;
++
++ if ((m_text != null) && !AreEqual (m_text, CultureInfo.InvariantCulture)) {
++ str = m_text.ToLower (str);
++ for (int i = 0; i < str.Length; i++) {
++ c = str [i];
++ h = h * 31 + c;
++ }
++ } else {
++ for (int i = 0; i < str.Length; i++) {
++ c = Char.ToLower (str [i], CultureInfo.InvariantCulture);
++ h = h * 31 + c;
++ }
++ }
++ return h;
++ }
++ }
++}
+diff --git a/mcs/class/System.Web/System.Web.dll.sources b/mcs/class/System.Web/System.Web.dll.sources
+index ca7745a..aa41fca 100644
+--- a/mcs/class/System.Web/System.Web.dll.sources
++++ b/mcs/class/System.Web/System.Web.dll.sources
+@@ -1174,6 +1174,7 @@ System.Web.Util/IWebPropertyAccessor.cs
+ System.Web.Util/MachineKeySectionUtils.cs
+ System.Web.Util/RuntimeHelpers.cs
+ System.Web.Util/SearchPattern.cs
++System.Web.Util/SecureHashCodeProvider.cs
+ System.Web.Util/SerializationHelper.cs
+ System.Web.Util/StrUtils.cs
+ System.Web.Util/TimeUtil.cs
+diff --git a/mcs/class/System.Web/System.Web/WebROCollection.cs b/mcs/class/System.Web/System.Web/WebROCollection.cs
+index ddb2e30..e1b98df 100644
+--- a/mcs/class/System.Web/System.Web/WebROCollection.cs
++++ b/mcs/class/System.Web/System.Web/WebROCollection.cs
+@@ -5,6 +5,7 @@
+ // Gonzalo Paniagua Javier (gonzalo@novell.com)
+ //
+ // (c) 2005-2009 Novell, Inc. (http://www.novell.com)
++// Copyright 2012 Xamarin, Inc (http://xamarin.com)
+ //
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+@@ -26,8 +27,10 @@
+ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ //
++using System.Collections;
+ using System.Collections.Specialized;
+ using System.Text;
++using System.Web.Util;
+
+ namespace System.Web
+ {
+@@ -36,7 +39,7 @@ class WebROCollection : NameValueCollection
+ bool got_id;
+ int id;
+
+- public WebROCollection () : base (StringComparer.OrdinalIgnoreCase) { }
++ public WebROCollection () : base (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant) { }
+ public bool GotID {
+ get { return got_id; }
+ }
+--
+1.7.10
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch
new file mode 100644
index 00000000000..6ab3e077b68
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch
@@ -0,0 +1,34 @@
+From 049bb49f1c5b650166de2a266bc1879c5def0190 Mon Sep 17 00:00:00 2001
+From: Marek Habersack <grendel@twistedcode.net>
+Date: Wed, 25 Jul 2012 08:42:09 -0400
+Subject: [PATCH] Update to fix for Novell bug #739119
+
+---
+ mcs/class/System.Web/System.Web.UI/Page.cs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
+index 989af7e..b2316a4 100644
+--- a/mcs/class/System.Web/System.Web.UI/Page.cs
++++ b/mcs/class/System.Web/System.Web.UI/Page.cs
+@@ -1175,7 +1175,7 @@ internal void OnFormPostRender (HtmlTextWriter writer, string formUniqueID)
+
+ void ProcessPostData (NameValueCollection data, bool second)
+ {
+- NameValueCollection requestValues = _requestValueCollection == null ? new NameValueCollection () : _requestValueCollection;
++ NameValueCollection requestValues = _requestValueCollection == null ? new NameValueCollection (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant) : _requestValueCollection;
+
+ if (data != null && data.Count > 0) {
+ var used = new Dictionary <string, string> (StringComparer.Ordinal);
+@@ -1210,7 +1210,7 @@ void ProcessPostData (NameValueCollection data, bool second)
+
+ } else if (!second) {
+ if (secondPostData == null)
+- secondPostData = new NameValueCollection ();
++ secondPostData = new NameValueCollection (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant);
+ secondPostData.Add (id, data [id]);
+ }
+ }
+--
+1.7.10
+
diff --git a/dev-lang/mono/files/mono-3.2.8-disable-missing-test.patch b/dev-lang/mono/files/mono-3.2.8-disable-missing-test.patch
new file mode 100644
index 00000000000..79c2674a659
--- /dev/null
+++ b/dev-lang/mono/files/mono-3.2.8-disable-missing-test.patch
@@ -0,0 +1,7 @@
+--- a/mcs/tests/Makefile
++++ b/mcs/tests/Makefile
+@@ -96,4 +96,3 @@
+ setup:
+ $(CSCOMPILE) -t:library dlls/test-679-2/test-679-lib-2.cs
+ $(CSCOMPILE) -t:library dlls/test-679-1/test-679-lib.cs -r:dlls/test-679-2/test-679-lib-2.dll
+- $(ILASM) -dll dlls/test-883.il
diff --git a/dev-lang/mono/metadata.xml b/dev-lang/mono/metadata.xml
new file mode 100644
index 00000000000..9529ca592b6
--- /dev/null
+++ b/dev-lang/mono/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>dotnet</herd>
+<use>
+ <flag name='pax_kernel'>Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
+ <flag name='xen'>Make mono generate code that is considerably faster on xen VMs but slightly slower on for normal systems.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/mono/mono-2.10.9-r2.ebuild b/dev-lang/mono/mono-2.10.9-r2.ebuild
new file mode 100644
index 00000000000..1990c36cb9d
--- /dev/null
+++ b/dev-lang/mono/mono-2.10.9-r2.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit linux-info mono eutils flag-o-matic multilib go-mono pax-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+
+IUSE="minimal pax_kernel xen"
+
+#Bash requirement is for += operator
+COMMONDEPEND="!dev-util/monodoc
+ !minimal? ( =dev-dotnet/libgdiplus-${GO_MONO_REL_PV}* )
+ ia64? ( sys-libs/libunwind )"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )"
+
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ >=app-shells/bash-3.2
+ pax_kernel? ( sys-apps/elfix )"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+RESTRICT="test"
+
+pkg_setup() {
+ if use kernel_linux
+ then
+ get_version
+ if linux_config_exists
+ then
+ if linux_chkconfig_present SYSVIPC
+ then
+ einfo "CONFIG_SYSVIPC is set, looking good."
+ else
+ eerror "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ eerror "See http://bugs.gentoo.org/261869 for more info."
+ eerror "Please set CONFIG_SYSVIPC in your kernel .config if build fails."
+ fi
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See http://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+ PATCHES=( "${FILESDIR}/${PN}-2.10.2-threads-access.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3382.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3543.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3543_2.patch" )
+}
+
+src_prepare() {
+ go-mono_src_prepare
+
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it doesn't
+ # get killed in the build process when MPROTECT is enabled. #286280
+ # RANDMMAP kills the build process to #347365
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+ sed '/exec "/ i\paxctl-ng -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+}
+
+src_configure() {
+ # mono's build system is finiky, strip the flags
+ strip-flags
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+
+ local myconf=""
+ use ppc && myconf="${myconf} --with-sgen=no"
+ go-mono_src_configure \
+ --enable-static \
+ --disable-quiet-build \
+ --without-moonlight \
+ --with-libgdiplus=$(use minimal && printf "no" || printf "installed" ) \
+ $(use_with xen xen_opt) \
+ --without-ikvm-native \
+ --with-jit \
+ --disable-dtrace \
+ --with-profile4 \
+ ${myconf}
+}
+
+src_test() {
+ echo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+
+ export MONO_REGISTRY_PATH="${T}/registry"
+ export XDG_DATA_HOME="${T}/data"
+ export MONO_SHARED_DIR="${T}/shared"
+ export XDG_CONFIG_HOME="${T}/config"
+ export HOME="${T}/home"
+
+ emake -j1 check
+}
+
+src_install() {
+ go-mono_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mscorlib.dll.so
+ rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mcs.exe.so
+}
+
+#THINK!!!! Before touching postrm and postinst
+#Reference phase order:
+#pkg_preinst
+#pkg_prerm
+#pkg_postrm
+#pkg_postinst
+
+pkg_preinst() {
+ local symlink
+ local NUNIT_DIR="/usr/$(get_libdir)/mono/nunit"
+ local pv_atom
+ if [[ "$(readlink "${ROOT}"/${NUNIT_DIR})" == *"mono-nunit"* ]]
+ then
+ for pv_atom in 2.2{,-r1,-r2,-r3,-r4} '2.4_pre*' '2.4_rc*' 2.4
+ do
+ if has_version "=dev-lang/mono-${pv_atom}"
+ then
+ einfo "If you just received a file collision warning message,"
+ einfo "be advised that this is a known problem, which will now be fixed:"
+ ebegin "Found broken symlinks created by $(best_version dev-lang/mono), fixing"
+ for symlink in \
+ "${ROOT}/${NUNIT_DIR}" \
+ "${ROOT}/usr/$(get_libdir)/pkgconfig/nunit.pc" \
+ "${ROOT}/usr/bin/nunit-console" \
+ "${ROOT}/usr/bin/nunit-console2"
+ do
+ if [[ -L "${symlink}" ]]
+ then
+ rm -f "${symlink}" &> /dev/null
+ fi
+ done
+ eend 0
+ break
+ fi
+ done
+ fi
+}
+
+#pkg_postinst() {
+# elog "PLEASE TAKE NOTE!"
+# elog ""
+# elog "Some of the namespaces supported by Mono require extra packages to be installed."
+# elog "Below is a list of namespaces and the corresponding package you must install:"
+# elog ""
+# elog ">=x11-libs/cairo-1.6.4"
+# elog " Mono.Cairo"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Mono.Cairo"
+# elog ""
+# elog ">=dev-db/firebird-2.0.4.13130.1"
+# elog " FirebirdSql.Data.Firebird"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Firebird_Interbase"
+# elog ""
+# elog "dev-db/sqlite:3"
+# elog " Mono.Data.Sqlite"
+# elog "Also read:"
+# elog "http://www.mono-project.com/SQLite"
+# elog ""
+# elog ">=dev-db/oracle-instantclient-basic-10.2"
+# elog " System.Data.OracleClient"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Oracle"
+# elog ""
+# elog "Mono also has support for packages that are not included in portage:"
+# elog ""
+# elog "No ebuild available:"
+# elog " IBM.Data.DB2"
+# elog "Also read: http://www.mono-project.com/IBM_DB2"
+# elog ""
+# elog "No ebuild needed:"
+# elog " Mono.Data.SybaseClient"
+# elog "Also read: http://www.mono-project.com/Sybase"
+#}
+
+# NOTICE: THE COPYRIGHT FILES IN THE TARBALL ARE UNCLEAR!
+# WHENEVER YOU THINK SOMETHING IS GPL-2+, IT'S ONLY GPL-2
+# UNLESS MIGUEL DE ICAZA HIMSELF SAYS OTHERWISE.
+
+# mono
+# The code we use is LGPL, but contributions must be made under the MIT/X11
+# license, so Novell can serve its paying customers. Exception is mono/man.
+# LICENSE="LGPL-2.1"
+
+ # mono/man
+ # LICENSE="MIT"
+
+# mcs/mcs
+# mcs/gmcs
+# LICENSE="GPL-2 MIT"
+
+# tests
+# LICENSE="MIT"
+
+# mcs/class
+# Except the listed exceptions:
+# LICENSE="MIT"
+
+ # mcs/class/ByteFX.Data
+ # mcs/class/Npgsql
+ # LICENSE="LGPL-2.1"
+
+ # mcs/class/FirebirdSql.Data.Firebird
+ # LICENSE="IDPL"
+
+ # mcs/class/ICSharpCode.SharpZipLib
+ # LICENSE="GPL-2-with-linking-exception"
+
+ # mcs/class/MicrosoftAjaxLibrary
+ # LICENSE="Ms-Pl"
+
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/TokenStream.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Token.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Parser.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Decompiler.cs
+ # LICENSE="|| ( NPL-1.1 GPL-2 )"
+
+# mcs/jay
+# LICENSE="BSD-4"
+
+# mcs/tools
+# Except the listed exceptions:
+# LICENSE="MIT"
+
+ # mcs/tools/mdoc/Mono.Documentation/monodocs2html.cs
+ # LICENSE="GPL-2"
+
+ # mcs/tools/sqlsharp/SqlSharpCli.cs
+ # LICENSE="GPL-2"
+
+ # mcs/tools/csharp/repl.cs
+ # LICENSE="|| ( MIT GPL-2 )"
+
+ # mcs/tools/mono-win32-setup.nsi
+ # LICENSE="GPL-2"
+
+# samples
+# LICENSE="MIT"
diff --git a/dev-lang/mono/mono-3.0.7.ebuild b/dev-lang/mono/mono-3.0.7.ebuild
new file mode 100644
index 00000000000..9735a81edff
--- /dev/null
+++ b/dev-lang/mono/mono-3.0.7.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="all"
+
+inherit linux-info mono-env flag-o-matic pax-utils autotools-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+IUSE="minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !dev-util/monodoc
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/paxctl )
+"
+
+pkg_pretend() {
+ # 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 -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTEC is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+ sed '/exec/ i\paxctl -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+ local myeconfargs=(
+ --enable-system-aot=yes
+ --enable-static
+ --disable-quiet-build
+ --without-moonlight
+ --with-libgdiplus=$(use minimal && printf "no" || printf "installed" )
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --with-jit
+ --disable-dtrace
+ --with-profile4
+ --with-sgen=$(use ppc && printf "no" || printf "yes" )
+ $(use_with doc mcs-docs)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_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
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so
+}
diff --git a/dev-lang/mono/mono-3.12.1.ebuild b/dev-lang/mono/mono-3.12.1.ebuild
new file mode 100644
index 00000000000..03928d106f7
--- /dev/null
+++ b/dev-lang/mono/mono-3.12.1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="all"
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils autotools-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc debug"
+
+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 )
+"
+
+pkg_pretend() {
+ # 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 MPROTEC is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ 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\paxctl-ng -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
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+ local myeconfargs=(
+ --enable-system-aot=yes
+ --enable-static
+ --disable-quiet-build
+ --without-moonlight
+ --with-libgdiplus=$(usex minimal no installed)
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --with-jit
+ --disable-dtrace
+ --with-profile4
+ --with-sgen=$(usex ppc no yes)
+ $(use_with doc mcs-docs)
+ $(use_enable debug)
+ $(use_enable nls)
+ )
+
+ autotools-utils_src_configure
+
+ # FIX for uncompilable 3.4.0 sources
+ FF="${WORKDIR}/mono-3.4.0/mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets"
+ rm -f $FF
+ touch $FF
+ echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' >> $FF
+ echo ' <Import Project="..\\Microsoft.Portable.Core.props" />' >> $FF
+ echo ' <Import Project="..\\Microsoft.Portable.Core.targets" />' >> $FF
+ echo '</Project>' >> $FF
+}
+
+src_compile() {
+ nonfatal autotools-utils_src_compile || {
+ eqawarn "maintainer of this ebuild has no idea why it fails. If you happen to know how to fix it - please let me know"
+ autotools-utils_src_compile
+ }
+}
+
+src_test() {
+ cd mcs/tests || die
+ emake check
+}
diff --git a/dev-lang/mono/mono-3.2.3.ebuild b/dev-lang/mono/mono-3.2.3.ebuild
new file mode 100644
index 00000000000..462e3ab5de6
--- /dev/null
+++ b/dev-lang/mono/mono-3.2.3.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="all"
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils autotools-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc debug"
+
+COMMONDEPEND="
+ !dev-util/monodoc
+ !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 )
+"
+
+pkg_pretend() {
+ # 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 MPROTEC is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ 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\paxctl-ng -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
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+ local myeconfargs=(
+ --enable-system-aot=yes
+ --enable-static
+ --disable-quiet-build
+ --without-moonlight
+ --with-libgdiplus=$(usex minimal no installed)
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --with-jit
+ --disable-dtrace
+ --with-profile4
+ --with-sgen=$(usex ppc no yes)
+ $(use_with doc mcs-docs)
+ $(use_enable debug)
+ $(use_enable nls)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ nonfatal autotools-utils_src_compile || {
+ eqawarn "maintainer of this ebuild has no idea why it fails. If you happen to know how to fix it - please let me know"
+ autotools-utils_src_compile
+ }
+}
+
+src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+src_install() {
+ autotools-utils_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-3.2.8.ebuild b/dev-lang/mono/mono-3.2.8.ebuild
new file mode 100644
index 00000000000..ec4e9e89cf0
--- /dev/null
+++ b/dev-lang/mono/mono-3.2.8.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="all"
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils autotools-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc debug"
+
+COMMONDEPEND="
+ !dev-util/monodoc
+ !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 )
+"
+
+pkg_pretend() {
+ # 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 MPROTEC is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ 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\paxctl-ng -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
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ # Bug #504108, dlls/test-883.il unexisting; TODO: Figure out how to make it.
+ epatch "${FILESDIR}"/${P}-disable-missing-test.patch
+ rm mcs/tests/test-883{,-lib}.cs|| die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See http://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+ local myeconfargs=(
+ --enable-system-aot=yes
+ --enable-static
+ --disable-quiet-build
+ --without-moonlight
+ --with-libgdiplus=$(usex minimal no installed)
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --with-jit
+ --disable-dtrace
+ --with-profile4
+ --with-sgen=$(usex ppc no yes)
+ $(use_with doc mcs-docs)
+ $(use_enable debug)
+ $(use_enable nls)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ nonfatal autotools-utils_src_compile || {
+ eqawarn "maintainer of this ebuild has no idea why it fails. If you happen to know how to fix it - please let me know"
+ autotools-utils_src_compile
+ }
+}
+
+src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mozart-stdlib/Manifest b/dev-lang/mozart-stdlib/Manifest
new file mode 100644
index 00000000000..c93bc52a8f1
--- /dev/null
+++ b/dev-lang/mozart-stdlib/Manifest
@@ -0,0 +1 @@
+DIST mozart-1.4.0.20080704-std.tar.gz 1305359 SHA256 c94ca56d68aeb506e1454e14aaf6f3347005060e054cde5f82d62ed5e58cff39 SHA512 5b9d9811d739c3533b7f1fa98757d842b506d58a3fd5d89ee2c1d9c036b3130f152da05b19036c8c1609057e361d71b106a728afea47140ebab3b4fc82441aed WHIRLPOOL 8b7034d1d721533e2c563839e6345edce56a413d1e929639454c4720119ec8d89a320f45302cabf778fcb64e4c9fa3c2d6c7a2b0ab7955675a6494562a2098e5
diff --git a/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-doc.patch b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-doc.patch
new file mode 100644
index 00000000000..1752bb9f518
--- /dev/null
+++ b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-doc.patch
@@ -0,0 +1,179 @@
+diff -ur mozart-1.3.2.20060615-std.orig/adt/makefile.oz mozart-1.3.2.20060615-std/adt/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/adt/makefile.oz 2004-05-19 11:40:35.000000000 +1200
++++ mozart-1.3.2.20060615-std/adt/makefile.oz 2007-02-17 12:29:43.000000000 +1300
+@@ -4,14 +4,5 @@
+ 'Dictionary.ozf' 'Cell.ozf'
+ %%'Generator.ozf'
+ ]
+- doc : [
+- 'index.html'
+- 'cell.html'
+- 'counter.html'
+- 'dictionary.html'
+- %%'generator.html'
+- 'queue.html'
+- 'stack.html'
+- ]
+
+ )
+diff -ur mozart-1.3.2.20060615-std.orig/makefile.oz mozart-1.3.2.20060615-std/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/makefile.oz 2004-05-19 20:05:19.000000000 +1200
++++ mozart-1.3.2.20060615-std/makefile.oz 2007-02-17 12:29:25.000000000 +1300
+@@ -10,12 +10,4 @@
+ 'os'
+ 'net'
+ ]
+- doc : [
+- 'index.html'
+- 'ozdoc.css'
+- 'page.gif'
+- 'string.html'
+- 'mapping.html'
+- 'generator.html'
+- ]
+ )
+diff -ur mozart-1.3.2.20060615-std.orig/net/makefile.oz mozart-1.3.2.20060615-std/net/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/net/makefile.oz 2004-05-18 11:33:41.000000000 +1200
++++ mozart-1.3.2.20060615-std/net/makefile.oz 2007-02-17 12:29:54.000000000 +1300
+@@ -1,4 +1,3 @@
+ makefile(
+ lib : ['URL.ozf']
+- doc : ['index.html' 'url.html']
+ )
+\ No newline at end of file
+diff -ur mozart-1.3.2.20060615-std.orig/os/makefile.oz mozart-1.3.2.20060615-std/os/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/os/makefile.oz 2004-05-18 11:33:41.000000000 +1200
++++ mozart-1.3.2.20060615-std/os/makefile.oz 2007-02-17 12:30:07.000000000 +1300
+@@ -1,4 +1,3 @@
+ makefile(
+ lib : ['Path.ozf' 'Shell.ozf']
+- doc : ['index.html' 'path.html' 'shell.html']
+ )
+diff -ur mozart-1.3.2.20060615-std.orig/wp/makefile.oz mozart-1.3.2.20060615-std/wp/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/wp/makefile.oz 2004-05-18 11:33:41.000000000 +1200
++++ mozart-1.3.2.20060615-std/wp/makefile.oz 2007-02-17 12:30:24.000000000 +1300
+@@ -2,5 +2,4 @@
+ subdirs : ['qtk'
+ %'qhtml'
+ ]
+- doc : ['index.html']
+ )
+diff -ur mozart-1.3.2.20060615-std.orig/wp/qtk/makefile.oz mozart-1.3.2.20060615-std/wp/qtk/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/wp/qtk/makefile.oz 2004-02-28 03:05:22.000000000 +1300
++++ mozart-1.3.2.20060615-std/wp/qtk/makefile.oz 2007-02-17 12:31:29.000000000 +1300
+@@ -117,96 +117,4 @@
+ %%src : ['QTk.ozf' 'QTkDevel.ozf' 'QTkBare.ozf']
+ rules : o(
+ 'QTk.ozf' : ozl('QTkBare.ozf'))
+- doc : ['html/button.gif'
+- 'html/bwoz1.gif'
+- 'html/canvas.gif'
+- 'html/checkbutton.gif'
+- 'html/color.gif'
+- 'html/dropdownlistbox.gif'
+- 'html/entry.gif'
+- 'html/grid.gif'
+- 'html/index.html'
+- 'html/label.gif'
+- 'html/line.gif'
+- 'html/listbox.gif'
+- 'html/listcont.oz'
+- 'html/load.gif'
+- 'html/menubutton.gif'
+- 'html/message.gif'
+- 'html/node1.html'
+- 'html/node10.html'
+- 'html/node11.html'
+- 'html/node12.html'
+- 'html/node13.html'
+- 'html/node14.html'
+- 'html/node15.html'
+- 'html/node16.html'
+- 'html/node17.html'
+- 'html/node18.html'
+- 'html/node19.html'
+- 'html/node2.html'
+- 'html/node20.html'
+- 'html/node21.html'
+- 'html/node22.html'
+- 'html/node23.html'
+- 'html/node24.html'
+- 'html/node25.html'
+- 'html/node26.html'
+- 'html/node27.html'
+- 'html/node28.html'
+- 'html/node29.html'
+- 'html/node3.html'
+- 'html/node30.html'
+- 'html/node31.html'
+- 'html/node32.html'
+- 'html/node33.html'
+- 'html/node34.html'
+- 'html/node35.html'
+- 'html/node36.html'
+- 'html/node37.html'
+- 'html/node38.html'
+- 'html/node39.html'
+- 'html/node4.html'
+- 'html/node40.html'
+- 'html/node41.html'
+- 'html/node42.html'
+- 'html/node43.html'
+- 'html/node44.html'
+- 'html/node45.html'
+- 'html/node5.html'
+- 'html/node6.html'
+- 'html/node7.html'
+- 'html/node8.html'
+- 'html/node9.html'
+- 'html/notepad.oz'
+- 'html/numberentry.gif'
+- 'html/ozdoc.css'
+- 'html/page.gif'
+- 'html/panel.gif'
+- 'html/picture1.gif'
+- 'html/picture10.gif'
+- 'html/picture100.gif'
+- 'html/picture11.gif'
+- 'html/picture2.gif'
+- 'html/picture3.gif'
+- 'html/picture4.gif'
+- 'html/picture5.gif'
+- 'html/picture6.gif'
+- 'html/picture8.gif'
+- 'html/picture9.gif'
+- 'html/placeholder.gif'
+- 'html/printcanvas.gif'
+- 'html/radiobutton.gif'
+- 'html/rubberframe.gif'
+- 'html/scale.gif'
+- 'html/scrollbar.gif'
+- 'html/scrollframe.gif'
+- 'html/space.gif'
+- 'html/tbbutton.gif'
+- 'html/tbcheckbutton.gif'
+- 'html/tbradiobutton.gif'
+- 'html/tdlr.gif'
+- 'html/text.gif'
+- 'html/toplevel.gif'
+- ]
+ )
+diff -ur mozart-1.3.2.20060615-std.orig/xml/makefile.oz mozart-1.3.2.20060615-std/xml/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/xml/makefile.oz 2004-05-18 11:33:42.000000000 +1200
++++ mozart-1.3.2.20060615-std/xml/makefile.oz 2007-02-17 12:31:52.000000000 +1300
+@@ -1,4 +1,3 @@
+ makefile(
+ subdirs:['parser']
+- doc : ['index.html']
+ )
+\ No newline at end of file
+diff -ur mozart-1.3.2.20060615-std.orig/xml/parser/makefile.oz mozart-1.3.2.20060615-std/xml/parser/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/xml/parser/makefile.oz 2004-05-18 11:33:42.000000000 +1200
++++ mozart-1.3.2.20060615-std/xml/parser/makefile.oz 2007-02-17 12:37:58.000000000 +1300
+@@ -1,6 +1,5 @@
+ makefile(
+ lib : ['Parser.ozf']
+- doc : ['index.html' 'example.xml']
+ version : '0.5'
+ uri : 'x-oz://system/xml'
+ % mogul : 'mogul:/duchier/xml/parser'
diff --git a/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-ozmake.patch b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-ozmake.patch
new file mode 100644
index 00000000000..1f6b2022001
--- /dev/null
+++ b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-ozmake.patch
@@ -0,0 +1,78 @@
+diff -ur mozart-1.3.2.20060615-std.orig/Makefile.in mozart-1.3.2.20060615-std/Makefile.in
+--- mozart-1.3.2.20060615-std.orig/Makefile.in 2004-05-19 02:22:05.000000000 +1200
++++ mozart-1.3.2.20060615-std/Makefile.in 2007-02-17 11:12:09.000000000 +1300
+@@ -12,6 +12,7 @@
+ NOTDIRSRCDIR = $(notdir $(SRCDIR))
+ BUILDDATE = $(shell date '+%Y%m%d')
+ VERSION = $(shell $(OZTOOL) version)
++BINDIR = /usr/bin
+
+ ifeq ($(PLATFORM),win32-i486)
+ OZEMULATOR = $(shell $(CYGPATH) $(PREFIX)/platform/win32-i486/emulator.dll)
+@@ -22,11 +23,14 @@
+ $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)
+
+ build.ozmake:
+- cd ozmake && $(MAKE) ozmake.ozf
++ cd ozmake && $(MAKE) ozmake
+
+ 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
++ mkdir -p $(BINDIR)
++ cp ozmake/ozmake $(BINDIR)
++ chmod +x $(BINDIR)/ozmake
+
+ export CLEANDIR
+
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/Attribs.oz mozart-1.3.2.20060615-std/ozmake/Attribs.oz
+--- mozart-1.3.2.20060615-std.orig/ozmake/Attribs.oz 2004-05-15 03:21:43.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Attribs.oz 2007-02-17 09:29:47.000000000 +1300
+@@ -458,7 +458,7 @@
+ end
+
+ meth get_oz_home($) {Path.expand {Property.get 'oz.home'}} end
+- meth get_oz_bindir($) {Path.resolve Attribs,get_oz_home($) 'bin'} end
++ meth get_oz_bindir($) {Path.resolve '/usr' 'bin'} end
+ meth get_oz_engine($)
+ if @OzEngine==unit then
+ P={Path.resolveAtom Attribs,get_oz_bindir($) 'ozengine.exe'}
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/Makefile.in mozart-1.3.2.20060615-std/ozmake/Makefile.in
+--- mozart-1.3.2.20060615-std.orig/ozmake/Makefile.in 2004-04-01 00:52:55.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Makefile.in 2007-02-17 10:55:26.000000000 +1300
+@@ -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 -ur mozart-1.3.2.20060615-std.orig/ozmake/Makefile.vars mozart-1.3.2.20060615-std/ozmake/Makefile.vars
+--- mozart-1.3.2.20060615-std.orig/ozmake/Makefile.vars 2005-06-05 01:47:45.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Makefile.vars 2007-02-17 08:42:20.000000000 +1300
+@@ -13,6 +13,6 @@
+ MakeGUI.oz Fixes.oz DatabaseLib.oz CHANGES Config.oz Mogul.oz \
+ Pickler.oz ExecutorFast.oz Depends.oz Requires.oz
+ PKG_INSTALLS = ozmake.ozf
+-PKG_INSTALLS_BIN= ozmake ozmake.win
++PKG_INSTALLS_BIN= ozmake
+ PKG_UPDATE = tgz tarz
+ PKG_INSTALLS_DOC= index.html CHANGES
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/makefile.oz mozart-1.3.2.20060615-std/ozmake/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/ozmake/makefile.oz 2004-05-22 09:37:24.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/makefile.oz 2007-02-17 12:15:46.000000000 +1300
+@@ -4,8 +4,8 @@
+ mogul : 'mogul:/mozart/ozmake'
+ author: 'mogul:/duchier/denys'
+ lib : ['ozmake.ozf']
+- bin : ['ozmake.exe']
+- doc : ['index.html' 'CHANGES']
++% bin : ['ozmake.exe']
++% doc : ['index.html' 'CHANGES']
+ rules :
+ o(
+ 'ozmake.ozf' : ozl('Main.ozf')
diff --git a/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-r1-ozmake.patch b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-r1-ozmake.patch
new file mode 100644
index 00000000000..12a621390eb
--- /dev/null
+++ b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.3.2-r1-ozmake.patch
@@ -0,0 +1,78 @@
+diff -ur mozart-1.3.2.20060615-std.orig/Makefile.in mozart-1.3.2.20060615-std/Makefile.in
+--- mozart-1.3.2.20060615-std.orig/Makefile.in 2004-05-19 02:22:05.000000000 +1200
++++ mozart-1.3.2.20060615-std/Makefile.in 2007-02-17 11:12:09.000000000 +1300
+@@ -12,6 +12,7 @@
+ NOTDIRSRCDIR = $(notdir $(SRCDIR))
+ BUILDDATE = $(shell date '+%Y%m%d')
+ VERSION = $(shell $(OZTOOL) version)
++BINDIR = $(PREFIX)/bin
+
+ ifeq ($(PLATFORM),win32-i486)
+ OZEMULATOR = $(shell $(CYGPATH) $(PREFIX)/platform/win32-i486/emulator.dll)
+@@ -22,11 +23,14 @@
+ $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)
+
+ build.ozmake:
+- cd ozmake && $(MAKE) ozmake.ozf
++ cd ozmake && $(MAKE) ozmake
+
+ 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
++ mkdir -p $(BINDIR)
++ cp ozmake/ozmake $(BINDIR)
++ chmod +x $(BINDIR)/ozmake
+
+ export CLEANDIR
+
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/Attribs.oz mozart-1.3.2.20060615-std/ozmake/Attribs.oz
+--- mozart-1.3.2.20060615-std.orig/ozmake/Attribs.oz 2004-05-15 03:21:43.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Attribs.oz 2007-02-17 09:29:47.000000000 +1300
+@@ -458,7 +458,7 @@
+ end
+
+ meth get_oz_home($) {Path.expand {Property.get 'oz.home'}} end
+- meth get_oz_bindir($) {Path.resolve Attribs,get_oz_home($) 'bin'} end
++ meth get_oz_bindir($) {Path.resolve '/usr/lib/mozart' 'bin'} end
+ meth get_oz_engine($)
+ if @OzEngine==unit then
+ P={Path.resolveAtom Attribs,get_oz_bindir($) 'ozengine.exe'}
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/Makefile.in mozart-1.3.2.20060615-std/ozmake/Makefile.in
+--- mozart-1.3.2.20060615-std.orig/ozmake/Makefile.in 2004-04-01 00:52:55.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Makefile.in 2007-02-17 10:55:26.000000000 +1300
+@@ -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 -ur mozart-1.3.2.20060615-std.orig/ozmake/Makefile.vars mozart-1.3.2.20060615-std/ozmake/Makefile.vars
+--- mozart-1.3.2.20060615-std.orig/ozmake/Makefile.vars 2005-06-05 01:47:45.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/Makefile.vars 2007-02-17 08:42:20.000000000 +1300
+@@ -13,6 +13,6 @@
+ MakeGUI.oz Fixes.oz DatabaseLib.oz CHANGES Config.oz Mogul.oz \
+ Pickler.oz ExecutorFast.oz Depends.oz Requires.oz
+ PKG_INSTALLS = ozmake.ozf
+-PKG_INSTALLS_BIN= ozmake ozmake.win
++PKG_INSTALLS_BIN= ozmake
+ PKG_UPDATE = tgz tarz
+ PKG_INSTALLS_DOC= index.html CHANGES
+diff -ur mozart-1.3.2.20060615-std.orig/ozmake/makefile.oz mozart-1.3.2.20060615-std/ozmake/makefile.oz
+--- mozart-1.3.2.20060615-std.orig/ozmake/makefile.oz 2004-05-22 09:37:24.000000000 +1200
++++ mozart-1.3.2.20060615-std/ozmake/makefile.oz 2007-02-17 12:15:46.000000000 +1300
+@@ -4,8 +4,8 @@
+ mogul : 'mogul:/mozart/ozmake'
+ author: 'mogul:/duchier/denys'
+ lib : ['ozmake.ozf']
+- bin : ['ozmake.exe']
+- doc : ['index.html' 'CHANGES']
++% bin : ['ozmake.exe']
++% doc : ['index.html' 'CHANGES']
+ rules :
+ o(
+ 'ozmake.ozf' : ozl('Main.ozf')
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 00000000000..f4102a47b27
--- /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 00000000000..6cdc6153f6e
--- /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 00000000000..b60aa8b6a4a
--- /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>
+ <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 00000000000..47a78579eb9
--- /dev/null
+++ b/dev-lang/mozart-stdlib/mozart-stdlib-1.4.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..1807ace297e
--- /dev/null
+++ b/dev-lang/mozart/Manifest
@@ -0,0 +1,3 @@
+DIST mozart-1.4.0-gentoo-patchset-5.tar.gz 24700 SHA256 7ab555ea5345d6a2d5b89b4112fde11ef5be9e9bc9c05b1d84bb54d1f115993b SHA512 99db9bf62682fd306c4b665d99ab3b48a787c26230d5e8db2e3564684eff2e41ac0c6bb6a612afa0446555dcb1e419ae7ef1dbfec4c918d769d51dafeeee8462 WHIRLPOOL ef7c2974bc8ec03823c1432f56be6349991774a221bd1f278adf733e08b6d5cfe763d23d984f502070ab2afce7d7c805a15d073c0c1e302647d9d63cde126b43
+DIST mozart-1.4.0.20080704-doc.tar.gz 4085020 SHA256 68c52cb7379504a5142af37459c89884355fb9cc020f585d7778e7d4b1f0cd9e SHA512 25f8f4b603ae7f4ef054a79a2baa4e10074f8a95f762b75fd88480526fb073b5b4874c269d116a960017a9e7ef989dd9f41853b0ff76e08b2cad2de2090c2eb4 WHIRLPOOL 1f05b48d9ad41006576a66fa5062116bb60bc02438a119ddfe334ff0da02fe8505dee8254db20ca2d02e713e02f8327188ded4b957ee7fec5b965375fe39d5c0
+DIST mozart-1.4.0.20080704-src.tar.gz 11848201 SHA256 5da73d80b5aa7fa42edca64159a1a076323f090e5c548f3747f94d0afc60b223 SHA512 f1114662c8c603cc2ac530d4ea1d22a0581f6e1b4d5cb57ccf899b8051ea48dbcf2fa2b62173359a754367a5456a7cb121a208d6a246248207599b0470525229 WHIRLPOOL e96ff3688025cffb0c78f050f02421872f2119498943b5ebf5786e0886a13f264e0f637c6a41869b6e79ee10c6ed03c8dc55fe1775c5cf66d60fc9f5d09db742
diff --git a/dev-lang/mozart/files/50mozart-gentoo.el b/dev-lang/mozart/files/50mozart-gentoo.el
new file mode 100644
index 00000000000..64f65c54a68
--- /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 00000000000..b60aa8b6a4a
--- /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>
+ <email>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mozart/mozart-1.4.0-r2.ebuild b/dev-lang/mozart/mozart-1.4.0-r2.ebuild
new file mode 100644
index 00000000000..c6c842860e0
--- /dev/null
+++ b/dev-lang/mozart/mozart-1.4.0-r2.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+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
+ 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 || die "emake bootstrap failed"
+}
+
+src_test() {
+ # Mozart tests must be run single-threaded
+ cd "${S}"/share/test
+ emake -j1 boot-oztest || die "emake boot-oztest failed"
+ emake -j1 boot-check || die "emake boot-check failed"
+}
+
+src_install() {
+ emake \
+ PREFIX="${D}"/usr/lib/mozart \
+ ELISPDIR="${D}${SITELISP}/${PN}" \
+ install || die "emake install failed"
+
+ dosym /usr/lib/mozart/bin/convertTextPickle /usr/bin/convertTextPickle || die
+ dosym /usr/lib/mozart/bin/oldpickle2text /usr/bin/oldpickle2text || die
+ dosym /usr/lib/mozart/bin/ozc /usr/bin/ozc || die
+ dosym /usr/lib/mozart/bin/ozd /usr/bin/ozd || die
+ dosym /usr/lib/mozart/bin/ozengine /usr/bin/ozengine || die
+ dosym /usr/lib/mozart/bin/ozl /usr/bin/ozl || die
+ dosym /usr/lib/mozart/bin/ozplatform /usr/bin/ozplatform || die
+ dosym /usr/lib/mozart/bin/oztool /usr/bin/oztool || die
+ dosym /usr/lib/mozart/bin/pickle2text /usr/bin/pickle2text || die
+ dosym /usr/lib/mozart/bin/text2pickle /usr/bin/text2pickle || die
+
+ if use emacs; then
+ dosym /usr/lib/mozart/bin/oz /usr/bin/oz || die
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+
+ if use doc ; then
+ dohtml -r "${WORKDIR}"/mozart/doc/* || die
+ fi
+
+ if use examples; then
+ cd "${S}"/share
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/* || die
+ doins -r demo/* || die
+ rm -rf $(find "${D}"/usr/share/doc/${PF}/examples \
+ -name Makefile -o -name Makefile.in)
+ fi
+
+ cd "${S}"
+ dodoc README || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
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 00000000000..00a81c5e68b
--- /dev/null
+++ b/dev-lang/mozart/mozart-1.4.0-r3.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ sys-libs/zlib
+ emacs? ( virtual/emacs )
+ gdbm? ( sys-libs/gdbm )
+ tcl? (
+ tk? (
+ dev-lang/tk:0=
+ dev-lang/tcl:0=
+ )
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+SITEFILE=50${PN}-gentoo.el
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+}
+
+src_configure() {
+ local myconf="\
+ --without-global-oz \
+ --enable-opt=none"
+
+ if use tcl && use tk ; then
+ myconf="${myconf} --enable-wish"
+ else
+ myconf="${myconf} --disable-wish"
+ fi
+
+ econf \
+ ${myconf} \
+ --disable-doc \
+ --enable-contrib \
+ --disable-contrib-micq \
+ $(use_enable doc contrib-doc) \
+ $(use_enable gdbm contrib-gdbm) \
+ $(use_enable tk contrib-tk) \
+ $(use_enable emacs compile-elisp) \
+ $(use_enable static link-static) \
+ $(use_enable threads threaded)
+}
+
+src_compile() {
+ emake bootstrap
+}
+
+src_test() {
+ # Mozart tests must be run single-threaded
+ cd "${S}"/share/test || die
+ emake -j1 boot-oztest
+ emake -j1 boot-check
+}
+
+src_install() {
+ emake \
+ PREFIX="${D}"/usr/lib/mozart \
+ ELISPDIR="${D}${SITELISP}/${PN}" \
+ install
+
+ dosym /usr/lib/mozart/bin/convertTextPickle /usr/bin/convertTextPickle
+ dosym /usr/lib/mozart/bin/oldpickle2text /usr/bin/oldpickle2text
+ dosym /usr/lib/mozart/bin/ozc /usr/bin/ozc
+ dosym /usr/lib/mozart/bin/ozd /usr/bin/ozd
+ dosym /usr/lib/mozart/bin/ozengine /usr/bin/ozengine
+ dosym /usr/lib/mozart/bin/ozl /usr/bin/ozl
+ dosym /usr/lib/mozart/bin/ozplatform /usr/bin/ozplatform
+ dosym /usr/lib/mozart/bin/oztool /usr/bin/oztool
+ dosym /usr/lib/mozart/bin/pickle2text /usr/bin/pickle2text
+ dosym /usr/lib/mozart/bin/text2pickle /usr/bin/text2pickle
+
+ if use emacs; then
+ dosym /usr/lib/mozart/bin/oz /usr/bin/oz
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ dodoc "${S}"/README
+ use doc && dohtml -r "${WORKDIR}"/mozart/doc/*
+
+ if use examples; then
+ cd "${S}"/share || die
+ insinto /usr/share/doc/${PF}
+ doins -r examples demo
+ rm -rf $(find "${ED}"/usr/share/doc/${PF}/examples \
+ -name Makefile -o -name Makefile.in) || die
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
new file mode 100644
index 00000000000..c788fa61055
--- /dev/null
+++ b/dev-lang/mujs/Manifest
@@ -0,0 +1 @@
+DIST mujs-0_p20150202.tar.gz 96743 SHA256 c757bfec7ad9864d85d710cd0b413a4909e9dfc418e036e7b0692bb6acd25305 SHA512 28a1b95fcf09098e0882fe0bc989696961c39ae9d4fb2d00f61b84778431b1c9973f1dcc3c9dee277ba4827b2bf1fd323502d9c6469cb5179c6fb1a04bbbd0e1 WHIRLPOOL 17166bad1594bcee38569531ded73abf24f99b98d7434f535775287d1baa16f2106a53a05359d40c504fbf64981e9bd92ccdbab14a41afa03d9a0d34dd553a94
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 00000000000..4dca385e379
--- /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/metadata.xml b/dev-lang/mujs/metadata.xml
new file mode 100644
index 00000000000..5b80fb94c39
--- /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>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mujs/mujs-0_p20150202.ebuild b/dev-lang/mujs/mujs-0_p20150202.ebuild
new file mode 100644
index 00000000000..c2c815f2cac
--- /dev/null
+++ b/dev-lang/mujs/mujs-0_p20150202.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils 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=c1ad1ba1e482e7d01743e3f4f9517572bebf99ac;sf=tgz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+ # workaround for linkage of app-text/mupdf-1.7a
+ # TODO: generate a shared library and IUSE=static-libs
+ append-cflags -fPIC
+ tc-export CC
+}
diff --git a/dev-lang/nacl-toolchain-newlib/Manifest b/dev-lang/nacl-toolchain-newlib/Manifest
new file mode 100644
index 00000000000..58cae016f82
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/Manifest
@@ -0,0 +1,19 @@
+DIST binutils-2.20.1.tar.bz2 17591527 SHA256 71d37c96451333c5c0b84b170169fdcb138bbb27397dc06281905d9717c8ed64 SHA512 b05c93eb9ba8db344fbdee3c5b36ed5a7ad1366f948d41af43286715c7345a2477e0808d25f7bbf81b54ab06c4d46356d44318d56efcdbef42236d1a694411fc WHIRLPOOL 6166462fce695914a32c3295dadb6782716bb6693ee0a2a5543cc925e4967f5bccf38a5a2c244703bb9990acd229d0588a9463c62cec042f24107854c631518e
+DIST gcc-4.4.3.tar.bz2 62944934 SHA256 97ed664694b02b4d58ac2cafe443d02a388f9cb3645e7778843b5086a5fec040 SHA512 7e94f874f66d248fa930dc415c9442c6c5bff134653dacb7749e1f8a75c4660e29d47661c0f5a254d6fcbdf75a2c37aa7e26091f370a934277421879f98b1928 WHIRLPOOL af2449836826c51ac26bc0b228fedccaa99c7652244e42baab47eff99422940d9b440cf359f8dfb5c2f0c9b509313860aa753c621cd2c17db558c988b856b274
+DIST naclbinutils-2.20.1-r10520.patch.bz2 38550 SHA256 3f369a6b4e4d79bf437c6ceab462a4fe7dc5fabceb32eb1dec9e149f8619de72 SHA512 58a81e665a32946e92813b3e07f23d59068c91a0074b1be1fbf0dba0ce5014ae7a86ce59e0f53d4ed24ae7c712376a27aac9f95fc85163cd9380a8cfdad167f8 WHIRLPOOL 380f631cb09f2d5191f18815538a419834bc4463a4572eb312d2f6cc1d696319f7d31f7558664462374d364318f414aebd7f76a071a4678a02742105f4bfe90e
+DIST naclbinutils-2.20.1-r10915.patch.bz2 44660 SHA256 009c497df864accb8cc1ec923347002ea53cb686cf26d772c9e740e3ba56b27d SHA512 3db827c5a2ae8d9059393311b791bc34982ec0e2872d907a289298890369c78793a897351d244abe2ea74b4eb9363632a5e0c4eab38f21e456300904f05d9d41 WHIRLPOOL fb9e7ffaa68da4b54ccac1d78b683a0a6b2f9a94308b5ad470e3d069b3188ca9678e001a5881c020ade6be72f93ceac82fd5aea16217c67e64ea3a2251148d18
+DIST naclbinutils-2.20.1-r11846.patch.bz2 73475 SHA256 3dcc64000c6837be2102bd4f64c13c6a736f469bd7dbdd9aec2cc871f18f4d6d SHA512 1c59357c90cb42a83540248b0bc9fc7ee57e72461510ae11819f59f8c9a1a01ed741719c57a4cdda7492cd90c45e7f08f5546dff19ae09d61c02706542c43293 WHIRLPOOL 42aa3ba3a1ef77d899fdd4292cd1994f2b043344aae327ffb671d7d8354f084b96ee85eaa683daac557bee975c364fba4598495549b62bbb8e8bad4254dd8b09
+DIST naclbinutils-2.20.1-r9093.patch.bz2 38538 SHA256 ea08fbe4b53317a6f465aee1afaf61c4fcb63765d877156cc42ff267faa103c6 SHA512 b7f9f8105de1adb44f89927ddb47428dbfee597a5cbe3ab85986a55a8403f3fcdb4cebab84019f78f32df540408c9c237929d2c5c4f3b0f4e116712ecce47475 WHIRLPOOL 336299d2e2fba147353675f31e3e2759da5311cf3fec3ccb27081761674f80241b38097b29217457b9422ab06b5b2e0fb751061a10b4a7c86e3c6c5761988f56
+DIST naclgcc-4.4.3-r10520.patch.bz2 39900 SHA256 40d9fed5c1a9c19f0dcc8f2bc820e3c899d6cec3430ee49c14096b928c6ef480 SHA512 edd8c4babfb5e4609a957efca22bbbd0aa44b4bc2f10bb6191bf6fe3004c529913ee018e1500d2c9f86b99c4388a4cbceb6ad82de1e4dd4cfb708d10fe4dc0a4 WHIRLPOOL 93e0866e7dd70336fa72908c12c0b5e2dec57ea2a8f5e8332dc5bf71608ce97647d6e1b6b21345a8b55bb4e53aca1c545b5ccd54fd000918776c067a99b42660
+DIST naclgcc-4.4.3-r10915.patch.bz2 39924 SHA256 635f7d682bdd3ce507566e2b1b8361c15cd4aeb36ea39c4f6147d773281578a8 SHA512 e3b4c63c3a0cfb6712e29491bc627d50d555450d5f866c7e283fada681ce5cd870277513965eae56b5515807a41f1e9112cbe5a5bbf063809bbf4321e9a55f2d WHIRLPOOL 312db4992a0e6045ede2a046eba4e4c369b9dd2e2b1bc1e8195b05c911e99e53b330eb190c61978f1d3ad2a433afd9167295d4cb1cc28357221356e49c3f6432
+DIST naclgcc-4.4.3-r11846.patch.bz2 41703 SHA256 64f116afb4d907e4ba5120ce02c7ad56e01c7f33be41e602a34a9b37c89d3345 SHA512 0a60b2ba42524c59617b8f611ee5224283746bf49f74cc5d08696fec9a66d5135dbade7ab18ff1a97d7209d4000d0aa59db1a28b24c3009f1d912acd5a43af9c WHIRLPOOL 65489097e16a8ff08732d9daa2db46c8a4c79a0f78a7599a8f131e64548e281a126237130906d6487724fecf8ad301c00fe2e46e7549fe68badd091d4216567b
+DIST naclgcc-4.4.3-r9093.patch.bz2 39561 SHA256 a90aeb300d886a2ada571e6f0826adca02cb579b026c0c06457589f019317568 SHA512 723fc258a7d57855a5dcf4b11b1d6cc6cc08189d912809e8eda1ea1c31f10c7cebc6230ee2b76a2957fcab0b52ac623899a0e8f619e516c7dfda5139457c3409 WHIRLPOOL 58cf5baa6660f0f98202fb4fa0f58c861cf8ea761c061ff6cd7b47b0d22984f6dc6c50a5d3754e816c11798971269ef7bb9c41246437547de49fd161f4d4b95d
+DIST naclnewlib-1.20.0-r10520.patch.bz2 92737 SHA256 109a86cc5d3e059004d90c12f1319a293ad3a137a62e6006cc997b44487cebed SHA512 60ab5fcce4c0548cf40fa55e036e5c3ad25fbcf51c719e1d632c77fe55086774cacf2e73f08d12400350ebc9e3b189558c17e2912a481a83ccd6884a142e1acb WHIRLPOOL 62c76dddd182fca2e3d2a45bb15228406ff73664e1d742928883660f53d4f0d1b166fb56c182c13e18dd8fe406d5d72d1d0dbf533996281fbfaf9a3736078053
+DIST naclnewlib-1.20.0-r10915.patch.bz2 94556 SHA256 d56efcbdd776854e9692748ea098f3f6f4c1fa7138bb1ac392c256ea53c037eb SHA512 c1891ccaea7e6db52854e20852445f607f23c196367ac7630b706d720f5db617eda4ba2ac8df05b405af83d77a2bd7efad49abcb9f8f55eb840dc2a4a219c6d8 WHIRLPOOL c6dbe3688c2b64e31e7caef80164abaaa0ef904c442f93495f436ee4d3745a3a24e94e44ebf0c79952a13761b6d34d999283304adb0ccb667ed84dd0b152f4aa
+DIST naclnewlib-1.20.0-r11846.patch.bz2 91074 SHA256 341629239a39fd184cfcaf48535185baffed8be1ffcd3800447246ae8a03820b SHA512 a69c33f6630af0c54cf06ffafe89c1a08cca6b89b37fc024a3681bdc430a0f3a7bb7651b19964ee423ae0b765deba1d5ea4257506d4d84af410bc58ddf9159b2 WHIRLPOOL 93478942e2164e54a0f3223e81be1d3530dce667afb2d9d61b3b90426dcbc6a563853dace9f71686b088de247d9f1f5526dfba5d09c4e8643164a463dfa2e699
+DIST naclnewlib-1.20.0-r9093.patch.bz2 92392 SHA256 3db6c5cd3344ca1bdd23db170a20c5e248dbbdb06706574bc4c6dacafddd6c9c SHA512 81f9c26bacc3c914c112b45e8a1012746ace869c60c309d0c2dfac449b26a0c3af1aeee577512eb910b47433e432988a7709d57088445428b108af348ad3e32b WHIRLPOOL da5c0588cc59ec14982be5b01188e4fd8fa72afcc738b2580c685a8d558f03b78e35f0b5de1fcdc3179414ccf61eb7937d5b55f422f9d327da36af454866970a
+DIST nacltoolchain-buildscripts-r10520.tar.gz 20323 SHA256 87f06f423a5ff86e99a0077390b7743f7bc1eec2b2a0516a4498055329f550bb SHA512 19fb4f484e0768e03d9ada3aa6ae7c366ae8e9bd1adf54e292ef0f4dd73ef5f9f2e289468576dfdbf3170246314066d67409cf32c4072d07d1bb841d02ca41c0 WHIRLPOOL eda7cd82eeb072a2e6da6075269396867072e4c90591cfadfc4cc746a0f895ddbca637847ed3e26b5da54d84fbcfb78ff02c9a7bdc3990a194a4fa26299e8d51
+DIST nacltoolchain-buildscripts-r10915.tar.gz 20364 SHA256 8eb5b19a310fecff76549b83e8a82769c5a499256d64fc6a4032313793ce2123 SHA512 74be89bf89be2eb9fd93f6a5aa96faa0c8c7ad08440c6875ac51cb78d0c5acbb6521a89394b29e30d36d88975777f2c8b03ca074197f281a7379a3cf0dd50674 WHIRLPOOL 97b91168fdb4b1b8e1801c8762fd3f0f3930e105da8fa5a9f4ab1e06a2979a44a788bc868c460f090b4ef9518b5d374025b09679872167a1f202ae8323bb1532
+DIST nacltoolchain-buildscripts-r11846.tar.gz 20326 SHA256 fd92db252db698283fa8fd093fb98e31c11941c671353a797e1feeee1529cbf9 SHA512 9ea3f71ad55f8325f25b7c0024321e9c5585c1cf69c83d25b2155d7174cdff6fd44bc8f03aefa81b2f4c819d2b3ceac08d4c3586da38a130fa070bfb46e075ad WHIRLPOOL 9717c99aef01dd6c0986925e1fb3da5f450d4983c6ce8e1b267035a9c64678e2a5e29c9664d1de3db8e7b5d8561ae132e687d7103499035516fe0ff566eb3791
+DIST nacltoolchain-buildscripts-r9093.tar.gz 20364 SHA256 648e17f89fb21a0508eeabc332e243eb4470c3f4906152a475e72cc62ae5c44e SHA512 e81bf5b61150c7022a87d36bdd14bd4694feadf4baa75316cc05f72466a3c4def8a659416399339d3db1a49bf7e988df228c1e466b90098d1041f3b5d8065562 WHIRLPOOL 5ce758c73af352979f1b0a46269d2d00493d03e2b504f4c1ffd98813e4b28816bac07416748ef8648825c1aba30689933a8ffb204aec8076730b117ea031e7db
+DIST newlib-1.20.0.tar.gz 14571004 SHA256 c644b2847244278c57bec2ddda69d8fab5a7c767f3b9af69aa7aa3da823ff692 SHA512 2abf1d30980e460c4d6ffe4d1682e38403d056048e00675362256731e57fe6759d01e85bcba84258d211941926e13bf3c632ff3824931a844c8b2596e795451f WHIRLPOOL be7996e493b0f2be6992c579796ea9d6968ed3b0a4f5d9c58e1c8b255a1060df18e6ae3d7ecf3a291c5859a6c04bdd39296e9ee5811eb59e2e7646da27089f66
diff --git a/dev-lang/nacl-toolchain-newlib/files/binutils-texinfo-r0.patch b/dev-lang/nacl-toolchain-newlib/files/binutils-texinfo-r0.patch
new file mode 100644
index 00000000000..ab81d8a4943
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/files/binutils-texinfo-r0.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/show_bug.cgi?id=464168
+
+commit 935f85422863b42b6fbca30885885e3fa28eea36
+Author: Nick Clifton <nickc@redhat.com>
+Date: Mon Jan 7 12:11:11 2013 +0000
+
+ * ld.texinfo: Replace @ with @@ when it is part of the text.
+ Correct ordering of M68HC11 entry.
+
+ * doc/binutils.texi: Fix ordering of top level nodes.
+ Replace erroneous uses of @itemx with @item.
+
+ * bfd.texinfo: Replace @ with @@ when it is part of the text.
+
+diff --git a/bfd/doc/bfd.texinfo b/bfd/doc/bfd.texinfo
+index 45ffa73..3aa3300 100644
+--- a/bfd/doc/bfd.texinfo
++++ b/bfd/doc/bfd.texinfo
+@@ -322,7 +324,7 @@ All of BFD lives in one directory.
+ @printindex cp
+
+ @tex
+-% I think something like @colophon should be in texinfo. In the
++% I think something like @@colophon should be in texinfo. In the
+ % meantime:
+ \long\def\colophon{\hbox to0pt{}\vfill
+ \centerline{The body of this manual is set in}
+@@ -333,7 +335,7 @@ All of BFD lives in one directory.
+ \centerline{{\sl\fontname\tensl\/}}
+ \centerline{are used for emphasis.}\vfill}
+ \page\colophon
+-% Blame: doc@cygnus.com, 28mar91.
++% Blame: doc@@cygnus.com, 28mar91.
+ @end tex
+
+ @bye
+diff --git a/ld/ld.texinfo b/ld/ld.texinfo
+index c7ae2a5..4777ad5 100644
+--- a/ld/ld.texinfo
++++ b/ld/ld.texinfo
+@@ -7877,7 +7879,7 @@ If you have more than one @code{SECT} statement for the same
+ @printindex cp
+
+ @tex
+-% I think something like @colophon should be in texinfo. In the
++% I think something like @@colophon should be in texinfo. In the
+ % meantime:
+ \long\def\colophon{\hbox to0pt{}\vfill
+ \centerline{The body of this manual is set in}
+@@ -7888,7 +7890,7 @@ If you have more than one @code{SECT} statement for the same
+ \centerline{{\sl\fontname\tensl\/}}
+ \centerline{are used for emphasis.}\vfill}
+ \page\colophon
+-% Blame: doc@cygnus.com, 28mar91.
++% Blame: doc@@cygnus.com, 28mar91.
+ @end tex
+
+ @bye
diff --git a/dev-lang/nacl-toolchain-newlib/files/gcc-parallel-build-r0.patch b/dev-lang/nacl-toolchain-newlib/files/gcc-parallel-build-r0.patch
new file mode 100644
index 00000000000..265c7b99df4
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/files/gcc-parallel-build-r0.patch
@@ -0,0 +1,15 @@
+Parallel build error: all-tree.def: No such file or directory
+
+http://gcc.gnu.org/PR46173
+
+--- a/gcc/gcc/Makefile.in
++++ b/gcc/gcc/Makefile.in
+@@ -3421,7 +3421,7 @@ build/genattrtab.o : genattrtab.c $(RTL_BASE_H) $(OBSTACK_H) \
+ build/genautomata.o : genautomata.c $(RTL_BASE_H) $(OBSTACK_H) \
+ $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h vec.h \
+ $(HASHTAB_H) gensupport.h
+-build/gencheck.o : gencheck.c tree.def $(BCONFIG_H) $(GTM_H) \
++build/gencheck.o : gencheck.c all-tree.def $(BCONFIG_H) $(GTM_H) \
+ $(SYSTEM_H) coretypes.h $(lang_tree_files) gimple.def
+ build/genchecksum.o : genchecksum.c $(BCONFIG_H) $(SYSTEM_H) $(MD5_H)
+ build/gencodes.o : gencodes.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
diff --git a/dev-lang/nacl-toolchain-newlib/files/gcc-texinfo-r0.patch b/dev-lang/nacl-toolchain-newlib/files/gcc-texinfo-r0.patch
new file mode 100644
index 00000000000..85233735174
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/files/gcc-texinfo-r0.patch
@@ -0,0 +1,132 @@
+https://bugs.gentoo.org/show_bug.cgi?id=464168
+
+commit 85ad240e47dcdc1bf20ef6a95e921ac1f766d995
+Author: schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sun Oct 28 09:19:54 2012 +0000
+
+ * doc/cppopts.texi: Fix use of @item vs. @itemx inside @table.
+ * doc/extend.texi: Likewise.
+ * doc/generic.texi: Likewise.
+ * doc/invoke.texi: Likewise.
+ * doc/md.texi: Likewise.
+ * doc/sourcebuild.texi: Likewise.
+
+
+ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192887 138bc75d-0d04-0410-961f-82ee72b054a4
+
+diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
+index 27b1095..a2eb79d 100644
+--- a/gcc/doc/cppopts.texi
++++ b/gcc/doc/cppopts.texi
+@@ -805,7 +805,7 @@ Replacement: [ ] @{ @} # \ ^ | ~
+ Enable special code to work around file systems which only permit very
+ short file names, such as MS-DOS@.
+
+-@itemx --help
++@item --help
+ @itemx --target-help
+ @opindex help
+ @opindex target-help
+diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
+index dfbdc4c..bca0d8f 100644
+--- a/gcc/doc/md.texi
++++ b/gcc/doc/md.texi
+@@ -4483,8 +4483,8 @@ means of constraints requiring operands 1 and 0 to be the same location.
+ @cindex @code{ior@var{m}3} instruction pattern
+ @cindex @code{xor@var{m}3} instruction pattern
+ @item @samp{ssadd@var{m}3}, @samp{usadd@var{m}3}
+-@item @samp{sub@var{m}3}, @samp{sssub@var{m}3}, @samp{ussub@var{m}3}
+-@item @samp{mul@var{m}3}, @samp{ssmul@var{m}3}, @samp{usmul@var{m}3}
++@itemx @samp{sub@var{m}3}, @samp{sssub@var{m}3}, @samp{ussub@var{m}3}
++@itemx @samp{mul@var{m}3}, @samp{ssmul@var{m}3}, @samp{usmul@var{m}3}
+ @itemx @samp{div@var{m}3}, @samp{ssdiv@var{m}3}
+ @itemx @samp{udiv@var{m}3}, @samp{usdiv@var{m}3}
+ @itemx @samp{mod@var{m}3}, @samp{umod@var{m}3}
+diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
+index 89e7712..ec8263f 100644
+--- a/gcc/doc/sourcebuild.texi
++++ b/gcc/doc/sourcebuild.texi
+@@ -691,7 +691,7 @@ standard rule in @file{gcc/Makefile.in} to the variable
+ @code{lang_checks}.
+
+ @table @code
+-@itemx all.cross
++@item all.cross
+ @itemx start.encap
+ @itemx rest.encap
+ FIXME: exactly what goes in each of these targets?
+--- a/gcc/doc/c-tree.texi
++++ b/gcc/doc/c-tree.texi
+@@ -2338,13 +2338,13 @@
+ not matter. The type of the operands and that of the result are
+ always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.
+
+-@itemx POINTER_PLUS_EXPR
++@item POINTER_PLUS_EXPR
+ This node represents pointer arithmetic. The first operand is always
+ a pointer/reference type. The second operand is always an unsigned
+ integer type compatible with sizetype. This is the only binary
+ arithmetic operand that can operate on pointer types.
+
+-@itemx PLUS_EXPR
++@item PLUS_EXPR
+ @itemx MINUS_EXPR
+ @itemx MULT_EXPR
+ These nodes represent various binary arithmetic operations.
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -4645,11 +4652,11 @@
+ @option{-fdump-rtl-ce3} enable dumping after the three
+ if conversion passes.
+
+-@itemx -fdump-rtl-cprop_hardreg
++@item -fdump-rtl-cprop_hardreg
+ @opindex fdump-rtl-cprop_hardreg
+ Dump after hard register copy propagation.
+
+-@itemx -fdump-rtl-csa
++@item -fdump-rtl-csa
+ @opindex fdump-rtl-csa
+ Dump after combining stack adjustments.
+
+@@ -4660,11 +4667,11 @@
+ @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
+ the two common sub-expression elimination passes.
+
+-@itemx -fdump-rtl-dce
++@item -fdump-rtl-dce
+ @opindex fdump-rtl-dce
+ Dump after the standalone dead code elimination passes.
+
+-@itemx -fdump-rtl-dbr
++@item -fdump-rtl-dbr
+ @opindex fdump-rtl-dbr
+ Dump after delayed branch scheduling.
+
+@@ -4709,7 +4716,7 @@
+ @opindex fdump-rtl-initvals
+ Dump after the computation of the initial value sets.
+
+-@itemx -fdump-rtl-into_cfglayout
++@item -fdump-rtl-into_cfglayout
+ @opindex fdump-rtl-into_cfglayout
+ Dump after converting to cfglayout mode.
+
+@@ -4739,7 +4746,7 @@
+ @opindex fdump-rtl-rnreg
+ Dump after register renumbering.
+
+-@itemx -fdump-rtl-outof_cfglayout
++@item -fdump-rtl-outof_cfglayout
+ @opindex fdump-rtl-outof_cfglayout
+ Dump after converting from cfglayout mode.
+
+@@ -4751,7 +4758,7 @@
+ @opindex fdump-rtl-postreload
+ Dump after post-reload optimizations.
+
+-@itemx -fdump-rtl-pro_and_epilogue
++@item -fdump-rtl-pro_and_epilogue
+ @opindex fdump-rtl-pro_and_epilogue
+ Dump after generating the function pro and epilogues.
+
diff --git a/dev-lang/nacl-toolchain-newlib/metadata.xml b/dev-lang/nacl-toolchain-newlib/metadata.xml
new file mode 100644
index 00000000000..fffcfc8b794
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>chromium</herd>
+</pkgmetadata>
diff --git a/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10520.ebuild b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10520.ebuild
new file mode 100644
index 00000000000..929909124a1
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10520.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib
+
+BINUTILS_PV="2.20.1"
+NEWLIB_PV="1.20.0"
+GCC_PV="4.4.3"
+NACL_REVISION="${PV##*_p}"
+
+DESCRIPTION="Native Client newlib-based toolchain (only for compiling IRT)"
+HOMEPAGE="http://code.google.com/chrome/nativeclient/"
+SRC_URI="mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.bz2
+ ftp://sources.redhat.com/pub/newlib/newlib-${NEWLIB_PV}.tar.gz
+ mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/nacltoolchain-buildscripts-r${NACL_REVISION}.tar.gz
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclbinutils-${BINUTILS_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclnewlib-${NEWLIB_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclgcc-${GCC_PV}-r${NACL_REVISION}.patch.bz2
+"
+
+LICENSE="BSD" # NaCl
+LICENSE+=" || ( GPL-3 LGPL-3 )" # binutils
+LICENSE+=" NEWLIB LIBGLOSS GPL-2" # newlib
+LICENSE+=" GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" # gcc
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping with a non-NaCl strip breaks the toolchain, bug #386931.
+# Tests are broken, bug #391761.
+RESTRICT="strip test"
+
+# Executable section checks do not make sense for newlib, bug #390383.
+QA_EXECSTACK="usr/lib*/nacl-toolchain-newlib/*/lib*/*"
+
+RDEPEND="
+ >=dev-libs/gmp-5.0.2
+ >=dev-libs/mpfr-3.0.1
+ >=sys-libs/glibc-2.8
+ >=sys-libs/zlib-1.1.4
+"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ dev-libs/mpc
+ dev-libs/cloog-ppl
+ dev-libs/ppl
+ >=media-libs/libart_lgpl-2.1
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/binutils-2.15.94
+ >=sys-devel/bison-1.875
+ >=sys-devel/flex-2.5.4
+ sys-devel/gnuconfig
+ sys-devel/m4
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-apps/sed-4
+ sys-devel/gettext
+ virtual/libiconv
+ virtual/yacc
+"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ # Unset variables known to break the build. This is a black-list
+ # rather than white-list because it's not obvious how to come up
+ # with a comprehensive white-list.
+ # For more info see bug #413995.
+ unset -v LANGUAGES || die
+}
+
+src_prepare() {
+ mkdir SRC || die
+ mv binutils-${BINUTILS_PV} SRC/binutils || die
+ mv newlib-${NEWLIB_PV} SRC/newlib || die
+ mv gcc-${GCC_PV} SRC/gcc || die
+ cd SRC || die
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch "${S}"
+
+ # Parallel build failure, bug #437048.
+ epatch "${FILESDIR}/gcc-parallel-build-r0.patch"
+}
+
+src_compile() {
+ strip-flags # See bug #390589.
+ emake PREFIX="${PWD}/${PN}" CANNED_REVISION="yes" build-with-newlib
+}
+
+src_install() {
+ local TOOLCHAIN_HOME="/usr/$(get_libdir)"
+ dodir "${TOOLCHAIN_HOME}"
+ mv "${WORKDIR}/${PN}" "${ED}/${TOOLCHAIN_HOME}" || die
+}
diff --git a/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10915.ebuild b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10915.ebuild
new file mode 100644
index 00000000000..e0b95b7f1d5
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p10915.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib
+
+BINUTILS_PV="2.20.1"
+NEWLIB_PV="1.20.0"
+GCC_PV="4.4.3"
+NACL_REVISION="${PV##*_p}"
+
+DESCRIPTION="Native Client newlib-based toolchain (only for compiling IRT)"
+HOMEPAGE="http://code.google.com/chrome/nativeclient/"
+SRC_URI="mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.bz2
+ ftp://sources.redhat.com/pub/newlib/newlib-${NEWLIB_PV}.tar.gz
+ mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/nacltoolchain-buildscripts-r${NACL_REVISION}.tar.gz
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclbinutils-${BINUTILS_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclnewlib-${NEWLIB_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclgcc-${GCC_PV}-r${NACL_REVISION}.patch.bz2
+"
+
+LICENSE="BSD" # NaCl
+LICENSE+=" || ( GPL-3 LGPL-3 )" # binutils
+LICENSE+=" NEWLIB LIBGLOSS GPL-2" # newlib
+LICENSE+=" GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" # gcc
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping with a non-NaCl strip breaks the toolchain, bug #386931.
+# Tests are broken, bug #391761.
+RESTRICT="strip test"
+
+# Executable section checks do not make sense for newlib, bug #390383.
+QA_EXECSTACK="usr/lib*/nacl-toolchain-newlib/*/lib*/*"
+
+RDEPEND="
+ >=dev-libs/gmp-5.0.2
+ >=dev-libs/mpfr-3.0.1
+ >=sys-libs/glibc-2.8
+ >=sys-libs/zlib-1.1.4
+"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ dev-libs/mpc
+ dev-libs/cloog-ppl
+ dev-libs/ppl
+ >=media-libs/libart_lgpl-2.1
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/binutils-2.15.94
+ >=sys-devel/bison-1.875
+ >=sys-devel/flex-2.5.4
+ sys-devel/gnuconfig
+ sys-devel/m4
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-apps/sed-4
+ sys-devel/gettext
+ virtual/libiconv
+ virtual/yacc
+"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ # Unset variables known to break the build. This is a black-list
+ # rather than white-list because it's not obvious how to come up
+ # with a comprehensive white-list.
+ # For more info see bug #413995.
+ unset -v LANGUAGES || die
+}
+
+src_prepare() {
+ mkdir SRC || die
+ mv binutils-${BINUTILS_PV} SRC/binutils || die
+ mv newlib-${NEWLIB_PV} SRC/newlib || die
+ mv gcc-${GCC_PV} SRC/gcc || die
+ cd SRC || die
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch "${S}"
+
+ # Parallel build failure, bug #437048.
+ epatch "${FILESDIR}/gcc-parallel-build-r0.patch"
+
+ cd "${S}/SRC/binutils" || die
+ epatch "${FILESDIR}/binutils-texinfo-r0.patch"
+
+ cd "${S}/SRC/gcc" || die
+ epatch "${FILESDIR}/gcc-texinfo-r0.patch"
+}
+
+src_compile() {
+ strip-flags # See bug #390589.
+ emake PREFIX="${PWD}/${PN}" CANNED_REVISION="yes" build-with-newlib
+}
+
+src_install() {
+ local TOOLCHAIN_HOME="/usr/$(get_libdir)"
+ dodir "${TOOLCHAIN_HOME}"
+ mv "${WORKDIR}/${PN}" "${ED}/${TOOLCHAIN_HOME}" || die
+}
diff --git a/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p11846.ebuild b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p11846.ebuild
new file mode 100644
index 00000000000..e0b95b7f1d5
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p11846.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib
+
+BINUTILS_PV="2.20.1"
+NEWLIB_PV="1.20.0"
+GCC_PV="4.4.3"
+NACL_REVISION="${PV##*_p}"
+
+DESCRIPTION="Native Client newlib-based toolchain (only for compiling IRT)"
+HOMEPAGE="http://code.google.com/chrome/nativeclient/"
+SRC_URI="mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.bz2
+ ftp://sources.redhat.com/pub/newlib/newlib-${NEWLIB_PV}.tar.gz
+ mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/nacltoolchain-buildscripts-r${NACL_REVISION}.tar.gz
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclbinutils-${BINUTILS_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclnewlib-${NEWLIB_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclgcc-${GCC_PV}-r${NACL_REVISION}.patch.bz2
+"
+
+LICENSE="BSD" # NaCl
+LICENSE+=" || ( GPL-3 LGPL-3 )" # binutils
+LICENSE+=" NEWLIB LIBGLOSS GPL-2" # newlib
+LICENSE+=" GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" # gcc
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Stripping with a non-NaCl strip breaks the toolchain, bug #386931.
+# Tests are broken, bug #391761.
+RESTRICT="strip test"
+
+# Executable section checks do not make sense for newlib, bug #390383.
+QA_EXECSTACK="usr/lib*/nacl-toolchain-newlib/*/lib*/*"
+
+RDEPEND="
+ >=dev-libs/gmp-5.0.2
+ >=dev-libs/mpfr-3.0.1
+ >=sys-libs/glibc-2.8
+ >=sys-libs/zlib-1.1.4
+"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ dev-libs/mpc
+ dev-libs/cloog-ppl
+ dev-libs/ppl
+ >=media-libs/libart_lgpl-2.1
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/binutils-2.15.94
+ >=sys-devel/bison-1.875
+ >=sys-devel/flex-2.5.4
+ sys-devel/gnuconfig
+ sys-devel/m4
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-apps/sed-4
+ sys-devel/gettext
+ virtual/libiconv
+ virtual/yacc
+"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ # Unset variables known to break the build. This is a black-list
+ # rather than white-list because it's not obvious how to come up
+ # with a comprehensive white-list.
+ # For more info see bug #413995.
+ unset -v LANGUAGES || die
+}
+
+src_prepare() {
+ mkdir SRC || die
+ mv binutils-${BINUTILS_PV} SRC/binutils || die
+ mv newlib-${NEWLIB_PV} SRC/newlib || die
+ mv gcc-${GCC_PV} SRC/gcc || die
+ cd SRC || die
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch "${S}"
+
+ # Parallel build failure, bug #437048.
+ epatch "${FILESDIR}/gcc-parallel-build-r0.patch"
+
+ cd "${S}/SRC/binutils" || die
+ epatch "${FILESDIR}/binutils-texinfo-r0.patch"
+
+ cd "${S}/SRC/gcc" || die
+ epatch "${FILESDIR}/gcc-texinfo-r0.patch"
+}
+
+src_compile() {
+ strip-flags # See bug #390589.
+ emake PREFIX="${PWD}/${PN}" CANNED_REVISION="yes" build-with-newlib
+}
+
+src_install() {
+ local TOOLCHAIN_HOME="/usr/$(get_libdir)"
+ dodir "${TOOLCHAIN_HOME}"
+ mv "${WORKDIR}/${PN}" "${ED}/${TOOLCHAIN_HOME}" || die
+}
diff --git a/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p9093.ebuild b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p9093.ebuild
new file mode 100644
index 00000000000..0beb032bfaa
--- /dev/null
+++ b/dev-lang/nacl-toolchain-newlib/nacl-toolchain-newlib-0_p9093.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib
+
+BINUTILS_PV="2.20.1"
+NEWLIB_PV="1.20.0"
+GCC_PV="4.4.3"
+NACL_REVISION="${PV##*_p}"
+
+DESCRIPTION="Native Client newlib-based toolchain (only for compiling IRT)"
+HOMEPAGE="http://code.google.com/chrome/nativeclient/"
+SRC_URI="mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.bz2
+ ftp://sources.redhat.com/pub/newlib/newlib-${NEWLIB_PV}.tar.gz
+ mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/nacltoolchain-buildscripts-r${NACL_REVISION}.tar.gz
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclbinutils-${BINUTILS_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclnewlib-${NEWLIB_PV}-r${NACL_REVISION}.patch.bz2
+ http://gsdview.appspot.com/nativeclient-archive2/x86_toolchain/r${NACL_REVISION}/naclgcc-${GCC_PV}-r${NACL_REVISION}.patch.bz2
+"
+
+LICENSE="BSD" # NaCl
+LICENSE+=" || ( GPL-3 LGPL-3 )" # binutils
+LICENSE+=" NEWLIB LIBGLOSS GPL-2" # newlib
+LICENSE+=" GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" # gcc
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Stripping with a non-NaCl strip breaks the toolchain, bug #386931.
+# Tests are broken, bug #391761.
+RESTRICT="strip test"
+
+# Executable section checks do not make sense for newlib, bug #390383.
+QA_EXECSTACK="usr/lib*/nacl-toolchain-newlib/*/lib*/*"
+
+RDEPEND="
+ >=dev-libs/gmp-5.0.2
+ >=dev-libs/mpfr-3.0.1
+ >=sys-libs/glibc-2.8
+ >=sys-libs/zlib-1.1.4
+"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ dev-libs/mpc
+ dev-libs/cloog-ppl
+ dev-libs/ppl
+ >=media-libs/libart_lgpl-2.1
+ >=sys-apps/texinfo-4.8
+ >=sys-devel/binutils-2.15.94
+ >=sys-devel/bison-1.875
+ >=sys-devel/flex-2.5.4
+ sys-devel/gnuconfig
+ sys-devel/m4
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-apps/sed-4
+ sys-devel/gettext
+ virtual/libiconv
+ virtual/yacc
+"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ # Unset variables known to break the build. This is a black-list
+ # rather than white-list because it's not obvious how to come up
+ # with a comprehensive white-list.
+ # For more info see bug #413995.
+ unset -v LANGUAGES || die
+}
+
+src_prepare() {
+ mkdir SRC || die
+ mv binutils-${BINUTILS_PV} SRC/binutils || die
+ mv newlib-${NEWLIB_PV} SRC/newlib || die
+ mv gcc-${GCC_PV} SRC/gcc || die
+ cd SRC || die
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch "${S}"
+
+ # Parallel build failure, bug #437048.
+ epatch "${FILESDIR}/gcc-parallel-build-r0.patch"
+
+ cd "${S}/SRC/binutils" || die
+ epatch "${FILESDIR}/binutils-texinfo-r0.patch"
+
+ cd "${S}/SRC/gcc" || die
+ epatch "${FILESDIR}/gcc-texinfo-r0.patch"
+}
+
+src_compile() {
+ strip-flags # See bug #390589.
+ emake PREFIX="${PWD}/${PN}" CANNED_REVISION="yes" build-with-newlib
+}
+
+src_install() {
+ local TOOLCHAIN_HOME="/usr/$(get_libdir)"
+ dodir "${TOOLCHAIN_HOME}"
+ mv "${WORKDIR}/${PN}" "${ED}/${TOOLCHAIN_HOME}" || die
+}
diff --git a/dev-lang/nasm/Manifest b/dev-lang/nasm/Manifest
new file mode 100644
index 00000000000..5b50dc71e88
--- /dev/null
+++ b/dev-lang/nasm/Manifest
@@ -0,0 +1 @@
+DIST nasm-2.11.08.tar.xz 764872 SHA256 c99467c7072211c550d147640d8a1a0aa4d636d4d8cf849f3bf4317d900a1f7f SHA512 f7caf42d0fe1b850de13180a1f363e34a6d44a02696312dd8f12f4116ad1c1f3d01e6606c3a79fb881e76fc70d20894d85b333c84a75d60265ff9551f7b8cde4 WHIRLPOOL d13f342d59aedf2510347f847a2f5fb276a3bdb9e7b8c5cac6ac4e204a03ea31e477adc19facbf68f939245aae72971b232f1a0fc461ef554458f8956403c623
diff --git a/dev-lang/nasm/metadata.xml b/dev-lang/nasm/metadata.xml
new file mode 100644
index 00000000000..a648b4a6e51
--- /dev/null
+++ b/dev-lang/nasm/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>
+ <email>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+</maintainer>
+<longdescription>
+The Netwide Assembler, NASM, is an 80x86 assembler designed for portability
+and modularity. It supports a range of object file formats, including Linux
+and NetBSD/FreeBSD a.out, ELF, COFF, Microsoft 16-bit OBJ and Win32. It
+will also output plain binary files. Its syntax is designed to be simple
+and easy to understand, similar to Intel's but less complex. It supports
+Pentium, P6, MMX, 3DNow!, SSE and SSE2 opcodes, and has macro capability.
+</longdescription>
+</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 00000000000..8057415ba78
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.11.08.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="http://nasm.sourceforge.net/"
+SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~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/niecza-bin/Manifest b/dev-lang/niecza-bin/Manifest
new file mode 100644
index 00000000000..b09f2e8b74e
--- /dev/null
+++ b/dev-lang/niecza-bin/Manifest
@@ -0,0 +1,4 @@
+DIST niecza-20.zip 1878083 SHA256 2ca2542c563130c5d4b45d5bd251601472695457568fc63cab6b6cbe3969c0e7 SHA512 2d587029a1037fca3901c0c1caadd6f6e5d9951d6804c54ef0262b69a7429c13458bd4e6eeb83a823ecb02afe93a3e9d0364065f1ca37412c674533a290363a6 WHIRLPOOL 580a62dbfdec49546c19b567b477727f3ff41a355b5d8cf50afa0418feda7768012049bf86737e97eb489b7871432835169b007a7ec7f65d3ed1ef487a7d0c09
+DIST niecza-21.zip 737733 SHA256 b4d01a79137134d25e22c8085212571cdadcd7ea519bede42f161acd1d1dfdba SHA512 34c29fb8d427c5dc98ead5acd1e49becf5b67a4c34478b431975d975047c9601a5a7192d400088ff36cd907543bc0e32457000cfd565078d8c4c48c810d23c53 WHIRLPOOL 1b319fa101b93778b25e1d60a44462f026def9a0f3d0f7572c24abb6075e90da179c310f61e6d6c52a37bc13e201a79a11a99e65dae8b225e063cd75acde7251
+DIST niecza-22.zip 1909281 SHA256 b4220bf2d12505ea576405e84b2402a9532af3e6e953d5f3f0b576f21114e6b0 SHA512 decfa04d7614f3d335e8991a0938821fe0ca26f2892a2d6d9d498ab8c84c11f2b6b620101633c7b27faf65e100775baefa23cb5c0072a34037803caa5dc4d800 WHIRLPOOL 67275813b182434853290d4abe2546c26691b67747b6be681fd9276310b720d36a86ab2a4f1ade23c5b3f551ca0e399c64242896e6bd7f332659f3821b1df302
+DIST niecza-24.zip 1577897 SHA256 182055b5c2c187e1bebb4dd3fe34c62ea39cdb67188b9548df6aa78864141af6 SHA512 f4fa5cf6aa98a102d193bbbcf14ab0079831a2344684fb9190bebd1ec25e93c0078a816a7ddb9bb17c3a017f2b34a1dcf32e9016cf26d7b1721ad94baeefafe7 WHIRLPOOL 635b415945ffd25f3b84af205f5edd428adb6776a8981954bd810400f364fb164d2f54bd076e0f379ef9f4d0a0b8b2d0350db47654084f639bf9f0fca2ee05f8
diff --git a/dev-lang/niecza-bin/metadata.xml b/dev-lang/niecza-bin/metadata.xml
new file mode 100644
index 00000000000..be595113bf8
--- /dev/null
+++ b/dev-lang/niecza-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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">sorear/niecza</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/niecza-bin/niecza-bin-20.ebuild b/dev-lang/niecza-bin/niecza-bin-20.ebuild
new file mode 100644
index 00000000000..5c4b25e9820
--- /dev/null
+++ b/dev-lang/niecza-bin/niecza-bin-20.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+
+MY_PN="niecza"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="mirror://github/sorear/${MY_PN}/${MY_P}.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ mkdir "${D}"/opt/niecza-bin -p
+ cp -r "${WORKDIR}"/* "${D}"/opt/niecza-bin || die "Failed to copy"
+ einfo "The binary is installed to /opt/niecza-bin/run/Niecza.exe"
+}
diff --git a/dev-lang/niecza-bin/niecza-bin-21.ebuild b/dev-lang/niecza-bin/niecza-bin-21.ebuild
new file mode 100644
index 00000000000..5c4b25e9820
--- /dev/null
+++ b/dev-lang/niecza-bin/niecza-bin-21.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+
+MY_PN="niecza"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="mirror://github/sorear/${MY_PN}/${MY_P}.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ mkdir "${D}"/opt/niecza-bin -p
+ cp -r "${WORKDIR}"/* "${D}"/opt/niecza-bin || die "Failed to copy"
+ einfo "The binary is installed to /opt/niecza-bin/run/Niecza.exe"
+}
diff --git a/dev-lang/niecza-bin/niecza-bin-22.ebuild b/dev-lang/niecza-bin/niecza-bin-22.ebuild
new file mode 100644
index 00000000000..5c4b25e9820
--- /dev/null
+++ b/dev-lang/niecza-bin/niecza-bin-22.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+
+MY_PN="niecza"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="mirror://github/sorear/${MY_PN}/${MY_P}.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ mkdir "${D}"/opt/niecza-bin -p
+ cp -r "${WORKDIR}"/* "${D}"/opt/niecza-bin || die "Failed to copy"
+ einfo "The binary is installed to /opt/niecza-bin/run/Niecza.exe"
+}
diff --git a/dev-lang/niecza-bin/niecza-bin-24.ebuild b/dev-lang/niecza-bin/niecza-bin-24.ebuild
new file mode 100644
index 00000000000..5c4b25e9820
--- /dev/null
+++ b/dev-lang/niecza-bin/niecza-bin-24.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+
+MY_PN="niecza"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="mirror://github/sorear/${MY_PN}/${MY_P}.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+src_configure() { :; }
+
+src_compile() { :; }
+
+src_install() {
+ mkdir "${D}"/opt/niecza-bin -p
+ cp -r "${WORKDIR}"/* "${D}"/opt/niecza-bin || die "Failed to copy"
+ einfo "The binary is installed to /opt/niecza-bin/run/Niecza.exe"
+}
diff --git a/dev-lang/niecza/Manifest b/dev-lang/niecza/Manifest
new file mode 100644
index 00000000000..ace23986062
--- /dev/null
+++ b/dev-lang/niecza/Manifest
@@ -0,0 +1,4 @@
+DIST niecza-19.zip 728618 SHA256 b320a72e77531515bafb2c1e1588572f39f24e9c38305eb4cbe60569e87845e9 SHA512 3be02a89f9698724fd4a5d8aad0dd2946a5cb4ace9bf519d0ddb52d159596beeeb162884a8b98b4fcdf8b322149ae222b3dd11caeb369218d73afe3194ab186c WHIRLPOOL 5e627ce9d885ed059bda2a898518bce551d82ca7801f5239b010316d5ce2aaf7c70ca063c73b204f06b72825158650a30653092ba86156e25021ad4bc67569b5
+DIST niecza-21.zip 737733 SHA256 b4d01a79137134d25e22c8085212571cdadcd7ea519bede42f161acd1d1dfdba SHA512 34c29fb8d427c5dc98ead5acd1e49becf5b67a4c34478b431975d975047c9601a5a7192d400088ff36cd907543bc0e32457000cfd565078d8c4c48c810d23c53 WHIRLPOOL 1b319fa101b93778b25e1d60a44462f026def9a0f3d0f7572c24abb6075e90da179c310f61e6d6c52a37bc13e201a79a11a99e65dae8b225e063cd75acde7251
+DIST niecza-22-src.zip 740724 SHA256 4c3be30c7df4d02318ad2da95180e69f07a36d6157aa6b9d08173bc785e30a20 SHA512 0e583fd9b20e872f2bb07066f5a770b2d53b44dedeac7e7e92cb482ed9b5ffa898221a1a856f8692be1e2aa5488a4685c3933d4d6c37003227fb88e5e913a329 WHIRLPOOL 477a396aba393b6397d093fa4aac42ef817c61101fdc328d8ce1f4db2c4d2ab4f36f4081d4c19d9e8682fb1889fecc1e337d14e4e17e66fdd9a6358d4a14309b
+DIST niecza-24-src.zip 760567 SHA256 db296e7a15ec546f30478de5fa047b93a6f3e85edfcef4154d25ff87fc82837e SHA512 438791f61a417f846c525ec13199e61c83f95fc7f503e2f0f0fe805f168121f2d09f1a5507e92019ffba842b51ef7a2a33746903f097981be63c5631d6cf0582 WHIRLPOOL 3c08ff3a513f5145461007c9d7eff83460396d6c47f771002f85ee4dd51117eb1201e0e2d9e51e1872ff085cc92d7991b1e1a1d120fa3dcef63458cba1080fac
diff --git a/dev-lang/niecza/files/fix-bootstrap-21.patch b/dev-lang/niecza/files/fix-bootstrap-21.patch
new file mode 100644
index 00000000000..91ad5f82fdd
--- /dev/null
+++ b/dev-lang/niecza/files/fix-bootstrap-21.patch
@@ -0,0 +1,13 @@
+--- Makefile 2012-06-25 22:30:16.000000000 +0800
++++ Makefile.new 2012-08-22 10:55:22.879717085 +0800
+@@ -41,10 +41,6 @@
+ $(RUN_CLR) run/Kernel.dll -gen-app Niecza boot/obj
+
+ .fetch-stamp: FETCH_URL
+- -rm -rf boot/
+- mkdir boot
+- $(WGET_O) boot/niecza.zip $$(cat FETCH_URL)
+- cd boot && unzip niecza.zip
+ NIECZA_KEEP_IL=1 $(RUN_CLR) boot/run/Niecza.exe -C $(libunits)
+ $(CP) boot/run/Kernel.dll boot/obj/
+ touch .fetch-stamp
diff --git a/dev-lang/niecza/files/fix-bootstrap-22.patch b/dev-lang/niecza/files/fix-bootstrap-22.patch
new file mode 100644
index 00000000000..00f0e997ebd
--- /dev/null
+++ b/dev-lang/niecza/files/fix-bootstrap-22.patch
@@ -0,0 +1,13 @@
+--- Makefile 2012-06-25 22:30:16.000000000 +0800
++++ Makefile.new 2012-08-22 10:55:22.879717085 +0800
+@@ -41,10 +41,6 @@
+ $(RUN_CLR) run/Kernel.dll -gen-app Niecza boot/obj
+
+ .fetch-stamp: FETCH_URL
+- -rm -rf boot/
+- mkdir boot
+- $(WGET_O) boot/niecza.zip $$(cat FETCH_URL)
+- cd boot && unzip niecza.zip
+ NIECZA_KEEP_IL=1 $(RUN_CLR) boot/run/Niecza.exe --obj-dir=boot/obj -C $(libunits)
+ $(CP) boot/run/Kernel.dll boot/obj/
+ touch .fetch-stamp
diff --git a/dev-lang/niecza/files/fix-bootstrap-24.patch b/dev-lang/niecza/files/fix-bootstrap-24.patch
new file mode 100644
index 00000000000..dc3c8467114
--- /dev/null
+++ b/dev-lang/niecza/files/fix-bootstrap-24.patch
@@ -0,0 +1,13 @@
+--- Makefile 2012-06-25 22:30:16.000000000 +0800
++++ Makefile.new 2012-08-22 10:55:22.879717085 +0800
+@@ -41,10 +41,6 @@
+ $(RUN_CLR) run/Kernel.dll -gen-app Niecza boot/obj
+
+ .fetch-stamp: FETCH_URL
+- -rm -rf boot/
+- mkdir boot
+- $(WGET_O) boot/niecza.zip $$(cat FETCH_URL)
+- cd boot && unzip niecza.zip
+ NIECZA_KEEP_IL=1 $(RUN_CLR) boot/run/Niecza.exe --obj-dir=run -C $(libunits)
+ $(CP) boot/run/Kernel.dll boot/obj/
+ touch .fetch-stamp
diff --git a/dev-lang/niecza/files/fix-bootstrap-9999.patch b/dev-lang/niecza/files/fix-bootstrap-9999.patch
new file mode 100644
index 00000000000..00f0e997ebd
--- /dev/null
+++ b/dev-lang/niecza/files/fix-bootstrap-9999.patch
@@ -0,0 +1,13 @@
+--- Makefile 2012-06-25 22:30:16.000000000 +0800
++++ Makefile.new 2012-08-22 10:55:22.879717085 +0800
+@@ -41,10 +41,6 @@
+ $(RUN_CLR) run/Kernel.dll -gen-app Niecza boot/obj
+
+ .fetch-stamp: FETCH_URL
+- -rm -rf boot/
+- mkdir boot
+- $(WGET_O) boot/niecza.zip $$(cat FETCH_URL)
+- cd boot && unzip niecza.zip
+ NIECZA_KEEP_IL=1 $(RUN_CLR) boot/run/Niecza.exe --obj-dir=boot/obj -C $(libunits)
+ $(CP) boot/run/Kernel.dll boot/obj/
+ touch .fetch-stamp
diff --git a/dev-lang/niecza/files/fix-bootstrap.patch b/dev-lang/niecza/files/fix-bootstrap.patch
new file mode 100644
index 00000000000..71d02385824
--- /dev/null
+++ b/dev-lang/niecza/files/fix-bootstrap.patch
@@ -0,0 +1,13 @@
+--- Makefile 2012-06-25 22:30:16.000000000 +0800
++++ Makefile.new 2012-08-22 10:55:22.879717085 +0800
+@@ -37,10 +37,6 @@
+ $(RUN_CLR) run/Kernel.dll -gen-app Niecza boot/obj
+
+ .fetch-stamp: FETCH_URL
+- -rm -rf boot/
+- mkdir boot
+- wget --no-check-certificate -Oboot/niecza.zip $$(cat FETCH_URL)
+- cd boot && unzip niecza.zip
+ NIECZA_KEEP_IL=1 $(RUN_CLR) boot/run/Niecza.exe -C $(libunits)
+ $(CP) boot/run/Kernel.dll boot/obj/
+ touch .fetch-stamp
diff --git a/dev-lang/niecza/metadata.xml b/dev-lang/niecza/metadata.xml
new file mode 100644
index 00000000000..be595113bf8
--- /dev/null
+++ b/dev-lang/niecza/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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">sorear/niecza</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/niecza/niecza-19.ebuild b/dev-lang/niecza/niecza-19.ebuild
new file mode 100644
index 00000000000..77b590435c7
--- /dev/null
+++ b/dev-lang/niecza/niecza-19.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+GITHUB_CRAP="sorear-niecza-3743eb0"
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+#SRC_URI="https://github.com/downloads/sorear/${PN}/${P}.zip"
+SRC_URI="https://github.com/sorear/niecza/zipball/v19 -> niecza-19.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}
+ || ( dev-lang/niecza-bin dev-lang/niecza )"
+
+S=${WORKDIR}/${GITHUB_CRAP}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix-bootstrap.patch || die "Failed to fix"
+ cd "${S}"
+ # bootstrap only works from git dirs? sigh :)
+ sed -i -e 's:@git describe --tags:echo "v19":' Makefile
+ # silly workaround for stuff trying to write everywhere: copy the installed niecza here (sigh)
+ # since we have different installation paths for the bin version we need to check here
+ mkdir boot -p
+ if has_version dev-lang/niecza; then
+ cp -r /opt/niecza/* boot/
+ else
+ cp -r /opt/niecza-bin/* boot/
+ fi
+}
+
+src_configure() { :; }
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ mkdir -p "${D}"/opt/niecza
+ for i in docs lib obj run README.pod; do
+ cp -r "${S}"/$i "${D}"/opt/niecza/ || die "Failed to install"
+ done
+}
diff --git a/dev-lang/niecza/niecza-21.ebuild b/dev-lang/niecza/niecza-21.ebuild
new file mode 100644
index 00000000000..e9d75386d9c
--- /dev/null
+++ b/dev-lang/niecza/niecza-21.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+GITHUB_CRAP="sorear-niecza-50939fa"
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+SRC_URI="https://github.com/sorear/niecza/zipball/v${PV} -> niecza-${PV}.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}
+ || ( dev-lang/niecza-bin dev-lang/niecza )"
+
+S=${WORKDIR}/${GITHUB_CRAP}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix-bootstrap-${PV}.patch || die "Failed to fix"
+ cd "${S}"
+ # bootstrap only works from git dirs? sigh :)
+ sed -i -e 's:@git describe --tags:echo "v${PV}":' Makefile
+ # silly workaround for stuff trying to write everywhere: copy the installed niecza here (sigh)
+ # since we have different installation paths for the bin version we need to check here
+ mkdir boot -p
+ if has_version dev-lang/niecza; then
+ cp -r /opt/niecza/* boot/
+ else
+ cp -r /opt/niecza-bin/* boot/
+ fi
+ mkdir -p boot/obj
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export XDG_DATA_HOME="${S}"
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ mkdir -p "${D}"/opt/niecza
+ for i in docs lib obj run README.pod; do
+ cp -r "${S}"/$i "${D}"/opt/niecza/ || die "Failed to install"
+ done
+}
diff --git a/dev-lang/niecza/niecza-22.ebuild b/dev-lang/niecza/niecza-22.ebuild
new file mode 100644
index 00000000000..c4960e07a2c
--- /dev/null
+++ b/dev-lang/niecza/niecza-22.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+GITHUB_CRAP="sorear-niecza-8d7386f"
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+SRC_URI="https://github.com/sorear/niecza/zipball/v${PV} -> niecza-${PV}-src.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}
+ || ( dev-lang/niecza-bin dev-lang/niecza )"
+
+S=${WORKDIR}/${GITHUB_CRAP}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix-bootstrap-${PV}.patch || die "Failed to fix"
+ cd "${S}"
+ # bootstrap only works from git dirs? sigh :)
+ sed -i -e 's:@git describe --tags:echo "v${PV}":' Makefile
+ # silly workaround for stuff trying to write everywhere: copy the installed niecza here (sigh)
+ # since we have different installation paths for the bin version we need to check here
+ mkdir boot -p
+ if has_version dev-lang/niecza; then
+ cp -r /opt/niecza/* boot/
+ else
+ cp -r /opt/niecza-bin/* boot/
+ fi
+ mkdir -p boot/obj
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export XDG_DATA_HOME="${S}"
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ mkdir -p "${D}"/opt/niecza
+ for i in docs lib obj run README.pod; do
+ cp -r "${S}"/$i "${D}"/opt/niecza/ || die "Failed to install"
+ done
+}
diff --git a/dev-lang/niecza/niecza-24.ebuild b/dev-lang/niecza/niecza-24.ebuild
new file mode 100644
index 00000000000..8b3e851247e
--- /dev/null
+++ b/dev-lang/niecza/niecza-24.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib
+
+GITHUB_CRAP="sorear-niecza-287cfa1"
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+SRC_URI="https://github.com/sorear/niecza/zipball/v${PV} -> niecza-${PV}-src.zip"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}
+ || ( dev-lang/niecza-bin dev-lang/niecza )"
+
+S=${WORKDIR}/${GITHUB_CRAP}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix-bootstrap-${PV}.patch || die "Failed to fix"
+ cd "${S}"
+ # bootstrap only works from git dirs? sigh :)
+ sed -i -e 's:@git describe --tags:echo "v${PV}":' Makefile
+ # silly workaround for stuff trying to write everywhere: copy the installed niecza here (sigh)
+ # since we have different installation paths for the bin version we need to check here
+ mkdir boot -p
+ if has_version dev-lang/niecza; then
+ cp -r /opt/niecza/* boot/
+ else
+ cp -r /opt/niecza-bin/* boot/
+ fi
+ mkdir -p boot/obj
+}
+
+src_configure() { :; }
+
+src_compile() {
+ export XDG_DATA_HOME="${S}"
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ mkdir -p "${D}"/opt/niecza
+ for i in docs lib obj run README.pod; do
+ cp -r "${S}"/$i "${D}"/opt/niecza/ || die "Failed to install"
+ done
+}
diff --git a/dev-lang/niecza/niecza-9999.ebuild b/dev-lang/niecza/niecza-9999.ebuild
new file mode 100644
index 00000000000..740581feba3
--- /dev/null
+++ b/dev-lang/niecza/niecza-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils git-2
+
+GITHUB_CRAP="sorear-niecza-3743eb0"
+
+DESCRIPTION="A Perl 6 compiler targetting the CLR with an experimental focus on optimizations"
+HOMEPAGE="https://github.com/sorear/niecza"
+EGIT_REPO_URI="https://github.com/sorear/niecza.git"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}
+ || ( dev-lang/niecza-bin dev-lang/niecza )"
+
+S=${WORKDIR}/${GITHUB_CRAP}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix-bootstrap-${PV}.patch || die "Failed to fix"
+ cd "${S}"
+ # bootstrap only works from git dirs? sigh :)
+ sed -i -e 's:@git describe --tags:echo "v9999":' Makefile
+ # silly workaround for stuff trying to write everywhere: copy the installed niecza here (sigh)
+ # since we have different installation paths for the bin version we need to check here
+ mkdir boot -p
+ if has_version dev-lang/niecza; then
+ cp -r /opt/niecza/* boot/
+ else
+ cp -r /opt/niecza-bin/* boot/
+ fi
+ mkdir -p boot/obj
+}
+
+src_configure() { :; }
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ export XDG_DATA_HOME="${S}"
+ emake -j1 test || die
+}
+
+src_install() {
+ mkdir -p "${D}"/opt/niecza
+ for i in docs lib obj run README.pod; do
+ cp -r "${S}"/$i "${D}"/opt/niecza/ || die "Failed to install"
+ done
+}
diff --git a/dev-lang/nqc/Manifest b/dev-lang/nqc/Manifest
new file mode 100644
index 00000000000..8933fec78a4
--- /dev/null
+++ b/dev-lang/nqc/Manifest
@@ -0,0 +1 @@
+DIST nqc-3.1.r6.tgz 329410 SHA256 bfd5e654f639af7a588cfdef4d22bd5efcfff547b10a56cebebde58ef2bfe766 SHA512 7ec7015861b5f8e063e3a2567f5c6ff7e5c6a65b60fab9bef71411d59b13a588f284ee3a8d06b9325748c209e21f9480b9792bc605148e2a4af64b90f872e2aa WHIRLPOOL 72c2dcb63bbdc1a1d35e0bb17c1c2838f688c69ef48d0958663c99c48855454b99a586603309b238e23eb6adc87edff40800c9ff1f81c12829d61d7e95b0a757
diff --git a/dev-lang/nqc/files/nqc-3.1_p6-flags.patch b/dev-lang/nqc/files/nqc-3.1_p6-flags.patch
new file mode 100644
index 00000000000..a27d1e454a0
--- /dev/null
+++ b/dev-lang/nqc/files/nqc-3.1_p6-flags.patch
@@ -0,0 +1,73 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Aug 21 18:14:15 UTC 2012
+Subject: build system
+
+respect flags
+
+--- Makefile
++++ Makefile
+@@ -67,7 +67,7 @@
+
+ # CFLAGS
+ #CFLAGS = -pipe -Iplatform -Ircxlib -Inqc -Icompiler -Wall -Wstrict-prototypes -Wmissing-prototypes
+-CFLAGS += -Iplatform -Ircxlib -Inqc -Icompiler -Wall
++CXXFLAGS += -Iplatform -Ircxlib -Inqc -Icompiler -Wall
+
+ USBOBJ = rcxlib/RCX_USBTowerPipe_none.o
+
+@@ -87,20 +87,20 @@
+ # Linux
+ # uncomment this next line if you have the USB tower library installed
+ # USBOBJ = rcxlib/RCX_USBTowerPipe_linux.o
+- CFLAGS += -I/usr/local/include/LegoUSB -Wno-deprecated
++ CXXFLAGS += -I/usr/include/LegoUSB -Wno-deprecated
+ else
+ ifneq (,$(findstring $(OSTYPE), SunOS))
+ # Solaris
+- CFLAGS += -DSOLARIS
++ CXXFLAGS += -DSOLARIS
+ else
+ ifneq (,$(strip $(findstring $(OSTYPE), FreeBSD)))
+ # FreeBSD
+ USBOBJ = rcxlib/RCX_USBTowerPipe_fbsd.o
+ DEFAULT_SERIAL_NAME = "/dev/cuad0"
+- CFLAGS += -Wno-deprecated
++ CXXFLAGS += -Wno-deprecated
+ else
+ # default Unix build without USB support
+- CFLAGS += -O6
++ CXXFLAGS += -O6
+ endif
+ endif
+ endif
+@@ -113,7 +113,7 @@
+ ifndef DEFAULT_SERIAL_NAME
+ DEFAULT_SERIAL_NAME = "/dev/ttyS0"
+ endif
+-CFLAGS += -DDEFAULT_SERIAL_NAME='$(DEFAULT_SERIAL_NAME)'
++CXXFLAGS += -DDEFAULT_SERIAL_NAME='$(DEFAULT_SERIAL_NAME)'
+
+ #
+ # Object files
+@@ -164,10 +164,10 @@
+ $(MKDIR) bin
+
+ bin/nqc : compiler/parse.cpp $(OBJ)
+- $(CXX) -o $@ $(OBJ) $(LIBS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+
+ bin/mkdata : mkdata/mkdata.cpp nqc/SRecord.cpp
+- $(CXX) -o bin/mkdata -Inqc/ -Iplatform/ mkdata/mkdata.cpp nqc/SRecord.cpp
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o bin/mkdata -Inqc/ -Iplatform/ mkdata/mkdata.cpp nqc/SRecord.cpp
+
+ #
+ # clean up stuff
+@@ -227,7 +227,7 @@
+ # general rule for compiling
+ #
+ .cpp.o:
+- $(CXX) -c $(CFLAGS) $< -o $*.o
++ $(CXX) -c $(CXXFLAGS) $< -o $*.o
+
+
+ #
diff --git a/dev-lang/nqc/files/nqc-3.1_p6-gcc-4.7.patch b/dev-lang/nqc/files/nqc-3.1_p6-gcc-4.7.patch
new file mode 100644
index 00000000000..73a96abef29
--- /dev/null
+++ b/dev-lang/nqc/files/nqc-3.1_p6-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ compiler/lexer.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/compiler/lexer.cpp b/compiler/lexer.cpp
+index 14e6d92..274b1a7 100755
+--- a/compiler/lexer.cpp
++++ b/compiler/lexer.cpp
+@@ -10,6 +10,7 @@
+ #define YY_FLEX_MAJOR_VERSION 2
+ #define YY_FLEX_MINOR_VERSION 5
+
++#include <unistd.h>
+ #include <stdio.h>
+
+ #if defined(__MWERKS__) && !__MACH__ && !YY_NEVER_INTERACTIVE
diff --git a/dev-lang/nqc/metadata.xml b/dev-lang/nqc/metadata.xml
new file mode 100644
index 00000000000..59e2b8f78cb
--- /dev/null
+++ b/dev-lang/nqc/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>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/nqc/nqc-3.1_p6.ebuild b/dev-lang/nqc/nqc-3.1_p6.ebuild
new file mode 100644
index 00000000000..cc855704a87
--- /dev/null
+++ b/dev-lang/nqc/nqc-3.1_p6.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Not Quite C - C-like compiler for Lego Mindstorms"
+HOMEPAGE="http://bricxcc.sourceforge.net/nqc/"
+SRC_URI="http://bricxcc.sourceforge.net/nqc/release/${P/_p/.r}.tgz"
+
+LICENSE="MPL-1.0"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="usb"
+
+DEPEND="usb? ( dev-libs/legousbtower )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ tc-export CXX
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{gcc-4.7,flags}.patch
+}
+
+src_configure() {
+ if use usb; then
+ sed -i Makefile -e 's|#.*USBOBJ =|USBOBJ =|g' || die "sed usb"
+ fi
+}
+
+src_install() {
+ dobin bin/*
+ newman nqc-man-2.1r1-0.man nqc.1
+ dodoc history.txt readme.txt scout.txt test.nqc
+}
+
+pkg_postinst() {
+ elog "To change the default serial name for nqc (/dev/ttyS0) set"
+ elog "the environment variable RCX_PORT or use the nqc command line"
+ elog "option -S to specify your serial port."
+ if use usb; then
+ echo
+ elog "You have enabled USB support. To use usb on the"
+ elog "command line use the -Susb command line option"
+ else
+ echo
+ elog "You have not enabled usb support and will be unable"
+ elog "to use the usb IR tower. To enable USB use the usb use flag"
+ fi
+}
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
new file mode 100644
index 00000000000..0062ba5901b
--- /dev/null
+++ b/dev-lang/nqp/Manifest
@@ -0,0 +1,7 @@
+DIST nqp-2015.01.tar.gz 5225188 SHA256 b661cb1c435e64ef39e149d3034414aef17c5bb5d213cdb85c8f30a8e30d475d SHA512 186bc301a55458ca872461b5e4cd98e8abb5163d734427e182112a41e63ba892dedf1f53f10f46f65ac3c3bc101cd74d55942f920f0bbb848fd8e943dc3e294b WHIRLPOOL 34a13340757c1c63172f7499b3ca5f466c8c6bde66c50c5d6b9aa35b9c60b55a18561636fa9bd165b037662fa7cf988addbd7b5c720f505986f0227a9b551219
+DIST nqp-2015.02.tar.gz 5231834 SHA256 f35c480e49fb68e2c7c99f4ab752d59ffecbb017350ed4e11b011335ae673a1b SHA512 cd25e8edb3dd25e16f6fde5d5d1752b6afdb1acb4f00b8be9348cc927bfba3708aef60c1bba63f9856b32e349277e09ed516661b79dd734415d6fbc6466a67b1 WHIRLPOOL 0bc36047ff5bd788691c1a7a0064d766c5b6c5edf4a3f2ab0dbb004f601e665bf67a15cf677a6634a7937c191afbe9eafad99c2096633324f96eaf0bc0b83c56
+DIST nqp-2015.03.tar.gz 5240119 SHA256 203c31c516a370204d8193ac824956ffd7fb5f71edbdb9712da0b20f98729020 SHA512 11f85230277929ea9f78c4c0fad867143b6e8c3eeaeec53ca2cf676c3905d071b147fad42fcbf4e83f01b2afbf80ffae15ce753d615432442af16db5a76af0c5 WHIRLPOOL 3f3944529715b1b52672d0a13bf21509f754606762ed728d503d77d3706ab4725faefc3026d34d2a9ec1efacd3f6fc17c3b9f86018ac3068c2f75a37cc12bd2a
+DIST nqp-2015.04.tar.gz 4995958 SHA256 a58e45ae42035102222bf3b3b62bd3892ccaec5aeb4b9629c6d593749d68d9b3 SHA512 84748167aef995c7e1b4c1b19e165d940ca13c7ee08802a92ada8879247dc91b01ded6d8e2a58772b4e3564628114857dcf7b5f25ce4e63ceeec17c997958fbb WHIRLPOOL c8f16aed500116f70fb7e4b039e636d46d2e519d30740f84ef8f480db0e90865425b9e4b28eaeccdc63bc02841420500562d29a63158fa8afaf83612635e8218
+DIST nqp-2015.05.tar.gz 4985712 SHA256 ad54f05422d0fbe14483b91de26c195a2d7e21e19446c6374aba5342458c7762 SHA512 0190f8e27b6dcc77cfc8f35efb7b7871e2efb56284ad7cb25b5662c14d5844262d2c491a43f8b60d567402bf2dd5264ad8736de3334d804173e3aa36a93c7449 WHIRLPOOL f4ebddf27db049478ed70c6dfbce0bda06aecddc6a088f73ee484b6f2da5aa2c59ea60619b871477b2c08ccf9969ccfcc636972d14c9c3da791a929f402f1259
+DIST nqp-2015.06.tar.gz 4986918 SHA256 07dd6ea9762c9a3d5e477472cd65584b5e00fef1403c540d2b4ce802c2cc9d26 SHA512 f5d8e9dc057d303745d691eb6f92222c6586077a8f5c3ce0bf8557f715fa7e9ddea6a333e7db1743ed9982189e13e920c0228b40e22bfd3eac9b889a589bc3cb WHIRLPOOL a8164398f54fbc1609f52352e01112681390959a53b1c3d61192800ad2ec40e3ac79c2cb67108f10ab3bd277a540b52aa16e2d989461a860990cef5c92f02b3a
+DIST nqp-2015.07.2.tar.gz 5001361 SHA256 45cde1880b314d98dd20062e93ef28f083dbf2239784e8f050456df8520a25c1 SHA512 b40ad51e37504b0c05e3d27c7a09543bb4735b3d8758a34805034600e362ae327434584f6824ef72587c37de5b51b476dbb05e8f0f248dc49ed64449f2ba1917 WHIRLPOOL 692f4ac9c669f7cf3b56e81b659f4b1d50296b4dccf9effa6f08aca9082f3b501fad140f7411e9ddbada15a5c458be21b699e850ed04574ed53699d2d28be084
diff --git a/dev-lang/nqp/metadata.xml b/dev-lang/nqp/metadata.xml
new file mode 100644
index 00000000000..bc25fd7bfc0
--- /dev/null
+++ b/dev-lang/nqp/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="parrot">Build the parrot backend (default)</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-2015.01.ebuild b/dev-lang/nqp/nqp-2015.01.ebuild
new file mode 100644
index 00000000000..5b04351ab0a
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.01.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=bba0461
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc +parrot java moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.02.ebuild b/dev-lang/nqp/nqp-2015.02.ebuild
new file mode 100644
index 00000000000..27168e2f950
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.02.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=48279f9
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc +parrot java moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.03.ebuild b/dev-lang/nqp/nqp-2015.03.ebuild
new file mode 100644
index 00000000000..caf0eebce75
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.03.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=6104d87
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc +parrot java moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.04.ebuild b/dev-lang/nqp/nqp-2015.04.ebuild
new file mode 100644
index 00000000000..5b1f02402e2
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.04.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=e415a4f
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc +parrot java moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.05.ebuild b/dev-lang/nqp/nqp-2015.05.ebuild
new file mode 100644
index 00000000000..070c65be3e3
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.05.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=d99efa9
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc parrot java +moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.06.ebuild b/dev-lang/nqp/nqp-2015.06.ebuild
new file mode 100644
index 00000000000..ab314169118
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.06.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=10ccaf4
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc parrot java +moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-${PV} )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nqp/nqp-2015.07.2.ebuild b/dev-lang/nqp/nqp-2015.07.2.ebuild
new file mode 100644
index 00000000000..9fd1feb8ff6
--- /dev/null
+++ b/dev-lang/nqp/nqp-2015.07.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# still not working
+RESTRICT="test"
+
+inherit eutils multilib versionator
+
+GITCRAP=2d22571
+PARROT_VERSION="6.7.0"
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc parrot java +moar"
+REQUIRED_USE="|| ( parrot java moar )"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ java? ( >=virtual/jre-1.7 )
+ moar? ( =dev-lang/moarvm-2015.07 )
+ dev-libs/libffi"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+S=${WORKDIR}/perl6-nqp-${GITCRAP}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use parrot && myconf+="parrot,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backend=${myconf} --prefix=/usr || die
+ # dirty hack to make dyncall not fail
+ sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
+ sed -i -e 's/-Werror=missing-declarations//' Makefile || die
+ sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
+
+ # more dirty hack to allow building with newer gcc
+ sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
+ sed -i -e 's/-Werror=nested-externs//' Makefile || die
+}
+
+src_compile() {
+ emake -j1 || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.pod || die
+
+ if use doc; then
+ dodoc -r docs/* || die
+ fi
+}
diff --git a/dev-lang/nwcc/Manifest b/dev-lang/nwcc/Manifest
new file mode 100644
index 00000000000..f21b884b47b
--- /dev/null
+++ b/dev-lang/nwcc/Manifest
@@ -0,0 +1 @@
+DIST nwcc_0.8.2.tar.gz 948656 SHA256 e274626d79b98a5d869fb7edc6264957c37addce80dc028346769e73c62f9d96 SHA512 b399baf16a41ae3782343521fc65b8e94bf76dc0a29719a3addc33881bd0d9dd68170f0e7eb2c79aaafa3ced254fac15847883a38d4a5956280fa5fed10d24e0 WHIRLPOOL da2c47fdf130ff5ad7105345a16b540529adee8e3d3a9669c08db48f17da5a0fefc1aabac8c98625731c725cf9cc9e2627a0a9a393951aff6d70cb859335b7ee
diff --git a/dev-lang/nwcc/metadata.xml b/dev-lang/nwcc/metadata.xml
new file mode 100644
index 00000000000..24cbb90cf0c
--- /dev/null
+++ b/dev-lang/nwcc/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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</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 00000000000..0601b110cad
--- /dev/null
+++ b/dev-lang/nwcc/nwcc-0.8.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/ocaml/Manifest b/dev-lang/ocaml/Manifest
new file mode 100644
index 00000000000..31e4a535f51
--- /dev/null
+++ b/dev-lang/ocaml/Manifest
@@ -0,0 +1,8 @@
+DIST ocaml-3.12.1.tar.bz2 2949124 SHA256 edcf563da75e0b91f09765649caa98ab1535e0c7498f0737b5591b7de084958d SHA512 cbb050aabcbe19a4aa070d6cb74f3774cb136692dfd9433ca977f0f9520ad2f583b6cfb1a9cedfedc92e7dc794ac4a869e20aa5a67a4739002feb290435dc7e7 WHIRLPOOL b7bf4844452ab52027e6b785159df6e4defc548d2f3d31eb73dc0dc05214e7c19ed654c8b3ff234a85691599df0be568ba02fafe257856be7f603177584a7ca0
+DIST ocaml-4.01.0.tar.bz2 3691090 SHA256 b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a SHA512 b0a4efa89d0e48e5c01922156a73a8ed67c58efa07170710eaef9de1138e1d6fff8a440b2c81860fc63c604f3a4e189b795bb08a5e9d8df60778fcd468985f6e WHIRLPOOL a31cc2c46e19ca1c5ca65ffdee77ef42b7269b1584f81629e29b725b167c7e3d9eb467a3e8171aaba7d2cf1d8aea31d1822c5631fe3e209ce7731c16112a11d3
+DIST ocaml-4.02.1.tar.xz 2031244 SHA256 68c4b01be54c23bc20fc0a8beaa5c7433b8483f8950490129cfe7662e0c6f4dc SHA512 79d257210c0ddfb0367250a688ffb58f143fcc8c159f7d6e149d42b074e811eaf69449b66ad39da399e1bdcb2bab5924d195fc7c5ebc29d44cb637c093b9931d WHIRLPOOL 2c9849f73a705a63c0d0d4682d1ab1225a3150f68bda98805dc2d2b11f100ee7206200b9dc49b07d39d1b737f45671f3662a9bf2c069d6795f26e1f9b9b65ead
+DIST ocaml-4.02.2.tar.xz 2059800 SHA256 60f923988ab7ae023a0799f9699d7d7a476bf8207ee2c900f92c8288ea363085 SHA512 f826cdb149ba594134b02d62343c5d25aca7ca2a36154e360560fe11d285c4f4905074d81db03ce71758254fc390e93ae8d530ecd08853324966f39af870d46e WHIRLPOOL 8fa47f214743000c0e372f77cfe874d1c8e5b043647c753a459a22e6045cecda3f8a18edaca75e262d4004d2b3bf11c500232864cfdf71e9231ac24af4419c0e
+DIST ocaml-4.02.3.tar.xz 2058552 SHA256 83c6697e135b599a196fd7936eaf8a53dd6b8f3155a796d18407b56f91df9ce3 SHA512 a815421f6a320b18e7f351bd66884024ad4a33525ba161a198ea356892ce331be6c1ddf4cd07d120ebe9a902bcf815ce1b17e45f405e4e0b2d55ce1b6d2adada WHIRLPOOL 1104cdcf23b773ebf0c0ef8d8ee36b2b4b58b1fab10a41ff7f2d522c34ae6161bc6cba28b279eea03ac183a111fc332557084b017d0c2ad6f9c969204e309597
+DIST ocaml-patches-3.tar.bz2 4101 SHA256 c4ceb604f4480c78d1cf4f848b0903c8d37798d9761f582d8d1643d4e38b8658 SHA512 8be5c44de5a6b0b7c14723e41d92fe807b881b218cc5eee38ea7519c0f971415cb7fe30035303da275089dcb8a61c4f334c4a88e0bdbced3953503794b8308a7 WHIRLPOOL f1920606785702c44dead01b1426145653bc1931acba2d614c6818baddc051e4f74ca0322cae66ade63ba0cd0df5651cfd67f511fca5f12973b67a0c50ebab6d
+DIST ocaml-patches-6.tar.bz2 2197 SHA256 7acfa3d056c2b3f7dfc3b1f96a2557d81802c837c2ba0abc1487de10627e5e07 SHA512 88afa904044192b945b537cbfc3c17308e333ed1d241332212b9500d01c14bb306905b03f2b48ec64dd2f428df1f7179772d742b77b4402da108ba7790239bf6 WHIRLPOOL d2001a8a3e799080c3981be87bcef62635c11cab037d6d92da186643614c6e2a568543f82f3566bfb099c063ad344cab2238edf863a9fb02081f4e20f442d9f8
+DIST ocaml-patches-7.tar.bz2 2194 SHA256 71e9496af89ded9852d8e1f32be18a5f0d7e11270958fb4bc8c588420b1e9156 SHA512 63bca96f009e2de24ff6f7a4b37b97c5b7655d5ad6196f06cc2b18ca213e87878a310d169378c341c00aaac698530e458e301620bcc21284bc8b9ea143f642dd WHIRLPOOL 02d17436f901c70b2fa8a104d8b7a6526c65ab9b40408b549c4f4dfe7a1eeae8213620d151fb181833782504e4d7cb6fa3ff7ddebe77efcb88d32fe057cbd8cc
diff --git a/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch b/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
new file mode 100644
index 00000000000..fa7664cecc9
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch
@@ -0,0 +1,66 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Tue, 8 Mar 2011 21:17:40 +0100
+Subject: [PATCH] Fix ocamlopt w.r.t. binutils 2.21
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Bug: http://caml.inria.fr/mantis/view.php?id=5237
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404
+Authors: Eric Cooper, spiralvoice
+Reviewed-by: Stéphane Glondu <steph@glondu.net>
+---
+ asmcomp/amd64/emit.mlp | 13 +++++++------
+ asmcomp/i386/emit.mlp | 6 +++---
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
+index 4a3f844..525c6e6 100644
+--- a/asmcomp/amd64/emit.mlp
++++ b/asmcomp/amd64/emit.mlp
+@@ -679,17 +679,18 @@ let fundecl fundecl =
+ emit_all true fundecl.fun_body;
+ List.iter emit_call_gc !call_gc_sites;
+ emit_call_bound_errors ();
++ begin match Config.system with
++ "linux" | "gnu" ->
++ ` .type {emit_symbol fundecl.fun_name},@function\n`;
++ ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
++ | _ -> ()
++ end;
+ if !float_constants <> [] then begin
+ if macosx
+ then ` .literal8\n`
+ else ` .section .rodata.cst8,\"a\",@progbits\n`;
+ List.iter emit_float_constant !float_constants
+- end;
+- match Config.system with
+- "linux" | "gnu" ->
+- ` .type {emit_symbol fundecl.fun_name},@function\n`;
+- ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
+- | _ -> ()
++ end
+
+ (* Emission of data *)
+
+diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
+index 2992f29..0b1252c 100644
+--- a/asmcomp/i386/emit.mlp
++++ b/asmcomp/i386/emit.mlp
+@@ -905,12 +905,12 @@ let fundecl fundecl =
+ emit_all true fundecl.fun_body;
+ List.iter emit_call_gc !call_gc_sites;
+ emit_call_bound_errors ();
+- List.iter emit_float_constant !float_constants;
+- match Config.system with
++ begin match Config.system with
+ "linux_elf" | "bsd_elf" | "gnu" ->
+ ` .type {emit_symbol fundecl.fun_name},@function\n`;
+ ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
+- | _ -> ()
++ | _ -> () end;
++ List.iter emit_float_constant !float_constants
+
+
+ (* Emission of data *)
+--
diff --git a/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch b/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch
new file mode 100644
index 00000000000..b9fa750ff07
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch
@@ -0,0 +1,15 @@
+--- ocaml-4.01.0-orig/configure 2013-08-23 16:22:36.000000000 +1000
++++ ocaml-4.01.0/configure 2014-01-18 20:06:50.669644267 +1100
+@@ -892,7 +892,11 @@
+ # For the terminfo module
+
+ if test "$withcurses" = "yes"; then
+- for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
++ ncurseslibs=""
++ if pkg-config --exists ncurses 2>/dev/null; then
++ ncurseslibs=`pkg-config --libs ncurses`
++ fi
++ for libs in "${ncurseslibs}" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
+ if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
+ echo "termcap functions found (with libraries '$libs')"
+ echo "#define HAS_TERMCAP" >> s.h
diff --git a/dev-lang/ocaml/files/ocaml-rebuild.sh b/dev-lang/ocaml/files/ocaml-rebuild.sh
new file mode 100644
index 00000000000..7dd14a4eb7d
--- /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 00000000000..083b8cef960
--- /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 00000000000..2193d772e35
--- /dev/null
+++ b/dev-lang/ocaml/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ml</herd>
+</pkgmetadata>
diff --git a/dev-lang/ocaml/ocaml-3.12.1.ebuild b/dev-lang/ocaml/ocaml-3.12.1.ebuild
new file mode 100644
index 00000000000..a662590f584
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-3.12.1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="1"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="3"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.bz2
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="emacs gdbm latex ncurses +ocamlopt tk X xemacs"
+
+RDEPEND="tk? ( >=dev-lang/tk-3.3.3 )
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )
+ gdbm? ( sys-libs/gdbm )"
+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_unpack() {
+ unpack ${A}
+ cd "${S}"
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ # Bug #459512
+ epatch "${FILESDIR}/${PN}-4.01.0-pkg-config-ncurses.patch"
+}
+
+src_compile() {
+ 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
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use tk || myconf="${myconf} -no-tk"
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use gdbm || myconf="${myconf} -no-dbm"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure -prefix /usr \
+ --bindir /usr/bin \
+ --libdir /usr/$(get_libdir)/ocaml \
+ --mandir /usr/share/man \
+ -host "${CHOST}" \
+ -cc "$(tc-getCC)" \
+ -as "$(tc-getAS)" \
+ -aspp "$(tc-getCC) -c" \
+ -partialld "$(tc-getLD) -r" \
+ --with-pthread ${myconf} || die "configure failed!"
+
+ emake -j1 world || die "make world failed!"
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake -j1 opt || die "make opt failed!"
+ emake -j1 opt.opt || die "make opt.opt failed!"
+ fi
+}
+
+src_install() {
+ make BINDIR="${D}"/usr/bin \
+ LIBDIR="${D}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${D}"/usr/share/man \
+ install || die "make install failed!"
+
+ # Install the compiler libs
+ dodir /usr/$(get_libdir)/ocaml/compiler-libs
+ insinto /usr/$(get_libdir)/ocaml/compiler-libs
+ doins {utils,typing,parsing}/*.{mli,cmi,cmo}
+ use ocamlopt && doins {utils,typing,parsing}/*.{cmx,o}
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym /usr/$(get_libdir)/ocaml/caml /usr/include/
+
+ # Remove ${D} from ld.conf, as the buildsystem isn't $(DESTDIR) aware
+ dosed "s:${D}::g" /usr/$(get_libdir)/ocaml/ld.conf
+
+ dodoc Changes INSTALL README Upgrading
+
+ # Create and envd entry for latex input files (this definitely belongs into
+ # CONTENT and not in pkg_postinst.
+ if use latex ; then
+ echo "TEXINPUTS=/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" || die
+}
+
+pkg_postinst() {
+ echo
+ ewarn "OCaml is not binary compatible from version to version, so you"
+ ewarn "need to rebuild all packages depending on it, that are actually"
+ ewarn "installed on your system. To do so, you can run:"
+ ewarn "emerge @ocaml-rebuild"
+ ewarn "Or, (almost) equivalently: emerge -1 /usr/$(get_libdir)/ocaml"
+ echo
+}
diff --git a/dev-lang/ocaml/ocaml-4.01.0.ebuild b/dev-lang/ocaml/ocaml-4.01.0.ebuild
new file mode 100644
index 00000000000..6278a86157e
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.01.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="6"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.bz2
+ 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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux"
+IUSE="emacs latex ncurses +ocamlopt tk X xemacs"
+
+RDEPEND="tk? ( >=dev-lang/tk-3.3.3 )
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ # Bug #459512
+ epatch "${FILESDIR}/${PN}-4.01.0-pkg-config-ncurses.patch"
+}
+
+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
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use tk || myconf="${myconf} -no-tk"
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure -prefix "${EPREFIX}"/usr \
+ --bindir "${EPREFIX}"/usr/bin \
+ --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
+ --mandir "${EPREFIX}"/usr/share/man \
+ -host "${CHOST}" \
+ -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 -j1 world
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake -j1 opt
+ emake -j1 opt.opt
+ fi
+}
+
+src_install() {
+ make 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 INSTALL README
+
+ # 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"
+}
+
+pkg_postinst() {
+ echo
+ ewarn "OCaml is not binary compatible from version to version, so you"
+ ewarn "need to rebuild all packages depending on it, that are actually"
+ ewarn "installed on your system. To do so, you can run:"
+ if has_version '>=sys-apps/portage-2.2' ; then
+ ewarn "emerge @ocaml-rebuild"
+ else
+ ewarn "emerge -1 ${EROOT%/}/usr/$(get_libdir)/ocaml"
+ fi
+ echo
+}
diff --git a/dev-lang/ocaml/ocaml-4.02.1.ebuild b/dev-lang/ocaml/ocaml-4.02.1.ebuild
new file mode 100644
index 00000000000..deefc1fd7f3
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.02.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="6"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.xz
+ 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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux"
+IUSE="emacs latex ncurses +ocamlopt X xemacs"
+
+RDEPEND="
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # 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"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure \
+ --prefix "${EPREFIX}"/usr \
+ --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_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 INSTALL README
+
+ # 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.02.2.ebuild b/dev-lang/ocaml/ocaml-4.02.2.ebuild
new file mode 100644
index 00000000000..c63ec641371
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.02.2.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="7"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.xz
+ 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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux"
+IUSE="emacs latex ncurses +ocamlopt X xemacs"
+
+RDEPEND="
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # 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"
+
+ # 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_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 INSTALL README
+
+ # 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.02.3.ebuild b/dev-lang/ocaml/ocaml-4.02.3.ebuild
new file mode 100644
index 00000000000..c63ec641371
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.02.3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="7"
+MY_P="${P/_/+}"
+DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.xz
+ 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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux"
+IUSE="emacs latex ncurses +ocamlopt X xemacs"
+
+RDEPEND="
+ ncurses? ( sys-libs/ncurses )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # 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"
+
+ # 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_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 INSTALL README
+
+ # Create and envd entry for latex input files
+ if use latex ; then
+ echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+ doenvd "${T}"/99ocamldoc
+ fi
+
+ # Install ocaml-rebuild portage set
+ insinto /usr/share/portage/config/sets
+ doins "${FILESDIR}/ocaml.conf"
+}
diff --git a/dev-lang/open-cobol/Manifest b/dev-lang/open-cobol/Manifest
new file mode 100644
index 00000000000..e65ab858fc8
--- /dev/null
+++ b/dev-lang/open-cobol/Manifest
@@ -0,0 +1 @@
+DIST open-cobol-1.1.tar.gz 1007791 SHA256 6ae7c02eb8622c4ad55097990e9b1688a151254407943f246631d02655aec320 SHA512 eb06cec456425ba5f4a091ae4ac0bfd14f38549bc147c606a022804f602102df6dbf0d399614f0eda49d50dee17eef55087748853a8cc8bdd1248f94fd09110c WHIRLPOOL 2c1331ddd218007434af9f7d39bb10a4a2e21165549f991d9de3e8af92a16157f9c9ede5d64ec2746e64d4c46d661472950326c0a634fe10c5edbf9169dd574d
diff --git a/dev-lang/open-cobol/metadata.xml b/dev-lang/open-cobol/metadata.xml
new file mode 100644
index 00000000000..d8dae734445
--- /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>
+ <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 00000000000..2038ac0b6b2
--- /dev/null
+++ b/dev-lang/open-cobol/open-cobol-1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="an open-source COBOL compiler"
+HOMEPAGE="http://www.opencobol.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="berkdb nls readline"
+
+RDEPEND="dev-libs/gmp
+ berkdb? ( =sys-libs/db-4* )
+ sys-libs/ncurses
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+src_compile() {
+ econf \
+ $(use_with berkdb db) \
+ $(use_enable nls) \
+ $(use_with readline) || die "econf failed."
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/dev-lang/opendylan-bin/Manifest b/dev-lang/opendylan-bin/Manifest
new file mode 100644
index 00000000000..da17b21b4a1
--- /dev/null
+++ b/dev-lang/opendylan-bin/Manifest
@@ -0,0 +1,10 @@
+DIST opendylan-2011.1-x86-linux.tar.bz2 31908698 SHA256 f2cd16cbb1b0494154d66ed2363af11dd2ce605a9ef7bbe06ca0241e8f77757c SHA512 345d97d71e34fd7cd923c9f53b65cb33d7edab4f2d946fd7cf9430df63cafc361ff854d444edde9d40c94bc16a3899979a34346a9ca60b9fd20e2745ff27a33b WHIRLPOOL f36fb1f7978a3d39fdca1a2ac3d51b8c19ee6adb440fbcd4282e653347d70a68bc644bb4ca06820381dd7ab83ebf1da42b91e1cd82439d239a87ed84afb14693
+DIST opendylan-2011.1-x86_64-linux.tar.bz2 36493244 SHA256 22b5299234bca0495f15185518fd3edff6bafa140d7b45f8cdeb93125ad547f2 SHA512 4241df29a762c73262ab7856aa2e7dc1b302719cf96de3a5d4878e5d7c5e15308d89b5c82d6379fb48b6badad03027427c013f27c690b6d8a372628ce81cda91 WHIRLPOOL aa4d7f9849fa782a0a7592cabb393001ed450f1f7e15ab53e47e5bbab3b40a8d51fca7aff99d792b89dfc954dcf9d4ddf1a16e9a64fc6034483762b79eab4dbd
+DIST opendylan-2012.1-x86-linux.tar.bz2 32874377 SHA256 cc7d1461c8a21f2329bce7c88bb7e8be68dde454fe35d0a14ad3d00aa2296301 SHA512 3ba1744e3dc62ab8ede681f7317ebfb3ec80bb35dd10f8c0f24fe2f77abb86157a939a69f7585a88f82233563388014cc2a686d8e2cd15c73d314d496356cb69 WHIRLPOOL 434233ded2aa1d01d888bd0336b919835ca5db4be4df62c80665dc6dd88551534c7c88c9d95bf598c2579c47b84cbcf3fa2beea7eac717e544dfc0457f505213
+DIST opendylan-2012.1-x86_64-linux.tar.bz2 47535071 SHA256 b4f1d0484f20d1d566c8a16cf214cc7cf84516db9e4f3e61b5ba648fe3f6aab7 SHA512 53b36b9ec1eff40bb9572f8a9118d18ba6674798c053678abf326d947a9e8d5dc51e2d89e9fa9dc58dd61f0c83e5d3cab4acec2af2968edbe196b8c7fe9599dc WHIRLPOOL 4f6bbbb4c05bd191b5e6ea4a3b9c1757d2497bf4ec05b2943aa02069f2f9ed2380e4a9adfcfcacd5db0bf6e2512ad4b12c2b54d8cd40aae5d02b1b5c429de8cc
+DIST opendylan-2013.1-x86-linux.tar.bz2 32974920 SHA256 994208c5fb1043a540a27a7eba06882c9c38514ec963ef9452a4f4be57d6f863 SHA512 a3b78c2c78cb0fe73a7a7d3bf13c28d9a44d451ace6c5fc9c18e67a1ed04afbb1dab1a2679279bec4fe4de7d68afc6e8fba051de5b9f26b472ee42393ed1547d WHIRLPOOL d2c2f57521287d6f19d248343b33c718b93058b5a944081c8bd3dbd6d6e4e7106e50f9429c383473ffe1a78384444b551e5ac1bb7d8dec94e739f594b1982722
+DIST opendylan-2013.1-x86_64-linux.tar.bz2 47675706 SHA256 15e211b2b88ef38849c7c9960ffaf76d7918226a3e2acf1f8bcc1de81bdec1c4 SHA512 f60dc7ee49f382375843d5887956541362461350acbd75f2e3af82887ef1bc2a5373f8db5cf0838aa627223036eb36558d3484b03f7128abbab030fc3cc717f5 WHIRLPOOL 856e8c691f7f72bc2132cd01a3a5959ba7401ea1be411baf7aa665650c6bc5d40b14f77cbdb54706098d37d5d366f201891703af943dd51e4b5299ebd146240a
+DIST opendylan-2013.2-x86-linux.tar.bz2 32953359 SHA256 055b1138decc8cd8caab444b7591c6994d0da9471d65660dcf5233ba368cc130 SHA512 e54ac273e6ca257df260efea9b680a99b53c01521b01afc6612902becc3e5a119dd3b0872124c098444d1a00ae1b436f186999ef04bf4efca484ebd9c70be346 WHIRLPOOL cf41be20aee359c86662651c3ebc88f111baa98c3aada0401376fd21f58efae0b77b67e370c334999140b8aebbe19b6b23b245b2b5ba95a93c8c8de141388aa3
+DIST opendylan-2013.2-x86_64-linux.tar.bz2 48471480 SHA256 f03c2a22d17370faffc9610d3e6b7d41d2e705619fe0918aceff5438f8caab0c SHA512 cac4205e47bee41dfa99cf059897025a60942fb0e73c970f26fffba7c77ceebcd789e0acb110ad636d6b8ebac947632e9d28e8d0887e4d4b7be2bc2791c1eeac WHIRLPOOL f256fa4fc4f97c23c03b3f4722ea92536c294f6985f1bb05e60aaf551feeca2a548539814be63495bfc6a12bc1a29206970333e6804844a9b0f7480355733cdd
+DIST opendylan-2014.1-x86-linux.tar.bz2 42086000 SHA256 8afe5af7257f5628aff56db28dd0e50b772de7da53768c7f8f669d8502c10f42 SHA512 8411db8cf56b6b4dad11d29ab49f3d9d21d93b05af2c45a5fee0cea1a56eb471b40cb6cbd622f1db995284c499a1c5a5b7d509e31ae6f4f4afe1595a2f4aab79 WHIRLPOOL ffb05dfa1c266188e0ca913731232d233d1978cdcc45a7e2b9d79f6ec5124cca751fefb8fb102d6d927bc22103afbc960d35fe5951d20a4ee0eb50252ddc74cb
+DIST opendylan-2014.1-x86_64-linux.tar.bz2 49625384 SHA256 8b4a0de4c0c957b2adbe4ec3ca29a65c7cbb539aa16db74933e8f681638d0bf4 SHA512 4d88ab8c6916e82465d846b32a86da0ec654d40a2a1310a7b05897d9bfa325c839713f46f62081b968793b3713a61cb74158c405cb724fa5fdf4c97596e1c6bf WHIRLPOOL 1a5a689bd8988ba748605769f4d510eeff040336890424441d163fb8a5da72836ad49fc8230e70fca3d63b8d3a714a38bd90bf2f36d8f2785e48d6383efc27f2
diff --git a/dev-lang/opendylan-bin/metadata.xml b/dev-lang/opendylan-bin/metadata.xml
new file mode 100644
index 00000000000..24cbb90cf0c
--- /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>
+ <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 00000000000..e619c96d689
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+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 00000000000..6ea2a15a5eb
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+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 00000000000..557ade44708
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+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 00000000000..fde46d51834
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+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 00000000000..0f10a0a28ce
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+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 00000000000..7ae5f847a36
--- /dev/null
+++ b/dev-lang/opendylan/Manifest
@@ -0,0 +1,3 @@
+DIST opendylan-2013.1-sources.tar.bz2 8441356 SHA256 69cb884d2d07a96a6793ec0f782566924e40aa8660256ddf94f0703c96f1edf5 SHA512 f5168bb9a4d2bcd372667406f2f07ed5972f3e773a5766c5f74421d6ffd10901a43cf9d6604ad2ae14d80f1b84e856f4fdca3e1546a87053939f470005a87a2f WHIRLPOOL ed6a4804c29399e65f3fbc2785f5909f3a649521de798452fb2e5ba34542806fc628383257d9198fa8338d8407c90be321d790ceffa0ee896c6ce0ceb347c528
+DIST opendylan-2013.2-sources.tar.bz2 9174284 SHA256 0bac4ca80d25f33a5bb06ebd8f0f1bf1fa6ae0000a8c0748bb5799e65986028d SHA512 f846a1d80f78b887815d2f2983314dbf6b5f424164dba9bc6ac456b40f31ab02aeb073a447df8f02b3fad6bcf6401a889abaac400d58db8e0adebcdd4e177a4d WHIRLPOOL ac6554e51b7e67af4adb13f34c8973a789816008ce071bac564dcc907e7f92e8b74d48d351023c2b80e36ec04e4018227b6dcde4f0e172a4a5debe81708589ac
+DIST opendylan-2014.1-sources.tar.bz2 8232321 SHA256 2dab54287fe32905307e160ffd3cf7c6ca31f43b0121ba363d93f1c0f34f4417 SHA512 576616cad0eb6ff8606a394834ad325858a5f45a8427adb0eefc9ebf883ab1522ec66dff6e591a367390d49f53acd160becad62679edc610ccfe63c9a3795cfc WHIRLPOOL f85e65646b32f2363991bba1f8f99121ff4bd1e8cdbe0647029c3b36dcde5ca14431a7fad3f9399692af68037c89668a59eec5fc9998fe566b1f12c5d9274488
diff --git a/dev-lang/opendylan/metadata.xml b/dev-lang/opendylan/metadata.xml
new file mode 100644
index 00000000000..24cbb90cf0c
--- /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>
+ <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 00000000000..f7da2e96d23
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.1-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+
+inherit autotools
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-2013.2.ebuild b/dev-lang/opendylan/opendylan-2013.2.ebuild
new file mode 100644
index 00000000000..25d55228da7
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # configure autodetects clang and prefers it, #527108
+ sed -i -e 's/clang//' configure.ac || die
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-2014.1.ebuild b/dev-lang/opendylan/opendylan-2014.1.ebuild
new file mode 100644
index 00000000000..997c4fe40b2
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2014.1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+src_prepare() {
+ # configure autodetects clang and prefers it, #527108
+ sed -i -e 's/clang//' configure.ac || die
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2014.1; then
+ PATH=/opt/opendylan-2014.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-9999.ebuild b/dev-lang/opendylan/opendylan-9999.ebuild
new file mode 100644
index 00000000000..a7fcfae2440
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-9999.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=4
+
+inherit autotools git-2
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+EGIT_HAS_SUBMODULES="1"
+EGIT_REPO_URI="https://github.com/dylan-lang/opendylan.git"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+
+ # quick hack
+ sed -i -e 's:/usr/local:/usr:' admin/builds/fdmake.pl || die
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2014.1; then
+ PATH=/opt/opendylan-2014.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin/:$PATH
+ fi
+ econf --prefix=/opt/opendylan || die
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/orc/Manifest b/dev-lang/orc/Manifest
new file mode 100644
index 00000000000..a486c2267f5
--- /dev/null
+++ b/dev-lang/orc/Manifest
@@ -0,0 +1,2 @@
+DIST orc-0.4.23.tar.xz 450076 SHA256 767eaebce2941737b43368225ec54598b3055ca78b4dc50c4092f5fcdc0bdfe7 SHA512 e12bca0dcc7230da825834f50b88ff531a6aed83a29ccc5b57e969adb1af7ceb2c1d4dd04cd248e38db92fded6edc809c7deba42cd1ddeacd62b0e922950d92e WHIRLPOOL 62df2cbc9943b7c7e625519d0f16bf1becbce78b26ccaebbc315ac43f2ceee689b6ad6632ce5e49123aa59d97ec73c3268a3fd6b81f94ca4dcf97de7a3a222e5
+DIST orc-0.4.24.tar.xz 455880 SHA256 338cd493b5247300149821c6312bdf7422a3593ae98691fc75d7e4fe727bd39b SHA512 f40f692873a4fa506379a1b9e3ed1d329ee42470fb0b083aec5f993c1b6f756e63b772dbf664ca3328531c2f9be141ca43ed79a49572c1f02d82f85aa4306216 WHIRLPOOL 2d41972933ede160a9b85f6ed2ee4aabefc51557f2f65d30f9c65b32e4fcc6e14b8bf55609859b5084997bdc875a1249114de31ec59d944e993fc9e2f0651bc1
diff --git a/dev-lang/orc/metadata.xml b/dev-lang/orc/metadata.xml
new file mode 100644
index 00000000000..9e260ceca3e
--- /dev/null
+++ b/dev-lang/orc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gstreamer</herd>
+</pkgmetadata>
diff --git a/dev-lang/orc/orc-0.4.23.ebuild b/dev-lang/orc/orc-0.4.23.ebuild
new file mode 100644
index 00000000000..3db1c06b3b4
--- /dev/null
+++ b/dev-lang/orc/orc-0.4.23.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools-multilib flag-o-matic gnome2-utils
+
+DESCRIPTION="The Oil Runtime Compiler, a just-in-time compiler for array operations"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="BSD BSD-2"
+SLOT="0"
+KEYWORDS="amd64 arm 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 static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_prepare() {
+ if ! use examples; then
+ sed -e '/SUBDIRS/ s:examples::' \
+ -i Makefile.am Makefile.in || die
+ fi
+
+ gnome2_environment_reset #556160
+}
+
+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*
+ autotools-multilib_src_configure
+}
diff --git a/dev-lang/orc/orc-0.4.24.ebuild b/dev-lang/orc/orc-0.4.24.ebuild
new file mode 100644
index 00000000000..b468c6b9b80
--- /dev/null
+++ b/dev-lang/orc/orc-0.4.24.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools-multilib flag-o-matic gnome2-utils pax-utils
+
+DESCRIPTION="The Oil Runtime Compiler, a just-in-time compiler for array operations"
+HOMEPAGE="http://gstreamer.freedesktop.org/"
+SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="BSD BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~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 hardened static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_prepare() {
+ if ! use examples; then
+ sed -e '/SUBDIRS/ s:examples::' \
+ -i Makefile.am Makefile.in || die
+ fi
+
+ gnome2_environment_reset #556160
+}
+
+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*
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+ if use hardened; then
+ pax-mark m usr/bin/orc-bugreport || die
+ pax-mark m usr/bin/orcc || die
+ pax-mark m usr/$(get_libdir)/liborc*.so* || die
+ fi
+}
+
+pkg_postinst() {
+ if use hardened; then
+ ewarn "Please run \"revdep-pax\" after installation".
+ ewarn "It's provided by sys-apps/elfix."
+ fi
+}
diff --git a/dev-lang/parrot/Manifest b/dev-lang/parrot/Manifest
new file mode 100644
index 00000000000..02f8b99333c
--- /dev/null
+++ b/dev-lang/parrot/Manifest
@@ -0,0 +1,5 @@
+DIST parrot-7.0.2.tar.gz 4697530 SHA256 1a8e9e203ad8ac92c89422603d1603fa821e957aa3a9ae57420c737d93c55213 SHA512 9fcd3d27c71a37841c81353aea3e393822358521e18f02644caa360de8d0f90b04c040839539769f0565c76fecc345a8c803c8e1b2cb0ec14675077a84cb4714 WHIRLPOOL e3f42c54c2c1dc422a7307e1f45689a81e27ffece6178e96067ae5a1ced168cf27849765249759d4fbc0b355151dc1d274dc97a8fb6a17cf9eece831415f2a71
+DIST parrot-7.1.0.tar.gz 4688341 SHA256 fe2cac1f5b811f36d6de7454ef1ff394ad66474f203813e5369b4dc68305964b SHA512 b7d261e82934aa84b3d93b2e68b3eb0f13dea684665ca2448a0e2139aa6676c1ff2da1a8056332a7f2538bee6158953be5bceed0ac8a9b277827ec7bcba46cb8 WHIRLPOOL 8083787f8779664e4ec7b3426b3e103dff9a22dfb18051e7617b6738b44156e1084f1691ce02e5869abba4d6455628c30631a9b5c86bc90779e6d2051e85d87b
+DIST parrot-7.2.0.tar.gz 4700915 SHA256 f4792fc1a82040dd855f73890de6fa26759aa62f4b4ad1aa468597592b7bf3bf SHA512 9b29394e753a88ecc5f581e73cb2c01cbf65442f754dacda1e7b4ff68ce527248d831de56a597512418918660ec12829259fd4ad3a235d1e22012c88a933242b WHIRLPOOL abef905a53830d7e352f5d64bb26c8861f10b2188fea36f3d1a426cf6e0fd5b0383345d1f6b7ba32dc47b8f7666566a6ac987f7b8e1b5b198192c30e5fcb815e
+DIST parrot-7.3.0.tar.gz 4687210 SHA256 23d2f59a0399a63a835087a192bede02a25f21fbcf5e42ed113b4c6dcdbea6b1 SHA512 e0aa408733af7939bdd4149952765fada0dcd6ce08b6a95f19ceab974f202fa3e440ffcb604f28fe9fd1b3b860a3400890b81e24984efdd88595f985041f3112 WHIRLPOOL fa2f32eb04d0a2be18fef4d420fa88808859d42474869d46ae6f44f3caa8611297de19b35dd337993de7e6e33df139b79e228c19a4fd7386b611643d557361e9
+DIST parrot-7.5.0.tar.gz 4693149 SHA256 71c25d2eb0798f1fc1c0890f6e4aed9d5f2a6e4e248456b3502f7721758267fe SHA512 6c009dec6bdb9f419b20f3bb6c103b16018b27b2ed0094f13c957f66d9735cfc126c15f787d4ce577cd0c6492d61264c35c23d50ab29517b65f00df7c4b4d619 WHIRLPOOL 7c0da3ad36d92cdae3d89de5f0938a4744c87301d8d0e76fec9bf7421dda7459ab083e112867702cfb6cfee3f308c856e5d7dcb547b35d27754d23e98dff8c3c
diff --git a/dev-lang/parrot/metadata.xml b/dev-lang/parrot/metadata.xml
new file mode 100644
index 00000000000..708bcbd3005
--- /dev/null
+++ b/dev-lang/parrot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>perl</herd>
+</pkgmetadata>
diff --git a/dev-lang/parrot/parrot-7.0.2.ebuild b/dev-lang/parrot/parrot-7.0.2.ebuild
new file mode 100644
index 00000000000..9214bc9be43
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.0.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to efficiently 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.1.0.ebuild b/dev-lang/parrot/parrot-7.1.0.ebuild
new file mode 100644
index 00000000000..9214bc9be43
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.1.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to efficiently 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.2.0.ebuild b/dev-lang/parrot/parrot-7.2.0.ebuild
new file mode 100644
index 00000000000..1e07b683321
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.2.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to efficiently 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.3.0.ebuild b/dev-lang/parrot/parrot-7.3.0.ebuild
new file mode 100644
index 00000000000..1e07b683321
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.3.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to efficiently 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 00000000000..1e07b683321
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.5.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to efficiently compile and execute bytecode for dynamic languages"
+HOMEPAGE="http://www.parrot.org/"
+SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="opengl nls doc examples gdbm +gmp ssl +unicode pcre"
+
+RDEPEND="sys-libs/readline
+ dev-libs/libffi
+ opengl? ( media-libs/freeglut )
+ nls? ( sys-devel/gettext )
+ unicode? ( >=dev-libs/icu-2.6:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
+ gmp? ( >=dev-libs/gmp-4.1.4 )
+ ssl? ( dev-libs/openssl )
+ pcre? ( dev-libs/libpcre )
+ doc? ( dev-perl/JSON )"
+
+DEPEND="dev-lang/perl[doc?]
+ ${RDEPEND}"
+
+src_configure() {
+ myconf="--disable-rpath"
+ use unicode || myconf+=" --without-icu"
+ use ssl || myconf+=" --without-crypto"
+ use gdbm || myconf+=" --without-gdbm"
+ use nls || myconf+=" --without-gettext"
+ use gmp || myconf+=" --without-gmp"
+ use opengl || myconf+=" --without-opengl"
+ use pcre || myconf+=" --without-pcre"
+
+ perl Configure.pl \
+ --ccflags="${CFLAGS}" \
+ --linkflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --sysconfdir="${EPREFIX}"/etc \
+ --sharedstatedir="${EPREFIX}"/var/lib/parrot \
+ $myconf || die
+}
+
+src_compile() {
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
+ # occasionally dies in parallel make
+ emake -j1 || die
+ if use doc ; then
+ emake -j1 html || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" || die
+ dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO || die
+ dosym /usr/bin/parrot-ops2c /usr/bin/ops2c || die
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/* || die
+ fi
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/editor"
+ doins -r editor || die
+ cd docs/html
+ dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
+ pmc.html tools.html docs src tools || die
+ fi
+}
diff --git a/dev-lang/pasm/Manifest b/dev-lang/pasm/Manifest
new file mode 100644
index 00000000000..f592b1c9bc4
--- /dev/null
+++ b/dev-lang/pasm/Manifest
@@ -0,0 +1 @@
+DIST pasm.tar.gz 82136 SHA256 c8e11cccdf70e02f6bcb2edd76606bd6b745904a0858350ab739a8ea372adacd SHA512 313e4ad694704ad59619c46353c53ef9bd5529b6c9faee5cc6124dd0175f7b5a87268d2c26045f0639a0002311828b227915f30e697f8adedcd4256774674283 WHIRLPOOL 01631ddbf1c4c34487ee0558b149b5fee8b7c179ca23a764a0d6cda091d116d9488aa94e54f8d6992c78545da93972576c4611f60a7f87aa32d26a25a0d9cddd
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 00000000000..24ff8056b93
--- /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 00000000000..4dbb423b703
--- /dev/null
+++ b/dev-lang/pasm/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <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 00000000000..3bebe34a91e
--- /dev/null
+++ b/dev-lang/pasm/pasm-1.7.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/path64/Manifest b/dev-lang/path64/Manifest
new file mode 100644
index 00000000000..35f6b94ff41
--- /dev/null
+++ b/dev-lang/path64/Manifest
@@ -0,0 +1,16 @@
+DIST path64-assembler-1.0.0_pre20110821.tbz2 1095418 SHA256 6046a032a8172a16046588388e73caf364f1537c33b85396b8ce7e64d59ff031 SHA512 c99d7c1a4afb804e1518c87ab213f73cf93c45c65e2ebbf2acc0131ecf10b638cf1da4af9fadae27915ce98560a16db4345f167baeffc0bb374e4bd6aac8cd6c WHIRLPOOL 075b11b4401ba5f16739e88623c4a4606f30630060697d63a7247e06b676223e444ceb616b852e0936b0e2dcf2f706f525dd3a4236544c3f14d3573c2c54eaa4
+DIST path64-assembler-1.0.0_pre20110924.tbz2 1095149 SHA256 90425c8d70b6083e728946be8dd059d7c264e8f6d5953826fa4ac5636e1da688 SHA512 22c05fd02b1633523d0270ff42c0a4b857cc862449855b545f4ffb0f5f57cbcd773b9eae0f38ccaa20cc089666fc7b6fe758e3b1df710c53fd2a6578b711db24 WHIRLPOOL 73682ab63223770949d85d5f8dc84847ebdd248f4f4f1638e6048870fd6c582775d2246aeb5ae4fc585084c9196609aec4cb2632a43ca3a1ad6e31eb05e82c92
+DIST path64-assembler-1.0.0_pre20111108.tbz2 1359302 SHA256 3e81bed49f092506c5f7e7032c541dacf6f9e80f422aac6b8239e9488822d679 SHA512 c251a36d83ff6f5c7704d76c13ae23ac4ebcce29c5058ef2afb7e75092f834d6d4872cc64e087de14e6e6f397cc33138cb2b96fd96320910e880b5e4f829151b WHIRLPOOL 5afb5f67f10ed195b19a20e0869782e6404040061c5ce38fddb1825e30c171c8e82d3652821ae05d7c4b8ef178a166709e07afa869226265def1ae37b09c31a1
+DIST path64-assembler-1.0.0_pre20120223.tbz2 1359028 SHA256 ecf1b3b1cffc83d1e63b064ac0ed0de1b75d1c4692cf9b2613cb251faabcd33c SHA512 38e1ca1ceda911c5bf7a69df071440eb70c91b243ec437188c2aa41dfaa3ca7c4a2f83a47f0f2123c69d6c89cab1eee8f25f913d99a70920f9540b1ef0786295 WHIRLPOOL 552452aa6e54352715ff54abefea252e9bc61f324ecc5568df1d8af7a4847e2bc0f3d242ee9bca8f0ccde883c8fc13ad3d3a2c6991d5f599232cf7e390904ad2
+DIST path64-compiler-1.0.0_pre20110821.tbz2 21221669 SHA256 70e47bc04e32708a9c70cad552f4f51acb511707fb3ecd8456875b8f8f7d0b02 SHA512 92196ad4d1b5d80aa705247d412ba7ea88c1f69eb9cfca81feeb9cecb62e4c8a6a02a40ea890da90c0b4f1cebffc18dfabc43a9bc1b83a7dab6e02bf6ec9f6f9 WHIRLPOOL 24aec9919dda2db93ae3a3d9d86362ac53cc721ff6368544ace57698b5b79f2b25ce484011d0360204537c2d53ed4b807f46a2fb8a7c702914ae6de15e6d3545
+DIST path64-compiler-1.0.0_pre20110924.tbz2 21084223 SHA256 aef5fcef24bdc11eea277dc5fb2ecf490ab4e949a0f490b57614b0907d0d8bab SHA512 ce48398aa0a82ee2699a5ddac495bc568bf123a98c944a38b0a4625ec38604ecbd780a9521810c5dc704df78b9207dc375259713a9c8caa0c7a50c7c42f9590b WHIRLPOOL 3ae92d97d83d8858cc35373bb2d2678d2075a8e90c993c2b292606f13f8b92d8e3228ebdaa0b4d1434c7c1ad8642c61e877551c0355cd7cb56c0e6e88ff2943a
+DIST path64-compiler-1.0.0_pre20111108.tbz2 21176793 SHA256 56fcb586b75e65c2cc00b77c247ddaf50d74d99b6953d920064fdbd61d0bbc05 SHA512 a794f2273266a1f324a81195278e3c974a33c9f92a8891aab167a7af172564abf0e2b74b1808ef5bac0998b4022c083ee4c6aef3a2c87cbd59960b143ff2dad4 WHIRLPOOL 63845c99564e8ac56da930001a51c382103950d657b15a1687e90401c68825971f356c31699a3fbd11003bd62ffc996a050a3df62bf94926c0fd6967e5c25816
+DIST path64-compiler-1.0.0_pre20120223.tbz2 21191645 SHA256 dd6ca637f80d0a2f442ce01bbb3d7931b8f1f6a25206443d21aa247d282db7d6 SHA512 cc318698f8627fa15689803bfc862fbf4b854378d5ebd50a6884b3acec8b3ef3bcae47fcd9c1a17fc8523f8d11db253d1ee6ba550bef8402ab7cd0c005180d31 WHIRLPOOL e4f5a9601ba1657050ea09a03f88d27fa4335611f9c93c457c3b4e7f30fadca9980de5457b570735b45dbd9dde2544baf22d7e39d05c039ca04e2fe5d33fd6fb
+DIST path64-debugger-1.0.0_pre20110821.tbz2 304870 SHA256 ac8a8141a9626e38cceb469c36bdd0a6793b91c09ef02d4379e5a737fe47d7ac SHA512 10a71bb3b2dd327cd582ecd741a988f161a33a960ee89ac23f0597def32391c45a7f96a38383d4e714c37aa3c143b49de402a3b8c954717d5dfc3e2b9cacacac WHIRLPOOL d5f2e18e898f34a6879beb1eab19ddb7b86e61197a97218a2a9eb4bc7ef99e82d548fe72f54c09fc353f3283b9e04759701a650e78f663ad43ca1ddf4be16d45
+DIST path64-debugger-1.0.0_pre20110924.tbz2 305006 SHA256 2537b7d6fae6aa868dafb2704b764fdffa884a727d08e695f86baee6cd3a5034 SHA512 56e0e9b31171905557fef85282867201ae1a2fae871c087facd43377aef14435e77781b3e9b4758e44a4aab27544dd1bc4d7abad1f0c2233479e6e032432a243 WHIRLPOOL 7854a0438f9d388386e5a58bde70abe19c72442e6dd3da2223f0dc6c94099bbb559424441d667bc2dad7616a1ca763b22e5a15235e84bf6ddebb67e9602df89d
+DIST path64-debugger-1.0.0_pre20111108.tbz2 304753 SHA256 766427a341d8b08c39cdd25b06e79e7c59a30955a02dccb3b340d7dfc76f6315 SHA512 e7908c2a6c1deb7ddad77f704dedd8c50768accac9ab8a56d077c2905bf6b85c8b427c66c71cea867c1b12bc599ceaf9bb4cf8ece77e3e1d969fcedf25b0aeaf WHIRLPOOL e834815c2ef47dd8aaabcfb831e20b12f71355592e0488d2939cc2a073a315d2e0ec810b40e512c0efd7f3ef345342830c86387bce44430b5418d5698509813a
+DIST path64-debugger-1.0.0_pre20120223.tbz2 304639 SHA256 28044cdd27c6a143e5c310e22dfd22513d7ebac43ba78887f9a2eea223809484 SHA512 02721c2f82d207de98e9f28d6397d464f74afd46b03deda0364cac78ce249a8887fe2560babf69c78d310156b558910273520541b9983646e3c9b9d51c9b01be WHIRLPOOL 2428406e41bfe8bbb291c4be6b4e333247589618c36205cb462470784b95959d687ccb770a242576bbfb9e015a44126bbabcc5ea525cc8f7e054e82dfb8478ce
+DIST path64-suite-1.0.0_pre20110821.tbz2 9850 SHA256 de50ecb38951847e941a826443fdcc3de8119b86cb0efc38b63e8e98837a1342 SHA512 07e78a83003ab5d1ffd709e171e8a194c21dec9e3fec47378a29ca491424e40bc76f3c387d144f9decf4cced37df7c531b71cf2843ea02685b54507cafe03766 WHIRLPOOL dae1e1526283e25495acc1e5643291c8f2f8092f2fdd9168404e30c25c68d1d6bed1b75378190920a3c8b7f7ba68f2fd66325fc064d22806719d29e947aebde5
+DIST path64-suite-1.0.0_pre20110924.tbz2 10596 SHA256 345f15eff3a4a86ad1540b9b2d9bb1205321883c400b00dfa94e3646cf196782 SHA512 8a9aab980ac52af5a2e1d0be9a2a91d057b8c01ab80336e3eb451cfd080a3561c027fd87205001584dd71b46bcc4dd23d3466fc331b6caf60f3d81f3f3cd6492 WHIRLPOOL 0adf22fd27d2389624e8b9eb2fac44f7a56b030c0b13878c1a334784fec48321ca2f20bb6ef1300e51e9d8d3edeafc9a064d78d274549fbd7062548de978a580
+DIST path64-suite-1.0.0_pre20111108.tbz2 12941 SHA256 7620caef7911a45477b6efd1334dff1ed961ce79fdc9db8de8870745b4d7b320 SHA512 93d2d5496fa10de0ad9c140fe835ca6066022fe730c32eca0c68d56b6071d762b718a6f7acc4c9b48dca8987fd8e43e01ad4fa2555c8d76a60cde6e7c255a7d5 WHIRLPOOL 8eb56a99f114a74c9029e613b51bc1de52a84a3000a1532d6a36123665cb45197720029f7ef7ad4a6553869d55e50cea6e99f38a48ebeee3c84bab1082b7a034
+DIST path64-suite-1.0.0_pre20120223.tbz2 12976 SHA256 4e21590204a10eba873509461d97cf97d857f2018ab04127c50625571483178b SHA512 91ca273ef18ebb264369bec6091165cd7ba5a53b9ac40aeb17f877460d92833174ef0c583625f29e8bcf2158cc63af0c386c49d2303cc88120978d447c471688 WHIRLPOOL e6f0c20d074983cec90682e99cebbc9cafe9ac2a2720a5276a844aed5a6f6c4beeaa654828fd52487083760b4c0d9fc20e8b3ad5152d2c6519d8918a41f1f2c7
diff --git a/dev-lang/path64/metadata.xml b/dev-lang/path64/metadata.xml
new file mode 100644
index 00000000000..e22d385ffd7
--- /dev/null
+++ b/dev-lang/path64/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription>
+ The PathScale EKOPath Compiler Suite offers programmers a rich set of tools and
+ one of the world's most sophisticated optimization infrastructures to maximize
+ program performance on any Intel 64 or AMD64 platform supporting Intel MMX,
+ SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AMD SSE4A and AVX.
+ </longdescription>
+ <use>
+ <flag name='assembler'>Build PathAS</flag>
+ <flag name='debugger'>Build PathDB</flag>
+ <flag name='native'>Use EKOPath/Path64 for bootstraping</flag>
+ <flag name='valgrind'>Use <pkg>dev-util/valgrind</pkg> for memory debbuging</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/path64/path64-1.0.0_pre20110821.ebuild b/dev-lang/path64/path64-1.0.0_pre20110821.ebuild
new file mode 100644
index 00000000000..ca2bc210495
--- /dev/null
+++ b/dev-lang/path64/path64-1.0.0_pre20110821.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_VERBOSE=1
+MY_MIRROR=http://dev.gentoo.org/~xarthisius/distfiles
+
+inherit cmake-utils multilib toolchain-funcs
+
+DESCRIPTION="Path64 Compiler Suite Community Edition"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="${MY_MIRROR}/${PN}-suite-${PV}.tbz2
+ ${MY_MIRROR}/${PN}-compiler-${PV}.tbz2
+ assembler? ( ${MY_MIRROR}/${PN}-assembler-${PV}.tbz2 )
+ debugger? ( ${MY_MIRROR}/${PN}-debugger-${PV}.tbz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="assembler custom-cflags debugger fortran +native +openmp valgrind"
+
+DEPEND="!native? ( sys-devel/gcc[vanilla] )
+ native? ( || ( dev-lang/ekopath dev-lang/path64 ) )
+ valgrind? ( dev-util/valgrind )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "You are trying to build ${PN} with custom-cflags"
+ ewarn "There is a high chance that you will utterly fail!"
+ ewarn "Unless you know what you are doing you'd better stop now"
+ ewarn "Should you decide to proceed, you are on your own..."
+ fi
+}
+
+src_prepare() {
+ local ver=$(grep 'SET(PSC_FULL_VERSION' CMakeLists.txt | cut -d'"' -f2)
+ cat > "98${PN}" <<-EOF
+ PATH=/usr/$(get_libdir)/${PN}/bin
+ ROOTPATH=/usr/$(get_libdir)/${PN}/bin
+ LDPATH=/usr/$(get_libdir)/${PN}/lib:/usr/$(get_libdir)/${PN}/lib/${ver}/x8664/64
+ EOF
+ sed -i -e "s/-Wl,-s //" CMakeLists.txt || die #strip
+}
+
+src_configure() {
+ local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | \
+ sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')
+ local libgcc=$($(tc-getCC) -print-libgcc-file-name)
+ use custom-cflags && flags=(
+ -DCMAKE_C_FLAGS="${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+ )
+
+ # Yup, I know how bad it is, but I'd rather have a working compiler
+ unset FC F90 F77 FCFLAGS F90FLAGS FFLAGS CFLAGS CXXFLAGS
+
+ if use native ; then
+ export CMAKE_BUILD_TYPE=Release
+ export CC=pathcc
+ export CXX=pathCC
+ export MYCMAKEARGS="-UCMAKE_USER_MAKE_RULES_OVERRIDE"
+ else
+ export CMAKE_BUILD_TYPE=Debug
+ fi
+ mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+ -DPATH64_ENABLE_TARGETS="x86_64"
+ -DPATH64_ENABLE_PROFILING=ON
+ -DPATH64_ENABLE_MATHLIBS=ON
+ -DPATH64_ENABLE_PATHOPT2=OFF
+ $(cmake-utils_use assembler PATH64_ENABLE_PATHAS)
+ $(cmake-utils_use assembler PATH64_ENABLE_DEFAULT_PATHAS)
+ $(cmake-utils_use fortran PATH64_ENABLE_FORTRAN)
+ $(cmake-utils_use openmp PATH64_ENABLE_OPENMP)
+ $(cmake-utils_use debugger PATH64_ENABLE_PATHDB)
+ $(cmake-utils_use valgrind PATH64_ENABLE_VALGRIND)
+ -DPSC_CRT_PATH_x86_64=/usr/$(get_libdir)
+ -DPSC_CRTBEGIN_PATH=$(dirname ${libgcc})
+ -DPSC_DYNAMIC_LINKER_x86_64=${linker}
+ -DCMAKE_C_COMPILER="$(tc-getCC)"
+ -DCMAKE_CXX_COMPILER="$(tc-getCXX)"
+ "${flags[@]}"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "98${PN}"
+}
diff --git a/dev-lang/path64/path64-1.0.0_pre20110924.ebuild b/dev-lang/path64/path64-1.0.0_pre20110924.ebuild
new file mode 100644
index 00000000000..ca2bc210495
--- /dev/null
+++ b/dev-lang/path64/path64-1.0.0_pre20110924.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_VERBOSE=1
+MY_MIRROR=http://dev.gentoo.org/~xarthisius/distfiles
+
+inherit cmake-utils multilib toolchain-funcs
+
+DESCRIPTION="Path64 Compiler Suite Community Edition"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="${MY_MIRROR}/${PN}-suite-${PV}.tbz2
+ ${MY_MIRROR}/${PN}-compiler-${PV}.tbz2
+ assembler? ( ${MY_MIRROR}/${PN}-assembler-${PV}.tbz2 )
+ debugger? ( ${MY_MIRROR}/${PN}-debugger-${PV}.tbz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="assembler custom-cflags debugger fortran +native +openmp valgrind"
+
+DEPEND="!native? ( sys-devel/gcc[vanilla] )
+ native? ( || ( dev-lang/ekopath dev-lang/path64 ) )
+ valgrind? ( dev-util/valgrind )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "You are trying to build ${PN} with custom-cflags"
+ ewarn "There is a high chance that you will utterly fail!"
+ ewarn "Unless you know what you are doing you'd better stop now"
+ ewarn "Should you decide to proceed, you are on your own..."
+ fi
+}
+
+src_prepare() {
+ local ver=$(grep 'SET(PSC_FULL_VERSION' CMakeLists.txt | cut -d'"' -f2)
+ cat > "98${PN}" <<-EOF
+ PATH=/usr/$(get_libdir)/${PN}/bin
+ ROOTPATH=/usr/$(get_libdir)/${PN}/bin
+ LDPATH=/usr/$(get_libdir)/${PN}/lib:/usr/$(get_libdir)/${PN}/lib/${ver}/x8664/64
+ EOF
+ sed -i -e "s/-Wl,-s //" CMakeLists.txt || die #strip
+}
+
+src_configure() {
+ local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | \
+ sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')
+ local libgcc=$($(tc-getCC) -print-libgcc-file-name)
+ use custom-cflags && flags=(
+ -DCMAKE_C_FLAGS="${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+ )
+
+ # Yup, I know how bad it is, but I'd rather have a working compiler
+ unset FC F90 F77 FCFLAGS F90FLAGS FFLAGS CFLAGS CXXFLAGS
+
+ if use native ; then
+ export CMAKE_BUILD_TYPE=Release
+ export CC=pathcc
+ export CXX=pathCC
+ export MYCMAKEARGS="-UCMAKE_USER_MAKE_RULES_OVERRIDE"
+ else
+ export CMAKE_BUILD_TYPE=Debug
+ fi
+ mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+ -DPATH64_ENABLE_TARGETS="x86_64"
+ -DPATH64_ENABLE_PROFILING=ON
+ -DPATH64_ENABLE_MATHLIBS=ON
+ -DPATH64_ENABLE_PATHOPT2=OFF
+ $(cmake-utils_use assembler PATH64_ENABLE_PATHAS)
+ $(cmake-utils_use assembler PATH64_ENABLE_DEFAULT_PATHAS)
+ $(cmake-utils_use fortran PATH64_ENABLE_FORTRAN)
+ $(cmake-utils_use openmp PATH64_ENABLE_OPENMP)
+ $(cmake-utils_use debugger PATH64_ENABLE_PATHDB)
+ $(cmake-utils_use valgrind PATH64_ENABLE_VALGRIND)
+ -DPSC_CRT_PATH_x86_64=/usr/$(get_libdir)
+ -DPSC_CRTBEGIN_PATH=$(dirname ${libgcc})
+ -DPSC_DYNAMIC_LINKER_x86_64=${linker}
+ -DCMAKE_C_COMPILER="$(tc-getCC)"
+ -DCMAKE_CXX_COMPILER="$(tc-getCXX)"
+ "${flags[@]}"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "98${PN}"
+}
diff --git a/dev-lang/path64/path64-1.0.0_pre20111108.ebuild b/dev-lang/path64/path64-1.0.0_pre20111108.ebuild
new file mode 100644
index 00000000000..ca2bc210495
--- /dev/null
+++ b/dev-lang/path64/path64-1.0.0_pre20111108.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_VERBOSE=1
+MY_MIRROR=http://dev.gentoo.org/~xarthisius/distfiles
+
+inherit cmake-utils multilib toolchain-funcs
+
+DESCRIPTION="Path64 Compiler Suite Community Edition"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="${MY_MIRROR}/${PN}-suite-${PV}.tbz2
+ ${MY_MIRROR}/${PN}-compiler-${PV}.tbz2
+ assembler? ( ${MY_MIRROR}/${PN}-assembler-${PV}.tbz2 )
+ debugger? ( ${MY_MIRROR}/${PN}-debugger-${PV}.tbz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="assembler custom-cflags debugger fortran +native +openmp valgrind"
+
+DEPEND="!native? ( sys-devel/gcc[vanilla] )
+ native? ( || ( dev-lang/ekopath dev-lang/path64 ) )
+ valgrind? ( dev-util/valgrind )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "You are trying to build ${PN} with custom-cflags"
+ ewarn "There is a high chance that you will utterly fail!"
+ ewarn "Unless you know what you are doing you'd better stop now"
+ ewarn "Should you decide to proceed, you are on your own..."
+ fi
+}
+
+src_prepare() {
+ local ver=$(grep 'SET(PSC_FULL_VERSION' CMakeLists.txt | cut -d'"' -f2)
+ cat > "98${PN}" <<-EOF
+ PATH=/usr/$(get_libdir)/${PN}/bin
+ ROOTPATH=/usr/$(get_libdir)/${PN}/bin
+ LDPATH=/usr/$(get_libdir)/${PN}/lib:/usr/$(get_libdir)/${PN}/lib/${ver}/x8664/64
+ EOF
+ sed -i -e "s/-Wl,-s //" CMakeLists.txt || die #strip
+}
+
+src_configure() {
+ local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | \
+ sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')
+ local libgcc=$($(tc-getCC) -print-libgcc-file-name)
+ use custom-cflags && flags=(
+ -DCMAKE_C_FLAGS="${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+ )
+
+ # Yup, I know how bad it is, but I'd rather have a working compiler
+ unset FC F90 F77 FCFLAGS F90FLAGS FFLAGS CFLAGS CXXFLAGS
+
+ if use native ; then
+ export CMAKE_BUILD_TYPE=Release
+ export CC=pathcc
+ export CXX=pathCC
+ export MYCMAKEARGS="-UCMAKE_USER_MAKE_RULES_OVERRIDE"
+ else
+ export CMAKE_BUILD_TYPE=Debug
+ fi
+ mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+ -DPATH64_ENABLE_TARGETS="x86_64"
+ -DPATH64_ENABLE_PROFILING=ON
+ -DPATH64_ENABLE_MATHLIBS=ON
+ -DPATH64_ENABLE_PATHOPT2=OFF
+ $(cmake-utils_use assembler PATH64_ENABLE_PATHAS)
+ $(cmake-utils_use assembler PATH64_ENABLE_DEFAULT_PATHAS)
+ $(cmake-utils_use fortran PATH64_ENABLE_FORTRAN)
+ $(cmake-utils_use openmp PATH64_ENABLE_OPENMP)
+ $(cmake-utils_use debugger PATH64_ENABLE_PATHDB)
+ $(cmake-utils_use valgrind PATH64_ENABLE_VALGRIND)
+ -DPSC_CRT_PATH_x86_64=/usr/$(get_libdir)
+ -DPSC_CRTBEGIN_PATH=$(dirname ${libgcc})
+ -DPSC_DYNAMIC_LINKER_x86_64=${linker}
+ -DCMAKE_C_COMPILER="$(tc-getCC)"
+ -DCMAKE_CXX_COMPILER="$(tc-getCXX)"
+ "${flags[@]}"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "98${PN}"
+}
diff --git a/dev-lang/path64/path64-1.0.0_pre20120223.ebuild b/dev-lang/path64/path64-1.0.0_pre20120223.ebuild
new file mode 100644
index 00000000000..d36d7e08ede
--- /dev/null
+++ b/dev-lang/path64/path64-1.0.0_pre20120223.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+CMAKE_VERBOSE=1
+MY_MIRROR=http://dev.gentoo.org/~xarthisius/distfiles
+
+inherit cmake-utils multilib toolchain-funcs
+
+DESCRIPTION="Path64 Compiler Suite Community Edition"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="${MY_MIRROR}/${PN}-suite-${PV}.tbz2
+ ${MY_MIRROR}/${PN}-compiler-${PV}.tbz2
+ assembler? ( ${MY_MIRROR}/${PN}-assembler-${PV}.tbz2 )
+ debugger? ( ${MY_MIRROR}/${PN}-debugger-${PV}.tbz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="assembler custom-cflags debugger fortran +native +openmp valgrind"
+
+DEPEND="!native? ( sys-devel/gcc[vanilla] )
+ native? ( || ( dev-lang/ekopath dev-lang/path64 ) )
+ valgrind? ( dev-util/valgrind )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use custom-cflags ; then
+ ewarn "You are trying to build ${PN} with custom-cflags"
+ ewarn "There is a high chance that you will utterly fail!"
+ ewarn "Unless you know what you are doing you'd better stop now"
+ ewarn "Should you decide to proceed, you are on your own..."
+ fi
+}
+
+src_prepare() {
+ local ver=$(grep 'SET(PSC_FULL_VERSION' CMakeLists.txt | cut -d'"' -f2)
+ cat > "98${PN}" <<-EOF
+ PATH=/usr/$(get_libdir)/${PN}/bin
+ ROOTPATH=/usr/$(get_libdir)/${PN}/bin
+ LDPATH=/usr/$(get_libdir)/${PN}/lib:/usr/$(get_libdir)/${PN}/lib/${ver}/x8664/64
+ EOF
+ sed -i -e "s/-Wl,-s //" CMakeLists.txt || die #strip
+}
+
+src_configure() {
+ local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | \
+ sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')
+ local libgcc=$($(tc-getCC) -print-libgcc-file-name)
+ use custom-cflags && flags=(
+ -DCMAKE_C_FLAGS="${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+ )
+
+ # Yup, I know how bad it is, but I'd rather have a working compiler
+ unset FC F90 F77 FCFLAGS F90FLAGS FFLAGS CFLAGS CXXFLAGS
+
+ if use native ; then
+ export CMAKE_BUILD_TYPE=Release
+ export CC=pathcc
+ export CXX=pathCC
+ export MYCMAKEARGS="-UCMAKE_USER_MAKE_RULES_OVERRIDE"
+ else
+ export CMAKE_BUILD_TYPE=Debug
+ fi
+ mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+ -DPATH64_ENABLE_TARGETS="x86_64"
+ -DPATH64_ENABLE_PROFILING=ON
+ -DPATH64_ENABLE_MATHLIBS=ON
+ -DPATH64_ENABLE_PATHOPT2=OFF
+ $(cmake-utils_use assembler PATH64_ENABLE_PATHAS)
+ $(cmake-utils_use assembler PATH64_ENABLE_DEFAULT_PATHAS)
+ $(cmake-utils_use fortran PATH64_ENABLE_FORTRAN)
+ $(cmake-utils_use openmp PATH64_ENABLE_OPENMP)
+ $(cmake-utils_use debugger PATH64_ENABLE_PATHDB)
+ $(cmake-utils_use valgrind PATH64_ENABLE_VALGRIND)
+ -DPSC_CRT_PATH_x86_64=/usr/$(get_libdir)
+ -DPSC_CRTBEGIN_PATH=$(dirname ${libgcc})
+ -DPSC_DYNAMIC_LINKER_x86_64=${linker}
+ -DCMAKE_C_COMPILER="$(tc-getCC)"
+ -DCMAKE_CXX_COMPILER="$(tc-getCXX)"
+ "${flags[@]}"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doenvd "98${PN}"
+}
diff --git a/dev-lang/pcc/Manifest b/dev-lang/pcc/Manifest
new file mode 100644
index 00000000000..908362c7985
--- /dev/null
+++ b/dev-lang/pcc/Manifest
@@ -0,0 +1 @@
+DIST pcc-1.1.0.tgz 848427 SHA256 d9e3fed84c767dcddefb6b1f854d5da8921f3f65d8bd02997743412f41474d64 SHA512 5bd2b59fbb323016d215023ce77793ae66766e8e8192b44bf0707ee444658022e1645669c13eea8c81bc55c161eea3b0271d6b3098b8a7d51ce67eb86c7527b4 WHIRLPOOL 4701a9129c39cd3079016a6d545c2cc57895799d1756e37514000d049c10ad84a6f99395af22c9f83dd2905a678ac7cbd55079ac583f7c72675b54b2ddcccd24
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 00000000000..8420908e9f9
--- /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 00000000000..24cbb90cf0c
--- /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>
+ <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 00000000000..df2007c2367
--- /dev/null
+++ b/dev-lang/pcc/pcc-1.1.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..220dbd1ba5d
--- /dev/null
+++ b/dev-lang/pcc/pcc-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils versionator autotools
+
+DESCRIPTION="pcc portable c compiler"
+HOMEPAGE="http://pcc.ludd.ltu.se"
+
+if [[ ${PV} = 9999 ]]; then
+ inherit cvs
+ ECVS_SERVER="pcc.ludd.ltu.se:/cvsroot"
+ ECVS_MODULE="${PN}"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ SRC_URI="ftp://pcc.ludd.ltu.se/pub/pcc-releases/${P}.tgz"
+ KEYWORDS="~x86 ~amd64 ~amd64-fbsd"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+DEPEND=">=dev-libs/pcc-libs-${PV}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/AC_CHECK_PROG(strip,strip,yes,no)//' configure.ac || die "Failed to fix configure.ac"
+ sed -i -e 's/AC_SUBST(strip)//' configure.ac || die "Failed to fix configure.ac more"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-stripping
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
new file mode 100644
index 00000000000..f1a5141f812
--- /dev/null
+++ b/dev-lang/perl/Manifest
@@ -0,0 +1,5 @@
+DIST perl-5.20.2-patches-1.tar.xz 14640 SHA256 c084291cdf3e78b8fa2901f79e92f1e93aece7b7b8cb4e931a5df9616b0f6ba5 SHA512 5be0314529e926efcad1e73aebef73a72b86587a31ae68a93b8446edd5cea293027c61d41727b993611d7fb1d694b7740b7ed948dc59cd29ea7ad2646e7be327 WHIRLPOOL ea554c09531778bd655e4208943393cdcdb72d980956c609a6cd0da18ee74c3204d51c8151094bad7e602b6bab5f2bb55f35d632beabfdde9ab35ef374e7494c
+DIST perl-5.20.2-patches-2.tar.xz 15892 SHA256 5ca37bdd05c770d4d33e59116093d5083bdaffd9212541c7de08d5b8495e9bcd SHA512 6c892a5eb8f9fc1bf4a3c69ed751f22895e4d545e5e70f9c73d54d61121818b4ea220d80a31db4269aca9a7805688d2013c8128e27c013051d4d12d56922f6ed WHIRLPOOL 37c6b9f84a0d9b83220e21d323aea96f00487b37666a48b351fffc7a36c913c43532ab2bcbfd0ab8bca42f95d4bb78d210c20df164861f97e2ddc5e5ffc35a5c
+DIST perl-5.20.2.tar.bz2 13717128 SHA256 e5a4713bc65e1da98ebd833dce425c000768bfe84d17ec5183ec5ca249db71ab SHA512 1da867f04137e84cc6f4148fd7c15933cdc675939bf20f524b659b3c3a6225a18efe9f4cd8c445b9536f3efc13f1c5b696fcf14584e1f20ad1f908a9b6ca509c WHIRLPOOL 5654f824c57b4c78a6b4cd250e2055ec541def9a04b976444bbc80ced82105b1e9a283b809535a9092fc21eb6613ab4464f59575bc42f961698bbe70aa5a81a7
+DIST perl-5.22.0-patches-1.tar.xz 20892 SHA256 9abd87880c9c91e89e88eb467c124ba66fe3955b526802ad186b030a51a408f8 SHA512 53d5a49d12237aa39dc6ae2cffb9e22bc3776c3e78a3a5a37b4e0a0930eea0a33bf7ce4ab5f0e32d4dc68d0af8341b356de003558c88fb8686e826aee4055870 WHIRLPOOL fd1cc0ebf32664211cf263e2d8e9e1ddf29bad0835e6f377e20ba5dfdd80250f49ff663e2f449dd5e11e3d26a26a2fb51924dde3a5c490cce375c05d990a9e32
+DIST perl-5.22.0.tar.bz2 13811518 SHA256 3689fdb519133d039f49e12834764ff4c1de8f8d925dea44a952ca110d0ac9f7 SHA512 97e770d9bc9acbb7fa6939207a46d9a2887a61971c1ae1c8d6b5071bfc0d68a0f539486fea81ba81966f716d7ae532273a27a6baaf323e73fbd5c5eb9bf01fa4 WHIRLPOOL 9416c17323edc9ee5affb8a6d857e9ecf1ac5d7d37ca7d8703bfd15541c97f1031a9c669c9a41d8deb974676e197c0c7be753ad988f050f5fbb5b01942eacb3a
diff --git a/dev-lang/perl/files/eblits/common-v50160001.eblit b/dev-lang/perl/files/eblits/common-v50160001.eblit
new file mode 100644
index 00000000000..2a8d815717a
--- /dev/null
+++ b/dev-lang/perl/files/eblits/common-v50160001.eblit
@@ -0,0 +1,71 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}
+
diff --git a/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit b/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit
new file mode 100644
index 00000000000..cc864d04000
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit
@@ -0,0 +1,67 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-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
+
+# ebegin "Generating ConfigLocal.pm (ignore any error)"
+# enc2xs -C
+
+ einfo "Converting C header files to the corresponding Perl format (ignore any error)"
+ # Prefix note: unprefixed as this is all kernel/libc stuff that we never provide
+ pushd /usr/include >/dev/null
+ h2ph -Q -a -d "${EPREFIX}"${ARCH_LIB} \
+ asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \
+ sys/socket.h sys/time.h wait.h sysexits.h
+ popd >/dev/null
+
+# This has been moved into a function because rumor has it that a future release
+# of portage will allow us to check what version was just removed - which means
+# we will be able to invoke this only as needed :)
+ # Tried doing this via -z, but $INC is too big...
+ #if [[ "${INC}x" != "x" ]]; then
+ # cleaner_msg
+ #fi
+ fi
+}
+
+cleaner_msg() {
+ eerror "You have had multiple versions of perl. It is recommended"
+ eerror "that you run perl-cleaner now. perl-cleaner will"
+ eerror "assist with this transition. This script is capable"
+ eerror "of cleaning out old .ph files, rebuilding modules for "
+ eerror "your new version of perl, as well as re-emerging"
+ eerror "applications that compiled against your old libperl$(get_libname)"
+ eerror
+ eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT."
+ eerror "Part of the rebuilding of applications compiled against "
+ eerror "your old libperl involves temporarily unmerging"
+ eerror "them - interruptions could leave you with unmerged"
+ eerror "packages before they can be remerged."
+ eerror ""
+ eerror "If you have run perl-cleaner and a package still gives"
+ eerror "you trouble, and re-emerging it fails to correct"
+ eerror "the problem, please check http://bugs.gentoo.org/"
+ eerror "for more information or to report a bug."
+ eerror ""
+}
diff --git a/dev-lang/perl/files/eblits/pkg_postinst-v50220001.eblit b/dev-lang/perl/files/eblits/pkg_postinst-v50220001.eblit
new file mode 100644
index 00000000000..a268f785f40
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_postinst-v50220001.eblit
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-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
+
+# ebegin "Generating ConfigLocal.pm (ignore any error)"
+# enc2xs -C
+
+ einfo "Converting C header files to the corresponding Perl format (ignore any error)"
+ # Prefix note: unprefixed as this is all kernel/libc stuff that we never provide
+ pushd /usr/include >/dev/null
+ h2ph -Q -a -d "${EPREFIX}"${ARCH_LIB} \
+ asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \
+ sys/socket.h sys/time.h wait.h sysexits.h
+ popd >/dev/null
+
+# This has been moved into a function because rumor has it that a future release
+# of portage will allow us to check what version was just removed - which means
+# we will be able to invoke this only as needed :)
+ # Tried doing this via -z, but $INC is too big...
+ #if [[ "${INC}x" != "x" ]]; then
+ # cleaner_msg
+ #fi
+ fi
+}
+
+cleaner_msg() {
+ eerror "You have had multiple versions of perl. It is recommended"
+ eerror "that you run perl-cleaner now. perl-cleaner will"
+ eerror "assist with this transition. This script is capable"
+ eerror "of cleaning out old .ph files, rebuilding modules for "
+ eerror "your new version of perl, as well as re-emerging"
+ eerror "applications that compiled against your old libperl$(get_libname)"
+ eerror
+ eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT."
+ eerror "Part of the rebuilding of applications compiled against "
+ eerror "your old libperl involves temporarily unmerging"
+ eerror "them - interruptions could leave you with unmerged"
+ eerror "packages before they can be remerged."
+ eerror ""
+ eerror "If you have run perl-cleaner and a package still gives"
+ eerror "you trouble, and re-emerging it fails to correct"
+ eerror "the problem, please check http://bugs.gentoo.org/"
+ eerror "for more information or to report a bug."
+ eerror ""
+}
diff --git a/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit b/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit
new file mode 100644
index 00000000000..02b5944af47
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-pkg_postrm(){
+ dual_scripts
+
+# if [[ -e ${ARCH_LIB}/Encode/ConfigLocal.pm ]] ; then
+# ebegin "Removing ConfigLocal.pm"
+# rm "${ARCH_LIB}/Encode/ConfigLocal.pm"
+# fi
+}
diff --git a/dev-lang/perl/files/eblits/pkg_postrm-v50220001.eblit b/dev-lang/perl/files/eblits/pkg_postrm-v50220001.eblit
new file mode 100644
index 00000000000..5bead2a57c2
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_postrm-v50220001.eblit
@@ -0,0 +1,12 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-pkg_postrm(){
+ dual_scripts
+
+# if [[ -e ${ARCH_LIB}/Encode/ConfigLocal.pm ]] ; then
+# ebegin "Removing ConfigLocal.pm"
+# rm "${ARCH_LIB}/Encode/ConfigLocal.pm"
+# fi
+}
diff --git a/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit b/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit
new file mode 100644
index 00000000000..a7b734f4091
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-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" ;;
+ *) 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}"
+
+ if use ithreads ; then
+ echo ""
+ ewarn "THREADS WARNING:"
+ ewarn "PLEASE NOTE: You are compiling ${MY_P} with"
+ ewarn "interpreter-level threading enabled."
+ ewarn "Threading is not supported by all applications "
+ ewarn "that compile against perl. You use threading at "
+ ewarn "your own discretion. "
+ fi
+ check_rebuild
+ dual_scripts
+}
+
+check_rebuild() {
+ if has_version "<dev-lang/perl-${SHORT_PV}" ; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl you must reinstall"
+ ewarn "the installed perl modules."
+ ewarn "Use: perl-cleaner --all"
+ elif has_version dev-lang/perl ; then
+ # doesnot work
+ #if ! has_version dev-lang/perl[ithreads=,debug=] ; then
+ #if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then
+ if ( 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
+ fi
+}
+
diff --git a/dev-lang/perl/files/eblits/pkg_setup-v50220001.eblit b/dev-lang/perl/files/eblits/pkg_setup-v50220001.eblit
new file mode 100644
index 00000000000..a2b09574d16
--- /dev/null
+++ b/dev-lang/perl/files/eblits/pkg_setup-v50220001.eblit
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-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" ;;
+ *) 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}"
+
+ if use ithreads ; then
+ echo ""
+ ewarn "THREADS WARNING:"
+ ewarn "PLEASE NOTE: You are compiling ${MY_P} with"
+ ewarn "interpreter-level threading enabled."
+ ewarn "Threading is not supported by all applications "
+ ewarn "that compile against perl. You use threading at "
+ ewarn "your own discretion. "
+ fi
+ check_rebuild
+ dual_scripts
+}
+
+check_rebuild() {
+ if has_version "<dev-lang/perl-${SHORT_PV}" ; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules will"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but you should still call perl-cleaner to"
+ ewarn "make sure your system is consistent."
+ ewarn "Use: perl-cleaner --all"
+ elif has_version dev-lang/perl ; then
+ # doesnot work
+ #if ! has_version dev-lang/perl[ithreads=,debug=] ; then
+ #if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then
+ if ( 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
+ fi
+}
+
diff --git a/dev-lang/perl/files/eblits/src_configure-v50180002.eblit b/dev-lang/perl/files/eblits/src_configure-v50180002.eblit
new file mode 100644
index 00000000000..dfe97813093
--- /dev/null
+++ b/dev-lang/perl/files/eblits/src_configure-v50180002.eblit
@@ -0,0 +1,146 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+eblit-perl-src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EPREFIX}/usr/include
+ export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EPREFIX}/usr/include
+ export ZLIB_LIB=${EPREFIX}/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'
+ myndbm='D'
+ 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
+ [[ ${CHOST} == *-darwin* ]] && myconf "-Dld=$(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}"
+
+ sh Configure \
+ -des \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dinstallprefix="${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' \
+ -Dinstallusrbinperl='n' \
+ -Ud_csh \
+ -Uusenm \
+ "${myconf[@]}" || die "Unable to configure"
+}
diff --git a/dev-lang/perl/files/eblits/src_install-v50160001.eblit b/dev-lang/perl/files/eblits/src_install-v50160001.eblit
new file mode 100644
index 00000000000..aa90fae4aa8
--- /dev/null
+++ b/dev-lang/perl/files/eblits/src_install-v50160001.eblit
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}"/usr/bin/perl
+ ln -s perl${MY_PV} "${ED}"/usr/bin/perl || 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"
+
+# # A poor fix for the miniperl issues
+# dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
+# fperms 0444 /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
+# dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp
+# fperms 0755 /usr/bin/xsubpp
+
+ # 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
+
+ find "${ED}" -type f -name .packlist -delete || die
+
+ # Note: find out from psm why we would need/want this.
+ # ( use berkdb && has_version '=sys-libs/db-1*' ) ||
+ # find "${ED}" -name "*NDBM*" | xargs rm -f
+
+ 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
+}
diff --git a/dev-lang/perl/files/eblits/src_install-v50200001.eblit b/dev-lang/perl/files/eblits/src_install-v50200001.eblit
new file mode 100644
index 00000000000..fafff825d5e
--- /dev/null
+++ b/dev-lang/perl/files/eblits/src_install-v50200001.eblit
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-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
+
+ find "${ED}" -type f -name .packlist -delete || die
+
+ 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
+}
diff --git a/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit b/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit
new file mode 100644
index 00000000000..a12b7730fe8
--- /dev/null
+++ b/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit
@@ -0,0 +1,70 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+
+ [[ -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}"/patchlevel-gentoo.h
+}
+
+eblit-perl-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
+
+ # pod/perltoc.pod fails
+ # lib/ExtUtils/t/Embed.t fails
+ if ! tc-is-static-only ; then
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+ fi
+}
+
diff --git a/dev-lang/perl/files/eblits/src_test-v50160001.eblit b/dev-lang/perl/files/eblits/src_test-v50160001.eblit
new file mode 100644
index 00000000000..9e241ecd373
--- /dev/null
+++ b/dev-lang/perl/files/eblits/src_test-v50160001.eblit
@@ -0,0 +1,12 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+eblit-perl-src_test() {
+ 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"
+}
diff --git a/dev-lang/perl/metadata.xml b/dev-lang/perl/metadata.xml
new file mode 100644
index 00000000000..1f1398aeae6
--- /dev/null
+++ b/dev-lang/perl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <use>
+ <flag name='ithreads'>Enable Perl threads, has some compatibility problems</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/perl/perl-5.20.2-r1.ebuild b/dev-lang/perl/perl-5.20.2-r1.ebuild
new file mode 100644
index 00000000000..f1a1ed61907
--- /dev/null
+++ b/dev-lang/perl/perl-5.20.2-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=2
+
+PERL_OLDVERSEN="5.20.0 5.20.1"
+MODULE_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.bz2
+ mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
+ mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
+ http://dev.gentoo.org/~dilfridge/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-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-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+"
+# bug 390719, bug 523624
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 1.960.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/Digest-SHA 5.880.0 shasum
+ src_remove_dual perl-core/CPAN 2.50.0 cpan
+ src_remove_dual perl-core/Encode 2.600.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 6.980.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.240.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.64.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.272.30 json_pp
+ src_remove_dual perl-core/Module-Build 0.420.500 config_data
+ src_remove_dual perl-core/Module-CoreList 5.201.502.140 corelist
+ src_remove_dual perl-core/Pod-Parser 1.620.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.230.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.330.0 prove
+ src_remove_dual perl-core/podlators 2.5.3 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 2.5.3 /usr/share/man/man1/perlpodstyle.1
+}
+
+# eblit-include [--skip] <function> [version]
+eblit-include() {
+ local skipable=false
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ local e v func=$1 ver=$2
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ return 0
+ fi
+ done
+ ${skipable} && return 0
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+#src_unpack() { eblit-run src_unpack v50160001 ; }
+src_prepare() { eblit-run src_prepare v50160001 ; }
+src_configure() { eblit-run src_configure v50180002 ; }
+#src_compile() { eblit-run src_compile v50160001 ; }
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ eblit-run src_test v50160001 ;
+}
+src_install() { eblit-run src_install v50200001 ; }
+
+# FILESDIR might not be available during binpkg install
+# FIXME: version passing
+for x in setup {pre,post}{inst,rm} ; do
+ e="${FILESDIR}/eblits/pkg_${x}-v50160001.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ eval "pkg_${x}() { eblit-run pkg_${x} v50160001 ; }"
+ fi
+done
diff --git a/dev-lang/perl/perl-5.20.2.ebuild b/dev-lang/perl/perl-5.20.2.ebuild
new file mode 100644
index 00000000000..f9040930f07
--- /dev/null
+++ b/dev-lang/perl/perl-5.20.2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+
+PERL_OLDVERSEN="5.20.0 5.20.1"
+MODULE_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.bz2
+ mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
+ mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
+ http://dev.gentoo.org/~dilfridge/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-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-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+"
+# bug 390719, bug 523624
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 1.960.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/Digest-SHA 5.880.0 shasum
+ src_remove_dual perl-core/CPAN 2.50.0 cpan
+ src_remove_dual perl-core/Encode 2.600.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 6.980.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.240.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.64.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.272.30 json_pp
+ src_remove_dual perl-core/Module-Build 0.420.500 config_data
+ src_remove_dual perl-core/Module-CoreList 5.201.502.140 corelist
+ src_remove_dual perl-core/Pod-Parser 1.620.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.230.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.330.0 prove
+ src_remove_dual perl-core/podlators 2.5.3 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 2.5.3 /usr/share/man/man1/perlpodstyle.1
+}
+
+# eblit-include [--skip] <function> [version]
+eblit-include() {
+ local skipable=false
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ local e v func=$1 ver=$2
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ return 0
+ fi
+ done
+ ${skipable} && return 0
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+#src_unpack() { eblit-run src_unpack v50160001 ; }
+src_prepare() { eblit-run src_prepare v50160001 ; }
+src_configure() { eblit-run src_configure v50180002 ; }
+#src_compile() { eblit-run src_compile v50160001 ; }
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ eblit-run src_test v50160001 ;
+}
+src_install() { eblit-run src_install v50200001 ; }
+
+# FILESDIR might not be available during binpkg install
+# FIXME: version passing
+for x in setup {pre,post}{inst,rm} ; do
+ e="${FILESDIR}/eblits/pkg_${x}-v50160001.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ eval "pkg_${x}() { eblit-run pkg_${x} v50160001 ; }"
+ fi
+done
diff --git a/dev-lang/perl/perl-5.22.0.ebuild b/dev-lang/perl/perl-5.22.0.ebuild
new file mode 100644
index 00000000000..f1f5b240add
--- /dev/null
+++ b/dev-lang/perl/perl-5.22.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+
+PERL_OLDVERSEN=""
+MODULE_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.bz2
+ mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
+ mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
+ http://dev.gentoo.org/~civil/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="~alpha ~amd64 ~amd64-fbsd ~amd64-linux ~arm ~arm64 ~hppa ~hppa-hpux ~ia64 ~ia64-hpux ~ia64-linux ~m68k ~m68k-mint ~mips ~ppc ~ppc64 ~ppc-aix ~ppc-macos ~s390 ~sh ~sparc ~sparc64-solaris ~sparc-solaris ~x64-freebsd ~x64-macos ~x64-solaris ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~x86-linux ~x86-macos ~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-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+"
+# bug 390719, bug 523624
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.40.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/Digest-SHA 5.950.0 shasum
+ src_remove_dual perl-core/CPAN 2.110.0 cpan
+ src_remove_dual perl-core/Encode 2.720.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.40.100 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.280.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.68.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.273.0 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.505.200 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.250.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.350.0 prove
+ src_remove_dual perl-core/podlators 2.5.3 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 2.5.3 /usr/share/man/man1/perlpodstyle.1
+}
+
+# eblit-include [--skip] <function> [version]
+eblit-include() {
+ local skipable=false
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ local e v func=$1 ver=$2
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ return 0
+ fi
+ done
+ ${skipable} && return 0
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+src_prepare() { eblit-run src_prepare v50160001 ; }
+src_configure() { eblit-run src_configure v50180002 ; }
+#src_compile() { eblit-run src_compile v50160001 ; }
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ eblit-run src_test v50160001 ;
+}
+src_install() { eblit-run src_install v50200001 ; }
+
+# FILESDIR might not be available during binpkg install
+# FIXME: version passing
+for x in setup {pre,post}{inst,rm} ; do
+ e="${FILESDIR}/eblits/pkg_${x}-v50220001.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ eval "pkg_${x}() { eblit-run pkg_${x} v50160001 ; }"
+ fi
+done
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
new file mode 100644
index 00000000000..4519692bb8c
--- /dev/null
+++ b/dev-lang/php/Manifest
@@ -0,0 +1,14 @@
+DIST php-5.4.41.tar.bz2 12487089 SHA256 5bc4b45a1280ff80a3cf5b8563716f325cfd0121d7fd25aa54d56ff38b3b8272 SHA512 3034adab5e47bd4dedb207d305fcbbdc9ca5bc0869fa1c55c43841101c54e8fd73d36b9ac80a84f74c71f2a23ad390cda7bf60e2347570e542b1db8c3aefa2f7 WHIRLPOOL 68af528ef069c7b6cb3bdc07e25b9bdd2af31dc248ad023a3f7948bfc49886bc7a803e9656fa12e860dd6338da1817fd3d8ca91b066e4e329e255626434e2016
+DIST php-5.4.42.tar.bz2 12708394 SHA256 6285b2e64bfaa69e5d983d7d981b4f254f5259ad3fd591ca832722a4cc1ae0f9 SHA512 74ff03081321418f9afa1e2275198c86a5a6bf2fa923eb414e02256b8228f0b26b67bb818ccfac46a0658d2bd0f5f4113549c8e515e97992b9b646ec215b4744 WHIRLPOOL 21e925aedea63f234cf4269bff44469345a3f34c5d99b95a2c6f2d7ff86f7746ab5321f7b4306294b33952cfe5b2959221874eede09b83dadaea69ed46a1d49b
+DIST php-5.4.43.tar.bz2 12708452 SHA256 25d7724fb00ad1b520f5bad2173717031153d0a8e3de2c75e7a084c76f8ecd6b SHA512 8fcf8a5b8a1f51fcbce19498b693eba0d772fc33fed07934f75f1b28de0c9ef25ab74d989f455c67b8d36f301b1808dbab324f9c5931ea9cd9d88560373d75b1 WHIRLPOOL 844f44aaa955cedff71940a76ee28d3efaf4e530bdc2e66697471afc85f4ec8e257be50a79efba7be87e2be4c45dad19fbff29bcdf100327290ac77b6d82e13e
+DIST php-5.4.44.tar.bz2 12705644 SHA256 8dd59e5ce9248cf36ac3de5412a518b8b24c01ace6c46ce3d12e4ce981a3856d SHA512 5a73311b22741d8fe60a7cd7923fdcf3d7fa26eea8b2366e55a29048012231c9f59bbf4bf089e672352cb6bd4142cd8b37946ecd76bc4400ad55592d895bf4b8 WHIRLPOOL 4367fec1fd6a25b523198516d641316955d178253e04846f27515ac47eac08f783de214ad113f54b91192214d2cc2ec5c4098899dd20b14f13904d1b37715b2c
+DIST php-5.5.25.tar.bz2 13422002 SHA256 68df37e725ddd05675c0df906041038127938ecc52113a54d10e1e4029262c63 SHA512 961e1c48c591bf3c4c6068b2dca9f3cab41925b0845e4886128e75272622ee6e24ca94e2f4cd18874e27d61de7ad7aa238c6040d57c6696f62b77ffa33fec26a WHIRLPOOL efddc221988eb9e46adf2301cc1f1a39740efb27f7a5ba9673b9021d6fd6ee2b894cfe38c3d3af2098afa3f0c92fb9ab31f7cd8abebbacfb3180406f11b48e9a
+DIST php-5.5.26.tar.bz2 13671379 SHA256 816afffdb03ff4c542bc172a2f77f9c69b817df82d60cce05c1b4f578c2c926e SHA512 eaea4160cbf6970d4fcd8b4dd897fc1c8d32397ecd613a39b3a8657e339b9e60dca25afcdf76598a5f763520aa7cdacb1f8338dc3fee5400b28ca27d19205132 WHIRLPOOL e0f63d93bda0d0cefb7309f7f6afe2ee0b8e46ec2005684628803f2c5ed460e577281b6e10f26b999711c061eb40160ef628cd80cb9545b7715c385ee37ae4d0
+DIST php-5.5.27.tar.bz2 13692811 SHA256 c4b4c6a534c0ca67a9ae39bec4f51e52d13e820135dd016eae230e15337e1f70 SHA512 b73eb13000048cb94da186ca505a51bca9d10694b1d4a07a282b9c3d9833138d1e45dd47e9d6acb628b8150e4aeab18f56f6e698251db8ee66a7f88df3816255 WHIRLPOOL 57e11bd9e63d6174f2c19cc283ed52c06487af0ea61827fc345482262e57defc64ec4942c46b3d71c18f53f1b93a22dd3c2d80f00547d9578582f6a6ab50bd00
+DIST php-5.5.28.tar.bz2 13249927 SHA256 197d2c572e030c177e53d3763d59ac6d363d7c78dc22e6cc1e2ac65573d9c2f3 SHA512 4cb1e90d08bc90b35feaa4aa636d8484089d3b1868b19af99cfb27e815941798732c9a44c046bff5d48b60573657e67daff3991abbe6872a9ab3e1ab6f347b5f WHIRLPOOL 276b354cf3aa7ec3bb31602736fd724c0902832dc1a5f30d0ae288cd7c59f4614efda093a9968049996b7f2a5704d846a26e17f872754abf5be2d7badbf7c74b
+DIST php-5.6.10.tar.bz2 14080915 SHA256 0a579c81c724ea41815eee0caa8ea7d8eeb302458519d8cc4fc5b055577c8c45 SHA512 c2a0d4d7a2d20224591e7e7f3617ed4e6c49d6284797b092a0352c86d3cd88b8c5ec5092e4b97134c06a504a0df31963b191e1ca66b4fc395987bfb0d5ca4643 WHIRLPOOL 7f17e7da5ae70d817e25cdbd87e3cfff83d91a421ac9a0bfbf6f10f3796bd3d34de209da8b9bcc59c80f8573d2685cf9266a2fb3af89870cac90d13324e82e74
+DIST php-5.6.11.tar.bz2 14081292 SHA256 bd6b260816764c267244749ead07482120dbf8d1920ebbbb0dcb2aa411033866 SHA512 c6319939882a7e736cc4311470ff4802439452e45785f57c18f57e7ffaa2bce1df90221e5f44a9f0b778f56ed5fe3d86248bfd44df7537fd9f2151c09a2442e3 WHIRLPOOL 10e7973b8124b1dd3c7ef1d83a74f210b61de2d4979bf0b2f1b1eb3823be9e20bef976c9e028b27d625590db489849475a418747c0e26d3ce5560c390ad938d4
+DIST php-5.6.12.tar.bz2 14094148 SHA256 6f27104272af7b2a996f85e4100fac627630fbdaf39d7bd263f16cf529c8853a SHA512 fba0b5d0474ee0429d77bb8848863e68c22bd08d1d675f73a0b09d001b3bbfc5f4c15237055ad9a2e3367dbc1ad52c98db83c093e524a55ef67e573688e4fb03 WHIRLPOOL ae72ac363edca0481bdf7120db8a6d9d923f4bb448eff2bcf95e2c9895a4fcf6e91f185c81fb879f0c75ca21caded4c68ea61262bc93984b9a1789a8dfcf58dd
+DIST php-5.6.9.tar.bz2 14037070 SHA256 19d3b87b7b8bba3be24cf6d757d16b723a98881c3af8d15469fd25501e9abcb9 SHA512 c00e0fdfc60a84e0a9ebe4702907b86b86a65efc72c26fa86abc1ed79afa21fb1eb10052c1fc2326f5cb9858878f62e1a39c1cd02ea2a96fb8f14c515b26389e WHIRLPOOL e561f0c183314e05ffb34f633eac0f638d1f81d6d0a1445390ffde7baad9ce8798605bdd9a51b1227177e6b0849f752cb342d7168cc94a465406149bfad45947
+DIST php-7.0.0beta1.tar.bz2 14642405 SHA256 04a556a1d9108119c661f6f50ab71f94ad9fb61be3ee08cec8e2710d9df643de SHA512 496388128d5cff5c86bebb253f08e55c6b5957ed33abf96060818c31c3f8b81dd989fc437556b8071b6ba0ebb30e6b251f2b2c3326b204891467ae73c4967d9f WHIRLPOOL 0b33f5bc8df641d04f11c0e8e8a9c6f511521f9bd092392ea2bf25983539f84d1bf636cb90719672032ebdec5c64dc0b9cefe1dbdbb5e28d2c68aab72e950370
+DIST php-patchset-5.4-r2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea
diff --git a/dev-lang/php/files/20php5-envd b/dev-lang/php/files/20php5-envd
new file mode 100644
index 00000000000..f6033ae517c
--- /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/all_mysql_socket_location-gentoo.patch b/dev-lang/php/files/all_mysql_socket_location-gentoo.patch
new file mode 100644
index 00000000000..bd179986014
--- /dev/null
+++ b/dev-lang/php/files/all_mysql_socket_location-gentoo.patch
@@ -0,0 +1,13 @@
+diff -u a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
+--- a/ext/mysqlnd/mysqlnd.c 2010-10-22 17:46:26.000000000 +0200
++++ b/ext/mysqlnd/mysqlnd.c 2010-12-08 21:54:47.000000000 +0100
+@@ -619,7 +619,8 @@
+ if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
+ DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
+ if (!socket_or_pipe) {
+- socket_or_pipe = "/tmp/mysql.sock";
++ // gentoo mysql default socket location
++ socket_or_pipe = "/var/run/mysqld/mysqld.sock";
+ }
+ transport_len = spprintf(&transport, 0, "unix://%s", socket_or_pipe);
+ unix_socket = TRUE;
diff --git a/dev-lang/php/files/all_strict_aliasing.patch b/dev-lang/php/files/all_strict_aliasing.patch
new file mode 100644
index 00000000000..cfa609085e5
--- /dev/null
+++ b/dev-lang/php/files/all_strict_aliasing.patch
@@ -0,0 +1,14 @@
+upstream bug: http://bugs.php.net/bug.php?id=46311
+The current patch follows a suggestion from Siarhei Siamashka
+Adapted for php 5.5
+--- Zend/zend_execute.h.old 2013-01-01 13:49:04.587825704 +0100
++++ Zend/zend_execute.h 2013-01-01 13:53:28.762958578 +0100
+@@ -293,7 +293,7 @@
+ void **end = p - (int)(zend_uintptr_t)*p;
+
+ while (p != end) {
+- zval *q = *(zval **)(--p);
++ zval *q = (zval *)*(--p);
+ *p = NULL;
+ i_zval_ptr_dtor(q ZEND_FILE_LINE_CC);
+ }
diff --git a/dev-lang/php/files/bison_any_version.patch b/dev-lang/php/files/bison_any_version.patch
new file mode 100644
index 00000000000..94271e51468
--- /dev/null
+++ b/dev-lang/php/files/bison_any_version.patch
@@ -0,0 +1,16 @@
+--- ./Zend/acinclude.m4 2013-03-20 15:09:27.000000000 +0100
++++ ./Zend/acinclude.m4.new 2013-03-25 21:35:27.654016588 +0100
+@@ -17,12 +17,7 @@
+ if test -n "$bison_version_vars"; then
+ set $bison_version_vars
+ bison_version="${1}.${2}"
+- for bison_check_version in $bison_version_list; do
+- if test "$bison_version" = "$bison_check_version"; then
+- php_cv_bison_version="$bison_check_version (ok)"
+- break
+- fi
+- done
++ php_cv_bison_version="$bison_version (ok)"
+ fi
+ ])
+ fi
diff --git a/dev-lang/php/files/bison_build_2.patch b/dev-lang/php/files/bison_build_2.patch
new file mode 100644
index 00000000000..dd2481df884
--- /dev/null
+++ b/dev-lang/php/files/bison_build_2.patch
@@ -0,0 +1,29 @@
+diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
+index ccbc9b1..6a9a24a 100644
+--- a/Zend/zend_language_parser.y
++++ b/Zend/zend_language_parser.y
+@@ -41,17 +41,19 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
+
+ #define YYERROR_VERBOSE
+ #define YYSTYPE znode
+-#ifdef ZTS
+-# define YYPARSE_PARAM tsrm_ls
+-# define YYLEX_PARAM tsrm_ls
+-#endif
+-
+
+ %}
+
+ %pure_parser
+ %expect 3
+
++%code requires {
++#ifdef ZTS
++# define YYPARSE_PARAM tsrm_ls
++# define YYLEX_PARAM tsrm_ls
++#endif
++}
++
+ %token END 0 "end of file"
+ %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
+ %token T_INCLUDE "include (T_INCLUDE)"
diff --git a/dev-lang/php/files/bison_build_2a.patch b/dev-lang/php/files/bison_build_2a.patch
new file mode 100644
index 00000000000..7dedd036bca
--- /dev/null
+++ b/dev-lang/php/files/bison_build_2a.patch
@@ -0,0 +1,30 @@
+Gentoo bug: #494240
+Upstream: #64503
+
+--- Zend/zend_language_parser.y.orig 2013-12-14 12:25:43.528989017 +0100
++++ Zend/zend_language_parser.y 2013-12-14 12:26:30.088988957 +0100
+@@ -38,10 +38,6 @@
+
+ #define YYERROR_VERBOSE
+ #define YYSTYPE znode
+-#ifdef ZTS
+-# define YYPARSE_PARAM tsrm_ls
+-# define YYLEX_PARAM tsrm_ls
+-#endif
+
+
+ %}
+@@ -49,6 +45,13 @@
+ %pure_parser
+ %expect 2
+
++%code requires {
++#ifdef ZTS
++# define YYPARSE_PARAM tsrm_ls
++# define YYLEX_PARAM tsrm_ls
++#endif
++}
++
+ %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
+ %left ','
+ %left T_LOGICAL_OR
diff --git a/dev-lang/php/files/fix-libstdc++-underlinking.patch b/dev-lang/php/files/fix-libstdc++-underlinking.patch
new file mode 100644
index 00000000000..a35305a865b
--- /dev/null
+++ b/dev-lang/php/files/fix-libstdc++-underlinking.patch
@@ -0,0 +1,10 @@
+--- acinclude.m4 2013-04-02 09:58:33.069274096 +0200
++++ acinclude.m4.new 2013-04-02 09:58:25.221240142 +0200
+@@ -762,6 +762,7 @@
+ if test -z "$php_cxx_done"; then
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
++ PHP_ADD_LIBRARY(stdc++)
+ php_cxx_done=yes
+ fi
+ ])
diff --git a/dev-lang/php/files/freetype-2.5.1-linking-fix.patch b/dev-lang/php/files/freetype-2.5.1-linking-fix.patch
new file mode 100644
index 00000000000..3b78f9b309b
--- /dev/null
+++ b/dev-lang/php/files/freetype-2.5.1-linking-fix.patch
@@ -0,0 +1,64 @@
+From a0955f351c7eb1022da7ae36970ffef3b00c8aff Mon Sep 17 00:00:00 2001
+From: Adam Harvey <aharvey@php.net>
+Date: Sat, 7 Dec 2013 19:39:40 -0800
+Subject: [PATCH] Switch to using freetype-config for freetype detection.
+
+This fixes GD compilation against libfreetype 2.5.1 and later after they made
+the rather interesting decision to change their include directory layout in a
+point release.
+
+The original suggestion in the bug was to use pkg-config, but my inclination is
+to use freetype-config instead: we should be able to get the same configuration
+information without actually needing pkg-config installed, since pkg-config is
+by no means guaranteed to exist on many Unices and distros, whereas
+freetype-config should always be present if a libfreetype build environment is
+installed. Let's try it out and see what happens.
+
+Fixes bug #64405 (Use freetype-config for determining freetype2 dir(s)).
+
+diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
+index 0e35ece..732e14c 100644
+--- a/ext/gd/config.m4
++++ b/ext/gd/config.m4
+@@ -193,30 +193,25 @@ 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/include/freetype2/freetype/freetype.h"; then
++ if test -f "$i/bin/freetype-config"; then
+ FREETYPE2_DIR=$i
+- FREETYPE2_INC_DIR=$i/include/freetype2
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
+ break
+ fi
+ done
+
+ if test -z "$FREETYPE2_DIR"; then
+- AC_MSG_ERROR([freetype.h not found.])
++ AC_MSG_ERROR([freetype-config not found.])
+ fi
+
+- PHP_CHECK_LIBRARY(freetype, FT_New_Face,
+- [
+- PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
+- PHP_ADD_INCLUDE($FREETYPE2_DIR/include)
+- PHP_ADD_INCLUDE($FREETYPE2_INC_DIR)
+- AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+- AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+- AC_DEFINE(ENABLE_GD_TTF,1,[ ])
+- ],[
+- AC_MSG_ERROR([Problem with freetype.(a|so). Please check config.log for more information.])
+- ],[
+- -L$FREETYPE2_DIR/$PHP_LIBDIR
+- ])
++ 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(USE_GD_IMGSTRTTF, 1, [ ])
++ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
++ AC_DEFINE(ENABLE_GD_TTF,1,[ ])
+ else
+ AC_MSG_RESULT([If configure fails try --with-freetype-dir=<DIR>])
+ fi
diff --git a/dev-lang/php/files/iodbc-pkgconfig-r1.patch b/dev-lang/php/files/iodbc-pkgconfig-r1.patch
new file mode 100644
index 00000000000..b2159845008
--- /dev/null
+++ b/dev-lang/php/files/iodbc-pkgconfig-r1.patch
@@ -0,0 +1,52 @@
+--- ext/odbc/config.m4.old 2013-04-06 11:26:04.047017826 +0200
++++ ext/odbc/config.m4 2013-04-06 12:29:47.180617161 +0200
+@@ -366,22 +366,37 @@
+
+ if test -z "$ODBC_TYPE"; then
+ PHP_ARG_WITH(iodbc,,
+-[ --with-iodbc[=DIR] Include iODBC support [/usr/local]])
++[ --with-iodbc[=DIR] Include iODBC support])
+
+ if test "$PHP_IODBC" != "no"; then
+ AC_MSG_CHECKING(for iODBC support)
+- if test "$PHP_IODBC" = "yes"; then
+- PHP_IODBC=/usr/local
++ if test -z "$PKG_CONFIG"; then
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ fi
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
++ ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
++ ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
++ PHP_EVAL_INCLINE($ODBC_INCLUDE)
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
++ else
++ if test "$PHP_IODBC" = "yes"; then
++ PHP_IODBC=/usr/local
++ fi
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=-I$PHP_IODBC/include
++ ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
++ ODBC_LIBS=-liodbc
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
+ fi
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+- PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
+- ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$PHP_IODBC/include
+- ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
+- ODBC_LIBS=-liodbc
+- AC_DEFINE(HAVE_IODBC,1,[ ])
+- AC_DEFINE(HAVE_ODBC2,1,[ ])
+- AC_MSG_RESULT([$ext_output])
+ fi
+ fi
+
diff --git a/dev-lang/php/files/iodbc-pkgconfig.patch b/dev-lang/php/files/iodbc-pkgconfig.patch
new file mode 100644
index 00000000000..f32f8eb7ef1
--- /dev/null
+++ b/dev-lang/php/files/iodbc-pkgconfig.patch
@@ -0,0 +1,52 @@
+--- ext/odbc/config.m4.old 2013-04-06 11:26:04.047017826 +0200
++++ ext/odbc/config.m4 2013-04-06 12:29:47.180617161 +0200
+@@ -366,22 +366,37 @@
+
+ if test -z "$ODBC_TYPE"; then
+ PHP_ARG_WITH(iodbc,,
+-[ --with-iodbc[=DIR] Include iODBC support [/usr/local]])
++[ --with-iodbc[=DIR] Include iODBC support])
+
+ if test "$PHP_IODBC" != "no"; then
+ AC_MSG_CHECKING(for iODBC support)
+- if test "$PHP_IODBC" = "yes"; then
+- PHP_IODBC=/usr/local
++ if test -z "$PKG_CONFIG"; then
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ fi
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
++ ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
++ ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
++ PHP_EVAL_INCLINE($ODBC_INCLUDE)
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
++ else
++ if test "$PHP_IODBC" = "yes"; then
++ PHP_IODBC=/usr/local
++ fi
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=-I$PHP_IODBC/include
++ ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
++ ODBC_LIBS=-liodbc
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
+ fi
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+- PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
+- ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$PHP_IODBC/include
+- ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
+- ODBC_LIBS=-liodbc
+- AC_DEFINE(HAVE_IODBC,1,[ ])
+- AC_DEFINE(HAVE_ODBC2,1,[ ])
+- AC_MSG_RESULT([$ext_output])
+ fi
+ fi
+
diff --git a/dev-lang/php/files/missing-openssl-include.patch b/dev-lang/php/files/missing-openssl-include.patch
new file mode 100644
index 00000000000..28cc7dd6471
--- /dev/null
+++ b/dev-lang/php/files/missing-openssl-include.patch
@@ -0,0 +1,14 @@
+--- acinclude.m4 2012-11-17 21:53:06.346408695 +0100
++++ acinclude.m4.new 2013-03-18 11:37:09.253432820 +0100
+@@ -2331,8 +2331,10 @@
+ AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
+ fi
+
+- if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
++ if test -n "$OPENSSL_LIBS" ; then
+ PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
++ fi
++ if test -n "$OPENSSL_INCS" ; then
+ PHP_EVAL_INCLINE($OPENSSL_INCS)
+ fi
+ fi
diff --git a/dev-lang/php/files/php-fpm-r1.conf b/dev-lang/php/files/php-fpm-r1.conf
new file mode 100644
index 00000000000..0b0a7f8badd
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r1.conf
@@ -0,0 +1,311 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/lib/php5.3). This prefix can be dynamicaly changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p arguement)
+; - /usr/lib/php5.3 otherwise
+;include=/etc/php/fpm-php5.3/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var/lib
+; Default Value: none
+; Warning: pid file is overriden by the Gentoo init script.
+; FPM will refuse to start if you uncomment this settingi and make use of the
+; init script.
+; pid = /var/run/php-fpm.pid
+
+; Error log file
+; Note: the default prefix is /var/lib
+; Default Value: log/php-fpm.log
+error_log = /var/log/php-fpm.log
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options. The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr/lib/php5.3) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = -1
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = nobody
+group = nobody
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives:
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes to be created when pm is set to 'dynamic'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI.
+; Note: Used when pm is set to either 'static' or 'dynamic'
+; Note: This value is mandatory.
+pm.max_children = 50
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+;pm.start_servers = 20
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 5
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 35
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. By default, the status page shows the following
+; information:
+; accepted conn - the number of request accepted by the pool;
+; pool - the name of the pool;
+; process manager - static or dynamic;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes.
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic')
+; The values of 'idle processes', 'active processes' and 'total processes' are
+; updated each second. The value of 'accepted conn' is updated in real time.
+; Example output:
+; accepted conn: 12073
+; pool: www
+; process manager: static
+; idle processes: 35
+; active processes: 65
+; total processes: 100
+; max children reached: 1
+; By default the status page output is formatted as text/plain. Passing either
+; 'html' or 'json' as a query string will return the corresponding output
+; syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = /var/log/php-fpm-$pool.log.slow
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr/lib/php5.3)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/dev-lang/php/files/php-fpm-r4.init b/dev-lang/php/files/php-fpm-r4.init
new file mode 100755
index 00000000000..a186d83478c
--- /dev/null
+++ b/dev-lang/php/files/php-fpm-r4.init
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+
+set_phpvars() {
+ PHPSLOT=${SVCNAME#php-fpm-}
+ [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)"
+
+ PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+ PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid"
+}
+
+extra_commands="depend"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \
+ /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}"
+ local i=0
+ local timeout=5
+ while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
+ sleep 1
+ i=$(($i + 1))
+ done
+
+ [ $timeout -gt $i ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PHP FastCGI Process Manager"
+ set_phpvars
+ [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
+ eend $?
+}
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 00000000000..5f0482e8c26
--- /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 00000000000..152c1abe043
--- /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-libvpx.patch b/dev-lang/php/files/php-libvpx.patch
new file mode 100644
index 00000000000..e23ae0efa53
--- /dev/null
+++ b/dev-lang/php/files/php-libvpx.patch
@@ -0,0 +1,24 @@
+--- ext/gd/libgd/webpimg.c.orig 2015-04-10 17:33:03.864937281 +0300
++++ ext/gd/libgd/webpimg.c 2015-04-10 17:33:32.089873980 +0300
+@@ -706,14 +706,14 @@
+ codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
+ codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
+
+- vpx_img_wrap(&img, IMG_FMT_I420,
++ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
+ y_width, y_height, 16, (uint8*)(Y));
+- img.planes[PLANE_Y] = (uint8*)(Y);
+- img.planes[PLANE_U] = (uint8*)(U);
+- img.planes[PLANE_V] = (uint8*)(V);
+- img.stride[PLANE_Y] = y_stride;
+- img.stride[PLANE_U] = uv_stride;
+- img.stride[PLANE_V] = uv_stride;
++ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
++ img.planes[VPX_PLANE_U] = (uint8*)(U);
++ img.planes[VPX_PLANE_V] = (uint8*)(V);
++ img.stride[VPX_PLANE_Y] = y_stride;
++ img.stride[VPX_PLANE_U] = uv_stride;
++ img.stride[VPX_PLANE_V] = uv_stride;
+
+ res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
+
diff --git a/dev-lang/php/files/php5-ldvs b/dev-lang/php/files/php5-ldvs
new file mode 100644
index 00000000000..783b0f63ac7
--- /dev/null
+++ b/dev-lang/php/files/php5-ldvs
@@ -0,0 +1 @@
+PHP_5 { global: *; };
diff --git a/dev-lang/php/files/stricter-libc-client-symlink-check.patch b/dev-lang/php/files/stricter-libc-client-symlink-check.patch
new file mode 100644
index 00000000000..7cf36643c50
--- /dev/null
+++ b/dev-lang/php/files/stricter-libc-client-symlink-check.patch
@@ -0,0 +1,15 @@
+Gentoo bugs: 88944 463800
+--- ext/imap/config.m4 2013-03-27 19:31:13.000000000 +0100
++++ ext/imap/config.m4.new 2013-03-30 18:34:17.581557062 +0100
+@@ -198,9 +198,9 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
++ if test ! -r "$IMAP_DIR/c-client/libc-client.a" && -r "$IMAP_DIR/c-client/c-client.a" ; then
+ ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
++ elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
+ ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
+ fi
+
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 00000000000..1acc97162f2
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+ <use>
+ <flag name='cli'>Enable CLI SAPI</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='mysqlnd'>Use native driver for mysql, mysqli, PDO_Mysql</flag>
+ <flag name='libmysqlclient'>Use libmyslclient driver for mysql, mysqli, PDO_Mysql (not recommended)</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='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 suppoprt for GD</flag>
+ <flag name='zip'>Enable ZIP file support</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/php/php-5.4.41.ebuild b/dev-lang/php/php-5.4.41.ebuild
new file mode 100644
index 00000000000..1ab56190f8c
--- /dev/null
+++ b/dev-lang/php/php-5.4.41.ebuild
@@ -0,0 +1,802 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc 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 wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ if use_if_iuse opcache; then
+ elog "Adding opcache to ${phpinisrc}"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
+ fi
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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}}"
+
+ # SAPI-specific handling
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqlnd pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.4.42.ebuild b/dev-lang/php/php-5.4.42.ebuild
new file mode 100644
index 00000000000..c8660c49cfc
--- /dev/null
+++ b/dev-lang/php/php-5.4.42.ebuild
@@ -0,0 +1,802 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc 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 wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ if use_if_iuse opcache; then
+ elog "Adding opcache to ${phpinisrc}"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
+ fi
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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}}"
+
+ # SAPI-specific handling
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqlnd pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.4.43.ebuild b/dev-lang/php/php-5.4.43.ebuild
new file mode 100644
index 00000000000..c8660c49cfc
--- /dev/null
+++ b/dev-lang/php/php-5.4.43.ebuild
@@ -0,0 +1,802 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc 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 wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ if use_if_iuse opcache; then
+ elog "Adding opcache to ${phpinisrc}"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
+ fi
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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}}"
+
+ # SAPI-specific handling
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqlnd pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.4.44.ebuild b/dev-lang/php/php-5.4.44.ebuild
new file mode 100644
index 00000000000..c8660c49cfc
--- /dev/null
+++ b/dev-lang/php/php-5.4.44.ebuild
@@ -0,0 +1,802 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/stas/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_PATCHSET_LOC="olemarkus"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_PATCHSET="2"
+PHP_PATCHSET_URI="
+ $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
+
+PHP_FPM_INIT_VER="4"
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="
+ ${PHP_SRC_URI}
+ ${PHP_PATCHSET_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql mysqlnd mysqli nls
+ oci8-instant-client odbc 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 wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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] )
+ !mysqlnd? (
+ mysql? ( virtual/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ mysqlnd? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ if use_if_iuse opcache; then
+ elog "Adding opcache to ${phpinisrc}"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
+ fi
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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}}"
+
+ # SAPI-specific handling
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ if use mysql ; then
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysql mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ fi
+
+ # MySQLi support
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqli mysqli mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )"
+ if use mysqlnd ; then
+ my_conf+="
+ $(use_with mysqlnd pdo-mysql mysqlnd)"
+ else
+ my_conf+="
+ $(use_with mysql pdo-mysql ${EPREFIX}/usr)"
+ fi
+ my_conf+="
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.5.25-r1.ebuild b/dev-lang/php/php-5.5.25-r1.ebuild
new file mode 100644
index 00000000000..4832b79246a
--- /dev/null
+++ b/dev-lang/php/php-5.5.25-r1.ebuild
@@ -0,0 +1,787 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ # Fix build with libvpx-1.4.0, bug #545952 .
+ epatch "${FILESDIR}/${PN}-libvpx.patch"
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.5.26.ebuild b/dev-lang/php/php-5.5.26.ebuild
new file mode 100644
index 00000000000..c9bace4764e
--- /dev/null
+++ b/dev-lang/php/php-5.5.26.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.5.27.ebuild b/dev-lang/php/php-5.5.27.ebuild
new file mode 100644
index 00000000000..48edec03b8c
--- /dev/null
+++ b/dev-lang/php/php-5.5.27.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.5.28.ebuild b/dev-lang/php/php-5.5.28.ebuild
new file mode 100644
index 00000000000..48edec03b8c
--- /dev/null
+++ b/dev-lang/php/php-5.5.28.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.6.10.ebuild b/dev-lang/php/php-5.6.10.ebuild
new file mode 100644
index 00000000000..c9bace4764e
--- /dev/null
+++ b/dev-lang/php/php-5.6.10.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.6.11.ebuild b/dev-lang/php/php-5.6.11.ebuild
new file mode 100644
index 00000000000..48edec03b8c
--- /dev/null
+++ b/dev-lang/php/php-5.6.11.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.6.12.ebuild b/dev-lang/php/php-5.6.12.ebuild
new file mode 100644
index 00000000000..48edec03b8c
--- /dev/null
+++ b/dev-lang/php/php-5.6.12.ebuild
@@ -0,0 +1,784 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-5.6.9.ebuild b/dev-lang/php/php-5.6.9.ebuild
new file mode 100644
index 00000000000..feb808af4af
--- /dev/null
+++ b/dev-lang/php/php-5.6.9.ebuild
@@ -0,0 +1,787 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit 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"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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/mysql )
+ mysqli? ( >=virtual/mysql-4.1 )
+ )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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
+
+ # 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
+
+ # Fix build with libvpx-1.4.0, bug #545952 .
+ epatch "${FILESDIR}/${PN}-libvpx.patch"
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_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"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_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 odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.0.0_beta1.ebuild b/dev-lang/php/php-7.0.0_beta1.ebuild
new file mode 100644
index 00000000000..6d2dca2f191
--- /dev/null
+++ b/dev-lang/php/php-7.0.0_beta1.ebuild
@@ -0,0 +1,760 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/~ab/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# alias, so we can handle different types of releases (finals, rcs, alphas,
+# betas, ...) w/o changing the whole ebuild
+PHP_PV="${PV/_rc/RC}"
+PHP_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# 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} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ 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 vpx wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+DEPEND="
+ >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[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 ) )
+ 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 )
+ 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? ( >=dev-libs/openssl-0.9.7 )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+ virtual/mta
+"
+
+php="=${CATEGORY}/${PF}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli )
+ sharedmem? ( !threads )
+
+ mysql? ( || ( mysqli pdo ) )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND}
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
+
+ # 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}"
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ 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_if_iuse 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
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-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() {
+ # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
+ # ([empty session.save_path]/session_mm_[sapi][gid].sem)
+ # there is no easy way to circumvent that, all php calls during
+ # install use -n, so no php.ini file will be used.
+ # As such, this is the easiest way to get around
+ addpredict /session_mm_cli250.sem
+ addpredict /session_mm_cli0.sem
+
+ # 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"
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # This is a global variable and should be in caps. It isn't because the
+ # phpconfutils eclass relies on exactly this name...
+ # for --with-libdir see bug #327025
+ my_conf="
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}"/man
+ --infodir="${PHP_DESTDIR}"/info
+ --libdir="${PHP_DESTDIR}"/lib
+ --with-libdir=$(get_libdir)
+ --without-pear
+ $(use_enable threads maintainer-zts)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ my_conf="${my_conf} --enable-dba${shared}"
+ fi
+
+ # DBA drivers support
+ my_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
+ my_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)
+ $(use_with vpx vpx-dir ${EPREFIX}/usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mysql pdo-mysql ${mysqllib})
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_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
+ my_conf="${my_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"
+
+ # Support user-passed configuration parameters
+ my_conf="${my_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"
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
+ cd "${WORKDIR}/sapis-build/${one_sapi}"
+
+ sapi_conf="${my_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="${sapi_conf} --enable-${sapi}"
+ else
+ sapi_conf="${sapi_conf} --disable-${sapi}"
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+ 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}"
+
+ 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)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ 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_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ 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}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # 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"
+
+ 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
+ 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
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php
+ apache-module_pkg_postinst
+ 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}
+ 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
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ if ! use readline && use cli ; then
+ ewarn "Note that in order to use php interactivly, you need to enable"
+ ewarn "the readline USE flag or php -a will hang"
+ fi
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}
diff --git a/dev-lang/pocl/Manifest b/dev-lang/pocl/Manifest
new file mode 100644
index 00000000000..56f3cbe787f
--- /dev/null
+++ b/dev-lang/pocl/Manifest
@@ -0,0 +1 @@
+DIST pocl-0.11.tar.gz 1561743 SHA256 24bb801fb87d104b66faaa95d1890776fdeabb37ad1b12fb977281737c7f29bb SHA512 052cbac36a12a5b015779740c45b64adde5fa58a090f298b69de1df3ac9875d7bfc6dfe9f7ae95d14d974d7b44dc64e53ce6ad3a9b8e74708d546ef6e1032151 WHIRLPOOL 860a87904408eb7394e126bf5c8cab619d8f1d48a57440e9d73f585c5eaa1a70e53c5843f4ffbaa742447cd0e8ebf9c11fc0917357f6af203ecb1c3c48c0fa87
diff --git a/dev-lang/pocl/metadata.xml b/dev-lang/pocl/metadata.xml
new file mode 100644
index 00000000000..6719fcd2bb3
--- /dev/null
+++ b/dev-lang/pocl/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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/pocl/pocl-0.11.ebuild b/dev-lang/pocl/pocl-0.11.ebuild
new file mode 100644
index 00000000000..f55e02299d1
--- /dev/null
+++ b/dev-lang/pocl/pocl-0.11.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="PortableCL: opensource implementation of the OpenCL standard"
+HOMEPAGE="http://portablecl.org/"
+SRC_URI="http://portablecl.org/downloads/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-libs/ocl-icd
+ =sys-devel/llvm-3.6*
+ sys-apps/hwloc"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ # Needs an OpenCL 1.2 ICD, mesa and nvidia are invalid
+ # Maybe ati works, feel free to add/fix if you can test
+ if [[ $(eselect opencl show) == 'ocl-icd' ]]; then
+ einfo "Valid OpenCL ICD set"
+ else
+ eerror "Please use a supported ICD:"
+ eerror "eselect opencl set ocl-icd"
+ die "OpenCL ICD not set to a supported value"
+ fi
+}
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest
new file mode 100644
index 00000000000..d1addf494e1
--- /dev/null
+++ b/dev-lang/polyml/Manifest
@@ -0,0 +1,4 @@
+DIST polyml.5.4.1.tar.gz 6107319 SHA256 514d1d07be487b783d4dfa29dbd550b3396640579ce135a9eb5a61f08e7f9cac SHA512 4a7b404ed648b5a9fd9d52917214688d15f4f9a5f4570ba13b52a8304bde1cc4b534f539ffc3c9554283816ae130e4c898a179d776df6d3220fba9743a19b175 WHIRLPOOL 048db0b2210d699c0a86940daaafd24bfc81debae412f7e7dcad2585cd5514253f6c47e0006277ef00b640ab971a031d74e64c78c4abcc09712fa9e8593d1720
+DIST polyml.5.5.1.tar.gz 5465794 SHA256 cf8009dabc8b5d308d92e201dcd01f17ce14289d30caa8021a87365f4b8e209a SHA512 283954c8bf5599d83ea69916b827b1acae7137fe4add67537026092da2e6f1a89d71d3a394dbba599bbe9e967ded1446f39f4d81afb90301532db6be949f7a6f WHIRLPOOL 5bfeb8dcedcfe9b0a925ed089abc246d70d1269631ee46e9c78b123d461afb80e68640d6c08d77f47e69b0c244e9c7a27750dd7350741911e007f9dbcb2e7f76
+DIST polyml.5.5.2.tar.gz 5599140 SHA256 73fd2be89f7e3ff0567e27ef525ef788775d9f963d6db54069cb34d53040a682 SHA512 248c2a38c4691898bc1243a041f4683bf227d9c8a98c6c3545af2a8a3249ed5ed96f33f90cb2dede8809b42f33c0557650147302cfe046a5fba965ccd93cbc5b WHIRLPOOL d8dae553b6d4effef80b4303ea8fdbb95f8470790ab7ff49e62ae2a47d70d9d0b11b2113caa28302c029049041bd0286ba06a2153b5266b88a6c26eb1714abf7
+DIST polyml.5.5.tar.gz 5504389 SHA256 2b20e597e6fe43df1b0ed01e78e410c6b51d0ac7911833e91d94fcc9eb05d831 SHA512 4725c2e4a786b8c63bc6fc1cadad0de818ed935014d51040af43defa07b03ba7bedb2185bfb2e39a0db7284479e79e698b31ec7fe8463c306b668de1eda69b89 WHIRLPOOL 166c7d0037dff771251c95e17d86a6208d926a5adbbac0188426dfe09b7cdbab1b620919068a722f34377fbc59966145ebd1cba5dcb0664943cc82c10d3b5688
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 00000000000..af8bd8d4914
--- /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 00000000000..aaaed02f8e1
--- /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 00000000000..cffa627b9f3
--- /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 00000000000..1a2e114e650
--- /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 00000000000..2f6ce7b864b
--- /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 00000000000..f86cef07ca7
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch
@@ -0,0 +1,33 @@
+http://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-mprotect-exec.patch b/dev-lang/polyml/files/polyml-5.5.1-mprotect-exec.patch
new file mode 100644
index 00000000000..3ead4877e7b
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.1-mprotect-exec.patch
@@ -0,0 +1,29 @@
+--- polyml.5.5.1-orig/libpolyml/memmgr.cpp 2013-07-10 22:56:07.000000000 +1000
++++ polyml.5.5.1/libpolyml/memmgr.cpp 2014-02-10 14:08:51.866219101 +1100
+@@ -80,7 +80,7 @@
+ // Allocate the heap itself.
+ size_t iSpace = size*sizeof(PolyWord);
+ bottom =
+- (PolyWord*)osMemoryManager->Allocate(iSpace, PERMISSION_READ|PERMISSION_WRITE|PERMISSION_EXEC);
++ (PolyWord*)osMemoryManager->Allocate(iSpace, PERMISSION_READ|PERMISSION_EXEC);
+
+ if (bottom == 0)
+ return false;
+@@ -359,7 +359,7 @@
+ // Allocate the memory itself.
+ size_t iSpace = size*sizeof(PolyWord);
+ space->bottom =
+- (PolyWord*)osMemoryManager->Allocate(iSpace, PERMISSION_READ|PERMISSION_WRITE|PERMISSION_EXEC);
++ (PolyWord*)osMemoryManager->Allocate(iSpace, PERMISSION_READ|PERMISSION_EXEC);
+
+ if (space->bottom == 0)
+ {
+@@ -728,7 +728,7 @@
+ LocalMemSpace *space = lSpaces[i];
+ if (! space->isMutable)
+ osMemoryManager->SetPermissions(space->bottom, (char*)space->top - (char*)space->bottom,
+- on ? PERMISSION_READ|PERMISSION_EXEC : PERMISSION_READ|PERMISSION_EXEC|PERMISSION_WRITE);
++ on ? PERMISSION_READ|PERMISSION_EXEC : PERMISSION_READ|PERMISSION_WRITE);
+ }
+ }
+ }
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 00000000000..be37cdf8509
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch
@@ -0,0 +1,141 @@
+http://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 00000000000..1451d2df8d8
--- /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 00000000000..783577026f6
--- /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 00000000000..36c82947f37
--- /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 00000000000..0629f12f72c
--- /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 00000000000..c81bfbd6eee
--- /dev/null
+++ b/dev-lang/polyml/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ml</herd>
+ <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 00000000000..3aefc5dfe2f
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.4.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit base autotools
+
+MY_P=${PN}.${PV}
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=("${FILESDIR}/${PN}-5.4.1-configure.patch"
+ "${FILESDIR}/${PN}-5.4.1-asm.patch")
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.5.0.ebuild b/dev-lang/polyml/polyml-5.5.0.ebuild
new file mode 100644
index 00000000000..ace1e0f2082
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit base autotools versionator
+
+# Although the download is called 5.5, after building it poly -v says
+# it is 5.5.0.
+MY_PV=$(get_version_component_range "1-2" "${PV}")
+MY_P="${PN}.${MY_PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=("${FILESDIR}/${PN}-5.5.0-configure.patch"
+ "${FILESDIR}/${PN}-5.5.0-x-it-basis.patch"
+ "${FILESDIR}/${PN}-5.5.0-asm.patch")
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-system-libffi \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.5.1.ebuild b/dev-lang/polyml/polyml-5.5.1.ebuild
new file mode 100644
index 00000000000..806d28d6530
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit base autotools pax-utils
+
+MY_P="${PN}.${PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
+ # comes from the polyml generated ./polyexport.o file.
+ "${FILESDIR}/${PN}-5.5.0-asm.patch"
+ # http://sourceforge.net/p/polyml/code/1875/ for isabelle-2013.2
+ "${FILESDIR}/${PN}-5.5.1-inputN-return-for-zero-chars.patch"
+ # http://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 00000000000..1e6897afee8
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit base autotools pax-utils
+
+MY_P="${PN}.${PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
+ # comes from the polyml generated ./polyexport.o file.
+ "${FILESDIR}/${PN}-5.5.0-asm.patch"
+ # Patches from http://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/python-exec/Manifest b/dev-lang/python-exec/Manifest
new file mode 100644
index 00000000000..e9da27228ab
--- /dev/null
+++ b/dev-lang/python-exec/Manifest
@@ -0,0 +1,2 @@
+DIST python-exec-2.0.1.tar.bz2 80965 SHA256 3eddcb0d6c682a5c182c62578bb8d6ce1140a009873747e9ba1bf9de72ed7efd SHA512 0396e2617c759a66b16e57b0ca60b57e03f3c8096ae4a7f2e402eafcbee4ffd839bf0c6e4d259c6ba90940f9ba7e3f191125e395080cce3ef82e5f52053d0462 WHIRLPOOL 50c0cac1c7e2b5d2a21125647874c83caeabee293b87ef01926474d492b79b7837754c2d26173282977e9d00024559bb070f8d76bb5227df1776e937cd280c32
+DIST python-exec-2.0.2.tar.bz2 82217 SHA256 c411638fe94953c1e8ff57e7b66f601a817633fbc9cb7d410982778042051bb0 SHA512 96198dda88a73b902d617a32f10ddf2ac981b1871fb5eaf5003d77453df8a0aacf299c39c6e49ebaa620994a30e57ee7a1128fb4ba41aa4f503031fa2addef7f WHIRLPOOL 603b494c7b87f0f3f0cfba35378e1a2e231879a01b730657e09ecf798957fa4dfd54a6d852074c2aa9ae3c15e5d1d3203584b8a120e5dd0dee2117319706a5ce
diff --git a/dev-lang/python-exec/metadata.xml b/dev-lang/python-exec/metadata.xml
new file mode 100644
index 00000000000..c8cac33a5df
--- /dev/null
+++ b/dev-lang/python-exec/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://bitbucket.org/mgorny/python-exec/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/python-exec</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild b/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild
new file mode 100644
index 00000000000..1e8fd442af1
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.0.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+inherit autotools-utils python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://bitbucket.org/mgorny/python-exec/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="!<dev-python/python-exec-10000"
+
+src_configure() {
+ local pyimpls i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=" ${EPYTHON}"
+ done
+
+ local myeconfargs=(
+ --with-eprefix="${EPREFIX}"
+ --with-python-impls="${pyimpls}"
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/dev-lang/python-exec/python-exec-2.0.2.ebuild b/dev-lang/python-exec/python-exec-2.0.2.ebuild
new file mode 100644
index 00000000000..0448541db61
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.0.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+inherit autotools-utils python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://bitbucket.org/mgorny/python-exec/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="!<dev-python/python-exec-10000"
+
+src_configure() {
+ local pyimpls i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=" ${EPYTHON}"
+ done
+
+ local myeconfargs=(
+ --with-eprefix="${EPREFIX}"
+ --with-python-impls="${pyimpls}"
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/dev-lang/python-exec/python-exec-2.9999.ebuild b/dev-lang/python-exec/python-exec-2.9999.ebuild
new file mode 100644
index 00000000000..3caa2136f3d
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="http://bitbucket.org/mgorny/${PN}.git"
+EGIT_BRANCH="python-exec2"
+
+inherit git-r3
+#endif
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+inherit autotools-utils python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://bitbucket.org/mgorny/python-exec/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="!<dev-python/python-exec-10000"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+#endif
+
+src_configure() {
+ local pyimpls i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=" ${EPYTHON}"
+ done
+
+ local myeconfargs=(
+ --with-eprefix="${EPREFIX}"
+ --with-python-impls="${pyimpls}"
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
new file mode 100644
index 00000000000..28e908bf28c
--- /dev/null
+++ b/dev-lang/python/Manifest
@@ -0,0 +1,19 @@
+DIST Python-2.6.9.tgz 13285074 SHA256 7277b1285d8a82f374ef6ebaac85b003266f7939b3f2a24a3af52f9523ac94db SHA512 7ff28f41f7dc12e1504a781060520440bbf74b96c5df269ca5218f5910eae63898b94fdd398f549217912689814bc5275bb3b5ec4cc892f20bb468fc1b041c0c WHIRLPOOL 909f612286314ea004eef328a58d7b0aecffc1a524f6b283333ef0f299413055c1f7ec4e2d21a44d1beeaa8e11aabd68510cf9c5840cb5394176cbc8f2e5c147
+DIST Python-2.7.10.tar.xz 12250696 SHA256 1cd3730781b91caf0fa1c4d472dc29274186480161a150294c42ce9b5c5effc0 SHA512 67615a6defbcda062f15a09f9dd3b9441afd01a8cc3255e5bc45b925378a0ddc38d468b7701176f6cc153ec52a4f21671b433780d9bde343aa9b9c1b2ae29feb WHIRLPOOL 3a9dcfc55b107dc55ad0ae93fb24a11eab7d4d9b4cfbe6b6830a090b6e5f71bb2ac91526b89c6f3e4f2610fa1a2cc4e82b58a83c599aa71f94894c74181b504b
+DIST Python-2.7.9.tar.xz 12164712 SHA256 90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916 SHA512 6939182463272a6bb9da0e327bfb9efc574a87820f2ae39eaf02d9fae053dbe0004330e916e6828becfef94cbe294acb0a88a600f8930b99b94fcfc4efc44ff4 WHIRLPOOL 993313811eddef1820e6f3ee0e02848c73bdfce65b85ab0e360603e726c31e1cc9dc6c128e3fe086cafc94164d2d628ff5d859e13b90648da6352c35ddeedcd4
+DIST Python-3.2.5.tar.xz 9221624 SHA256 8ccb9645b9779fc4550055b2ebb21a724ab7a63dee45643286eb4f79b2f84116 SHA512 6e71d01695c7b1e74d9781e4ac40a8d1560cae659d5351d392fc685b84316568d93740a99d2ed878dd87d4ce1708d0474cb01c6bad7b3dab610c639f3255b09d WHIRLPOOL d5e5fae5e1d4110861e1e1dac00c9812abbbc37205e8ce3cd268535ab9f66e24038ab4778af8bb834fd472eaa0281730f1f2fabdf6dffc4f6b54ef32c1d75953
+DIST Python-3.3.5.tar.xz 12116308 SHA256 abe99b484434503d8b23be0f243ec27139e743a4798cd71c1dce3cf40e63b6e5 SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550 WHIRLPOOL f4b6010d32b28b7bb038cbb7c5f98d325cc4253fd1be9a0a1089ed6fd7dd414c5169931d21ef819137d5c1084517a650828f260cf2a1d8ce871bc67aeef3fff8
+DIST Python-3.4.0.tar.xz 14084912 SHA256 f13686c0a2d45e7146759e9d5d1cbd8097a0606483c0cf7730e1e13f58b14cbe SHA512 4fd4d3352e3b64ef8017ba083a2d894b99e89882581bcf30cdb218578f0f384aa6efc89211ffe44f5bb3d783c79763e26823242d27382fd05900099dd966ca31 WHIRLPOOL 82a1bb14a7683e2bce32221792923f334b61fabc75b0b293b0ecc0d810c8a4bebf05b75a061d85dd6612a8ca699c9b4f358e2aef5d14706aad1c18f42c9b8d55
+DIST Python-3.4.1.tar.xz 14125788 SHA256 c595a163104399041fcbe1c5c04db4c1da94f917b82ce89e8944c8edff7aedc4 SHA512 09b6390c07334974f189fb1c90bc2310898aef76661b1cecaa2b4d50001fa3df0fa0c63d3471a5a0dc7f9e08dd559d38d3bc45a6c05a816d8b2ed6b2a20e5fa9 WHIRLPOOL c8f879bb5d42a759b0804aa58d90330d9be6f4c29652ec40f07ca7da31510eadbd6b4eceb2b213af9a1af031c8321fc25faccae77763a31814eb0569831b8bfd
+DIST Python-3.4.2.tar.xz 14223804 SHA256 1c6d9682d145c056537e477bbfa060ce727f9edd38df1827e0f970dcf04b2def SHA512 12de5309cfaf91f5292efd660b5abe31581b902fdcc302317b597ffa74c9f5ec14ec1dd55994bcccd50d40473ae344ae19bf917ccfb8ab4906c8777d6ea95b17 WHIRLPOOL 358a2ca605676a7b6decf7cc9edfcf5edd6e15eb7b08e48fbf5f78422d3470a1233830867e3986a6bd564e105726298d3664ad04b90a233f90a46d6b81d8d60f
+DIST Python-3.4.3.tar.xz 14421964 SHA256 b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8 SHA512 55b2d7c07da8ad3a3971b4687da2e45809c6f1474732e93b0432f121f287d0b63ad8a9bf381987ea70f47a03d9474c3e55b7d86d14800bf7ef29b3324d8d35b9 WHIRLPOOL f851dedc6a1ea35adec83d60784a5fbcd9dfcf6aa8858bb5ada114fa2ff55add1fbf323ab94ec039ecdedb26d59e8f2e6e171cd9fc1ed41ad9cfa434a555cff3
+DIST python-gentoo-patches-2.6.9-0.tar.xz 17532 SHA256 6ff9448c3a8412f9624363ec6f321b4e7f098aff350a82fde74f82adfbb0cae3 SHA512 e6d134200df8320fe137f0a282b7564aba02b10eab2d4585fa82de5b4740223ddeac7a5ea922a40cea8496a1a706b6787310eae45978a3e69342bb80a7670a39 WHIRLPOOL 09b38d10f9415f41205dec2c9e9df5f0687e23f791d31ce1127d96bd489c9fc7825912096b37329d62e66d8c99778ad1ffcbdbd4a2b77b5305f75ea7c28fe15d
+DIST python-gentoo-patches-2.7.10-0.tar.xz 12892 SHA256 c9a838bd62ae50cc385da23a837acfd05f2b74e4f086c9c76eb4d3aa5366ef6d SHA512 5f100944635e360691dc0a2b340a906646c4ae9ee558246ddffc56e8b15d389f25f1fbdc1db4cc08e7d29560d04d66b058b3904902899d58ecae8c408ebdf056 WHIRLPOOL f69e9a518bb7ee50c1b262a21e70e1e2443f859ee6d2f4fa84421120dbd054a06ce8dd6cfea8512cbc64bce806322b879c25c561d5eb05e1ba6cc15035b373a9
+DIST python-gentoo-patches-2.7.9-0.tar.xz 14020 SHA256 d1ae164ab14e265ff63d6a724e0c2b5519bdb790fe8b7796c2124a30cecc8ef8 SHA512 83aa867ce562ff3acf970a4b3ecf7132f34aca1ecf286b90575a20e6e044600b98ff1d7f1a7ee613d4429a6a71cfe8beaff144b64b6beb456ea8691ca00937b0 WHIRLPOOL 5b4f7bd2dcec3a45e12fe5baf1c196faf2b754376a6bccb555dd12a1af28a202d51a0d956e4450ff2f334df13b296ee27b36aa967cb179925c386cd58389050b
+DIST python-gentoo-patches-2.7.9-1.tar.xz 12872 SHA256 9d912c55db56b5bfe054a6164614969fc9605f48f2ffec8770941f798a16470a SHA512 cbbae0faa246516361cd39e55d841660471931bb26cae8396a7d3929c9f4b4a3d8d5a76f7fa295deeb6335c26ed95aab18399e34c2603a582743b6e760f2b280 WHIRLPOOL 422ace8a204481458acd9cfd3b3b85e4b02fb2fe656c8ef8473a76444d5a1b54cd9d690e0009904f8c251697f60105769ce6a97c26224548476c0ece6595e484
+DIST python-gentoo-patches-3.2.5-1.tar.xz 14628 SHA256 0acc5531421781ab7f30e6fc8a502f202b79aa285b4f411eb16ea0a9e6d958c1 SHA512 1abbd53e92466d258802717309e1839ae931b8a4b0a5a27d4d0da748e71cf96ac47c6837bdbae5dd6921a46cee339c178f86ff3108afe95e6a0a42c4f4300791 WHIRLPOOL de003cccb8b311413889713d66b7987f28a1f906cc9642621d1fd2a379ceae4f0f901c137503d808dc3da7295ac611de09781bf8661cdbcd14c1d7c94ba489c2
+DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e
+DIST python-gentoo-patches-3.4.0-0.tar.xz 12900 SHA256 5e5ca54eaf446c7dde4155e5d792df5229c7790b32abb5aca38cbc4fc30f9c45 SHA512 be9851f9062f6aebbd2f23d91a4038dad1a8757049745ccbb1cc618ff6bc3dfab0326d520d27678541f4421e5db41d64f632fe6fb3e80f2cf4e73dadd3d5620b WHIRLPOOL df998b5588c928ca506f9f4434093a1f60637206f03f5e067444531dae02168f88b22c8de7d58e745bdb9d85e17abd667ed51f7f5651779c2c94da98f0925679
+DIST python-gentoo-patches-3.4.1-0.tar.xz 11164 SHA256 7d88e40ed02bef2d26802516fc0138a28cca58e298204e6b1a32054f9224fcb6 SHA512 5ecdf6a1ccb8d12b5b7436e1b7f641a41afcd7fde573e9249e3dc0d438bacb1eb6a5255e149388194dbfd2951fee4f8c800199362dfd072ff96776bbbcad0bbe WHIRLPOOL 707f943f9af7c3fc6deed7cfca5a4198f65a34434893840ba8e4f4c2a3d055e8f927069cb8855b5fe20dff643b7e2d41f35f65e1f3f300e350c0f291b4df6bc2
+DIST python-gentoo-patches-3.4.2-0.tar.xz 11568 SHA256 86028c50ecb16fdbaae68662d9749f8c5dbbad6359423ed02c7b379d4aaeb7e3 SHA512 786d74df8ca168655f38d052a3e79541fd1d9f58845f8fdc296246208f8ddc61e5a0d95d675432fcac77dda7c0ab419162790d0e39337bce2fb5c5d3f23c9ef4 WHIRLPOOL 5b26c7d5facd93ca334f23057e26e3a2af71d9d590ab270d4619bb57e0d14bc6465c08ea34c53e1ccf347f5938fd0199a0edf2ddada3c3a891a5568f1eb81227
+DIST python-gentoo-patches-3.4.3-0.tar.xz 11736 SHA256 917a9d98d40a91379c81ea57922a8632ba3c6f6db6f304ed6262bc88c5044946 SHA512 7ad1b30cf8bb7900fe518ed71e4ee55dd92ce7e23ae583a1f2f851b26cfa8c4f4271d28f418e780f3725a48d4ca8eeb8fd083f850810c66c29fb08c430828d72 WHIRLPOOL 074e8c0055b49a028eebda21d1acfb8a25ec968eb8b350c2bed37e042f9f354871e413db13e0ef2fe41d7e56d647178a7b3622019f36c4819c2c68f088366eb1
diff --git a/dev-lang/python/files/CVE-2013-4238_py27.patch b/dev-lang/python/files/CVE-2013-4238_py27.patch
new file mode 100644
index 00000000000..e215589d46b
--- /dev/null
+++ b/dev-lang/python/files/CVE-2013-4238_py27.patch
@@ -0,0 +1,247 @@
+diff -r 9ddc63c039ba Lib/test/nullbytecert.pem
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:13:17 2013 +0200
+@@ -0,0 +1,90 @@
++Certificate:
++ Data:
++ Version: 3 (0x2)
++ Serial Number: 0 (0x0)
++ Signature Algorithm: sha1WithRSAEncryption
++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Validity
++ Not Before: Aug 7 13:11:52 2013 GMT
++ Not After : Aug 7 13:12:52 2013 GMT
++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Subject Public Key Info:
++ Public Key Algorithm: rsaEncryption
++ Public-Key: (2048 bit)
++ Modulus:
++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
++ 2f:85
++ Exponent: 65537 (0x10001)
++ X509v3 extensions:
++ X509v3 Basic Constraints: critical
++ CA:FALSE
++ X509v3 Subject Key Identifier:
++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
++ X509v3 Key Usage:
++ Digital Signature, Non Repudiation, Key Encipherment
++ X509v3 Subject Alternative Name:
++ *************************************************************
++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
++ doesn't print the text after a NULL byte.
++ *************************************************************
++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
++ Signature Algorithm: sha1WithRSAEncryption
++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
++ c1:ca:a9:94
++-----BEGIN CERTIFICATE-----
++MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
++DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
++eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
++RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
++ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
++NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
++DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
++ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
++ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
++hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
++BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
++pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
++vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
++KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
++oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
++08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
++HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
++BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
++Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
++bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
++AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
++i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
++HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
++kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
++VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
++RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
++-----END CERTIFICATE-----
+diff -r 9ddc63c039ba Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
++++ b/Lib/test/test_ssl.py Sun Aug 11 18:13:17 2013 +0200
+@@ -25,6 +25,7 @@
+ HOST = test_support.HOST
+ CERTFILE = None
+ SVN_PYTHON_ORG_ROOT_CERT = None
++NULLBYTECERT = None
+
+ def handle_error(prefix):
+ exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
+@@ -123,6 +124,27 @@
+ ('DNS', 'projects.forum.nokia.com'))
+ )
+
++ def test_parse_cert_CVE_2013_4073(self):
++ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
++ if test_support.verbose:
++ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
++ subject = ((('countryName', 'US'),),
++ (('stateOrProvinceName', 'Oregon'),),
++ (('localityName', 'Beaverton'),),
++ (('organizationName', 'Python Software Foundation'),),
++ (('organizationalUnitName', 'Python Core Development'),),
++ (('commonName', 'null.python.org\x00example.org'),),
++ (('emailAddress', 'python-dev@python.org'),))
++ self.assertEqual(p['subject'], subject)
++ self.assertEqual(p['issuer'], subject)
++ self.assertEqual(p['subjectAltName'],
++ (('DNS', 'altnull.python.org\x00example.com'),
++ ('email', 'null@python.org\x00user@example.org'),
++ ('URI', 'http://null.python.org\x00http://example.org'),
++ ('IP Address', '192.0.2.1'),
++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
++ )
++
+ def test_DER_to_PEM(self):
+ with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
+ pem = f.read()
+@@ -1360,7 +1382,7 @@
+
+
+ def test_main(verbose=False):
+- global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT
++ global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT
+ CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "keycert.pem")
+ SVN_PYTHON_ORG_ROOT_CERT = os.path.join(
+@@ -1368,10 +1390,13 @@
+ "https_svn_python_org_root.pem")
+ NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "nokia.pem")
++ NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir,
++ "nullbytecert.pem")
+
+ if (not os.path.exists(CERTFILE) or
+ not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or
+- not os.path.exists(NOKIACERT)):
++ not os.path.exists(NOKIACERT) or
++ not os.path.exists(NULLBYTECERT)):
+ raise test_support.TestFailed("Can't read certificate files!")
+
+ tests = [BasicTests, BasicSocketTests]
+diff -r 9ddc63c039ba Modules/_ssl.c
+--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
++++ b/Modules/_ssl.c Sun Aug 11 18:13:17 2013 +0200
+@@ -741,8 +741,13 @@
+
+ /* get a rendering of each name in the set of names */
+
++ int gntype;
++ ASN1_STRING *as = NULL;
++
+ name = sk_GENERAL_NAME_value(names, j);
+- if (name->type == GEN_DIRNAME) {
++ gntype = name-> type;
++ switch (gntype) {
++ case GEN_DIRNAME:
+
+ /* we special-case DirName as a tuple of tuples of attributes */
+
+@@ -764,11 +769,61 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
+- } else {
++ case GEN_EMAIL:
++ case GEN_DNS:
++ case GEN_URI:
++ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
++ correctly. */
++ t = PyTuple_New(2);
++ if (t == NULL)
++ goto fail;
++ switch (gntype) {
++ case GEN_EMAIL:
++ v = PyUnicode_FromString("email");
++ as = name->d.rfc822Name;
++ break;
++ case GEN_DNS:
++ v = PyUnicode_FromString("DNS");
++ as = name->d.dNSName;
++ break;
++ case GEN_URI:
++ v = PyUnicode_FromString("URI");
++ as = name->d.uniformResourceIdentifier;
++ break;
++ }
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 0, v);
++ v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as),
++ ASN1_STRING_length(as));
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
++ default:
+ /* for everything else, we use the OpenSSL print form */
+-
++ switch (gntype) {
++ /* check for new general name type */
++ case GEN_OTHERNAME:
++ case GEN_X400:
++ case GEN_EDIPARTY:
++ case GEN_IPADD:
++ case GEN_RID:
++ break;
++ default:
++ if (PyErr_Warn(PyExc_RuntimeWarning,
++ "Unknown general name type") == -1) {
++ goto fail;
++ }
++ break;
++ }
+ (void) BIO_reset(biobuf);
+ GENERAL_NAME_print(biobuf, name);
+ len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+@@ -794,6 +849,7 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+ }
+
+ /* and add that rendering to the list */
diff --git a/dev-lang/python/files/CVE-2013-4238_py33.patch b/dev-lang/python/files/CVE-2013-4238_py33.patch
new file mode 100644
index 00000000000..41db4d241b5
--- /dev/null
+++ b/dev-lang/python/files/CVE-2013-4238_py33.patch
@@ -0,0 +1,241 @@
+diff -r e0f86c3b3685 Lib/test/nullbytecert.pem
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:17:23 2013 +0200
+@@ -0,0 +1,90 @@
++Certificate:
++ Data:
++ Version: 3 (0x2)
++ Serial Number: 0 (0x0)
++ Signature Algorithm: sha1WithRSAEncryption
++ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Validity
++ Not Before: Aug 7 13:11:52 2013 GMT
++ Not After : Aug 7 13:12:52 2013 GMT
++ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
++ Subject Public Key Info:
++ Public Key Algorithm: rsaEncryption
++ Public-Key: (2048 bit)
++ Modulus:
++ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
++ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
++ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
++ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
++ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
++ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
++ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
++ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
++ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
++ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
++ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
++ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
++ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
++ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
++ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
++ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
++ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
++ 2f:85
++ Exponent: 65537 (0x10001)
++ X509v3 extensions:
++ X509v3 Basic Constraints: critical
++ CA:FALSE
++ X509v3 Subject Key Identifier:
++ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
++ X509v3 Key Usage:
++ Digital Signature, Non Repudiation, Key Encipherment
++ X509v3 Subject Alternative Name:
++ *************************************************************
++ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
++ doesn't print the text after a NULL byte.
++ *************************************************************
++ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
++ Signature Algorithm: sha1WithRSAEncryption
++ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
++ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
++ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
++ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
++ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
++ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
++ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
++ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
++ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
++ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
++ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
++ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
++ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
++ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
++ c1:ca:a9:94
++-----BEGIN CERTIFICATE-----
++MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
++DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
++eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
++RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
++ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
++NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
++DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
++ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
++ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
++hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
++BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
++pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
++vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
++KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
++oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
++08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
++HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
++BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
++Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
++bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
++AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
++i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
++HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
++kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
++VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
++RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
++-----END CERTIFICATE-----
+diff -r e0f86c3b3685 Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
++++ b/Lib/test/test_ssl.py Sun Aug 11 18:17:23 2013 +0200
+@@ -55,6 +55,7 @@
+ WRONGCERT = data_file("XXXnonexisting.pem")
+ BADKEY = data_file("badkey.pem")
+ NOKIACERT = data_file("nokia.pem")
++NULLBYTECERT = data_file("nullbytecert.pem")
+
+ DHFILE = data_file("dh512.pem")
+ BYTES_DHFILE = os.fsencode(DHFILE)
+@@ -162,6 +163,27 @@
+ ('DNS', 'projects.forum.nokia.com'))
+ )
+
++ def test_parse_cert_CVE_2013_4073(self):
++ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
++ if support.verbose:
++ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
++ subject = ((('countryName', 'US'),),
++ (('stateOrProvinceName', 'Oregon'),),
++ (('localityName', 'Beaverton'),),
++ (('organizationName', 'Python Software Foundation'),),
++ (('organizationalUnitName', 'Python Core Development'),),
++ (('commonName', 'null.python.org\x00example.org'),),
++ (('emailAddress', 'python-dev@python.org'),))
++ self.assertEqual(p['subject'], subject)
++ self.assertEqual(p['issuer'], subject)
++ self.assertEqual(p['subjectAltName'],
++ (('DNS', 'altnull.python.org\x00example.com'),
++ ('email', 'null@python.org\x00user@example.org'),
++ ('URI', 'http://null.python.org\x00http://example.org'),
++ ('IP Address', '192.0.2.1'),
++ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
++ )
++
+ def test_DER_to_PEM(self):
+ with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
+ pem = f.read()
+@@ -294,6 +316,13 @@
+ fail(cert, 'foo.a.com')
+ fail(cert, 'bar.foo.com')
+
++ # NULL bytes are bad, CVE-2013-4073
++ cert = {'subject': ((('commonName',
++ 'null.python.org\x00example.org'),),)}
++ ok(cert, 'null.python.org\x00example.org') # or raise an error?
++ fail(cert, 'example.org')
++ fail(cert, 'null.python.org')
++
+ # Slightly fake real-world example
+ cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
+ 'subject': ((('commonName', 'linuxfrz.org'),),),
+diff -r e0f86c3b3685 Modules/_ssl.c
+--- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
++++ b/Modules/_ssl.c Sun Aug 11 18:17:23 2013 +0200
+@@ -771,12 +771,14 @@
+ ext->value->length));
+
+ for(j = 0; j < sk_GENERAL_NAME_num(names); j++) {
+-
+ /* get a rendering of each name in the set of names */
++ int gntype;
++ ASN1_STRING *as = NULL;
+
+ name = sk_GENERAL_NAME_value(names, j);
+- if (name->type == GEN_DIRNAME) {
+-
++ gntype = name-> type;
++ switch (gntype) {
++ case GEN_DIRNAME:
+ /* we special-case DirName as a tuple of
+ tuples of attributes */
+
+@@ -798,11 +800,62 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
+- } else {
++ case GEN_EMAIL:
++ case GEN_DNS:
++ case GEN_URI:
++ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
++ correctly. */
++ t = PyTuple_New(2);
++ if (t == NULL)
++ goto fail;
++ switch (gntype) {
++ case GEN_EMAIL:
++ v = PyUnicode_FromString("email");
++ as = name->d.rfc822Name;
++ break;
++ case GEN_DNS:
++ v = PyUnicode_FromString("DNS");
++ as = name->d.dNSName;
++ break;
++ case GEN_URI:
++ v = PyUnicode_FromString("URI");
++ as = name->d.uniformResourceIdentifier;
++ break;
++ }
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 0, v);
++ v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as),
++ ASN1_STRING_length(as));
++ if (v == NULL) {
++ Py_DECREF(t);
++ goto fail;
++ }
++ PyTuple_SET_ITEM(t, 1, v);
++ break;
+
++ default:
+ /* for everything else, we use the OpenSSL print form */
+-
++ switch (gntype) {
++ /* check for new general name type */
++ case GEN_OTHERNAME:
++ case GEN_X400:
++ case GEN_EDIPARTY:
++ case GEN_IPADD:
++ case GEN_RID:
++ break;
++ default:
++ if (PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
++ "Unknown general name type %d",
++ gntype) == -1) {
++ goto fail;
++ }
++ break;
++ }
+ (void) BIO_reset(biobuf);
+ GENERAL_NAME_print(biobuf, name);
+ len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+@@ -829,6 +882,7 @@
+ goto fail;
+ }
+ PyTuple_SET_ITEM(t, 1, v);
++ break;
+ }
+
+ /* and add that rendering to the list */
diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf
new file mode 100644
index 00000000000..b648cd36ab7
--- /dev/null
+++ b/dev-lang/python/files/pydoc.conf
@@ -0,0 +1,7 @@
+# /etc/init.d/pydoc.conf
+# $Id$
+
+# 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 100755
index 00000000000..ede01671f77
--- /dev/null
+++ b/dev-lang/python/files/pydoc.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public Licence v2
+# $Id$
+
+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.5-tcl86.patch b/dev-lang/python/files/python-2.5-tcl86.patch
new file mode 100644
index 00000000000..2362e989e2e
--- /dev/null
+++ b/dev-lang/python/files/python-2.5-tcl86.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1518,7 +1518,7 @@
+ # The versions with dots are used on Unix, and the versions without
+ # dots on Windows, for detection by cygwin.
+ tcllib = tklib = tcl_includes = tk_includes = None
+- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
++ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', '8.2',
+ '82', '8.1', '81', '8.0', '80']:
+ tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
+ tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
diff --git a/dev-lang/python/files/python-2.7-issue16248.patch b/dev-lang/python/files/python-2.7-issue16248.patch
new file mode 100644
index 00000000000..ce9c654c565
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-issue16248.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1375388712 -7200
+# Node ID 0f17aed78168e63ec058c219d03cea7240f83dd6
+# Parent bb546f6d8ab4f513804d7a420657963881e5b447
+Fix tkinter regression introduced by the security fix in #16248.
+
+diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
+--- a/Lib/lib-tk/Tkinter.py
++++ b/Lib/lib-tk/Tkinter.py
+@@ -1736,7 +1736,7 @@ class Tk(Misc, Wm):
+ # ensure that self.tk is always _something_.
+ self.tk = None
+ if baseName is None:
+- import sys, os
++ import os
+ baseName = os.path.basename(sys.argv[0])
+ baseName, ext = os.path.splitext(baseName)
+ if ext not in ('.py', '.pyc', '.pyo'):
diff --git a/dev-lang/python/files/python-2.7-issue18851.patch b/dev-lang/python/files/python-2.7-issue18851.patch
new file mode 100644
index 00000000000..35c69ae22e8
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-issue18851.patch
@@ -0,0 +1,287 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1377898693 -7200
+# Node ID 43749cb6bdbd0fdab70f76cd171c3c02a3f600dd
+# Parent ba54011aa295004ad87438211fe3bb1568dd69ab
+Issue #18851: Avoid a double close of subprocess pipes when the child process fails starting.
+
+diff --git a/Lib/subprocess.py b/Lib/subprocess.py
+--- a/Lib/subprocess.py
++++ b/Lib/subprocess.py
+@@ -698,12 +698,12 @@ class Popen(object):
+
+ (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+- errread, errwrite) = self._get_handles(stdin, stdout, stderr)
++ errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
+
+ try:
+ self._execute_child(args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
+@@ -711,18 +711,12 @@ class Popen(object):
+ # Preserve original exception in case os.close raises.
+ exc_type, exc_value, exc_trace = sys.exc_info()
+
+- to_close = []
+- # Only close the pipes we created.
+- if stdin == PIPE:
+- to_close.extend((p2cread, p2cwrite))
+- if stdout == PIPE:
+- to_close.extend((c2pread, c2pwrite))
+- if stderr == PIPE:
+- to_close.extend((errread, errwrite))
+-
+ for fd in to_close:
+ try:
+- os.close(fd)
++ if mswindows:
++ fd.Close()
++ else:
++ os.close(fd)
+ except EnvironmentError:
+ pass
+
+@@ -816,8 +810,9 @@ class Popen(object):
+ """Construct and return tuple with IO objects:
+ p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
+ """
++ to_close = set()
+ if stdin is None and stdout is None and stderr is None:
+- return (None, None, None, None, None, None)
++ return (None, None, None, None, None, None), to_close
+
+ p2cread, p2cwrite = None, None
+ c2pread, c2pwrite = None, None
+@@ -835,6 +830,10 @@ class Popen(object):
+ # Assuming file-like object
+ p2cread = msvcrt.get_osfhandle(stdin.fileno())
+ p2cread = self._make_inheritable(p2cread)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(p2cread)
++ if stdin == PIPE:
++ to_close.add(p2cwrite)
+
+ if stdout is None:
+ c2pwrite = _subprocess.GetStdHandle(_subprocess.STD_OUTPUT_HANDLE)
+@@ -848,6 +847,10 @@ class Popen(object):
+ # Assuming file-like object
+ c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
+ c2pwrite = self._make_inheritable(c2pwrite)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(c2pwrite)
++ if stdout == PIPE:
++ to_close.add(c2pread)
+
+ if stderr is None:
+ errwrite = _subprocess.GetStdHandle(_subprocess.STD_ERROR_HANDLE)
+@@ -863,10 +866,14 @@ class Popen(object):
+ # Assuming file-like object
+ errwrite = msvcrt.get_osfhandle(stderr.fileno())
+ errwrite = self._make_inheritable(errwrite)
++ # We just duplicated the handle, it has to be closed at the end
++ to_close.add(errwrite)
++ if stderr == PIPE:
++ to_close.add(errread)
+
+ return (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+- errread, errwrite)
++ errread, errwrite), to_close
+
+
+ def _make_inheritable(self, handle):
+@@ -895,7 +902,7 @@ class Popen(object):
+
+ def _execute_child(self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite):
+@@ -934,6 +941,10 @@ class Popen(object):
+ # kill children.
+ creationflags |= _subprocess.CREATE_NEW_CONSOLE
+
++ def _close_in_parent(fd):
++ fd.Close()
++ to_close.remove(fd)
++
+ # Start the process
+ try:
+ hp, ht, pid, tid = _subprocess.CreateProcess(executable, args,
+@@ -958,11 +969,11 @@ class Popen(object):
+ # pipe will not close when the child process exits and the
+ # ReadFile will hang.
+ if p2cread is not None:
+- p2cread.Close()
++ _close_in_parent(p2cread)
+ if c2pwrite is not None:
+- c2pwrite.Close()
++ _close_in_parent(c2pwrite)
+ if errwrite is not None:
+- errwrite.Close()
++ _close_in_parent(errwrite)
+
+ # Retain the process handle, but close the thread handle
+ self._child_created = True
+@@ -1088,6 +1099,7 @@ class Popen(object):
+ """Construct and return tuple with IO objects:
+ p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
+ """
++ to_close = set()
+ p2cread, p2cwrite = None, None
+ c2pread, c2pwrite = None, None
+ errread, errwrite = None, None
+@@ -1096,6 +1108,7 @@ class Popen(object):
+ pass
+ elif stdin == PIPE:
+ p2cread, p2cwrite = self.pipe_cloexec()
++ to_close.update((p2cread, p2cwrite))
+ elif isinstance(stdin, int):
+ p2cread = stdin
+ else:
+@@ -1106,6 +1119,7 @@ class Popen(object):
+ pass
+ elif stdout == PIPE:
+ c2pread, c2pwrite = self.pipe_cloexec()
++ to_close.update((c2pread, c2pwrite))
+ elif isinstance(stdout, int):
+ c2pwrite = stdout
+ else:
+@@ -1116,6 +1130,7 @@ class Popen(object):
+ pass
+ elif stderr == PIPE:
+ errread, errwrite = self.pipe_cloexec()
++ to_close.update((errread, errwrite))
+ elif stderr == STDOUT:
+ errwrite = c2pwrite
+ elif isinstance(stderr, int):
+@@ -1126,7 +1141,7 @@ class Popen(object):
+
+ return (p2cread, p2cwrite,
+ c2pread, c2pwrite,
+- errread, errwrite)
++ errread, errwrite), to_close
+
+
+ def _set_cloexec_flag(self, fd, cloexec=True):
+@@ -1170,7 +1185,7 @@ class Popen(object):
+
+ def _execute_child(self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite):
+@@ -1189,6 +1204,10 @@ class Popen(object):
+ if executable is None:
+ executable = args[0]
+
++ def _close_in_parent(fd):
++ os.close(fd)
++ to_close.remove(fd)
++
+ # For transferring possible exec failure from child to parent
+ # The first char specifies the exception type: 0 means
+ # OSError, 1 means some other error.
+@@ -1283,17 +1302,17 @@ class Popen(object):
+ # be sure the FD is closed no matter what
+ os.close(errpipe_write)
+
+- if p2cread is not None and p2cwrite is not None:
+- os.close(p2cread)
+- if c2pwrite is not None and c2pread is not None:
+- os.close(c2pwrite)
+- if errwrite is not None and errread is not None:
+- os.close(errwrite)
+-
+ # Wait for exec to fail or succeed; possibly raising exception
+ # Exception limited to 1M
+ data = _eintr_retry_call(os.read, errpipe_read, 1048576)
+ finally:
++ if p2cread is not None and p2cwrite is not None:
++ _close_in_parent(p2cread)
++ if c2pwrite is not None and c2pread is not None:
++ _close_in_parent(c2pwrite)
++ if errwrite is not None and errread is not None:
++ _close_in_parent(errwrite)
++
+ # be sure the FD is closed no matter what
+ os.close(errpipe_read)
+
+diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
+--- a/Lib/test/test_subprocess.py
++++ b/Lib/test/test_subprocess.py
+@@ -14,6 +14,10 @@ try:
+ import resource
+ except ImportError:
+ resource = None
++try:
++ import threading
++except ImportError:
++ threading = None
+
+ mswindows = (sys.platform == "win32")
+
+@@ -629,6 +633,36 @@ class ProcessTestCase(BaseTestCase):
+ if c.exception.errno not in (errno.ENOENT, errno.EACCES):
+ raise c.exception
+
++ @unittest.skipIf(threading is None, "threading required")
++ def test_double_close_on_error(self):
++ # Issue #18851
++ fds = []
++ def open_fds():
++ for i in range(20):
++ fds.extend(os.pipe())
++ time.sleep(0.001)
++ t = threading.Thread(target=open_fds)
++ t.start()
++ try:
++ with self.assertRaises(EnvironmentError):
++ subprocess.Popen(['nonexisting_i_hope'],
++ stdin=subprocess.PIPE,
++ stdout=subprocess.PIPE,
++ stderr=subprocess.PIPE)
++ finally:
++ t.join()
++ exc = None
++ for fd in fds:
++ # If a double close occurred, some of those fds will
++ # already have been closed by mistake, and os.close()
++ # here will raise.
++ try:
++ os.close(fd)
++ except OSError as e:
++ exc = e
++ if exc is not None:
++ raise exc
++
+ def test_handles_closed_on_exception(self):
+ # If CreateProcess exits with an error, ensure the
+ # duplicate output handles are released
+@@ -783,7 +817,7 @@ class POSIXProcessTestCase(BaseTestCase)
+
+ def _execute_child(
+ self, args, executable, preexec_fn, close_fds, cwd, env,
+- universal_newlines, startupinfo, creationflags, shell,
++ universal_newlines, startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite):
+@@ -791,7 +825,7 @@ class POSIXProcessTestCase(BaseTestCase)
+ subprocess.Popen._execute_child(
+ self, args, executable, preexec_fn, close_fds,
+ cwd, env, universal_newlines,
+- startupinfo, creationflags, shell,
++ startupinfo, creationflags, shell, to_close,
+ p2cread, p2cwrite,
+ c2pread, c2pwrite,
+ errread, errwrite)
diff --git a/dev-lang/python/files/python-2.7.10-semaphore-pid.patch b/dev-lang/python/files/python-2.7.10-semaphore-pid.patch
new file mode 100644
index 00000000000..97fcbd0c49c
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-semaphore-pid.patch
@@ -0,0 +1,51 @@
+Fix for semaphores in pid namespaces
+
+http://bugs.python.org/issue24303
+
+--- a/Modules/_multiprocessing/semaphore.c
++++ b/Modules/_multiprocessing/semaphore.c
+@@ -7,6 +7,7 @@
+ */
+
+ #include "multiprocessing.h"
++#include <time.h>
+
+ enum { RECURSIVE_MUTEX, SEMAPHORE };
+
+@@ -419,7 +420,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+ {
+ char buffer[256];
+ SEM_HANDLE handle = SEM_FAILED;
+- int kind, maxvalue, value;
++ int kind, maxvalue, value, try;
+ PyObject *result;
+ static char *kwlist[] = {"kind", "value", "maxvalue", NULL};
+ static int counter = 0;
+@@ -433,10 +434,24 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+ return NULL;
+ }
+
+- PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++);
++ /* With pid namespaces, we may have multiple processes with the same pid.
++ * Instead of relying on the pid to be unique, we use the microseconds time
++ * to attempt to a unique filename. */
++ for (try = 0; try < 100; ++try) {
++ struct timespec tv;
++ long arbitrary = clock_gettime(CLOCK_REALTIME, &tv) ? 0 : tv.tv_nsec;
++ PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d-%ld",
++ (long)getpid(),
++ counter++,
++ arbitrary);
++ SEM_CLEAR_ERROR();
++ handle = SEM_CREATE(buffer, value, maxvalue);
++ if (handle != SEM_FAILED)
++ break;
++ else if (errno != EEXIST)
++ goto failure;
++ }
+
+- SEM_CLEAR_ERROR();
+- handle = SEM_CREATE(buffer, value, maxvalue);
+ /* On Windows we should fail if GetLastError()==ERROR_ALREADY_EXISTS */
+ if (handle == SEM_FAILED || SEM_GET_LAST_ERROR() != 0)
+ goto failure;
diff --git a/dev-lang/python/files/python-2.7.5-library-path.patch b/dev-lang/python/files/python-2.7.5-library-path.patch
new file mode 100644
index 00000000000..6f435750a20
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.5-library-path.patch
@@ -0,0 +1,25 @@
+# HG changeset patch
+# User Ned Deily <nad@acm.org>
+# Date 1368666045 25200
+# Node ID cd577c3288860b0deb459443ca5c489dc0f99ef6
+# Parent 149340b3004acfcb68e5ed36b1e96b7463c756c7
+Issue #17990: Only modify include and library search paths when cross-compiling.
+
+diff --git a/setup.py b/setup.py
+--- a/setup.py
++++ b/setup.py
+@@ -437,9 +437,11 @@ class PyBuildExt(build_ext):
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+- self.add_gcc_paths()
++ if not cross_compiling:
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ if cross_compiling:
++ self.add_gcc_paths()
+ self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
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 00000000000..a762dfb1088
--- /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.5-re_unsigned_ptrdiff.patch b/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch
new file mode 100644
index 00000000000..a905839a254
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/show_bug.cgi?id=476426
+http://bugs.python.org/issue17998
+diff -r d91da96a55bf Modules/_sre.c
+--- a/Modules/_sre.c Thu May 16 22:47:47 2013 +0100
++++ b/Modules/_sre.c Fri May 17 21:02:48 2013 +0300
+@@ -1028,7 +1028,7 @@
+ TRACE(("|%p|%p|REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr,
+ ctx->pattern[1], ctx->pattern[2]));
+
+- if (ctx->pattern[1] > end - ctx->ptr)
++ if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr)
+ RETURN_FAILURE; /* cannot match */
+
+ state->ptr = ctx->ptr;
+@@ -1111,7 +1111,7 @@
+ TRACE(("|%p|%p|MIN_REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr,
+ ctx->pattern[1], ctx->pattern[2]));
+
+- if (ctx->pattern[1] > end - ctx->ptr)
++ if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr)
+ RETURN_FAILURE; /* cannot match */
+
+ state->ptr = ctx->ptr;
diff --git a/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch b/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch
new file mode 100644
index 00000000000..37e786bd3a5
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch
@@ -0,0 +1,17 @@
+diff -r 40fb60df4755 Modules/socketmodule.c
+--- a/Modules/socketmodule.c Sun Jan 12 12:11:47 2014 +0200
++++ b/Modules/socketmodule.c Mon Jan 13 16:36:35 2014 -0800
+@@ -2744,6 +2744,13 @@
+ recvlen = buflen;
+ }
+
++ /* Check if the buffer is large enough */
++ if (buflen < recvlen) {
++ PyErr_SetString(PyExc_ValueError,
++ "buffer too small for requested bytes");
++ goto error;
++ }
++
+ readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
+ if (readlen < 0) {
+ /* Return an error */
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 00000000000..38ce6f78b91
--- /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.2-CVE-2013-2099.patch b/dev-lang/python/files/python-3.2-CVE-2013-2099.patch
new file mode 100644
index 00000000000..9055a03dfc8
--- /dev/null
+++ b/dev-lang/python/files/python-3.2-CVE-2013-2099.patch
@@ -0,0 +1,51 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1368892602 -7200
+# Sat May 18 17:56:42 2013 +0200
+# Branch 3.2
+# Node ID b9b521efeba385af0142988899a55de1c1c805c7
+# Parent 6255b40c6a6127933d8ea7a2b9de200f5a0e6154
+Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
+
+diff --git a/Lib/ssl.py b/Lib/ssl.py
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -108,9 +108,16 @@
+ pass
+
+
+-def _dnsname_to_pat(dn):
++def _dnsname_to_pat(dn, max_wildcards=1):
+ pats = []
+ for frag in dn.split(r'.'):
++ if frag.count('*') > max_wildcards:
++ # Issue #17980: avoid denials of service by refusing more
++ # than one wildcard per fragment. A survery of established
++ # policy among SSL implementations showed it to be a
++ # reasonable choice.
++ raise CertificateError(
++ "too many wildcards in certificate DNS name: " + repr(dn))
+ if frag == '*':
+ # When '*' is a fragment by itself, it matches a non-empty dotless
+ # fragment.
+diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py
++++ b/Lib/test/test_ssl.py
+@@ -326,6 +326,17 @@
+ self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
+ self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
+
++ # Issue #17980: avoid denials of service by refusing more than one
++ # wildcard per fragment.
++ cert = {'subject': ((('commonName', 'a*b.com'),),)}
++ ok(cert, 'axxb.com')
++ cert = {'subject': ((('commonName', 'a*b.co*'),),)}
++ ok(cert, 'axxb.com')
++ cert = {'subject': ((('commonName', 'a*b*.com'),),)}
++ with self.assertRaises(ssl.CertificateError) as cm:
++ ssl.match_hostname(cert, 'axxbxxc.com')
++ self.assertIn("too many wildcards", str(cm.exception))
++
+ def test_server_side(self):
+ # server_hostname doesn't work for server sockets
+ ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
diff --git a/dev-lang/python/files/python-3.2-CVE-2014-1912.patch b/dev-lang/python/files/python-3.2-CVE-2014-1912.patch
new file mode 100644
index 00000000000..0e095074a25
--- /dev/null
+++ b/dev-lang/python/files/python-3.2-CVE-2014-1912.patch
@@ -0,0 +1,51 @@
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1389671978 18000
+# Node ID 9c56217e5c793685eeaf0ee224848c402bdf1e4c
+# Parent 2b5cd6d4d149dea6c6941b7e07ada248b29fc9f6
+complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
+
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -1968,6 +1968,14 @@ class BufferIOTest(SocketConnectedTest):
+
+ _testRecvFromIntoMemoryview = _testRecvFromIntoArray
+
++ def testRecvFromIntoSmallBuffer(self):
++ # See issue #20246.
++ buf = bytearray(8)
++ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
++
++ def _testRecvFromIntoSmallBuffer(self):
++ self.serv_conn.send(MSG*2048)
++
+
+ TIPC_STYPE = 2000
+ TIPC_LOWER = 200
+diff --git a/Misc/ACKS b/Misc/ACKS
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -1020,6 +1020,7 @@ Eric V. Smith
+ Christopher Smith
+ Gregory P. Smith
+ Roy Smith
++Ryan Smith-Roberts
+ Rafal Smotrzyk
+ Dirk Soede
+ Paul Sokolovsky
+diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -2598,6 +2598,11 @@ sock_recvfrom_into(PySocketSockObject *s
+ if (recvlen == 0) {
+ /* If nbytes was not specified, use the buffer's length */
+ recvlen = buflen;
++ } else if (recvlen > buflen) {
++ PyBuffer_Release(&pbuf);
++ PyErr_SetString(PyExc_ValueError,
++ "nbytes is greater than the length of the buffer");
++ return NULL;
+ }
+
+ readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
diff --git a/dev-lang/python/files/python-3.2-CVE-2014-4616.patch b/dev-lang/python/files/python-3.2-CVE-2014-4616.patch
new file mode 100644
index 00000000000..5b0a397487c
--- /dev/null
+++ b/dev-lang/python/files/python-3.2-CVE-2014-4616.patch
@@ -0,0 +1,39 @@
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1397441438 14400
+# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
+# Parent 218e28a935ab4494d05215c243e2129625a71893
+in scan_once, prevent the reading of arbitrary memory when passed a negative index
+
+Bug reported by Guido Vranken.
+
+Index: Python-3.2.5/Lib/json/tests/test_decode.py
+===================================================================
+--- Python-3.2.5.orig/Lib/test/json_tests/test_decode.py 2014-06-26 18:40:10.825269130 +0200
++++ Python-3.2.5/Lib/test/json_tests/test_decode.py 2014-06-26 18:40:21.962323035 +0200
+@@ -60,5 +60,9 @@
+ msg = 'escape'
+ self.assertRaisesRegexp(ValueError, msg, self.loads, s)
+
++ def test_negative_index(self):
++ d = self.json.JSONDecoder()
++ self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
++
+ class TestPyDecode(TestDecode, PyTest): pass
+ class TestCDecode(TestDecode, CTest): pass
+Index: Python-3.2.5/Modules/_json.c
+===================================================================
+--- a/Modules/_json.c
++++ b/Modules/_json.c
+@@ -930,7 +930,10 @@ scan_once_unicode(PyScannerObject *s, Py
+ PyObject *res;
+ Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
+ Py_ssize_t length = PyUnicode_GET_SIZE(pystr);
+- if (idx >= length) {
++ if (idx < 0)
++ /* Compatibility with Python version. */
++ idx += length;
++ if (idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
diff --git a/dev-lang/python/files/python-3.2-issue16248.patch b/dev-lang/python/files/python-3.2-issue16248.patch
new file mode 100644
index 00000000000..d0e80cae728
--- /dev/null
+++ b/dev-lang/python/files/python-3.2-issue16248.patch
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Georg Brandl <georg@python.org>
+# Date 1379142489 -7200
+# Node ID c18c18774e240377d47638fb23e8276c1ac2e606
+# Parent b9b521efeba385af0142988899a55de1c1c805c7
+Fix tkinter regression introduced by the security fix in #16248.
+
+diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
+--- a/Lib/tkinter/__init__.py
++++ b/Lib/tkinter/__init__.py
+@@ -1722,7 +1722,7 @@ class Tk(Misc, Wm):
+ # ensure that self.tk is always _something_.
+ self.tk = None
+ if baseName is None:
+- import sys, os
++ import os
+ baseName = os.path.basename(sys.argv[0])
+ baseName, ext = os.path.splitext(baseName)
+ if ext not in ('.py', '.pyc', '.pyo'):
diff --git a/dev-lang/python/files/python-3.3-CVE-2013-2099.patch b/dev-lang/python/files/python-3.3-CVE-2013-2099.patch
new file mode 100644
index 00000000000..44b9acede40
--- /dev/null
+++ b/dev-lang/python/files/python-3.3-CVE-2013-2099.patch
@@ -0,0 +1,51 @@
+# HG changeset patch
+# User Antoine Pitrou <solipsis@pitrou.net>
+# Date 1368892602 -7200
+# Sat May 18 17:56:42 2013 +0200
+# Branch 3.3
+# Node ID c627638753e2d25a98950585b259104a025937a9
+# Parent 9682241dc8fcb4b1aef083bd30860efa070c3d6d
+Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
+
+diff --git a/Lib/ssl.py b/Lib/ssl.py
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -129,9 +129,16 @@
+ pass
+
+
+-def _dnsname_to_pat(dn):
++def _dnsname_to_pat(dn, max_wildcards=1):
+ pats = []
+ for frag in dn.split(r'.'):
++ if frag.count('*') > max_wildcards:
++ # Issue #17980: avoid denials of service by refusing more
++ # than one wildcard per fragment. A survery of established
++ # policy among SSL implementations showed it to be a
++ # reasonable choice.
++ raise CertificateError(
++ "too many wildcards in certificate DNS name: " + repr(dn))
+ if frag == '*':
+ # When '*' is a fragment by itself, it matches a non-empty dotless
+ # fragment.
+diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
+--- a/Lib/test/test_ssl.py
++++ b/Lib/test/test_ssl.py
+@@ -349,6 +349,17 @@
+ self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
+ self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
+
++ # Issue #17980: avoid denials of service by refusing more than one
++ # wildcard per fragment.
++ cert = {'subject': ((('commonName', 'a*b.com'),),)}
++ ok(cert, 'axxb.com')
++ cert = {'subject': ((('commonName', 'a*b.co*'),),)}
++ ok(cert, 'axxb.com')
++ cert = {'subject': ((('commonName', 'a*b*.com'),),)}
++ with self.assertRaises(ssl.CertificateError) as cm:
++ ssl.match_hostname(cert, 'axxbxxc.com')
++ self.assertIn("too many wildcards", str(cm.exception))
++
+ def test_server_side(self):
+ # server_hostname doesn't work for server sockets
+ ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
diff --git a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch b/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
new file mode 100644
index 00000000000..c67b2e5feed
--- /dev/null
+++ b/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
@@ -0,0 +1,52 @@
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1397441438 14400
+# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
+# Parent 218e28a935ab4494d05215c243e2129625a71893
+in scan_once, prevent the reading of arbitrary memory when passed a negative index
+
+Bug reported by Guido Vranken.
+
+Index: Python-3.3.5/Lib/json/tests/test_decode.py
+===================================================================
+--- Python-3.3.5.orig/Lib/test/test_json/test_decode.py 2014-06-26 18:40:10.825269130 +0200
++++ Python-3.3.5/Lib/test/test_json/test_decode.py 2014-06-26 18:40:21.962323035 +0200
+@@ -60,5 +60,10 @@
+ msg = 'escape'
+ self.assertRaisesRegexp(ValueError, msg, self.loads, s)
+
++ def test_negative_index(self):
++ d = self.json.JSONDecoder()
++ self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
++ self.assertRaises(ValueError, d.raw_decode, u'a'*42, -50000)
++
+ class TestPyDecode(TestDecode, PyTest): pass
+ class TestCDecode(TestDecode, CTest): pass
+Index: Python-3.3.5/Misc/ACKS
+===================================================================
+--- Python-3.3.5.orig/Misc/ACKS 2014-06-26 18:40:10.826269135 +0200
++++ Python-3.3.5/Misc/ACKS 2014-06-26 18:40:21.962323035 +0200
+@@ -1085,6 +1085,7 @@
+ Frank Visser
+ Johannes Vogel
+ Alex Volkov
++Guido Vranken
+ Martijn Vries
+ Niki W. Waibel
+ Wojtek Walczak
+Index: Python-3.3.5/Modules/_json.c
+===================================================================
+--- a/Modules/_json.c
++++ b/Modules/_json.c
+@@ -975,7 +975,10 @@ scan_once_unicode(PyScannerObject *s, Py
+ kind = PyUnicode_KIND(pystr);
+ length = PyUnicode_GET_LENGTH(pystr);
+
+- if (idx >= length) {
++ if (idx < 0)
++ /* Compatibility with Python version. */
++ idx += length;
++ if (idx < 0 || idx >= length) {
+ PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+ }
diff --git a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
new file mode 100644
index 00000000000..d963b9e52bd
--- /dev/null
+++ b/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
@@ -0,0 +1,40 @@
+do not hardcode /usr/include paths
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -668,6 +668,8 @@ AC_ARG_WITH(cxx_main,
+ ])
+ AC_MSG_RESULT($with_cxx_main)
+
++AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++
+ preset_cxx="$CXX"
+ if test -z "$CXX"
+ then
+@@ -1513,7 +1515,7 @@ dnl AC_MSG_RESULT($cpp_type)
+ # checks for header files
+ AC_HEADER_STDC
+ ac_save_cppflags="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
++CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
+ AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
+ fcntl.h grp.h \
+ ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
+@@ -2225,8 +2227,6 @@ LIBS="$withval $LIBS"
+ ],
+ [AC_MSG_RESULT(no)])
+
+-AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+-
+ # Check for use of the system expat library
+ AC_MSG_CHECKING(for --with-system-expat)
+ AC_ARG_WITH(system_expat,
+@@ -4273,7 +4273,7 @@ then
+ fi
+
+ ac_save_cppflags="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
++CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
+ # On HP/UX 11.0, mvwdelch is a block with a return statement
+ AC_MSG_CHECKING(whether mvwdelch is an expression)
+ AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
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 00000000000..8bfad114278
--- /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-config-2.4-r1 b/dev-lang/python/files/python-config-2.4-r1
new file mode 100644
index 00000000000..af451131cee
--- /dev/null
+++ b/dev-lang/python/files/python-config-2.4-r1
@@ -0,0 +1,58 @@
+#! /usr/bin/python2.4
+
+import sys
+import os
+import getopt
+from distutils import sysconfig
+
+valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
+ 'ldflags', 'help']
+
+def exit_with_usage(code=1):
+ print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
+ '|'.join('--'+opt for opt in valid_opts))
+ sys.exit(code)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
+except getopt.error:
+ exit_with_usage()
+
+if not opts:
+ #exit_with_usage()
+ #be compatible with our old python-config-2.4
+ import string
+ print "-lpython2.4 -lm -L/usr/lib/python2.4/config",string.join(string.split(sysconfig.get_config_var("MODLIBS")))
+ sys.exit(0)
+
+opt = opts[0][0]
+
+pyver = sysconfig.get_config_var('VERSION')
+getvar = sysconfig.get_config_var
+
+if opt == '--help':
+ exit_with_usage(0)
+
+elif opt == '--prefix':
+ print sysconfig.PREFIX
+
+elif opt == '--exec-prefix':
+ print sysconfig.EXEC_PREFIX
+
+elif opt in ('--includes', '--cflags'):
+ flags = ['-I' + sysconfig.get_python_inc(),
+ '-I' + sysconfig.get_python_inc(plat_specific=True)]
+ if opt == '--cflags':
+ flags.extend(getvar('CFLAGS').split())
+ print ' '.join(flags)
+
+elif opt in ('--libs', '--ldflags'):
+ libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
+ libs.append('-lpython'+pyver)
+ # add the prefix/lib/pythonX.Y/config dir, but only if there is no
+ # shared library in prefix/lib/.
+ if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
+ libs.insert(0, '-L' + getvar('LIBPL'))
+ print ' '.join(libs)
+
+
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
new file mode 100644
index 00000000000..51a9e80800a
--- /dev/null
+++ b/dev-lang/python/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>python</herd>
+<use>
+ <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
+ <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
+ <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/python/python-2.6.9.ebuild b/dev-lang/python/python-2.6.9.ebuild
new file mode 100644
index 00000000000..1d68a1bb148
--- /dev/null
+++ b/dev-lang/python/python-2.6.9.ebuild
@@ -0,0 +1,371 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+WANT_AUTOMAKE="none"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib multiprocessing pax-utils python-utils-r1 toolchain-funcs unpacker
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="${PV}-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tgz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.6"
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ berkdb? ( || (
+ 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[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.3:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<sys-apps/portage-2.1.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.61
+ !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND="app-eselect/eselect-python
+ app-admin/python-updater"
+
+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 -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ local excluded_patches
+ if ! tc-is-cross-compiler; then
+ excluded_patches="*_all_crosscompile.patch"
+ fi
+
+ EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ epatch "${FILESDIR}/python-2.5-tcl86.patch"
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ # 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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
+
+ # Run the configure scripts in parallel.
+ multijob_init
+
+ mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}}
+
+ if tc-is-cross-compiler; then
+ (
+ multijob_child_init
+ cd "${WORKDIR}"/${CBUILD} >/dev/null
+ OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
+ "${S}"/configure \
+ --{build,host}=${CBUILD} \
+ || die "cross-configure failed"
+ ) &
+ multijob_post_fork
+ 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.6 correctly.
+ # Needed on FreeBSD unless Python 2.6 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ cd "${WORKDIR}"/${CHOST}
+ 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-libc="" \
+ --with-system-ffi
+
+ 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
+
+ if tc-is-cross-compiler; then
+ # Modify the Makefile.pre so we don't regen for the host/ one.
+ # We need to link the host python programs into $PWD and run
+ # them from here because the distutils sysconfig module will
+ # parse Makefile/etc... from argv[0], and we need it to pick
+ # up the target settings, not the host ones.
+ sed -i \
+ -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
+ -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
+ -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
+ Makefile{.pre,} || die "sed failed"
+ fi
+
+ multijob_finish
+}
+
+src_compile() {
+ if tc-is-cross-compiler; then
+ cd "${WORKDIR}"/${CBUILD}
+ # Disable as many modules as possible -- but we need a few to install.
+ PYTHON_DISABLE_MODULES=$(
+ sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
+ egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
+ ) \
+ PTHON_DISABLE_SSL="1" \
+ SYSROOT= \
+ emake || die "cross-make failed"
+ # See comment in src_configure about these.
+ ln python ../${CHOST}/hostpython || die
+ ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
+ ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
+ fi
+
+ cd "${WORKDIR}"/${CHOST}
+ default
+
+ # Work around bug 329499. See also bug 413751.
+ pax-mark m python
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${WORKDIR}"/${CHOST}
+
+ # Skip failing tests.
+ local skipped_tests="distutils tcl"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ PYTHONDONTWRITEBYTECODE="" 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() {
+ [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
+
+ local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+
+ cd "${WORKDIR}"/${CHOST}
+ emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT} || die
+
+ # 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}"
+ mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+ use berkdb || rm -fr "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*}
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk}
+ fi
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}"/Tools || die "doins failed"
+ fi
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+ 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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python \
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ export LD_LIBRARY_PATH
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ [[ -z "${EROOT}" || (! -d "${EROOT}" && -d "${ROOT}") ]] && EROOT="${ROOT%/}${EPREFIX}/"
+
+ 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 "You should switch active version of Python ${PV%%.*} and run"
+ ewarn "'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-2.7.10.ebuild b/dev-lang/python/python-2.7.10.ebuild
new file mode 100644
index 00000000000..c7400e85331
--- /dev/null
+++ b/dev-lang/python/python-2.7.10.ebuild
@@ -0,0 +1,357 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+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.10-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ 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[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ 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
+ app-admin/python-updater"
+
+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"
+
+ 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@@"
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ # 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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-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
+
+ # 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"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # 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"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
+ else
+ 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}
+ fi
+
+ 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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; 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 "You should switch active version of Python ${PV%%.*} and run"
+ ewarn "'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-2.7.9-r1.ebuild b/dev-lang/python/python-2.7.9-r1.ebuild
new file mode 100644
index 00000000000..b135a1a5e62
--- /dev/null
+++ b/dev-lang/python/python-2.7.9-r1.ebuild
@@ -0,0 +1,358 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+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.9-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ 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[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ 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
+ app-admin/python-updater"
+
+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"
+
+ 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@@"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ # 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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-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
+
+ # 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"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # 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"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
+ else
+ 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}
+ fi
+
+ 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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; 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 "You should switch active version of Python ${PV%%.*} and run"
+ ewarn "'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-2.7.9-r2.ebuild b/dev-lang/python/python-2.7.9-r2.ebuild
new file mode 100644
index 00000000000..512edb5b6d8
--- /dev/null
+++ b/dev-lang/python/python-2.7.9-r2.ebuild
@@ -0,0 +1,359 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+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.9-1"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ 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[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ 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
+ app-admin/python-updater"
+
+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"
+
+ 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@@"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ # 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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-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
+
+ # 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"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # 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"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test}
+ else
+ 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}
+ fi
+
+ 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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; 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 "You should switch active version of Python ${PV%%.*} and run"
+ ewarn "'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.2.5-r6.ebuild b/dev-lang/python/python-3.2.5-r6.ebuild
new file mode 100644
index 00000000000..e3881085467
--- /dev/null
+++ b/dev-lang/python/python-3.2.5-r6.ebuild
@@ -0,0 +1,384 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_REVISION="1"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )"
+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
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if [[ "${PV}" =~ ^3\.2(\.[1234])?(_pre)? ]]; then
+ rm -f "${EROOT}usr/$(get_libdir)/llibpython3.so"
+ else
+ die "Deprecated code not deleted"
+ fi
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -r Modules/expat
+ rm -r Modules/_ctypes/libffi*
+ rm -r Modules/zlib
+
+ local excluded_patches
+ if ! tc-is-cross-compiler; then
+ excluded_patches="*_all_crosscompile.patch"
+ fi
+
+ EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ epatch "${FILESDIR}/python-3.2-CVE-2013-2099.patch"
+ epatch "${FILESDIR}/CVE-2013-4238_py33.patch"
+ epatch "${FILESDIR}/python-3.2-issue16248.patch"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ # bug #514686
+ epatch "${FILESDIR}/${PN}-3.2-CVE-2014-4616.patch"
+ # bug #500518
+ epatch "${FILESDIR}/${PN}-3.2-CVE-2014-1912.patch"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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
+
+ # Run the configure scripts in parallel.
+ multijob_init
+
+ mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}}
+
+ if tc-is-cross-compiler; then
+ (
+ multijob_child_init
+ cd "${WORKDIR}"/${CBUILD} >/dev/null
+ OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
+ "${S}"/configure \
+ --{build,host}=${CBUILD} \
+ || die "cross-configure failed"
+ ) &
+ multijob_post_fork
+
+ # The configure script assumes it's buggy when cross-compiling.
+ export ac_cv_buggy_getaddrinfo=no
+ export ac_cv_have_long_long_format=yes
+ 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
+
+ cd "${WORKDIR}"/${CHOST}
+ ECONF_SOURCE=${S} OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $(use_with wide-unicode) \
+ --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
+
+ 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
+
+ if tc-is-cross-compiler; then
+ # Modify the Makefile.pre so we don't regen for the host/ one.
+ # We need to link the host python programs into $PWD and run
+ # them from here because the distutils sysconfig module will
+ # parse Makefile/etc... from argv[0], and we need it to pick
+ # up the target settings, not the host ones.
+ sed -i \
+ -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
+ -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
+ -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
+ Makefile{.pre,} || die "sed failed"
+ fi
+
+ multijob_finish
+}
+
+src_compile() {
+ if tc-is-cross-compiler; then
+ cd "${WORKDIR}"/${CBUILD}
+ # Disable as many modules as possible -- but we need a few to install.
+ PYTHON_DISABLE_MODULES=$(
+ sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
+ egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
+ ) \
+ PTHON_DISABLE_SSL="1" \
+ SYSROOT= \
+ emake
+ # See comment in src_configure about these.
+ ln python ../${CHOST}/hostpython || die
+ ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
+ ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
+ fi
+
+ cd "${WORKDIR}"/${CHOST}
+ 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 "${WORKDIR}"/${CHOST}
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" 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${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 "${WORKDIR}"/${CHOST}
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm "${ED}usr/$(get_libdir)/libpython3.so" || die
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python \
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ export LD_LIBRARY_PATH
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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() {
+ ewarn "Please note that Python ${PV%.*} is no longer supported in Gentoo."
+ ewarn "The interpreter is not well maintained, and may contain security"
+ ewarn "vulnerabilities. Gentoo ebuilds will no longer be built with support"
+ ewarn "for Python ${PV%.*}."
+ ewarn
+ ewarn "If you wish to use Python ${PV%.*} for your own purposes (development,"
+ ewarn "testing), we suggest establishing a virtualenv for this interpreter,"
+ ewarn "and installing the necessary dependencies inside it. However, we also"
+ ewarn "strongly discourage using Python ${PV%.*} on production systems."
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.3.5-r1.ebuild b/dev-lang/python/python-3.3.5-r1.ebuild
new file mode 100644
index 00000000000..351c9b08006
--- /dev/null
+++ b/dev-lang/python/python-3.3.5-r1.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="${PV}-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz
+ mirror://gentoo/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.3"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<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 )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND="app-eselect/eselect-python
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+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.3.5-ncurses-pkg-config.patch"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ # bug #514686
+ epatch "${FILESDIR}/${PN}-3.3-CVE-2014-4616.patch"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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
+
+ 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 || 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
+
+ PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" 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${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/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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."
+ ewarn
+ ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.4.0.ebuild b/dev-lang/python/python-3.4.0.ebuild
new file mode 100644
index 00000000000..a7d77f905fb
--- /dev/null
+++ b/dev-lang/python/python-3.4.0.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+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.0-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz
+ mirror://gentoo/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 +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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<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
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+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"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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() {
+ # 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${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/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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.1.ebuild b/dev-lang/python/python-3.4.1.ebuild
new file mode 100644
index 00000000000..453a4439b31
--- /dev/null
+++ b/dev-lang/python/python-3.4.1.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+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.1-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 +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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<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
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+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"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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() {
+ # 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${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/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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.2.ebuild b/dev-lang/python/python-3.4.2.ebuild
new file mode 100644
index 00000000000..55d3480f933
--- /dev/null
+++ b/dev-lang/python/python-3.4.2.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+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.2-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 +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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<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
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+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"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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() {
+ # 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${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/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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.3.ebuild b/dev-lang/python/python-3.4.3.ebuild
new file mode 100644
index 00000000000..30842a4f421
--- /dev/null
+++ b/dev-lang/python/python-3.4.3.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+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.3-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 +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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<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
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+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"
+
+ 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@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ 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
+ 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
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # 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() {
+ # 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${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/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ 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-${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
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/qu-prolog/Manifest b/dev-lang/qu-prolog/Manifest
new file mode 100644
index 00000000000..66dca89eac8
--- /dev/null
+++ b/dev-lang/qu-prolog/Manifest
@@ -0,0 +1,2 @@
+DIST qp9.1.tar.gz 1460679 SHA256 1f3052f2700d537b33207943a3ade48b2b3aa5cd01cafc0475bcf26c645bc9af SHA512 44590be9d1ecec97fa6c82b657e9ecc3778f833644055ee87c9a6a36996663d139ffd7b583d72f8ac317648e0f22ccbc2a1da9c3a5eabd23381c668e5d073cbb WHIRLPOOL 37ec4e25c2284b267f72c016b4ea1e542d735c9da5f6532d1f6b439af2b91422ddc251d31e1a17b6366ee6af0e754acdbf8a0c44ef03f46a2515f14b1259b732
+DIST qp9.5.tar.gz 1537445 SHA256 7e4b9883fad00b16c919620033da48482b2eccc875b37f8170d674ce9f72aee2 SHA512 7a79090a6e3f0263e38cf5e5724a5c35c63c8cca2842fa8c07f9ff84011ef7ac9a22b195713aeb626a787c9391c612f3fea0ff38c084634a2f62258feb3eb6e2 WHIRLPOOL 3f589998f3480925fa3ad3c54f1f0ba4122cfa12c48d9bf1269e92a0fdf52d1823cd8dae8851e36d2c97ec2f869da10ff6ee7f2663b752d1d396e1b5a95ca982
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
new file mode 100644
index 00000000000..1fde09843e6
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
@@ -0,0 +1,40 @@
+diff -ur qp9.1.orig/src/gc.cc qp9.1/src/gc.cc
+--- qp9.1.orig/src/gc.cc 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/gc.cc 2011-11-20 07:14:14.000000000 +1300
+@@ -152,7 +152,7 @@
+ {
+ cerr << size << endl;
+ heapobject* ptr = reinterpret_cast<heapobject*>(term);
+- cerr << hex << (u_int)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
++ cerr << hex << (wordptr)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
+ return false;
+ }
+ return true;
+diff -ur qp9.1.orig/src/objects.h qp9.1/src/objects.h
+--- qp9.1.orig/src/objects.h 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/objects.h 2011-11-20 07:14:14.000000000 +1300
+@@ -1242,18 +1242,12 @@
+ << this->getName() << "\" ";
+
+ #ifndef WIN32
+- switch (hasAssociatedItem())
+- {
+- case AssociatedNone:
+- std::cerr << "(no info)";
+- break;
+- case AssociatedInteger:
+- std::cerr << "int: " << getAssociatedInteger();
+- break;
+- case AssociatedAtom:
+- std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
+- break;
+- }
++ if (hasAssociatedInteger())
++ std::cerr << "int: " << getAssociatedInteger();
++ else if (hasAssociatedAtom())
++ std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
++ else
++ std::cerr << "(no info)";
+ #endif
+ }
+ #endif
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
new file mode 100644
index 00000000000..f53eb067b1f
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.1.orig/Makefile.in qp9.1/Makefile.in
+--- qp9.1.orig/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/Makefile.in 2012-01-14 12:57:16.000000000 +1300
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.1.orig/src/Makefile.in qp9.1/src/Makefile.in
+--- qp9.1.orig/src/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/src/Makefile.in 2012-01-14 12:48:33.000000000 +1300
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
new file mode 100644
index 00000000000..82d5bc7f7eb
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
@@ -0,0 +1,33 @@
+diff -ur qp9.1.orig/src/pile.h qp9.1/src/pile.h
+--- qp9.1.orig/src/pile.h 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/pile.h 2013-01-09 12:07:44.000000000 +0100
+@@ -75,7 +75,7 @@
+ //
+ // Push a StoredType onto the pile.
+ //
+- void push(const StoredType s){ pushElement(s); }
++ void push(const StoredType s){ this->pushElement(s); }
+
+ //
+ // Pop a StoredType off the pile.
+@@ -85,7 +85,7 @@
+ //
+ // Pop n entries of StoredType off the pile.
+ //
+- void popNEntries(word32 n) { setTopOfStack(this->getTopOfStack() - n); }
++ void popNEntries(word32 n) { this->setTopOfStack(this->getTopOfStack() - n); }
+
+ //
+ // Check whether the pile is empty or not.
+diff -ur qp9.1.orig/src/system_support.cc qp9.1/src/system_support.cc
+--- qp9.1.orig/src/system_support.cc 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/system_support.cc 2013-01-09 12:07:16.000000000 +0100
+@@ -61,6 +61,8 @@
+ #include <iostream>
+ #ifdef WIN32
+ #include <direct.h>
++#else
++#include <unistd.h>
+ #endif //WIN32
+
+ using namespace std;
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
new file mode 100644
index 00000000000..4a1aa23607a
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.1.orig/bin/qc.in qp9.1/bin/qc.in
+--- qp9.1.orig/bin/qc.in 2011-08-23 11:17:28.000000000 +1200
++++ qp9.1/bin/qc.in 2011-11-20 07:16:18.000000000 +1300
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.1.orig/prolog/Makefile.in qp9.1/prolog/Makefile.in
+--- qp9.1.orig/prolog/Makefile.in 2006-04-06 16:01:45.000000000 +1200
++++ qp9.1/prolog/Makefile.in 2011-11-20 07:16:18.000000000 +1300
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
new file mode 100644
index 00000000000..5bcce94d9b6
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.5.orig/Makefile.in qp9.5/Makefile.in
+--- qp9.5.orig/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.5.orig/src/Makefile.in qp9.5/src/Makefile.in
+--- qp9.5.orig/src/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/src/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
new file mode 100644
index 00000000000..55dc08ffe47
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.5.orig/bin/qc.in qp9.5/bin/qc.in
+--- qp9.5.orig/bin/qc.in 2014-11-17 06:45:59.000000000 +0100
++++ qp9.5/bin/qc.in 2015-05-03 11:31:54.000000000 +0200
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.5.orig/prolog/Makefile.in qp9.5/prolog/Makefile.in
+--- qp9.5.orig/prolog/Makefile.in 2006-04-06 06:01:45.000000000 +0200
++++ qp9.5/prolog/Makefile.in 2015-05-03 11:31:54.000000000 +0200
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/metadata.xml b/dev-lang/qu-prolog/metadata.xml
new file mode 100644
index 00000000000..9708914df07
--- /dev/null
+++ b/dev-lang/qu-prolog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>prolog</herd>
+ <use>
+ <flag name="pedro">Pedro subscription/notification communications system</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
new file mode 100644
index 00000000000..64aa5fa1f18
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
new file mode 100644
index 00000000000..8fe6db88ccc
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake || die "emake xqp failed"
+ fi
+}
+
+src_install() {
+ sed -i -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/qa bin/qdeal bin/qem bin/ql || die
+ dobin bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp bin/qppp || die
+ dobin bin/kq || die
+
+ if use qt4; then
+ dobin src/xqp/xqp || die
+ fi
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/qc1.qup.qx \
+ bin/qecat.qx \
+ bin/qg.qx \
+ bin/qp.qx || die
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo || die
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo || die
+
+ doman doc/man/man1/*.1 || die
+
+ dodoc README || die
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html || die
+ docinto user-guide
+ dodoc doc/user/main.pdf || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql || die
+ docinto examples
+ dodoc examples/README || die
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.5.ebuild b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
new file mode 100644
index 00000000000..9434322dd8a
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest
new file mode 100644
index 00000000000..9c9d9e34612
--- /dev/null
+++ b/dev-lang/rakudo/Manifest
@@ -0,0 +1,7 @@
+DIST rakudo-2015.01.1.tar.gz 1500598 SHA256 bf6e406a7d274d56b0afcbe13baccb69449d6847c41d713d4fea4220b5246d51 SHA512 b4953f7d4408e4ef51b09339acc1a3be13a00fd3a5a546961478d1bd62bf383660650aa336cd482fd7c321e4eda5a2d26182ad25f33b5902781a6b4cb407c0a7 WHIRLPOOL 9a8dfbec049f92455c2cdbb1d37e55e365dce50aa17b4181b888524efff8ec0a035f10b6ced5fa0803ff16d49772ce2de06664fa21df23ba997ef25f6fcf0825
+DIST rakudo-2015.02.tar.gz 1541857 SHA256 6e64d291809f1ec081fae061c4c886bc774d442439b86801511da3e1a64104b6 SHA512 c6acf3704f820f523be4b0bd2dba9cee23a573364bd22f8a5b8f65b3a0fdc2dcd2921a89ff1e3499d372af611a9fcc2d5660952f3b5d9efee4849ed0b14979e8 WHIRLPOOL aa96a90bba18fa9f2543dfdc7cde0c9e9ad9e6bb7f5cf462b6b55d07a9745f2ff8a7f1c342ae652f4dde49db079f54fb3391676c2a8c5de46c8f2cee736d4975
+DIST rakudo-2015.03.tar.gz 1518785 SHA256 39d0ca0c8f681a33c44e1265e38fb718e4357c43bc0c651c24f610a19598aecc SHA512 562be7491ee180fbf8cf03379716b507b234539e163e4c0bc56b2d9af1a8c4f57ea2a409ef1bef00e76d81a356abf8eef35b3c09cc1c4ac5f1e0ee29910f8b33 WHIRLPOOL 176119cd12aa18b1b1e8493a3539b5e580da9b86f71ebdba5722d1ec333a69a8c7adc4808d29341f3a60c02e4656b1640dc64857441a08472f57c824aa1cbb4f
+DIST rakudo-2015.04.tar.gz 2481636 SHA256 ba61883218617a2993169b4b318bb5b89d26422bb987b9f111c982a337012d65 SHA512 831136c52b1b83350db923a296c693e2ecaf079e988e4fc566cabb3946a085dabd695a9b2568a6fa43c3bff314940ca563a1c244288c6842ca4d791e9a8144ef WHIRLPOOL c4f6b4c0a24274808da01a2b4b4e39bc5d995879b945dceea31118797ae242d94bf0230932f297b501fa3898e09493ecb3233592a2129ac1b721722be8cf0471
+DIST rakudo-2015.05.tar.gz 2503009 SHA256 81ecf442e5c1720d8112effc5531f171c83907e29510c536cb16c8637d9d8924 SHA512 eb8774b0642bddbb6f11d3aa6041b25da495080d75fd1a0364002f071044d4e08cd798e2449d7b55622287ec482206e3327e8ba0b5973a17c0369c95c16e5dc1 WHIRLPOOL 135c6d3ca2eed5fb8fa529ceeb1a3c842e6174c34c1d259ca573bec0c3b8bea6f5967c8c404cd3cb6bccd6188eadf82bbb4407a01f7bf4ae4fb03dfaf7198181
+DIST rakudo-2015.06.tar.gz 2505308 SHA256 eea69522bc415a2566acb7277db44e5e0df558b3f3d667b64c4e700e917d18fa SHA512 1fb7f6fa42cc71977c26663ae38f5421b390781825e8acd0a0fae9c2781aa06018db3b474a0da43eb519eeb1aed8220df686968e2484272df095e21476b3023d WHIRLPOOL afea51402961a0ca2428a9e8ea5bda48b23b955fb04ad86aeb002b2a387c98931c3e03de24dda247b42a4e00ce772234f52bf6cb76f2951b28f57bef8908b56c
+DIST rakudo-2015.07.2.tar.gz 2539175 SHA256 1794f2d670af1174aee620587270c05fbc06ef3026ae144daac436101856c492 SHA512 2e487df689c40b45673fc14a66127f893a5b0db13c5747e030dbc4b293cec76114b88909598f2ac7d607e7fe6d8fa632ee0c7386a064da31e76feeec48406d5f WHIRLPOOL bfa2ae4c3f5e24f641eaf8c52d96e61c9cfc48d4ecd9fcacae5a19ed1f60d636d3241fddf2bcbf40df2f2b98add912992c8e955dd237b7583af38c17bbb6713c
diff --git a/dev-lang/rakudo/files/jakudo-fix-paths.patch b/dev-lang/rakudo/files/jakudo-fix-paths.patch
new file mode 100644
index 00000000000..dc75407d118
--- /dev/null
+++ b/dev-lang/rakudo/files/jakudo-fix-paths.patch
@@ -0,0 +1,23 @@
+commit b9f993b86acf0f1ca3108d1b799ca35c21e726c7
+Author: Tobias Leich <email@froggs.de>
+Date: Tue May 26 20:27:50 2015 +0200
+
+ dont create dirs when instanciating CUR
+
+ But also do not skip non-existing locations, because we might be
+ creating them when installing into.
+
+diff --git a/src/core/CompUnitRepo/Locally.pm b/src/core/CompUnitRepo/Locally.pm
+index 72a7eca..5acffca 100644
+--- a/src/core/CompUnitRepo/Locally.pm
++++ b/src/core/CompUnitRepo/Locally.pm
+@@ -7,9 +7,7 @@ role CompUnitRepo::Locally {
+
+ method new(CompUnitRepo::Locally: $dir) {
+ my $abspath := $*SPEC.rel2abs($dir);
+- try mkdir $abspath;
+ my $IO := IO::Path.new-from-absolute-path($abspath);
+- return Nil unless $IO.d and $IO.r;
+
+ %instances{$abspath} //=
+ self.bless(:$IO,:lock(Lock.new),:WHICH(self.^name ~ '|' ~ $abspath));
diff --git a/dev-lang/rakudo/metadata.xml b/dev-lang/rakudo/metadata.xml
new file mode 100644
index 00000000000..75666cc2c24
--- /dev/null
+++ b/dev-lang/rakudo/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>perl</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name='parrot'>Build the parrot backend (default)</flag>
+ <flag name='moar'>Build the MoarVM backend (experimental)</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rakudo/rakudo-2015.01.1.ebuild b/dev-lang/rakudo/rakudo-2015.01.1.ebuild
new file mode 100644
index 00000000000..9be0bf033d4
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.01.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PARROT_VERSION="6.7.0"
+
+MY_PV="2015.01"
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +parrot java moar"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ >=dev-lang/nqp-${MY_PV}[parrot?,java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_prepare() {
+ sed -i "s,\$(DOCDIR)/rakudo$,&-${PVR}," tools/build/Makefile-Parrot.in || die
+}
+
+src_configure() {
+ use parrot && myconf+="parrot,"
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+
+ # why doesn't ops2c get detected?! :(
+ if use parrot; then
+ sed -i -e 's~OPS2C = $(PARROT_BIN_DIR)/$(EXE)~OPS2C = $(PARROT_BIN_DIR)/ops2c~' Makefile || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.02.ebuild b/dev-lang/rakudo/rakudo-2015.02.ebuild
new file mode 100644
index 00000000000..9be0bf033d4
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.02.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PARROT_VERSION="6.7.0"
+
+MY_PV="2015.01"
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +parrot java moar"
+
+RDEPEND="parrot? ( >=dev-lang/parrot-${PARROT_VERSION}:=[unicode] )
+ >=dev-lang/nqp-${MY_PV}[parrot?,java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_prepare() {
+ sed -i "s,\$(DOCDIR)/rakudo$,&-${PVR}," tools/build/Makefile-Parrot.in || die
+}
+
+src_configure() {
+ use parrot && myconf+="parrot,"
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+
+ # why doesn't ops2c get detected?! :(
+ if use parrot; then
+ sed -i -e 's~OPS2C = $(PARROT_BIN_DIR)/$(EXE)~OPS2C = $(PARROT_BIN_DIR)/ops2c~' Makefile || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.03.ebuild b/dev-lang/rakudo/rakudo-2015.03.ebuild
new file mode 100644
index 00000000000..62b4355174a
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.03.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="2015.01"
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc java +moar"
+
+RDEPEND=">=dev-lang/nqp-${MY_PV}[java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.04.ebuild b/dev-lang/rakudo/rakudo-2015.04.ebuild
new file mode 100644
index 00000000000..62b4355174a
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.04.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV="2015.01"
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc java +moar"
+
+RDEPEND=">=dev-lang/nqp-${MY_PV}[java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.05-r1.ebuild b/dev-lang/rakudo/rakudo-2015.05-r1.ebuild
new file mode 100644
index 00000000000..631262a4c3e
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.05-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc java +moar"
+
+RDEPEND=">=dev-lang/nqp-${PV}[java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}/jakudo-fix-paths.patch"
+}
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.06.ebuild b/dev-lang/rakudo/rakudo-2015.06.ebuild
new file mode 100644
index 00000000000..744a9057d31
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.06.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc java +moar"
+
+RDEPEND=">=dev-lang/nqp-${PV}[java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rakudo/rakudo-2015.07.2.ebuild b/dev-lang/rakudo/rakudo-2015.07.2.ebuild
new file mode 100644
index 00000000000..744a9057d31
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2015.07.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="A Perl 6 implementation built on the Parrot virtual machine"
+HOMEPAGE="http://rakudo.org/"
+SRC_URI="http://rakudo.org/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc java +moar"
+
+RDEPEND=">=dev-lang/nqp-${PV}[java?,moar?]"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+src_configure() {
+ use java && myconf+="jvm,"
+ use moar && myconf+="moar,"
+ perl Configure.pl --backends=${myconf} --prefix=/usr || die
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install || die
+
+ dodoc CREDITS README.md docs/ChangeLog docs/ROADMAP || die
+
+ if use doc; then
+ dohtml -A svg docs/architecture.html docs/architecture.svg || die
+ dodoc docs/*.pod || die
+ docinto announce
+ dodoc docs/announce/* || die
+ fi
+}
diff --git a/dev-lang/rebol-bin/Manifest b/dev-lang/rebol-bin/Manifest
new file mode 100644
index 00000000000..1e6e7f9b407
--- /dev/null
+++ b/dev-lang/rebol-bin/Manifest
@@ -0,0 +1 @@
+DIST r3-a111-4-4.tar.gz 269516 SHA256 421c84f86b4649eaccaffe69c3a2b1bd856929e63711eea81da49d10bcdc05a4 SHA512 060b01197c242ceda20fe84228a5ae7d2a329eac04549ad5e0f368bc91baea515143e541ed9815a14aba9b3d571a22ff0d643716dc21452d5aeeb7678938455e WHIRLPOOL e3bb2de479e3620a6209c7e7dd245b9725422f7eb8bd3fc1db588d28dd605f2f19e5bf9f3ceec0a9f9978e360f02d59f6b781ed5f633eca17ea1656eae8292cb
diff --git a/dev-lang/rebol-bin/metadata.xml b/dev-lang/rebol-bin/metadata.xml
new file mode 100644
index 00000000000..24cbb90cf0c
--- /dev/null
+++ b/dev-lang/rebol-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>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</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 00000000000..17b0896d300
--- /dev/null
+++ b/dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/metadata.xml b/dev-lang/rebol/metadata.xml
new file mode 100644
index 00000000000..24cbb90cf0c
--- /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>
+ <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 00000000000..ce10fb53ba8
--- /dev/null
+++ b/dev-lang/rebol/rebol-9999.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+DESCRIPTION="Relative Expression-Based Object Language"
+HOMEPAGE="http://rebol.com"
+
+MY_PR=${PVR/3_pre/}
+EGIT_REPO_URI="git://github.com/rebol/r3.git"
+
+inherit eutils git-2
+
+LICENSE="Apache-2.0"
+SLOT="0"
+#KEYWORDS="~amd64 ~x86"
+# live ebuild
+KEYWORDS=""
+IUSE=""
+
+# usual bootstrap problems
+DEPEND="|| ( dev-lang/rebol dev-lang/rebol-bin )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/$(STRIP) r3//' make/makefile || die
+}
+
+src_compile() {
+ cd make
+ # silly build system. Prefer prebuilt for now
+ [[ -f /opt/rebol/r3 ]] && cp /opt/rebol/r3 ./r3-make || cp /usr/bin/r3 ./r3-make
+ make prep || die
+ make || die
+}
+
+src_install() {
+ mkdir -p "${D}/usr/bin"
+ cp "${S}/make/r3" "${D}/usr/bin/r3" || die
+}
diff --git a/dev-lang/regina-rexx/Manifest b/dev-lang/regina-rexx/Manifest
new file mode 100644
index 00000000000..64d09cb8759
--- /dev/null
+++ b/dev-lang/regina-rexx/Manifest
@@ -0,0 +1 @@
+DIST Regina-REXX-3.6.tar.gz 1140272 SHA256 687a52327b74e75cf383c427268346ef884c9aed6cdd7d3108feff2171ecfbcc SHA512 07a65c633da97e2a696c3d038808fa377af05f99fef2322398f4712726f4b7311957afeb9e2c18988feb29392ef06ddae7f7bde1a7574af0b0e8bbd286aa2e8e WHIRLPOOL be930cd0e8cf96a95eccf61d711ec633d7acfaf7b383f2633ac696bddbf8c01ab2ba2ef4bda8cf0f4f9404128e9f3eabbb3168864a5b93360f46b5f09fa1feb1
diff --git a/dev-lang/regina-rexx/files/regina-rexx-3.6-gentoo.patch b/dev-lang/regina-rexx/files/regina-rexx-3.6-gentoo.patch
new file mode 100644
index 00000000000..af4b0244cb9
--- /dev/null
+++ b/dev-lang/regina-rexx/files/regina-rexx-3.6-gentoo.patch
@@ -0,0 +1,28 @@
+--- a/Makefile.in 2011-12-31 09:50:28.000000000 +0100
++++ b/Makefile.in 2012-12-15 18:29:37.691579584 +0100
+@@ -92,6 +92,7 @@
+ REXX_BINARY_LIBS = @REXX_BINARY_LIBS@
+ REGINA_BINARY_LIBS = @REGINA_BINARY_LIBS@
+ LIBREGINA_BINARY_LIBS = @LIBREGINA_BINARY_LIBS@
++LIBREGUTIL_BINARY_LIBS = @LIBREGINA_BINARY_LIBS@ @REXX_BINARY_LIBS@
+ THREADER_BINARY_LIBS = @THREADER_BINARY_LIBS@
+ EXECISER_BINARY_LIBS = @EXECISER_BINARY_LIBS@
+ STACK_BINARY_LIBS = @STACK_BINARY_LIBS@
+@@ -926,7 +927,7 @@
+ # $(CC) -c $(COPT) $(CC2O) $(DYN_COMP) $(regutildir)/regtrig.c
+
+ $(SHLPRE)regutil$(MODPST): $(REGUTILOBJ) $(SHLPRE)$(SHLFILE)$(SHLPST) $(REGUTILEXP)
+- $(LD_RXLIB_UTILA) $(REGUTILEXPORTS) $(REGUTILOBJ) $(LD_RXLIB_UTILB) $(BOTHLIBS)
++ $(LD_RXLIB_UTILA) $(REGUTILEXPORTS) $(REGUTILOBJ) $(LD_RXLIB_UTILB) $(BOTHLIBS) $(LIBREGUTIL_BINARY_LIBS)
+ $(RANLIB_DYNAMIC)
+
+
+@@ -1009,7 +1010,7 @@
+ $(INSTALL) -m 755 -c ./rxqueue$(binarybitprefix)$(EXE) $(DESTDIR)$(bindir)/rxqueue$(binarybitprefix)$(EXE)
+ $(INSTALL) -m 755 -c ./rxstack$(binarybitprefix)$(EXE) $(DESTDIR)$(bindir)/rxstack$(binarybitprefix)$(EXE)
+ $(INSTALL) -m 755 -c ./regina-config $(DESTDIR)$(bindir)/regina-config
+- -$(INSTALL) -m 755 -c ./rxstack.init.d $(DESTDIR)$(sysconfdir)/rc.d/init.d/rxstack
++
+ @echo "The system startup/shutdown script; rxstack, may have been installed into $(sysconfdir)/rc.d/init.d"
+ @echo "You need to create the appropriate links to this script to start and stop rxstack automatically."
+ -$(INSTALL) -m 755 -c ./$(LIBPRE)$(LIBFILE)$(LIBPST) $(DESTDIR)$(libdir)/$(LIBPRE)$(LIBFILE)$(LIBPST)
diff --git a/dev-lang/regina-rexx/files/rxstack b/dev-lang/regina-rexx/files/rxstack
new file mode 100644
index 00000000000..f027e944832
--- /dev/null
+++ b/dev-lang/regina-rexx/files/rxstack
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+
+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"
+ kill -TERM `pidof /usr/bin/rxstack`
+ eend $?
+}
diff --git a/dev-lang/regina-rexx/files/rxstack-r1 b/dev-lang/regina-rexx/files/rxstack-r1
new file mode 100644
index 00000000000..da4299d84e4
--- /dev/null
+++ b/dev-lang/regina-rexx/files/rxstack-r1
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+
+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 00000000000..d79e10a4f9f
--- /dev/null
+++ b/dev-lang/regina-rexx/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>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <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>http://sourceforge.net/tracker/?group_id=28102</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/regina-rexx/regina-rexx-3.6-r2.ebuild b/dev-lang/regina-rexx/regina-rexx-3.6-r2.ebuild
new file mode 100644
index 00000000000..8210874e172
--- /dev/null
+++ b/dev-lang/regina-rexx/regina-rexx-3.6-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+
+ epatch "${FILESDIR}"/${PN}-3.6-gentoo.patch
+
+ eautoconf
+ tc-export CC #don't move it as tc-getCC
+}
+
+src_compile() {
+ emake LIBEXE="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/rxstack-r1 rxstack
+}
+
+pkg_postinst() {
+ elog "You may want to run"
+ elog
+ elog "\trc-update add rxstack default"
+ elog
+ elog "to enable Rexx queues (optional)."
+}
diff --git a/dev-lang/rubinius/Manifest b/dev-lang/rubinius/Manifest
new file mode 100644
index 00000000000..71c8a2d2e09
--- /dev/null
+++ b/dev-lang/rubinius/Manifest
@@ -0,0 +1,2 @@
+DIST rubinius-2.5.3.tar.bz2 11636033 SHA256 9af4d6e9d1e78a586579c86b9eb9a082cb863885d4a7cf33989d73280461e5fc SHA512 b923446d325dc3ce5ad28af9ee527607fae3259b85e85aeff97c1bebbb4520daf70616957b1c0ded900ed19e59025826dee66977c19cd2a2d4e9a0296811eb20 WHIRLPOOL 9ec26e62fde5d55153ce8f7fc8b57297fc365f94fc43d18c1a99c94823999494653e5d44ad1a27e31ae0803fc0c2d23d04fea7c7669210754236a9aa38e68b19
+DIST rubinius-2.5.5.tar.bz2 11659850 SHA256 217659849ca2c67322d24ce7167e760dc835f32a701ca6e558703914ca82d02f SHA512 a862146ddbbdcd4439eb64e78bfe6d09ae4cca540d19869618426d3f451544658713fe8eb7d46493785eb0cc721077e624293cc44d68eea3ef584967b43a18d7 WHIRLPOOL 82e45406f330339a3dc06ee26cb0baf39bd4ab10147ebbfbe2eaf12c72e44fe683d3eff3156af0f09feee4bc3d50334d041f497727a6ae86fd24347f75a658ae
diff --git a/dev-lang/rubinius/files/auto_gem.rb b/dev-lang/rubinius/files/auto_gem.rb
new file mode 100644
index 00000000000..5c4f540a92d
--- /dev/null
+++ b/dev-lang/rubinius/files/auto_gem.rb
@@ -0,0 +1,7 @@
+# This file is installed by Gentoo's rubygems package.
+# It's intended to help automate the loading of rubygems
+
+begin
+require 'rubygems'
+rescue LoadError
+end
diff --git a/dev-lang/rubinius/metadata.xml b/dev-lang/rubinius/metadata.xml
new file mode 100644
index 00000000000..dc6c83f06b8
--- /dev/null
+++ b/dev-lang/rubinius/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ruby</herd>
+ <use>
+ <flag name="llvm">
+ Build with llvm. Currently the package only builds against old versions of llvm.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rubinius/rubinius-2.5.3.ebuild b/dev-lang/rubinius/rubinius-2.5.3.ebuild
new file mode 100644
index 00000000000..26c383636c4
--- /dev/null
+++ b/dev-lang/rubinius/rubinius-2.5.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic multilib versionator
+
+DESCRIPTION="A re-implementation of the Ruby VM designed for speed"
+HOMEPAGE="http://rubini.us"
+SRC_URI="http://releases.rubini.us/${P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE="+llvm"
+
+RDEPEND="
+ llvm? ( >=sys-devel/llvm-3.2 )
+ dev-libs/openssl:0
+ sys-libs/ncurses
+ sys-libs/readline:0
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+"
+
+DEPEND="${RDEPEND}
+ =dev-ruby/rake-10*
+ dev-ruby/bundler
+"
+
+pkg_setup() {
+ unset RUBYOPT
+}
+
+src_prepare() {
+ # src_test will wait until all processes are reaped, so tune down
+ # the long sleep process a bit.
+ sed -i -e 's/sleep 1000/sleep 300/' spec/ruby/core/io/popen_spec.rb || die
+
+ # Drop error CFLAGS per Gentoo policy.
+ sed -i -e '/Werror/ s:^:#:' rakelib/blueprint.rb || die
+
+ bundle --local || die
+}
+
+src_configure() {
+ conf=""
+ if ! use llvm ; then
+ conf+="--disable-llvm "
+ fi
+
+ #Rubinius uses a non-autoconf ./configure script which balks at econf
+ INSTALL="${EPREFIX}/usr/bin/install -c" ./configure \
+ --prefix /usr/$(get_libdir) \
+ --mandir /usr/share/man \
+ --without-rpath \
+ --with-vendor-zlib \
+ ${conf} \
+ || die "Configure failed"
+}
+
+src_compile() {
+ RBXOPT="-Xsystem.log=/dev/null" rake build || die "Compilation failed"
+}
+
+src_test() {
+ rake spec || die "Tests failed"
+ einfo "Waiting for forked processes to die"
+}
+
+src_install() {
+ # The install phase tries to determine if there are relevant
+ addpredict /usr/local/lib64/ruby
+
+ local minor_version=$(get_version_component_range 1-2)
+ local librbx="usr/$(get_libdir)/rubinius"
+
+ RBXOPT="-Xsystem.log=/dev/null" DESTDIR="${D}" rake install || die "Installation failed"
+
+ dosym /${librbx}/bin/rbx /usr/bin/rbx || die "Couldn't make rbx symlink"
+
+ insinto /${librbx}/${minor_version}/site
+ doins "${FILESDIR}/auto_gem.rb" || die "Couldn't install rbx auto_gem.rb"
+ RBXOPT="-Xsystem.log=/dev/null" RBX_RUNTIME="${S}/runtime" RBX_LIB="${S}/lib" bin/rbx compile "${D}/${librbx}/${minor_version}/site/auto_gem.rb" || die "Couldn't bytecompile auto_gem.rb"
+}
diff --git a/dev-lang/rubinius/rubinius-2.5.5.ebuild b/dev-lang/rubinius/rubinius-2.5.5.ebuild
new file mode 100644
index 00000000000..26c383636c4
--- /dev/null
+++ b/dev-lang/rubinius/rubinius-2.5.5.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic multilib versionator
+
+DESCRIPTION="A re-implementation of the Ruby VM designed for speed"
+HOMEPAGE="http://rubini.us"
+SRC_URI="http://releases.rubini.us/${P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE="+llvm"
+
+RDEPEND="
+ llvm? ( >=sys-devel/llvm-3.2 )
+ dev-libs/openssl:0
+ sys-libs/ncurses
+ sys-libs/readline:0
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+"
+
+DEPEND="${RDEPEND}
+ =dev-ruby/rake-10*
+ dev-ruby/bundler
+"
+
+pkg_setup() {
+ unset RUBYOPT
+}
+
+src_prepare() {
+ # src_test will wait until all processes are reaped, so tune down
+ # the long sleep process a bit.
+ sed -i -e 's/sleep 1000/sleep 300/' spec/ruby/core/io/popen_spec.rb || die
+
+ # Drop error CFLAGS per Gentoo policy.
+ sed -i -e '/Werror/ s:^:#:' rakelib/blueprint.rb || die
+
+ bundle --local || die
+}
+
+src_configure() {
+ conf=""
+ if ! use llvm ; then
+ conf+="--disable-llvm "
+ fi
+
+ #Rubinius uses a non-autoconf ./configure script which balks at econf
+ INSTALL="${EPREFIX}/usr/bin/install -c" ./configure \
+ --prefix /usr/$(get_libdir) \
+ --mandir /usr/share/man \
+ --without-rpath \
+ --with-vendor-zlib \
+ ${conf} \
+ || die "Configure failed"
+}
+
+src_compile() {
+ RBXOPT="-Xsystem.log=/dev/null" rake build || die "Compilation failed"
+}
+
+src_test() {
+ rake spec || die "Tests failed"
+ einfo "Waiting for forked processes to die"
+}
+
+src_install() {
+ # The install phase tries to determine if there are relevant
+ addpredict /usr/local/lib64/ruby
+
+ local minor_version=$(get_version_component_range 1-2)
+ local librbx="usr/$(get_libdir)/rubinius"
+
+ RBXOPT="-Xsystem.log=/dev/null" DESTDIR="${D}" rake install || die "Installation failed"
+
+ dosym /${librbx}/bin/rbx /usr/bin/rbx || die "Couldn't make rbx symlink"
+
+ insinto /${librbx}/${minor_version}/site
+ doins "${FILESDIR}/auto_gem.rb" || die "Couldn't install rbx auto_gem.rb"
+ RBXOPT="-Xsystem.log=/dev/null" RBX_RUNTIME="${S}/runtime" RBX_LIB="${S}/lib" bin/rbx compile "${D}/${librbx}/${minor_version}/site/auto_gem.rb" || die "Couldn't bytecompile auto_gem.rb"
+}
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
new file mode 100644
index 00000000000..118d600b6e0
--- /dev/null
+++ b/dev-lang/ruby/Manifest
@@ -0,0 +1,8 @@
+DIST ruby-1.9.3-p551.tar.bz2 10049332 SHA256 b0c5e37e3431d58613a160504b39542ec687d473de1d4da983dabcf3c5de771e SHA512 5ea40f8c40cf116030ffdedbe436c1fdbf9a50b7bb44bc890845c9c2a885c34da711bc1a9e9694788c2f4710f7e6e0adc4410aec1ab18a25a27168f25ac3d68c WHIRLPOOL a4de6b7300e1f1cb22b01b1fbe0a73928baf6e5b1d083e8eb239e7696703e13774fdcb52bbb7f4253ea75b597663c43a8fbea2df7b77ed95f3fd8b2512ff1f1e
+DIST ruby-2.0.0-p645.tar.xz 8295192 SHA256 875be4f57bdbb2d2be0d64bfd8fc5022f004d55261ead8fd0cdc2e9e415e9f7b SHA512 440f8ea50f51c53f90e42a8dfd7cd41f806b290d5c12c09f84d9159ab9c95e19b036cd8a5dc788844da501b9fcd1fa8ad8352ef7417998debc1b43a61a4ea4dc WHIRLPOOL 6201a39976f793dd3702ba580aafb881ba6e9f5cbc9d544bdddf508ca86dc14fc2970451a386ba495d16f2f68724197ef089ba02e7d1a9423870a0fa5c39cbc8
+DIST ruby-2.1.6.tar.xz 9381724 SHA256 137b27bffefd795fd97c288fff539d135f42320f8a1afddde99a34e1fbe7314e SHA512 0cf91fe7ae53a3f9c034fa5996eeed91889b942b8e595e84be4e244adc30d79aa3f540cc6f657982715069dfb14af20786557689d9a8fe4bbfc66280e84dd6cf WHIRLPOOL 1881ba54cf751e558f3a321041ed987c4433f64e786078de35227126afc801fabdcff74cf7d882fd07a70988c8a28c95269fd0ed4ccaebb3627931320c697e60
+DIST ruby-2.2.2.tar.xz 10463044 SHA256 f033b5d08ab57083e48c1d81bcd7399967578c370b664da90e12a32891424462 SHA512 bd72d0a4c017e2527659f64ef2781bbe8bd540a2302eaa60234a12282fd53c359e04205c56385402c67e81bb9dab3b88de53de82e12bb13e3386c26301043b64 WHIRLPOOL ee9c3a664ac1d67bd9ff4ed8fcc7d4c8e9b6e2f5774c938f876223b22022b498932afc41990890a03b560c65ffe29a039761d18bbeeab46fe13cbfff515bc115
+DIST ruby-patches-1.9.3_p551-r1.tar.bz2 3685 SHA256 362d94b77c3408d200c42855868ebb5ddbee287d66bbed8e269255f9cb63418a SHA512 646a1979c1b879ef46cb195204bdcea83215f6407331f92d8caed910e03d1f426bfb203629f4bea307740742757877edae22bf9978b55cbda03921a0c25b8409 WHIRLPOOL 3001b1c6189a882a45125d04b6264e22e0bf2b773c249bf00c2cfc98dec3392ae422913d278aae289767db0aaf8782e1a7dd44e94965aa02893833d5737ad494
+DIST ruby-patches-2.0.0_p645.tar.bz2 2947 SHA256 dc173fe94af215fd2c1823f46140e4f11892dec59ce55b10ffad26b622bb6e4e SHA512 423a4fddfc8d7fd4f5b041989da343bc96ce0c3f22a448cab8cec47d4c458f4deeb83b167a0a3ae71d3be57df9b41151d1cafadd191bd3d3e9b08b32732e36cd WHIRLPOOL 9c728e95cf01abdb48afc2ff008dc73d341096b253c664297b6780b32821c1ec406c388ce5860b5dd2ce2de862fb80b2ae45d03750045aaf13c371743f97c92e
+DIST ruby-patches-2.1.6-r1.tar.bz2 2348 SHA256 2c158373217a719f2961c1f2cf2f3494eb43c413dc41ba7f9c1d88c60baca7f7 SHA512 01367d463a3aa72261742ae468d96ca1fb06a2d6b2a7a0cc416e449a7ae602d4478fb2394390636725424f252fa95c5db7d2c8116dc0b1e4477d8d641961980f WHIRLPOOL b39e8b9bdd8d05958b3b4c5884bfdd65c99b9aee2470a48ca748cbf336948bf0bb9f834ce3fec5e9365abaf385de760012f67dec6db257d7cbeff04ce0c5c7fb
+DIST ruby-patches-2.2.2-r1.tar.bz2 3066 SHA256 65342c7cd5146f0d5025932d31e2ed40e1247355d68356e17a06b0ff728fbef1 SHA512 1c578b868db179bca6dd7800528ac23076b1f44519d93b92fafd724d8e5a158512b05cb3d5f7a4f5ada156692978f98cab7dd5b4282701e57c33d50bcda977de WHIRLPOOL 241622b25acdc8b2a7cb912bac2f6e29a4331798ba67507821b3fb295791d7bea8b7933540f2cd47cc7e8477df14be478286d018b7afe9ae121cd8c49c58dc83
diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml
new file mode 100644
index 00000000000..47732fa63ea
--- /dev/null
+++ b/dev-lang/ruby/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ruby</herd>
+ <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="yaml">
+ Use the <pkg>dev-libs/libyaml</pkg> library to build the psych
+ extension, available since Ruby 1.9.2_rc2, in alternative to the
+ bundled syck-based parser.
+ </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-1.9.3_p551-r1.ebuild b/dev-lang/ruby/ruby-1.9.3_p551-r1.ebuild
new file mode 100644
index 00000000000..febede5c977
--- /dev/null
+++ b/dev-lang/ruby/ruby-1.9.3_p551-r1.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+RUBYPL=$(get_version_component_range 4)
+
+MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+# 1.9.3 still uses 1.9.1
+RUBYVERSION=1.9.1
+
+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/1.9/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl xemacs ncurses +readline +yaml" #libedit
+
+# libedit support is removed everywhere because of this upstream bug:
+# http://redmine.ruby-lang.org/issues/show/3698
+
+RDEPEND="
+ berkdb? ( sys-libs/db )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( dev-libs/openssl:0 )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline )
+ yaml? ( dev-libs/libyaml )
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20100402
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+# libedit? ( dev-libs/libedit )
+# !libedit? ( readline? ( sys-libs/readline ) )
+
+DEPEND="${RDEPEND}"
+PDEPEND="
+ virtual/rubygems[ruby_targets_ruby19]
+ rdoc? ( >=dev-ruby/rdoc-3.9.4[ruby_targets_ruby19] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ rm -r \
+ {bin,lib}/rake lib/rake.rb man/rake.1 \
+ ext/json \
+ bin/gem || die "removal failed"
+
+ # 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 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"
+
+# if use libedit; then
+# einfo "Using libedit to provide readline extension"
+# myconf="${myconf} --enable-libedit --with-readline"
+# elif use readline; then
+# einfo "Using readline to provide readline extension"
+# myconf="${myconf} --with-readline"
+# else
+# myconf="${myconf} --without-readline"
+# fi
+ myconf="${myconf} $(use_with readline)"
+
+ # Always disable tk because the module is no longer compatible with
+ # stable tcl/tk: https://bugs.gentoo.org/show_bug.cgi?id=500894
+ INSTALL="${EPREFIX}/usr/bin/install -c" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --enable-shared \
+ --enable-pthread \
+ --without-tk \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable debug) \
+ $(use_with berkdb dbm) \
+ $(use_with gdbm) \
+ $(use_with ssl openssl) \
+ $(use_with ncurses curses) \
+ $(use_with yaml psych) \
+ ${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() {
+ # 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="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems copy
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* ToDo || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.0.0_p645.ebuild b/dev-lang/ruby/ruby-2.0.0_p645.ebuild
new file mode 100644
index 00000000000..392d7918a3b
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.0.0_p645.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+RUBYPL=$(get_version_component_range 4)
+
+MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=2.0.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/2.0/${MY_P}.tar.xz
+ http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl xemacs ncurses +readline cpu_flags_x86_sse2"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( dev-libs/openssl:0 )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline:0 )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20100402
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+PDEPEND="
+ virtual/rubygems[ruby_targets_ruby20]
+ >=dev-ruby/json-1.7.7[ruby_targets_ruby20]
+ >=dev-ruby/rake-0.9.6[ruby_targets_ruby20]
+ rdoc? ( >=dev-ruby/rdoc-4.0.0[ruby_targets_ruby20] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ if use cpu_flags_x86_sse2 ; then
+ excluded_patches="012_no_forced_sse2.patch"
+ fi
+
+ EPATCH_EXCLUDE="${excluded_patches}" EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # We can no longer unbundle all of rake because rubygems now depends
+ # on this. We leave the actual rake code around to bootstrap
+ # rubygems, but remove the bits that would cause a file collision.
+ einfo "Unbundling gems..."
+ cd "$S"
+ rm -r \
+ {bin,lib}/rake lib/rake.rb man/rake.1 \
+ bin/gem || die "removal failed"
+
+ # 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 myconf=
+
+ # The Tk module can no longer be built because the module code is no
+ # longer compatible with newer stable versions.
+ # https://bugs.gentoo.org/show_bug.cgi?id=500894
+ local modules="tk"
+
+ # -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
+
+ INSTALL="${EPREFIX}/usr/bin/install -c" 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_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="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems copy
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.1.6-r1.ebuild b/dev-lang/ruby/ruby-2.1.6-r1.ebuild
new file mode 100644
index 00000000000..cfceeb77def
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.1.6-r1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+RUBYPL=$(get_version_component_range 4)
+
+MY_P="${PN}-$(get_version_component_range 1-3)"
+#MY_P="${PN}-$(get_version_component_range 1-3)-${RUBYPL:-0}"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=2.1.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/2.1/${MY_P}.tar.xz
+ http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 +rdoc rubytests socks5 ssl xemacs ncurses +readline"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( dev-libs/openssl:0 )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline:0 )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20131227
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+PDEPEND="
+ virtual/rubygems[ruby_targets_ruby21]
+ >=dev-ruby/json-1.8.1[ruby_targets_ruby21]
+ >=dev-ruby/rake-0.9.6[ruby_targets_ruby21]
+ rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby21] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # We can no longer unbundle all of rake because rubygems now depends
+ # on this. We leave the actual rake code around to bootstrap
+ # rubygems, but remove the bits that would cause a file collision.
+ einfo "Unbundling gems..."
+ cd "$S"
+ rm -r \
+ {bin,lib}/rake lib/rake.rb man/rake.1 \
+ bin/gem || die "removal failed"
+
+ # 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 myconf=
+
+ # The Tk module can no longer be built because the module code is no
+ # longer compatible with newer stable versions.
+ # https://bugs.gentoo.org/show_bug.cgi?id=500894
+ local modules="tk"
+
+ # -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
+
+ INSTALL="${EPREFIX}/usr/bin/install -c" 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_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="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems copy
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.2.2-r1.ebuild b/dev-lang/ruby/ruby-2.2.2-r1.ebuild
new file mode 100644
index 00000000000..5e2e56fe9e2
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.2.2-r1.ebuild
@@ -0,0 +1,238 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(get_version_component_range 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=2.2.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
+ http://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc +rdoc rubytests socks5 ssl xemacs ncurses +readline"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ jemalloc? ( dev-libs/jemalloc )
+ ssl? ( dev-libs/openssl:0 )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline:0 )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20141227
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
+ >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
+ >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby22]
+ >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
+ >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
+ rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # We can no longer unbundle all of rake because rubygems now depends
+ # on this. We leave the actual rake code around to bootstrap
+ # rubygems, but remove the bits that would cause a file collision.
+ einfo "Unbundling gems..."
+ cd "$S"
+ rm -r \
+ {bin,lib}/rake lib/rake.rb man/rake.1 \
+ bin/gem || die "removal failed"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700. Use explicit version numbers to ensure rm fails when they
+ # change so we can update dependencies accordingly.
+ rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ # The Tk module can no longer be built because the module code is no
+ # longer compatible with newer stable versions.
+ # https://bugs.gentoo.org/show_bug.cgi?id=500894
+ local modules="tk"
+
+ # -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
+
+ INSTALL="${EPREFIX}/usr/bin/install -c" 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_enable 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="${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems copy
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -r "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -r "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
new file mode 100644
index 00000000000..de469a5a3e6
--- /dev/null
+++ b/dev-lang/rust-bin/Manifest
@@ -0,0 +1,2 @@
+DIST rustc-1.1.0-i686-unknown-linux-gnu.tar.gz 87517937 SHA256 1a4e6845ed58a84fc8e2abe5b3a286c09fb2ac39d4848a6d511cdce336e4a207 SHA512 bdeb558b38d0df135973693c93fa41d5d30adcd222db273806ee2f49fcd1a571ad7f25208a64645540f22a0f9a6ed9142b9a20c3c3a043a0c783e9492e646b91 WHIRLPOOL 7b355e10d9c3aa0dbfba7138a18c45b31fe1f2614277718119ea5a28d20cc1032fa54730762efa07c604bb370730634b307a2d03b5bea16180030971972df6f1
+DIST rustc-1.1.0-x86_64-unknown-linux-gnu.tar.gz 86176446 SHA256 87ead57db95f059fe0b1d901f5d8f3fa0f7cce5d056a42d9486626997f4a1df2 SHA512 0a6ff00aa3a475c72111d23e8cb605759734d562b036d554c8c9e3472d1d1be663cc1f0a2c25aea55b032d15aae5726edafa2bd719c48ee2696bbd28632787d3 WHIRLPOOL 224eb012a6a989c3078c0cac6442c3e3289fd9c061edca34c99a2b8ce8529b0f760cd5e2e67a5a6acf6666cf3e79c28d68aea3a1a5aac04e24f19359fa26e3bc
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
new file mode 100644
index 00000000000..0b7db932cfa
--- /dev/null
+++ b/dev-lang/rust-bin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jauhien@gentoo.org</email>
+ <name>Jauhien Piatlicki</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/rust-bin/rust-bin-1.1.0.ebuild b/dev-lang/rust-bin/rust-bin-1.1.0.ebuild
new file mode 100644
index 00000000000..409a1b9f925
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.1.0.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rustc-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local components=rustc
+ ./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-mode 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 00000000000..44debdda19f
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,3 @@
+DIST rust-stage0-2015-04-27-857ef6e-linux-i386-0bc8cffdce611fb71fd7d3d8e7cdbfaf748a4f16.tar.bz2 15508125 SHA256 ad3d4316a4c07d37445b54a293923151a2f21914a2bbd1a5f175b1f73f860e0b SHA512 39f7dc1d8128ff902bc41dd2731f8332c7166cf7981c1b0676c7017083136802b4e35a3615c55a4bb16617f194abce32c0c14d0d864867726267cad145e46c39 WHIRLPOOL ff6bac955a2bec6578b81f6a076798631692ddb4b4dfe91513615df8278b35e454b36f82f5ce1c2e5f310af7686633de3691e08c593b4ce329047a1692d99b52
+DIST rust-stage0-2015-04-27-857ef6e-linux-x86_64-94089740e48167c5975c92c139ae9c286764012f.tar.bz2 14707052 SHA256 e7858a90c2c6c35299ebe2cb6425f3f84d0ba171dcbce20ff68295a1ff75c7e5 SHA512 5911a7addc44ebd975e2f4b8db20eb10f5d817defa2329e1a323b1f267e9c844ee1045513fb7156f19bea116aa9c5ba775703391f72edabb94e2fef1c67ba0a0 WHIRLPOOL b3bd0cfbda18955c0ec173e089d130b3cf9b6e1cd618e65eecba6ef648fbb5bdb4baf853958bcceee95e9ed30819f25e97ba134396038b0173b209a0fff2623f
+DIST rustc-1.1.0-src.tar.gz 22241376 SHA256 cb09f443b37ec1b81fe73c04eb413f9f656859cf7d00bc5088008cbc2a63fa8a SHA512 7b76464e42b9c97461e232791f0e48e6cb1a36cf191e543c21c7b21cb3e30426fa4e2e32e54242019836ef65ea7bcf5542c21aadf8d44140f7c0e8a5bfcb97f5 WHIRLPOOL cf4605895668e4ad7eca617ff6fe1e96ea077b46ddc9271f395c2da53ee5ff95eddca2cf1de9e4e3a9333a7f6d2081e0e36f8aa486b48fee5281a9b6bebb9e5e
diff --git a/dev-lang/rust/files/rust-1.1.0-install.patch b/dev-lang/rust/files/rust-1.1.0-install.patch
new file mode 100644
index 00000000000..ee8c3f4813c
--- /dev/null
+++ b/dev-lang/rust/files/rust-1.1.0-install.patch
@@ -0,0 +1,16 @@
+# le kludge that fixes https://github.com/Heather/gentoo-rust/issues/41
+--- src/rust-installer/install-template.sh
++++ src/rust-installer/install-template.sh
+@@ -622,12 +622,6 @@ install_components() {
+ # Decide the destination of the file
+ local _file_install_path="$_dest_prefix/$_file"
+
+- if echo "$_file" | grep "^lib/" > /dev/null
+- then
+- local _f="$(echo "$_file" | sed 's/^lib\///')"
+- _file_install_path="$CFG_LIBDIR/$_f"
+- fi
+-
+ if echo "$_file" | grep "^share/man/" > /dev/null
+ then
+ local _f="$(echo "$_file" | sed 's/^share\/man\///')"
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 00000000000..cfc7d973d61
--- /dev/null
+++ b/dev-lang/rust/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>
+ <email>jauhien@gentoo.org</email>
+ <name>Jauhien Piatlicki</name>
+ </maintainer>
+ <maintainer>
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <maintainer>
+ <email>cynede@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="clang">Use <pkg>sys-devel/clang</pkg> for building</flag>
+ <flag name="libcxx">Use <pkg>sys-libs/libcxx</pkg> as standard
+ library when building with <pkg>sys-devel/clang</pkg></flag>
+ <flag name="system-llvm">Use system <pkg>sys-devel/llvm</pkg> in
+ place of the bundled one</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.1.0.ebuild b/dev-lang/rust/rust-1.1.0.ebuild
new file mode 100644
index 00000000000..71f3d7cbe93
--- /dev/null
+++ b/dev-lang/rust/rust-1.1.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-any-r1
+
+MY_P="rustc-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="http://static.rust-lang.org/dist/${MY_P}-src.tar.gz
+ amd64? ( http://static.rust-lang.org/stage0-snapshots/rust-stage0-2015-04-27-857ef6e-linux-x86_64-94089740e48167c5975c92c139ae9c286764012f.tar.bz2 )
+ x86? ( http://static.rust-lang.org/stage0-snapshots/rust-stage0-2015-04-27-857ef6e-linux-i386-0bc8cffdce611fb71fd7d3d8e7cdbfaf748a4f16.tar.bz2 )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="clang debug doc libcxx +system-llvm"
+REQUIRED_USE="libcxx? ( clang )"
+
+CDEPEND="libcxx? ( sys-libs/libcxx )
+ >=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+DEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+ system-llvm? ( >=sys-devel/llvm-3.6.0[multitarget(-)] )
+"
+RDEPEND="${CDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack "${MY_P}-src.tar.gz" || die
+ mkdir "${MY_P}/dl" || die
+ cp "${DISTDIR}/rust-stage0"* "${MY_P}/dl/" || die
+}
+
+src_prepare() {
+ local postfix="gentoo-${SLOT}"
+ sed -i -e "s/CFG_FILENAME_EXTRA=.*/CFG_FILENAME_EXTRA=${postfix}/" mk/main.mk || die
+ epatch "${FILESDIR}/${P}-install.patch"
+}
+
+src_configure() {
+ export CFG_DISABLE_LDCONFIG="notempty"
+
+ "${ECONF_SOURCE:-.}"/configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${P}" \
+ --mandir="${EPREFIX}/usr/share/${P}/man" \
+ --release-channel=${SLOT} \
+ --disable-manage-submodules \
+ $(use_enable clang) \
+ $(use_enable debug) \
+ $(use_enable debug llvm-assertions) \
+ $(use_enable !debug optimize) \
+ $(use_enable !debug optimize-cxx) \
+ $(use_enable !debug optimize-llvm) \
+ $(use_enable !debug optimize-tests) \
+ $(use_enable doc docs) \
+ $(use_enable libcxx libcpp) \
+ $(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ unset SUDO_USER
+
+ default
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+
+ dodoc COPYRIGHT LICENSE-APACHE LICENSE-MIT
+
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-mode to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/scala-bin/Manifest b/dev-lang/scala-bin/Manifest
new file mode 100644
index 00000000000..d7dee547f9c
--- /dev/null
+++ b/dev-lang/scala-bin/Manifest
@@ -0,0 +1,2 @@
+DIST scala-2.11.6.tgz 27130723 SHA256 41ba45e4600404634217a66d6b2c960459d3a67e0344a7c3d9642d0eaa446583 SHA512 aeb6dd1b586d4e66e01f268aa8a647a303f2f960cbe255e9c79ced978dad92b6cef3cba143945affa3427548daed6e5e1d607b9ecb4d7567adc886d64546da61 WHIRLPOOL 20c1bd8b905ad4f7d155d366637a2aeaeb50569025ba585a0e6e3bb2268068e7b74bed26769a9b3a1d1d662833b6d5f57781c7165ec84d1c63142cdd6edae294
+DIST scala-2.11.7.tgz 28460530 SHA256 ffe4196f13ee98a66cf54baffb0940d29432b2bd820bd0781a8316eec22926d0 SHA512 1603fc6a0a6b3656146eee5650e0a57402d8ce65382220055a4934acb8fa15a81721b3b732ca856566e99c564e8b0a9448c8887668a814765798bea57933e6a3 WHIRLPOOL 808db0b2eddf356ad259b21681a6465b666875da3ebc6f49be3f4c9da7358b36dec0b25b6c243725e92f27311a109f559ffc6f2c31dd19f115d665cff95ed8b5
diff --git a/dev-lang/scala-bin/metadata.xml b/dev-lang/scala-bin/metadata.xml
new file mode 100644
index 00000000000..68b30527c02
--- /dev/null
+++ b/dev-lang/scala-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>
+ <herd>java</herd>
+ <maintainer>
+ <email>monsieurp@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/scala-bin/scala-bin-2.11.6.ebuild b/dev-lang/scala-bin/scala-bin-2.11.6.ebuild
new file mode 100644
index 00000000000..886fd7ba86e
--- /dev/null
+++ b/dev-lang/scala-bin/scala-bin-2.11.6.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://scala.epfl.ch/"
+SRC_URI="http://downloads.typesafe.com/scala/${PV}/scala-${PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="doc"
+
+DEPEND=""
+RDEPEND=">=virtual/jre-1.6
+ !dev-lang/scala"
+
+JAVA_PKG_IUSE="doc"
+
+S=${WORKDIR}/scala-${PV}
+
+java_prepare() {
+ ebegin 'Cleaning .bat files'
+ rm -f bin/*.bat || die
+ eend $?
+
+ ebegin 'Patching SCALA_HOME variable in bin/ scripts'
+ for f in bin/*; do
+ sed -i -e 's#\(SCALA_HOME\)=.*#\1=/usr/share/scala-bin#' $f || die
+ done
+ eend $?
+}
+
+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.11.7.ebuild b/dev-lang/scala-bin/scala-bin-2.11.7.ebuild
new file mode 100644
index 00000000000..24e2c4405b3
--- /dev/null
+++ b/dev-lang/scala-bin/scala-bin-2.11.7.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc"
+
+inherit java-pkg-2
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://scala.epfl.ch/"
+SRC_URI="http://downloads.typesafe.com/scala/${PV}/scala-${PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=""
+RDEPEND=">=virtual/jre-1.6
+ !dev-lang/scala"
+
+S=${WORKDIR}/scala-${PV}
+
+java_prepare() {
+ ebegin 'Cleaning .bat files'
+ rm -f bin/*.bat || die
+ eend $?
+
+ ebegin 'Patching SCALA_HOME variable in bin/ directory'
+ for f in bin/*; do
+ sed -i -e 's#\(SCALA_HOME\)=.*#\1=/usr/share/scala-bin#' $f || die
+ done
+ eend $?
+}
+
+src_install() {
+ ebegin 'Installing bin scripts'
+ dobin bin/*
+ eend $?
+
+ ebegin 'Installing jar files'
+ cd lib/ || die
+
+ # Unversion those libs
+ java-pkg_newjar scala-continuations-library_*.jar scala-continuations-library.jar
+ java-pkg_newjar akka-actor_*.jar akka-actor.jar
+ java-pkg_newjar config-*.jar config.jar
+ java-pkg_newjar scala-actors-2.11.0.jar scala-actors.jar
+ java-pkg_newjar scala-actors-migration_*.jar scala-actors-migration.jar
+ java-pkg_newjar scala-swing_*.jar scala-swing.jar
+ java-pkg_newjar scala-parser-combinators_*.jar scala-parser-combinators.jar
+ java-pkg_newjar scala-xml_*.jar scala-xml.jar
+ java-pkg_newjar jline-*.jar jline.jar
+ java-pkg_newjar scala-continuations-plugin_*.jar scala-continuations-plugin.jar
+ java-pkg_newjar scalap-*.jar scalap.jar
+
+ # Install these the usual way
+ java-pkg_dojar scala-compiler.jar
+ java-pkg_dojar scala-library.jar
+ java-pkg_dojar scala-reflect.jar
+
+ eend $?
+
+ cd ../ || die
+
+ ebegin 'Installing man pages'
+ doman man/man1/*.1
+ eend $?
+
+ if use doc; then
+ ebegin 'Installing documentation'
+ java-pkg_dohtml -r doc/tools
+ eend $?
+ fi
+}
diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest
new file mode 100644
index 00000000000..1c2fb70f2f6
--- /dev/null
+++ b/dev-lang/scala/Manifest
@@ -0,0 +1,165 @@
+DIST annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST fjbg.jar 130039 SHA256 a5acb5ca309b764a72e436fc770103277f4151233519b9ce7074f8000d259d6b SHA512 68f0bf76337fb243b9ca901eab985cfeb897d79d07ba81aaae516c890bbfb600a370c1e1df505275a12c723212fd88b5a03e97c73013d912be1be860d214e5ea WHIRLPOOL c4390956a00fad5a16018d5d4747e8585ba707339738b3e0c304a7093c4c8fd11111349377951916cee78c312735e823ee5e4ced19a1f568598e8fd553952426
+DIST forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST jline.jar 164623 SHA256 813f2bc34a096cc7780c6946acf401c82e739cf9d5359edf414f74662137d3b1 SHA512 2d97f0d1bc1df67423f54102f8b360a6dba0bfac67ba12673e781d9461485a6124cf985cbab96283af7b366a8fb53e526aa667ccec466aae7002d5030f2e1369 WHIRLPOOL a7c848acf502c2247d0a9c83fa45295e5ede7487ac2129e50d4bd05a0271050b274cd25af24fb4215dc20283ca7df750618b31fea8973fffa125a3fb37f33bf3
+DIST jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST msil.jar 298973 SHA256 5b9e6dc2f4dd79644a1480b7cb4db053d73fc5d0e41015b95f15ec4dacf2da0a SHA512 1e9be7bfea639cffd638c78b4368f599753e8bd4df8f9b3c192b72c2860d6f96002c94fcf751e9c6cdacfead1ae3bd851d61395ce83c49d66f801284bd2046dd WHIRLPOOL 3828f08bb47f038d3f6e52c0d077cdecd06195de3d29b326833f47a6713bbab644ddcd20b8d39aa814d25637dae31adc1d0f0aec6f489857d7b115aeab29a301
+DIST nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST plugins.jar 4181 SHA256 13313e0c3a42bb401377ab4f228e3c81db482c8f33295c6a1d021fc3c9727871 SHA512 d44427df9acf4611acb492b6268b65f63a8be2d47ef29598bf5d242f702af57f0ee2eff52378b8371755d5ddf58c79d48b18a6a056ee9fee5091e478ce5ec1a2 WHIRLPOOL b2e846b5965ea7f04844b4c49e3fcc2f5b3f0e31669a662557bd36a113dd94372bae55d46f1986e03099c6f51217bf10986e5e265874854ba479c36d041a1e41
+DIST push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.10.2-gentoo-binary.tar.bz2 42071067 SHA256 0e47e9585c67971f319782fe81214fd7babfbc8cfb28108f5dc3f12d16bb0f35 SHA512 e207c4b12f5c89e24d48c37a3342280bf93447c053ae2bc58a5b389439633d332eaa444119d73967e23bedd36b0f4349d6d075469e7cefa1d2f7dce32dfb6af7 WHIRLPOOL 52bdd96fc742904bc222a3944adf33898b3a07b28868ee598852554b00f677294522332eecd293fb8c62dc6800a0264ddb9167b36054a37040323277de5d884a
+DIST scala-2.10.2-maven-deps.tar.gz 12324758 SHA256 0880b9f2ab27e2e5afa315bcfd84a5fa7348f0b0d6e4184ad2793862df939676 SHA512 4ddf0b76724609940fe732335b3b34ea41405bbf39d91312b4db3b79d5682c0ef98020b7e0dabf098acc94d782300e47c7b80ae1f6f1b82f4358de859086575f WHIRLPOOL 8d13459a2026b9e304d649aa93abab200648ab3f54d1b870572d2a0a4526b7fc7c5febd2e2e65d7d032404036a8db2d2cb46a88cd41474735e569008359e13b4
+DIST scala-2.10.2.tar.gz 5526015 SHA256 c0b7e41924a2673e8cdf8af364e5c3249f7c52a5f931693301493ed71cc7ef32 SHA512 61be047c50f5919c1ba3e4f665a1a1f4c6f7fcf5061f94816e385b97fdec139e381cc2a3df720b3679c3056cbc5baa6d4f8cf1e53923c5b5cad37f522557dc85 WHIRLPOOL 8bf09843bc824941ae4be7875515c4c03f68fa865f1b56180bedef0c9b8e8328badc091d4eff655df3cf7729a39f117e9f129f4b7eb388cb27361d8bc611857f
+DIST scala-2.10.3-gentoo-binary.tar.bz2 45352632 SHA256 f9ecad6bf7c59496233ad080c9b11cd75ca28e324e368c0551665837cc10e2d6 SHA512 1e61748e68d32c88cc1e6812514a37f15894220d0256237bf82897dfc9f5f0b2d0d9c4f6536e49daf62f72113d4e43635d2abd93d848ab828a0e67e2a5c6ef68 WHIRLPOOL 9f2717d926622a0cf4bf61aa140dca6d1c8a95dc397b16b32e00ce2979b8bd2347608ce4eb3a30e1721b852b50a85358f564e8718994a2957914efd06420a37a
+DIST scala-2.10.3-maven-deps-2.tar.gz 6614692 SHA256 32e8d5a71dcf6432bb4554a0f346561eea621c567d154a7820d7b4f532a6b194 SHA512 50010e79656b60fb28501f255634e28ba4fb3a65c7790fc5db4651460921310e0e469e08cad38295afe9a58a39c8af7bb6c0c2e800096fbcdd3055534f17ebb4 WHIRLPOOL a9866879f25bc3d765f2905d6321298d71abcb98b7f3d65f951ac2dcc4cfa0e7dbec4872fe928049239e251a91fd637d3cfad2782d0dc59d215bf0d295407a4c
+DIST scala-2.10.3-maven-deps.tar.gz 5715856 SHA256 1fdabc22fdef4ddd7ed31dbedf97e216cdd11d27d702475f30d0b459da8f22f8 SHA512 c05555d07777e0c325aadfcec1cd10381cdc95945acc262925992918fcc321e51a20454dd19b4111b1fdcc14bd32e34ba5fe853e45e9b4467771186242a85335 WHIRLPOOL 11773fc2862fa0a27b4ad204dafd4723b478552f1557180b316932edc3657d3e68b1f8ce12a9bfbedf55598c656a196850586fbe7998fb2a28f4fd58cf5d1c55
+DIST scala-2.10.3.tar.gz 5570015 SHA256 4cd9c67d73fb98942b78982bcfc8f4da8522e3fb3dc3210dfb7f60f749389d29 SHA512 b78d8d6a759b3de8010093dfc4104a86b0084fc466bd739ea12a7b015aef07a09e6793c4d0bb146904faf1a0cf6f60e6ea68843aef6616b7dc682a3f3e89e528 WHIRLPOOL 41caa0c54363c116c023f60699fe9074abea646acd4dcaa24336a8925d3f04ef1443a4ed397c90e966374d99097663315c47bc9088725276c91986bd4a99f45a
+DIST scala-2.10.4-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.10.4-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.10.4-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.10.4-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.10.4-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.10.4-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.10.4-fjbg.jar 130039 SHA256 a5acb5ca309b764a72e436fc770103277f4151233519b9ce7074f8000d259d6b SHA512 68f0bf76337fb243b9ca901eab985cfeb897d79d07ba81aaae516c890bbfb600a370c1e1df505275a12c723212fd88b5a03e97c73013d912be1be860d214e5ea WHIRLPOOL c4390956a00fad5a16018d5d4747e8585ba707339738b3e0c304a7093c4c8fd11111349377951916cee78c312735e823ee5e4ced19a1f568598e8fd553952426
+DIST scala-2.10.4-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.10.4-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.10.4-gentoo-binary.tar.bz2 59680465 SHA256 4225042bfe9c066c05c4d70383c27f48994f0e9733c5b3c4d4b970fe3e5f8c62 SHA512 ab4199652395215557bcb1d424227604e86bcd2278d556ca9f9130a534f70be39a74a36dfbeacf5125fd6ad9044770bb8c0cf068cca46d100c7e880df1c0d479 WHIRLPOOL 43a99bac419e2d23f01159becc546c633a25137eee033c2057486652ecfa6f98151f2fd60fa73e8e87bbece562c837da2340b3957037fa23c13bfeb1af28e91d
+DIST scala-2.10.4-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.10.4-jline.jar 164623 SHA256 813f2bc34a096cc7780c6946acf401c82e739cf9d5359edf414f74662137d3b1 SHA512 2d97f0d1bc1df67423f54102f8b360a6dba0bfac67ba12673e781d9461485a6124cf985cbab96283af7b366a8fb53e526aa667ccec466aae7002d5030f2e1369 WHIRLPOOL a7c848acf502c2247d0a9c83fa45295e5ede7487ac2129e50d4bd05a0271050b274cd25af24fb4215dc20283ca7df750618b31fea8973fffa125a3fb37f33bf3
+DIST scala-2.10.4-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.10.4-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.10.4-maven-deps.tar.gz 35071635 SHA256 906e515af637444bcf31110ff56ac34278dc433f6438a97f3f3e3fa080130cef SHA512 724eea3b041b78975c27578bc285dedb0b472801c34406496adfaaf58d4a058eeff17ad19377e3a092844a23ae0a5a9aeb9787689109ee2cc4df33e7f2f049b4 WHIRLPOOL 5a85030f77c88b74a457da0b56577a563a1385f26d08114032681923005cc16dd59f77295aadac4dd1b5d1c83098539600a7857a59bb5da48096595d733d3993
+DIST scala-2.10.4-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.10.4-msil.jar 298973 SHA256 5b9e6dc2f4dd79644a1480b7cb4db053d73fc5d0e41015b95f15ec4dacf2da0a SHA512 1e9be7bfea639cffd638c78b4368f599753e8bd4df8f9b3c192b72c2860d6f96002c94fcf751e9c6cdacfead1ae3bd851d61395ce83c49d66f801284bd2046dd WHIRLPOOL 3828f08bb47f038d3f6e52c0d077cdecd06195de3d29b326833f47a6713bbab644ddcd20b8d39aa814d25637dae31adc1d0f0aec6f489857d7b115aeab29a301
+DIST scala-2.10.4-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.10.4-plugins.jar 4179 SHA256 929863f42c87921e203665006e8b3dd9a1cce7733c9441ab9b82c891729b8372 SHA512 d55b72473f124443673693f5df8f7692558d87e6ef352d649eda5a706297fe7a9d47580b1d80db5119529cce5467e0aa211bc6c56c236de26bd51de36963e5cb WHIRLPOOL 7ce16b8db4eee26716342e682fa4d0e968c18c941a75efd87d102df35b38f9e9d40a51e3ae16fa55c954842e69a1f2a19e02a21643b5e36b866f70560cfb36e2
+DIST scala-2.10.4-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.10.4-scala-compiler-src.jar 2462738 SHA256 ca43298237583dfd362ab4d773ef0f791a075d9187ecf30cc8ee4f4b7ae12e76 SHA512 a71eab8ada2fd23aa1408577dc3bde28847484643618a752ab68bbe5c8a4ef19ad852ace6f44c8e66668e6b6098de8b0cb3eb8d0c4674ed332562463b43a8a38 WHIRLPOOL 8cc711357fe2b393c1e28a3ebd0249fb633c1135c6c4d8819c6ab14081c9fbbb4c1e0a6b84eb9a5711c9874814e54676905da90a1d8d6c5e28213e189bb0f37b
+DIST scala-2.10.4-scala-compiler.jar 15095501 SHA256 dbad9d1e0e300c62945d8d8aa21ebfa614e1f7b1c8378550b0314aa006be21c0 SHA512 98588884da2a01af5df9898f5d3055cbf5fa04af7d5f87bd6076dbfca329a7f2fa5645fa87cc14720204e00dc540971f8c44b2233fd4706db0df00ce8978349f WHIRLPOOL 311db7bc73ac1584403b12ea8c712a4b6a0450c502328ac26d7d9e051db4f5dd185dfc1c7c8304d32991c374fc2ed3c89cf8cfd61759f9049e1b5e55f4a7c54c
+DIST scala-2.10.4-scala-library-src.jar 1378653 SHA256 4a347825a0856a14803ec2c9cc205e192f19f15e417d334f4d22276d898d0dfd SHA512 06b0944c53b145c71239ec5aa90a78fbdee8130508f02d6cecd4c6c5e26878f19751471ba5d54c80e8d1380645787512c6e7566471675f0c9e3f0c29e38b4ff7 WHIRLPOOL 27fcbc2e52d52b30a8d0f1d68caaf8fb0f201d1509609aa361aaae412f0ceb6d95e6c3c4210b60027eae1ebb406ba3bdad770a2b087145572255b452bf0028bc
+DIST scala-2.10.4-scala-library.jar 7113040 SHA256 66057366dc9c541d0fadb7f64a4e06f7c5c86a90b289d724e7db0153b7e92c2c SHA512 af8a57145c8bcac6f72abade3b21f066ae082c7ab858c3a7b0641240fb99fe24bac3c224b7b1418c47c852793cecc7e8f5838e0cf6ae2b78ee538839cebdffeb WHIRLPOOL 29cffc4e84730549ed25384411e1a9341f56d348800d1bbc04958d88071e0c36b7290969b8f9d6ea865d9c82fbb76b1727cf66b81e420950c7ad356f2bd02aea
+DIST scala-2.10.4-scala-reflect-src.jar 467879 SHA256 45846f176eba3e072282b597fbea58977e1ac08d7161571e2601a86adbff4e35 SHA512 c172be4d0ec724be4f62cbcaf848a71c99cffc706fcaa5b46fe2970088ba9a8f406d42728f64a0dfdef1cbe18e313b8be8142d68b9b3d7a592dec5e1fd7366b6 WHIRLPOOL 876bd9e3186d76d351e128cf990789459b51bca1ad6e4f51aa397d1941311ed51a1048188a4b94bd8709551c0cb3ab3985d3a1534594bb840082d0b555496d7c
+DIST scala-2.10.4-scala-reflect.jar 3307596 SHA256 910b58279250371e034859227fb5d9015297eb6bf607f9d3ec0836a822c1fff0 SHA512 466c55b8ce98e48f851c446b986388351ac4b0fb2b0cf6888d56fe2a4af1f5f3916e78f3fdea395ee18ef0a5128bc6b0d4cdcdce8f5b0f2fcc30c2bdbd41eb40 WHIRLPOOL 73a42b7b557bf29d14511f798e22f1ba8039e7c41bb165d9a4be7c66d393fa63c2836239fca56158eb2c5dd07567b1febb18d9f4f514de48e0c6ec5d155a46a2
+DIST scala-2.10.4-scalacheck.jar 763570 SHA256 96814bea5818186086473da5c657191d03145649eee0c300abec9c3380fdd418 SHA512 5383e80dbcb11cb3fba033bd6a0e8c220ec3dd6fc153062b9d44d346ff17bea014a8c7a412af85ff487a34011cdc2042191c4c4ad66ea44eb7eba139a0b358d4 WHIRLPOOL d6276010ce4d1bcc647e1d7673cc18f645ac92abf03c4aa5be03735853a33692763883fcd8e325d36b2a18cca758d6f1636294b182f247da1094c82476f36b58
+DIST scala-2.10.4-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.10.4.tar.gz 5510555 SHA256 d67ed8747bcdf5a598688d027be418790b59158c5dee5b46f51a88b067da59f3 SHA512 1d26d78d120377ba376b507ea484c245bfa289d55b6838211e8e7d2ca38fc7e6d6375e9467bad528d9d51a9eff9c766fbaf452a851e88f156295d89827514e26 WHIRLPOOL 0997c7c1489fa5438c54ffc4d44d32bdb4b6868455903448a6d9c5f9a3ee43fb1cd68ce00ecacacdaf667214cce6840054f3204647af391e48ae05dc5422ab3e
+DIST scala-2.11.1-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.1-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.1-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.1-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.1-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.1-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.1-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.1-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.1-gentoo-binary.tar.bz2 29582640 SHA256 d8238e2be80b1f95c488909b81aa9614ffd03ade9145e67e3fe0260fa4e2df93 SHA512 c03b92a15ee080a7049ffa8502d73caff6495f30bbbc0cee7975530cd15c767c4b1c4e189aede0a67bd575c0be2de5c19e907a85aee0b8cf9f76fa41ad45e8d8 WHIRLPOOL 11b4c94bc11d2f766d5198a54e687508a2587486608aadb3b84d0e5ebe7cc5c912b95290ef5b5d78c074093e2f20bb87b74d3365cd10322ff89e28b0a67482ed
+DIST scala-2.11.1-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.1-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.1-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.1-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.1-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.1-maven-deps.tar.gz 77191352 SHA256 7d0690ae465806fa01249cf4b04cd75485593db68c5751d681daadd4f29b44e9 SHA512 2e25beaaa669001aad0c3365a1ade7715ce28cbeb7cee6b082cde14f572740ac9950c8c94eb0b8f5ac2def37228e34d707087b8e822ed3aafc03bce38923d6dc WHIRLPOOL 7d409c86b201a3edc14201e0c458e9e23d4a3f0c0139e6aec0ca81bed67cf49c64a625fbd2f8a1d79778336c4f1f372f1029cc99d2b871302f8be120817fde9b
+DIST scala-2.11.1-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.1-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.1-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.1.tar.gz 5633076 SHA256 868a009c89a331ec05914faa204f865d09f2b7b35eabdb41e7f43e8734e0abf5 SHA512 bde7a8fae9fa570df392a70aa06f901bc4987703fadf1e7ad9f090f3b3c9a2ff1bbe055a401b0d851193b5ddcd8b0536c4916f79ae4c63b74c31695de6e651b2 WHIRLPOOL 4f153b829efe7e3435bab5fca27a0e52c94aa8f50f2078cee082575bb8f7677b4e0a70c49a92060c3509cc009f3586ff592c2b332a4c78bb57bcb9973328e6d1
+DIST scala-2.11.2-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.2-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.2-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.2-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.2-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.2-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.2-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.2-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.2-gentoo-binary.tar.bz2 28586286 SHA256 71938d4d07ed5f44164330b37de31052fda9e728d60fb450fd57f41f9184c38d SHA512 39a859394f1918daf0ad91d26a56554e591906a5b4d2385060fb08d8799a4efe95bd23e0f98502297ae0f2b16a8a7deaf583d68c5478fefa1f84d5677ca09226 WHIRLPOOL 9b4670b51ab0b475e317965298f1ee7f2ec411ae0a34faf287ffcf7b8119d962f800faa82628ea457c109e515f92edea991641177e6a7b46f7c9101cabc476f7
+DIST scala-2.11.2-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.2-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.2-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.2-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.2-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.2-maven-deps.tar.gz 84139566 SHA256 9006434636902fdd9cddbec38f0d81e017191998ee1eb1ddfb1792db1cbabc24 SHA512 54b888af964a5e2731fad20481253150d60859a5243c72873e09799dac665f315e1449d89f86cb311582085d34d7c1c661dee41f64084efb943feef8d4036602 WHIRLPOOL 352a93e287f2e9f9f1e2e55024f29541f4d82de5e9406c40362324c633e3a5b26257c801a0e37f77a56f6487eb2ac3478112389402ac762fb08af1f03dcbe2d3
+DIST scala-2.11.2-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.2-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.2-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.2-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.2.tar.gz 5679601 SHA256 a99201ce1da62976f2442fdb3570235cae329bad5c772868c094edfd5c8dc64d SHA512 c3ca34fbb2733295d9b28089ca136461042978e86e00d86eb2a64c8a8fa207ec99aa33238eda21fe48bcba9e21caeec0fdaa63ceb263dcd9ccef936e23a95c7f WHIRLPOOL ebc9e2c39f6172447a5a36f62063d86c1be6a2e35fea13152ef7dd3d486ec1f05518af6fa933fd6a1f9f7f89440800ab1f25645d26357a681fa675268cee6f3f
+DIST scala-2.11.4-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.4-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.4-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.4-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.4-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.4-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.4-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.4-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.4-gentoo-binary.tar.bz2 28642636 SHA256 92c72e0b505aa8a21b0ad07d4789310892ec377a5deba48d407a75edd3ac788a SHA512 0923f4d7a184fa04239066a4eee10bc989de637c7d5926f0bee8620ef1b46edcc5fff999a23d6754b809c03996d61ce0e4ade0dd046700a20fd1b52c53ca074a WHIRLPOOL c08385d81b7efd4e880564aa6d49641337de56db44bea549dd0b1aee162d6e5e651c0d7772a289600b22f3abdc7b6941d41f9773dc6c90e01e98fa314f69348b
+DIST scala-2.11.4-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.4-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.4-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.4-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.4-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.4-maven-deps.tar.gz 89732002 SHA256 4b0d6fdc6bb9cac88c7f4fc10f70e24e36473e748f2ba9499d0567676f535852 SHA512 d1f99158337789513eac7be25ee3f19272c3975babfe49c2f7876b2d51082bfa1c5bd4b4bd1aef0cac0c6701a9e62b96c15c593c94f04e3226f4aa34cd114052 WHIRLPOOL bfe8c4d6dd7b74d873c1a754fd881672df462217192223fa7f489e4b325b8b6f00758f057a379a9d786a1e812855478103bd51305e4faa34aaaa03b0b5f7f1a0
+DIST scala-2.11.4-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.4-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.4-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.4-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.4.tar.gz 5789309 SHA256 3c9af3b0cf7528f2ceacb316c3e96eee8c63d2e635a8143c8dbb8d5206a5a834 SHA512 e7646ed8d40eca6d91757d257e9301836bdc6676dfe5bbb4b059af7a08496fbc99d243f3f087e507d026a9c41e2452ecf72ea5e4e1babbb7119065d8bc710056 WHIRLPOOL ab8f272054a6d2776e4857f705d4de7ffded979e1628e7a290d28bd3cb8451aa72defc53e31e1eaa7e72f55b0f72fd5469226d1c35cb583b6bc2dd7fb0ff2e84
+DIST scala-2.11.6-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.6-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.6-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.6-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.6-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.6-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.6-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.6-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.6-gentoo-binary.tar.bz2 29875070 SHA256 a334a9ba5d6bb2ffceec5e92cad18a46725d3f2ad07c6137145e1b660cf8466f SHA512 fcdb8c44221f9a7e8260b16b0d069f5ffa45f8ce404f0a49b2ba76349cef7e7e5a0aa3bd8a3f4eecf8a1af5d2037c9d6582cdde38e1e8218f09196d0561d5226 WHIRLPOOL 2e846c52cbba1890a881d65e704de949a67cd3ed00bbfe1b7554ec73dd8e6896d97a21a0f9438096335de7939cfb29feed60d74db00c20c40ab75450d1b4bd47
+DIST scala-2.11.6-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.6-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.6-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.6-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.6-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.6-maven-deps.tar.gz 87558817 SHA256 864e3c0833dddaed75dd023de8f31225b36dc607765c50cae64d3b7fd4e3098f SHA512 ad271b4efbe137aa5bbc22bc138719fdd9f89119113dcb35f14bc45cea3382cb33c35bb973fca0d2607c6bb89abbfe69bb4ab1f35f65ad6b7b9a67b7dba63523 WHIRLPOOL 6751aeafa9d02e77291bf05bb0a0d78702ebe3ecfb39399a571bf2f799769b2523b192b6efdb1e07b76f793fb13553e1c50ee2df1b5b59c7cea6926b46d3268b
+DIST scala-2.11.6-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.6-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.6-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.6-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.6.tar.gz 5901947 SHA256 0ccf26576dacd2792af09a146a43a15b25201d47891f83c3dc8f9a04c79e88b1 SHA512 57e2a06c8f66e9e51cbfc998a90931a6bd6ab65b574077c8a2541b300d1c86c18bc48bf708060745a71517ae56fa8ad4032c254b3537cd66bc6fe4c328cb4a57 WHIRLPOOL 25d66716880c07cd03de1f1a2278140722268d7de499f1dbe33fec70f787f65a5f92496ba5d5115cee84c6870af0f4dc884270077a98430e7867b4ca57b899af
+DIST scala-2.11.7-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.7-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.7-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.7-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.7-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.7-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.7-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.7-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.7-gentoo-binary.tar.bz2 31603236 SHA256 6a9d55a0e43483421550e1dd0fb939b4105340eca4e5ae196d17fb175cc45456 SHA512 13ea3ebe69fea9e450587494ac0de20f28477442e10dae0306b13cc9dcdf375f897a3988a0dca6db102a6ba2744debb8552cd6704150e049bf6f15cc1c00899c WHIRLPOOL 72fbf5afb24fc879ac3a93bd3c5ef1f321b0e16166eef72eff65844a088b9ab421b01906b78f064c05649daf25813d7e2023f6f297bfb27b3335f3108474d6b7
+DIST scala-2.11.7-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.7-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.7-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.7-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.7-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.7-maven-deps.tar.gz 88535058 SHA256 57fbc3abab609b5129f51058f527e7c8211b4cc062d7d54442ddf0e4c87f0382 SHA512 745b981b80fddca1768c1eb4579b60888b82e1d1e5c4f3b48f4e5815c2f45f8bc7e2e2cae842dfe6d5187f3987b39e3fcd3c0d0e42173931822c6fb95edcfb5c WHIRLPOOL 26b9e58a871f0de483dfb6ef73d60447df8623da3268556f35ba6df73c6f51b835158ea5697bed459df3d78b824dccf07d30bb48d4bfd5ba9167484aeacd6791
+DIST scala-2.11.7-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.7-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.7-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.7-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.7.tar.gz 6443003 SHA256 1679ee604bc4e881b0d325e164c39c02dcfa711d53cd3115f5a6c9676c5915ef SHA512 f74614a303bdc28068b212e9fe4aa499db4a5a9ff87bf1af93d6b3598784edd3f2e37cedbdbc20c9aa507965845b4b511bfc786ff82f31dbc3365af796062611 WHIRLPOOL d7ebd8b9a6c34d90d7b7dd62d79406ff2776ed65037e93cd20c0ce2f954e3380896b67ee88813abe322303ebb7894070c68b1045ce71923ae26e876f1fa57a88
+DIST scala-2.9.2-gentoo-binary.tar.bz2 32370003 SHA256 43e07596f28e723cf1e2d41ed95c312af8422059de8c229d18eadb46d487c9ca SHA512 b0873dbe5d93b1665372c44f9473e1d4616f5347c26e0950cf2366b08e1f68069b1c527bda7bfcecb8af4afeaa1c9cae7d324d36509d5f2072e725310fd1cc7b WHIRLPOOL ffcba39e9f04eccadc16bda8770e42f2725fcf21172f7f6798f3849282c276d3671c93e0eaeb4a0a46a73a815cb31300302354f8e99ce888a5687739ab0f50f8
+DIST scala-2.9.2.tar.gz 38434121 SHA256 1b931103051f4f6b2f8788ac6f5392b5f29e1109e97f0e19340ff6185fbab4ad SHA512 c8ce17728976c506c90d2eec792904d39a16d35d153914a7c936e43e530f20d8cdf494287187c513393e2db7837b8ec9d417c56f6bb47be3b0501f2a57f52b63 WHIRLPOOL 08774dd06a6814a33a21643a0af361310ca8aae649968d4d411a3ffba32e855d320f052bda0707db356c01e1f4e1c1b0cafd67881d1666d046ad8934084e7635
+DIST scala-compiler-src.jar 2462738 SHA256 ca43298237583dfd362ab4d773ef0f791a075d9187ecf30cc8ee4f4b7ae12e76 SHA512 a71eab8ada2fd23aa1408577dc3bde28847484643618a752ab68bbe5c8a4ef19ad852ace6f44c8e66668e6b6098de8b0cb3eb8d0c4674ed332562463b43a8a38 WHIRLPOOL 8cc711357fe2b393c1e28a3ebd0249fb633c1135c6c4d8819c6ab14081c9fbbb4c1e0a6b84eb9a5711c9874814e54676905da90a1d8d6c5e28213e189bb0f37b
+DIST scala-compiler.jar 15095501 SHA256 dbad9d1e0e300c62945d8d8aa21ebfa614e1f7b1c8378550b0314aa006be21c0 SHA512 98588884da2a01af5df9898f5d3055cbf5fa04af7d5f87bd6076dbfca329a7f2fa5645fa87cc14720204e00dc540971f8c44b2233fd4706db0df00ce8978349f WHIRLPOOL 311db7bc73ac1584403b12ea8c712a4b6a0450c502328ac26d7d9e051db4f5dd185dfc1c7c8304d32991c374fc2ed3c89cf8cfd61759f9049e1b5e55f4a7c54c
+DIST scala-library-src.jar 1378653 SHA256 4a347825a0856a14803ec2c9cc205e192f19f15e417d334f4d22276d898d0dfd SHA512 06b0944c53b145c71239ec5aa90a78fbdee8130508f02d6cecd4c6c5e26878f19751471ba5d54c80e8d1380645787512c6e7566471675f0c9e3f0c29e38b4ff7 WHIRLPOOL 27fcbc2e52d52b30a8d0f1d68caaf8fb0f201d1509609aa361aaae412f0ceb6d95e6c3c4210b60027eae1ebb406ba3bdad770a2b087145572255b452bf0028bc
+DIST scala-library.jar 7113040 SHA256 66057366dc9c541d0fadb7f64a4e06f7c5c86a90b289d724e7db0153b7e92c2c SHA512 af8a57145c8bcac6f72abade3b21f066ae082c7ab858c3a7b0641240fb99fe24bac3c224b7b1418c47c852793cecc7e8f5838e0cf6ae2b78ee538839cebdffeb WHIRLPOOL 29cffc4e84730549ed25384411e1a9341f56d348800d1bbc04958d88071e0c36b7290969b8f9d6ea865d9c82fbb76b1727cf66b81e420950c7ad356f2bd02aea
+DIST scala-reflect-src.jar 467879 SHA256 45846f176eba3e072282b597fbea58977e1ac08d7161571e2601a86adbff4e35 SHA512 c172be4d0ec724be4f62cbcaf848a71c99cffc706fcaa5b46fe2970088ba9a8f406d42728f64a0dfdef1cbe18e313b8be8142d68b9b3d7a592dec5e1fd7366b6 WHIRLPOOL 876bd9e3186d76d351e128cf990789459b51bca1ad6e4f51aa397d1941311ed51a1048188a4b94bd8709551c0cb3ab3985d3a1534594bb840082d0b555496d7c
+DIST scala-reflect.jar 3307596 SHA256 910b58279250371e034859227fb5d9015297eb6bf607f9d3ec0836a822c1fff0 SHA512 466c55b8ce98e48f851c446b986388351ac4b0fb2b0cf6888d56fe2a4af1f5f3916e78f3fdea395ee18ef0a5128bc6b0d4cdcdce8f5b0f2fcc30c2bdbd41eb40 WHIRLPOOL 73a42b7b557bf29d14511f798e22f1ba8039e7c41bb165d9a4be7c66d393fa63c2836239fca56158eb2c5dd07567b1febb18d9f4f514de48e0c6ec5d155a46a2
+DIST scalacheck.jar 763570 SHA256 96814bea5818186086473da5c657191d03145649eee0c300abec9c3380fdd418 SHA512 5383e80dbcb11cb3fba033bd6a0e8c220ec3dd6fc153062b9d44d346ff17bea014a8c7a412af85ff487a34011cdc2042191c4c4ad66ea44eb7eba139a0b358d4 WHIRLPOOL d6276010ce4d1bcc647e1d7673cc18f645ac92abf03c4aa5be03735853a33692763883fcd8e325d36b2a18cca758d6f1636294b182f247da1094c82476f36b58
+DIST scalatest.jar 1827900 SHA256 43869b4171972901bce5a89b1ba8b8474c7e75538321dcdfb41e37d089edbac8 SHA512 2d77d1239d544d572660d8b2a8355bf7a03137a3d05d41b5f2ab214edab05ef038d3e05082d5adafe16b6cda41440c075f49a130c3c7ff053c6d8844000d2f2b WHIRLPOOL 68d804ab21f3caa0e459d8d8b1c926b6f69140cb64a96b72d95605f9f04845510cd47b369b3d73d5e944912fa2f0d06cfb02c75f89087d8f27effbdfa4d9ccd1
+DIST vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
diff --git a/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch
new file mode 100644
index 00000000000..964b323d9b3
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch
@@ -0,0 +1,165 @@
+commit f3f1064c90371449949892f30de91cc1f2662c55
+Merge: 0b7dddb 050b4c9
+Author: Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com>
+Date: Sat Jul 27 22:39:44 2013 -0700
+
+ Merge pull request #2750 from retronym/ticket/7455-2.10.x
+
+ SI-7455 Drop dummy param for synthetic access constructor
+
+commit 050b4c951c838699c2fe30cbf01b63942c63a299
+Author: Jason Zaugg <jzaugg@gmail.com>
+Date: Wed Jul 17 15:52:48 2013 +1000
+
+ SI-7455 Drop dummy param for synthetic access constructor
+
+ Java synthesizes public constructors in private classes to
+ allow access from inner classes. The signature of
+ that synthetic constructor (known as a "access constructor")
+ has a dummy parameter appended to avoid overloading clashes.
+ javac chooses the type "Enclosing$1" for the dummy parameter
+ (called the "access constructor tag") which is either an
+ existing anonymous class or a synthesized class for this purpose.
+
+ In OpenJDK, this transformation is performed in:
+
+ langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
+
+ (Incidentally, scalac would just emits a byte-code public
+ constructor in this situation, rather than a private constructor /
+ access constructor pair.)
+
+ Scala parses the signature of the access contructor, and drops
+ the $outer parameter, but retains the dummy parameter. This causes
+ havoc when it tries to parse the bytecode for that anonymous class;
+ the class file parser doesn't have the enclosing type parameters
+ of Vector in scope and crash ensues.
+
+ In any case, we shouldn't allow user code to see that constructor;
+ it should only be called from within its own compilation unit.
+
+ This commit drops the dummy parameter from access constructor
+ signatures in class file parsing.
+
+diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+index da11754..4e5204f 100644
+--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
++++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+@@ -626,7 +626,7 @@ abstract class ClassfileParser {
+ sawPrivateConstructor = true
+ in.skip(2); skipAttributes()
+ } else {
+- if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) {
++ if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) { // TODO this should be !optimize, no? See c4181f656d.
+ in.skip(4); skipAttributes()
+ } else {
+ val name = pool.getName(in.nextChar)
+@@ -636,7 +636,7 @@ abstract class ClassfileParser {
+ info match {
+ case MethodType(params, restpe) =>
+ // if this is a non-static inner class, remove the explicit outer parameter
+- val newParams = innerClasses getEntry currentClass match {
++ val paramsNoOuter = innerClasses getEntry currentClass match {
+ case Some(entry) if !isScalaRaw && !isStatic(entry.jflags) =>
+ /* About `clazz.owner.isPackage` below: SI-5957
+ * For every nested java class A$B, there are two symbols in the scala compiler.
+@@ -650,6 +650,15 @@ abstract class ClassfileParser {
+ case _ =>
+ params
+ }
++ val newParams = paramsNoOuter match {
++ case (init :+ tail) if (jflags & JAVA_ACC_SYNTHETIC) != 0L =>
++ // SI-7455 strip trailing dummy argument ("access constructor tag") from synthetic constructors which
++ // are added when an inner class needs to access a private constructor.
++ init
++ case _ =>
++ paramsNoOuter
++ }
++
+ info = MethodType(newParams, clazz.tpe)
+ }
+ sym.setInfo(info)
+diff --git a/test/files/run/t7455.check b/test/files/run/t7455.check
+new file mode 100644
+index 0000000..0eb9342
+--- /dev/null
++++ b/test/files/run/t7455.check
+@@ -0,0 +1,4 @@
++private[package <empty>] def <init>(x$1: String): Outer[E]
++private[package <empty>] def <init>(): Outer$PrivateInner
++private[package <empty>] def <init>(): Outer$PrivateStaticInner
++private[package <empty>] def <init>(x$2: String): Outer$PublicInner
+diff --git a/test/files/run/t7455/Outer.java b/test/files/run/t7455/Outer.java
+new file mode 100644
+index 0000000..10c97a9
+--- /dev/null
++++ b/test/files/run/t7455/Outer.java
+@@ -0,0 +1,31 @@
++public class Outer<E> {
++ public void elements() {
++ new C<E>() {
++ };
++ }
++
++ private Outer(String a) {}
++
++ static class SubSelf extends Outer<String> {
++ public SubSelf() { super(""); }
++ }
++
++ private class PrivateInner {
++ }
++ class SubPrivateInner extends PrivateInner {
++ }
++
++ private class PublicInner {
++ private PublicInner(String a) {}
++ }
++ class SubPublicInner extends PublicInner {
++ public SubPublicInner() { super(""); }
++ }
++
++ private static class PrivateStaticInner {
++ }
++ public static class SubPrivateStaticInner extends PrivateStaticInner {
++ }
++}
++
++class C<E> {}
+diff --git a/test/files/run/t7455/Test.scala b/test/files/run/t7455/Test.scala
+new file mode 100644
+index 0000000..b23a724
+--- /dev/null
++++ b/test/files/run/t7455/Test.scala
+@@ -0,0 +1,30 @@
++import scala.tools.partest._
++
++// javac adds dummy parameters of type Outer$1 to synthetic access constructors
++// This test shows that we strip them from the signatures. If we don't, we trigger
++// parsing of Outer$1 which can fail if it references type parameters of the Outer.
++//
++// OLD OUTPUT:
++// private[package <empty>] def <init>(x$2: Outer$1): Outer$PrivateInner
++// error: error while loading Outer$1, class file 't7455-run.obj/Outer$1.class' is broken
++// (class java.util.NoSuchElementException/key not found: E)
++// ...
++object Test extends DirectTest {
++ override def code = ""
++
++ def show {
++ val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
++ val compiler = newCompiler("-cp", classpath, "-d", testOutput.path)
++ import compiler._, definitions._
++ new compiler.Run
++
++ for {
++ name <- Seq("Outer", "Outer$PrivateInner", "Outer$PrivateStaticInner", "Outer$PublicInner")
++ clazz = compiler.rootMirror.staticClass(name)
++ constr <- clazz.info.member(nme.CONSTRUCTOR).alternatives
++ } {
++ println(constr.defString)
++ fullyInitializeSymbol(constr)
++ }
++ }
++}
+
diff --git a/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch
new file mode 100644
index 00000000000..a9614f3db2b
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch
@@ -0,0 +1,236 @@
+--- scala-2.10.2-orig/build.xml 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/build.xml 2013-08-20 20:41:23.335756000 +1000
+@@ -343,6 +343,8 @@
+ <echo level="warning"> You are using JDK7 for this build.
+ While this will be able to build most of Scala, it will not build the Swing project.
+ You will be unable to create a distribution.
++ ^ The above is a message from the scala 2.10.2 release, the Gentoo
++ ebuild applies patches for jdk 1.7 swing.
+ </echo>
+ </then></if>
+
+@@ -1153,7 +1155,7 @@
+ <target name="quick.partest" depends="quick.scalap, quick.comp, asm.done">
+ <staged-build with="locker" stage="quick" project="partest" version="partest"/> </target>
+
+- <target name="quick.swing" depends="quick.actors, quick.lib" if="has.java6">
++ <target name="quick.swing" depends="quick.actors, quick.lib">
+ <staged-build with="locker" stage="quick" project="swing"/> </target>
+
+ <target name="quick.plugins" depends="quick.comp">
+@@ -1204,7 +1206,7 @@
+ <staged-pack project="library"/></target>
+
+ <target name="pack.actors" depends="quick.lib"> <staged-pack project="actors"/> </target>
+- <target name="pack.swing" if="has.java6" depends="quick.swing"> <staged-pack project="swing"/> </target>
++ <target name="pack.swing" depends="quick.swing"> <staged-pack project="swing"/> </target>
+ <target name="pack.reflect" depends="quick.reflect"> <staged-pack project="reflect"/> </target>
+
+ <target name="pack.comp" depends="quick.comp, asm.done">
+@@ -1351,9 +1353,7 @@
+ <make-plugin-bundle name="continuations" version="${osgi.version.number}" />
+ <touch file="${build-osgi.dir}/bundles.complete" verbose="no"/>
+
+- <if><isset property="has.java6"/><then>
+- <make-bundle name="scala-swing" version="${osgi.version.number}"/></then>
+- </if>
++ <make-bundle name="scala-swing" version="${osgi.version.number}"/>
+ <stopwatch name="osgi.bundle.timer" action="total"/></then>
+ </if>
+ </target>
+--- scala-2.10.2-orig/src/swing/scala/swing/ComboBox.scala 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/src/swing/scala/swing/ComboBox.scala 2013-08-20 20:26:48.334061000 +1000
+@@ -9,7 +9,7 @@
+ package scala.swing
+
+ import event._
+-import javax.swing.{JList, JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer}
++import javax.swing.{ JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer }
+ import java.awt.event.ActionListener
+
+ object ComboBox {
+@@ -118,10 +118,10 @@
+ implicit def floatEditor(c: ComboBox[Float]): Editor[Float] = new BuiltInEditor(c)(s => s.toFloat, s => s.toString)
+ implicit def doubleEditor(c: ComboBox[Double]): Editor[Double] = new BuiltInEditor(c)(s => s.toDouble, s => s.toString)
+
+- def newConstantModel[A](items: Seq[A]): ComboBoxModel = {
+- new AbstractListModel with ComboBoxModel {
++ def newConstantModel[A](items: Seq[A]): ComboBoxModel[A] = {
++ new AbstractListModel[A] with ComboBoxModel[A] {
+ private var selected: A = if (items.isEmpty) null.asInstanceOf[A] else items(0)
+- def getSelectedItem: AnyRef = selected.asInstanceOf[AnyRef]
++ def getSelectedItem = selected.asInstanceOf[AnyRef]
+ def setSelectedItem(a: Any) {
+ if ((selected != null && selected != a) ||
+ selected == null && a != null) {
+@@ -129,7 +129,7 @@
+ fireContentsChanged(this, -1, -1)
+ }
+ }
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ def getElementAt(n: Int) = items(n).asInstanceOf[A]
+ def getSize = items.size
+ }
+ }
+@@ -157,7 +157,7 @@
+ * @see javax.swing.JComboBox
+ */
+ class ComboBox[A](items: Seq[A]) extends Component with Publisher {
+- override lazy val peer: JComboBox = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
++ override lazy val peer: JComboBox[A] = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
+
+ object selection extends Publisher {
+ def index: Int = peer.getSelectedIndex
+@@ -182,7 +182,8 @@
+ * of the component to its own defaults _after_ the renderer has been
+ * configured. That's Swing's principle of most suprise.
+ */
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getRenderer.asInstanceOf[ListCellRenderer[A]])
++ // def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
+ def renderer_=(r: ListView.Renderer[A]) { peer.setRenderer(r.peer) }
+
+ /* XXX: currently not safe to expose:
+@@ -201,8 +202,8 @@
+ peer.setEditor(editor(this).comboBoxPeer)
+ }
+
+- def prototypeDisplayValue: Option[A] = toOption[A](peer.getPrototypeDisplayValue)
++ def prototypeDisplayValue: Option[A] = Option(peer.getPrototypeDisplayValue)
+ def prototypeDisplayValue_=(v: Option[A]) {
+- peer.setPrototypeDisplayValue((v map toAnyRef).orNull)
++ peer.setPrototypeDisplayValue((v map toAnyRef).orNull.asInstanceOf[A])
+ }
+ }
+--- scala-2.10.2-orig/src/swing/scala/swing/ListView.scala 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/src/swing/scala/swing/ListView.scala 2013-08-20 20:26:48.334716000 +1000
+@@ -24,21 +24,21 @@
+ val MultiInterval = Value(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ }
+
+- def wrap[A](c: JList) = new ListView[A] {
++ def wrap[A](c: JList[A]) = new ListView[A] {
+ override lazy val peer = c
+ }
+
+ object Renderer {
+- def wrap[A](r: ListCellRenderer): Renderer[A] = new Wrapped[A](r)
++ def wrap[A](r: ListCellRenderer[A]): Renderer[A] = new Wrapped[A](r)
+
+ /**
+ * Wrapper for <code>javax.swing.ListCellRenderer<code>s
+ */
+- class Wrapped[A](override val peer: ListCellRenderer) extends Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
++ class Wrapped[A](override val peer: ListCellRenderer[A]) extends Renderer[A] {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
+ Component.wrap(peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent])
++ }
+ }
+- }
+
+ /**
+ * Returns a renderer for items of type <code>A</code>. The given function
+@@ -55,8 +55,8 @@
+ * </code>
+ */
+ def apply[A,B](f: A => B)(implicit renderer: Renderer[B]): Renderer[A] = new Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
+- renderer.componentFor(list, isSelected, focused, f(a), index)
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
++ renderer.componentFor(list.asInstanceOf[ListView[_ <: B]], isSelected, focused, f(a), index)
+ }
+ }
+
+@@ -69,11 +69,11 @@
+ * @see javax.swing.ListCellRenderer
+ */
+ abstract class Renderer[-A] {
+- def peer: ListCellRenderer = new ListCellRenderer {
+- def getListCellRendererComponent(list: JList, a: Any, index: Int, isSelected: Boolean, focused: Boolean) =
+- componentFor(ListView.wrap[A](list), isSelected, focused, a.asInstanceOf[A], index).peer
++ def peer: ListCellRenderer[_ >: A] = new ListCellRenderer[A] {
++ def getListCellRendererComponent(list: JList[_ <: A], a: A, index: Int, isSelected: Boolean, focused: Boolean) =
++ componentFor(ListView.wrap[A](list.asInstanceOf[JList[A]]), isSelected, focused, a, index).peer
+ }
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
+ }
+
+ /**
+@@ -110,7 +110,7 @@
+ /**
+ * Configures the component before returning it.
+ */
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
+ preConfigure(list, isSelected, focused, a, index)
+ configure(list, isSelected, focused, a, index)
+ component
+@@ -123,10 +123,10 @@
+ * that renders the string returned from an item's <code>toString</code>.
+ */
+ implicit object GenericRenderer extends Renderer[Any] {
+- override lazy val peer: ListCellRenderer = new DefaultListCellRenderer
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
+- val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent]
+- Component.wrap(c)
++ override lazy val peer: ListCellRenderer[Any] = (new DefaultListCellRenderer).asInstanceOf[ListCellRenderer[Any]]
++ def componentFor(list: ListView[_ <: Any], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
++ val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused)
++ Component.wrap(c.asInstanceOf[JComponent])
+ }
+ }
+ }
+@@ -142,34 +142,34 @@
+ */
+ class ListView[A] extends Component {
+ import ListView._
+- override lazy val peer: JList = new JList with SuperMixin
++ override lazy val peer: JList[A] = new JList[A] with SuperMixin
+
+ def this(items: Seq[A]) = {
+ this()
+ listData = items
+ }
+
+- protected class ModelWrapper(val items: Seq[A]) extends AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ protected class ModelWrapper[A](val items: Seq[A]) extends AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ }
+
+ def listData: Seq[A] = peer.getModel match {
+- case model: ModelWrapper => model.items
+- case model @ _ => new Seq[A] { selfSeq =>
++ case model: ModelWrapper[a] => model.items
++ case model => new Seq[A] { selfSeq =>
+ def length = model.getSize
+ def iterator = new Iterator[A] {
+ var idx = 0
+ def next = { idx += 1; apply(idx-1) }
+ def hasNext = idx < selfSeq.length
+ }
+- def apply(n: Int) = model.getElementAt(n).asInstanceOf[A]
++ def apply(n: Int): A = model.getElementAt(n)
+ }
+ }
+
+ def listData_=(items: Seq[A]) {
+- peer.setModel(new AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ peer.setModel(new AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ })
+ }
+@@ -216,7 +216,7 @@
+ def adjusting = peer.getSelectionModel.getValueIsAdjusting
+ }
+
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getCellRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getCellRenderer.asInstanceOf[ListCellRenderer[A]])
+ def renderer_=(r: ListView.Renderer[A]) { peer.setCellRenderer(r.peer) }
+
+ def fixedCellWidth = peer.getFixedCellWidth
diff --git a/dev-lang/scala/files/scala-2.10.2-maven-deps.patch b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
new file mode 100644
index 00000000000..133a2a4f757
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
@@ -0,0 +1,70 @@
+--- scala-2.10.2-orig/build.xml 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/build.xml 2013-08-30 22:48:11.727055000 +1000
+@@ -202,30 +202,19 @@
+ on repeated use of artifact:dependencies
+ -->
+ <if><not><isset property="maven-deps-done"></isset></not><then>
+- <mkdir dir="${user.home}/.m2/repository"/>
+- <!-- This task has an issue where if the user directory does not exist, so we create it above. UGH. -->
+- <artifact:dependencies pathId="extra.tasks.classpath" filesetId="extra.tasks.fileset">
+- <dependency groupId="biz.aQute" artifactId="bnd" version="1.50.0"/>
+- </artifact:dependencies>
++ <path id="extra.tasks.classpath">
++ <pathelement path="BNDLIB_CLASSPATH"></pathelement>
++ </path>
+
+ <!-- Pax runner -->
+- <property name="pax.exam.version" value="2.5.0"/>
+- <artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.4.0"/>
+- <dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
+- <dependency groupId="junit" artifactId="junit" version="4.10"/>
+- <dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="3.2.2"/>
+- </artifact:dependencies>
+-
+- <artifact:dependencies pathId="partest.extras.classpath" filesetId="partest.extras.fileset" versionsId="partest.extras.versions">
+- <dependency groupId="com.googlecode.java-diff-utils" artifactId="diffutils" version="1.3.0"/>
+- </artifact:dependencies>
+-
++ <path id="pax.exam.classpath">
++ <pathelement path="PAX_RUNNER_CLASSPATH"></pathelement>
++ </path>
++
++ <path id="partest.extras.classpath">
++ <pathelement path="DIFFUTILS_CLASSPATH"></pathelement>
++ </path>
++ <property name="partest.extras.versions" value="1.3.0"></property>
+ <!-- BND support -->
+ <typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
+
+@@ -1247,10 +1236,8 @@
+ <!-- depend on quick.done so quick.bin is run when pack.done is -->
+ <target name="pack.done" depends="quick.done, pack.bin">
+ <!-- copy dependencies to build/pack/lib, it only takes a second so don't bother with uptodate checks -->
+- <copy todir="${build-pack.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${build-pack.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <taskdef resource="scala/tools/ant/antlib.xml" classpathref="pack.compiler.path"/>
+@@ -1769,10 +1756,8 @@
+ </fileset>
+ </copy>
+
+- <copy todir="${dist.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${dist.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <mkdir dir="${dist.dir}/bin"/>
diff --git a/dev-lang/scala/files/scala-2.10.2-no-git.patch b/dev-lang/scala/files/scala-2.10.2-no-git.patch
new file mode 100644
index 00000000000..f1b83173036
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.2-orig/tools/get-scala-commit-date 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/tools/get-scala-commit-date 2013-08-20 20:26:34.859699000 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2013-05-31"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.2-orig/tools/get-scala-commit-sha 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/tools/get-scala-commit-sha 2013-08-20 20:26:34.860152000 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="60d462ef6e0dba5f9a7c4cc81255fcb9fba7939a"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.10.3-no-git.patch b/dev-lang/scala/files/scala-2.10.3-no-git.patch
new file mode 100644
index 00000000000..8309cef7e3d
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.3-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.3-orig/tools/get-scala-commit-date 2013-09-23 23:00:37.000000000 +1000
++++ scala-2.10.3/tools/get-scala-commit-date 2014-02-09 14:14:29.132553839 +1100
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2013-09-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.3-orig/tools/get-scala-commit-sha 2013-09-23 23:00:37.000000000 +1000
++++ scala-2.10.3/tools/get-scala-commit-sha 2014-02-09 14:08:46.878352444 +1100
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="e2fec6b28dfd73482945ffab85d9b582d0cb9f17"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.10.4-no-git.patch b/dev-lang/scala/files/scala-2.10.4-no-git.patch
new file mode 100644
index 00000000000..2efc8119015
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.4-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.4-orig/tools/get-scala-commit-date 2014-02-10 04:00:20.000000000 +1100
++++ scala-2.10.4/tools/get-scala-commit-date 2014-07-05 18:19:38.054864707 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-02-10"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.4-orig/tools/get-scala-commit-sha 2014-02-10 04:00:20.000000000 +1100
++++ scala-2.10.4/tools/get-scala-commit-sha 2014-07-05 18:20:27.799470430 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="b66a39653b9bccab72036ba58fec5fd7d596d313"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.1-no-git.patch b/dev-lang/scala/files/scala-2.11.1-no-git.patch
new file mode 100644
index 00000000000..fbec47cd6c6
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.1-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.1-orig/tools/get-scala-commit-date 2014-05-19 21:01:18.000000000 +1000
++++ scala-2.11.1/tools/get-scala-commit-date 2014-07-06 16:47:04.772397561 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-05-19"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.1-orig/tools/get-scala-commit-sha 2014-05-19 21:01:18.000000000 +1000
++++ scala-2.11.1/tools/get-scala-commit-sha 2014-07-06 16:47:25.704741601 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1e1defd99c4b8874c517daf877b583a81e056c15"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.2-no-git.patch b/dev-lang/scala/files/scala-2.11.2-no-git.patch
new file mode 100644
index 00000000000..87dbb8e4c8e
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.2-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.2-orig/tools/get-scala-commit-date 2014-07-21 17:50:18.000000000 +1000
++++ scala-2.11.2/tools/get-scala-commit-date 2014-10-04 18:33:48.729779264 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-07-21"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.2-orig/tools/get-scala-commit-sha 2014-07-21 17:50:18.000000000 +1000
++++ scala-2.11.2/tools/get-scala-commit-sha 2014-10-04 18:34:32.541990564 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="73fb460c1cd20ee97556ec0867d17efaa795d129"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.4-no-git.patch b/dev-lang/scala/files/scala-2.11.4-no-git.patch
new file mode 100644
index 00000000000..275c140a2a1
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.4-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.4-orig/tools/get-scala-commit-date 2014-10-23 20:06:36.000000000 +1100
++++ scala-2.11.4/tools/get-scala-commit-date 2014-11-26 21:54:26.064081533 +1100
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-10-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.4-orig/tools/get-scala-commit-sha 2014-10-23 20:06:36.000000000 +1100
++++ scala-2.11.4/tools/get-scala-commit-sha 2014-11-26 21:55:12.248629566 +1100
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="d783face36a464498c4832acb059a61192dfb105"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.6-no-git.patch b/dev-lang/scala/files/scala-2.11.6-no-git.patch
new file mode 100644
index 00000000000..231632a3b17
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.6-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.6-orig/tools/get-scala-commit-date 2015-02-25 12:22:22.000000000 +1100
++++ scala-2.11.6/tools/get-scala-commit-date 2015-04-17 20:32:27.899791213 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2015-02-25"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.6-orig/tools/get-scala-commit-sha 2015-02-25 12:22:22.000000000 +1100
++++ scala-2.11.6/tools/get-scala-commit-sha 2015-04-17 20:32:03.655808474 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="092690e7bf71bb22e6e57afb7ea7f67fdfe31a0a"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.7-no-git.patch b/dev-lang/scala/files/scala-2.11.7-no-git.patch
new file mode 100644
index 00000000000..ea337b23849
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.7-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.7-orig/tools/get-scala-commit-date 2015-06-23 04:27:36.000000000 +1000
++++ scala-2.11.7/tools/get-scala-commit-date 2015-07-04 11:53:24.696520666 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2015-06-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.7-orig/tools/get-scala-commit-sha 2015-06-23 04:27:36.000000000 +1000
++++ scala-2.11.7/tools/get-scala-commit-sha 2015-07-04 11:51:15.598526730 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1fbce4612c21a4d0c553ea489b4765494828c09f"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.7.3-build.xml.patch b/dev-lang/scala/files/scala-2.7.3-build.xml.patch
new file mode 100644
index 00000000000..3401bac3b05
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.7.3-build.xml.patch
@@ -0,0 +1,10 @@
+--- build.xml.orig 2009-02-11 22:47:38.000000000 +1300
++++ build.xml 2009-02-11 22:47:58.000000000 +1300
+@@ -627,7 +627,6 @@
+ <!-- filemode / dirmode: see trac ticket #1294 -->
+ <zipfileset dirmode="755" filemode="644" src="${fjbg.jar}"/>
+ <zipfileset dirmode="755" filemode="644" src="${msil.jar}"/>
+- <zipfileset dirmode="755" filemode="644" src="${jline.jar}"/>
+ </jar>
+ </target>
+
diff --git a/dev-lang/scala/metadata.xml b/dev-lang/scala/metadata.xml
new file mode 100644
index 00000000000..a860186ee83
--- /dev/null
+++ b/dev-lang/scala/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+<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>
+</pkgmetadata>
diff --git a/dev-lang/scala/scala-2.10.2-r2.ebuild b/dev-lang/scala/scala-2.10.2-r2.ebuild
new file mode 100644
index 00000000000..4197a5957ad
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.2-r2.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+WANT_ANT_TASKS="ant-nodeps"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
+
+# in the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI.
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar \
+ ${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar \
+ ${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar \
+ ${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar \
+ ${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar \
+ ${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar \
+ ${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar \
+ ${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar \
+ ${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar \
+ ${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar \
+ ${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar \
+ ${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar \
+ ${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar \
+ ${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar \
+ ${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar \
+ ${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar \
+ ${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar \
+ ${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar \
+ ${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar \
+ ${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar \
+ ${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar \
+ ${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar \
+ ${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar \
+ ${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://dev.gentoo.org/~tomwij/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/bndlib:0
+ dev-java/hawtjni-runtime:0
+ dev-java/junit:4"
+
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.8.0
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ dev-java/ant-contrib:0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ if use binary ; then
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fi
+
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,bndlib,hawtjni-runtime,junit-4
+
+ if ! use binary; then
+ local j
+ for j in "${JURI[@]}"
+ do
+ cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${PN}-2.10.2-no-git.patch"
+ if has_version ">=virtual/jdk-1.7.0"; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ fi
+ # https://issues.scala-lang.org/browse/SI-7455
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing-SI-7455.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. comment out applying the maven-deps patch and all the stuff here up to and including the sed of build.xml
+ # 3. try emerge scala, it will likely download more stuff in src_compile to ${WORKDIR}/.m2
+ # 4. tar up the stuff in ${WORKDIR}/.m2 and change the ${P}-maven-deps.tar.gz in SRC_URI to point to it.
+ # 5. uncomment the maven-deps patch apply and all the stuff up to and including the sed of build.xml
+ # 6. the hash in ${P}-no-git.patch should be updated by searching for hash matching the scala release
+ # tag, so that the source code hyper-links in the scala documentation will point to the correct version of
+ # the source code.
+ # Bug 482192
+ epatch "${FILESDIR}/${PN}-2.10.2-maven-deps.patch"
+ # we have $(java-config -p bndlib) in portage, but not bnd.
+ local bnd_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/biz/aQute/bnd" -type f -name *.jar -print)
+ do
+ if [ -z "${bnd_classpath}" ]
+ then
+ bnd_classpath="${i}"
+ else
+ bnd_classpath="${bnd_classpath}:${i}"
+ fi
+ done
+ bnd_classpath="${bnd_classpath}:$(java-config -p bndlib)"
+
+ # pax runner appears to only be used in the tests
+ local paxrunner_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/org/ops4j/" -type f -name *.jar -print)
+ do
+ if [ -z "${paxrunner_classpath}" ]
+ then
+ paxrunner_classpath="${i}"
+ else
+ paxrunner_classpath="${paxrunner_classpath}:${i}"
+ fi
+ done
+ paxrunner_classpath="${paxrunner_classpath}:$(java-config -p junit-4)"
+
+ # DiffUtils does not appear to be in portage. It is placed in ${partest.extras.classpath} and
+ # copied to ${build-pack.dir}/lib in ${PN}-2.10.2-maven-deps.patch.
+ local diffutils_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/com/googlecode/java-diff-utils" -type f -name *.jar -print)
+ do
+ if [ -z "${diffutils_classpath}" ]
+ then
+ diffutils_classpath="${i}"
+ else
+ diffutils_classpath="${diffutils_classpath}:${i}"
+ fi
+ done
+
+ sed -e "s@BNDLIB_CLASSPATH@${bnd_classpath}@" \
+ -e "s@PAX_RUNNER_CLASSPATH@${paxrunner_classpath}@" \
+ -e "s@DIFFUTILS_CLASSPATH@${diffutils_classpath}@" \
+ -i "${S}/build.xml" \
+ || die "could not sed classpaths in build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ cd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ #docs and examples are not contained in the binary tgz anymore
+ if ! use binary; then
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools"
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+ fi
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+}
diff --git a/dev-lang/scala/scala-2.10.3-r1.ebuild b/dev-lang/scala/scala-2.10.3-r1.ebuild
new file mode 100644
index 00000000000..05b6e76d5ac
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.3-r1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ ${BURI}/8b6ba65c8146217333f0762087fe2340d572e832/docs/examples/plugintemplate/lib/scalatest.jar \
+ ${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar \
+ ${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar \
+ ${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar \
+ ${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar \
+ ${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar \
+ ${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar \
+ ${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar \
+ ${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar \
+ ${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar \
+ ${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar \
+ ${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar \
+ ${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar \
+ ${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar \
+ ${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar
+ ${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar \
+ ${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar \
+ ${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar \
+ ${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar \
+ ${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar \
+ ${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar \
+ ${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar \
+ ${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar \
+ ${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar \
+ ${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar \
+ ${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar \
+ ${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar \
+ ${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar \
+ ${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar \
+ ${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar \
+ ${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar \
+ ${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps-2.tar.gz
+)
+binary? ( http://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.8.0
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.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() {
+ if use binary ; then
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fi
+
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local j
+ for j in "${JURI[@]}"
+ do
+ cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ if java-pkg_is-vm-version-ge "1.7" ; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ sed -e "s@above is a message from the scala 2.10.2 release@above is a message from the scala ${PV} release@" \
+ -i "${S}/build.xml" \
+ || die "Could not correct scala version message"
+ fi
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+
+ # Remove this test as it fails.
+ # [partest] testing: [...]/files/run/parserJavaIdent.scala [FAILED]
+ rm -f test/files/run/parserJavaIdent.scala
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ cd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools"
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+}
diff --git a/dev-lang/scala/scala-2.10.4-r1.ebuild b/dev-lang/scala/scala-2.10.4-r1.ebuild
new file mode 100644
index 00000000000..7ccddd43066
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.4-r1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/README ${MY_P}/docs/TODO ${MY_P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar" \
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar" \
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar" \
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar" \
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar" \
+ "${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar -> ${P}-fjbg.jar" \
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar" \
+ "${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar -> ${P}-jline.jar" \
+ "${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar -> ${P}-msil.jar" \
+ "${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar -> ${P}-scala-compiler-src.jar" \
+ "${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar -> ${P}-scala-compiler.jar" \
+ "${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar -> ${P}-scala-library-src.jar" \
+ "${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar -> ${P}-scala-library.jar" \
+ "${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar -> ${P}-scala-reflect-src.jar" \
+ "${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar -> ${P}-scala-reflect.jar" \
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar" \
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar" \
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar" \
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar" \
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar" \
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar" \
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar" \
+ "${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar -> ${P}-scalacheck.jar" \
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar" \
+ "${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar" \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.8.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.8.0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ if java-pkg_is-vm-version-ge "1.7" ; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ sed -e "s@above is a message from the scala 2.10.2 release@above is a message from the scala ${PV} release@" \
+ -i "${S}/build.xml" \
+ || die "Could not correct scala version message"
+ fi
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ # Remove this test as it fails.
+ # [partest] testing: [...]/files/run/parserJavaIdent.scala [FAILED]
+ rm -f test/files/run/parserJavaIdent.scala
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ popd
+ local docdir="build/scaladoc"
+ dodoc docs/README docs/TODO
+ if use doc; then
+ dohtml -r "${docdir}"
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.1-r1.ebuild b/dev-lang/scala/scala-2.11.1-r1.ebuild
new file mode 100644
index 00000000000..282e5300765
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.1-r1.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.9.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.9.0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://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.2-r1.ebuild b/dev-lang/scala/scala-2.11.2-r1.ebuild
new file mode 100644
index 00000000000..3f422a2c8e7
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.2-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.9.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.9.0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://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 00000000000..08e0d73f5f7
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.4-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.9.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.9.0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://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.ebuild b/dev-lang/scala/scala-2.11.6.ebuild
new file mode 100644
index 00000000000..94faaba60d4
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.6.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.9.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.9.0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://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.ebuild b/dev-lang/scala/scala-2.11.7.ebuild
new file mode 100644
index 00000000000..525f54f7ca5
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.7.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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[@]}
+ http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( http://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}
+ java-virtuals/jdk-with-com-sun:0
+ !binary? (
+ >=virtual/jdk-1.6.0
+ <virtual/jdk-1.9.0
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.7.0
+ <virtual/jdk-1.9.0
+ )
+ 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="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the http://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.9.2-r1.ebuild b/dev-lang/scala/scala-2.9.2-r1.ebuild
new file mode 100644
index 00000000000..f40446158eb
--- /dev/null
+++ b/dev-lang/scala/scala-2.9.2-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+JAVA_PKG_IUSE="doc examples source"
+WANT_ANT_TASKS="ant-nodeps"
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary? ( ${HOMEPAGE}downloads/distrib/files/${MY_P}.tgz -> ${P}.tar.gz )
+ binary? ( http://dev.gentoo.org/~ali_bush/distfiles/${P}-gentoo-binary.tar.bz2 )"
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="binary emacs"
+# one fails with 1.7, two with 1.4 (blackdown)
+#RESTRICT="test"
+
+DEPEND="virtual/jdk:1.6
+ java-virtuals/jdk-with-com-sun
+ !binary? (
+ dev-java/ant-contrib:0
+ )
+ app-arch/xz-utils"
+RDEPEND=">=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin"
+
+PDEPEND="emacs? ( app-emacs/scala-mode )"
+
+S="${WORKDIR}/${P}-sources"
+
+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."
+
+ CHECKREQS_MEMORY="1532M"
+
+ check-reqs_pkg_setup
+ fi
+}
+
+java_prepare() {
+ if ! use binary; then
+ pushd lib &> /dev/null
+ # other jars are needed for bootstrap
+ #rm -v jline.jar ant/ant-contrib.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die
+ rm -v ant/ant-contrib.jar || die
+ java-pkg_jar-from --into ant --build-only ant-contrib
+ popd &> /dev/null
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ newlibs newforkjoin build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ eant test.suite || die "Some tests aren't passed"
+}
+
+#scala_launcher() {
+# local SCALADIR="${EPREFIX}/usr/share/${PN}"
+# local bcp="${EPREFIX}${SCALADIR}/lib/scala-library.jar"
+# java-pkg_dolauncher "${1}" --main "${2}" \
+# --java_args "-Xmx256M -Xms32M -Dscala.home=${SCALADIR} -Denv.emacs=${EMACS}"
+#}
+
+src_install() {
+ cd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ #docs and examples are not contained in the binary tgz anymore
+ if ! use binary; then
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO || die
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools" || die
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+ fi
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ #pushd "${ED}/usr/bin" &>/dev/null
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ #popd &>/dev/null
+ done
+ #scala_launcher fsc scala.tools.nsc.CompileClient
+ #scala_launcher scala scala.tools.nsc.MainGenericRunner
+ #scala_launcher scalac scala.tools.nsc.Main
+ #scala_launcher scaladoc scala.tools.nsc.ScalaDoc
+ #scala_launcher scalap scala.tools.scalap.Main
+}
diff --git a/dev-lang/smlnj/Manifest b/dev-lang/smlnj/Manifest
new file mode 100644
index 00000000000..7abd1cb8013
--- /dev/null
+++ b/dev-lang/smlnj/Manifest
@@ -0,0 +1,22 @@
+DIST smlnj-110.75-MLRISC.tgz 1422655 SHA256 4daf94fb6bc8ff836a677616fa3aa6d001ad42829af20e662cbed8720b3e7237 SHA512 d1c9bacc135836bc83e5a0f99585d2c8007ecb2eaa9217489c9d5b2a845f82a48f3666b72ae59a016dca3b66bd56c9739461376e2ac628d01646182990e93c84 WHIRLPOOL aa00c3a8729a7ffd3bc96578b7491aa22c2438939cd4443cefcc396501ebc4d5a63d7dc74224e572dd2b9daab5b4dd584773f8c33cac308090eada9c4b598877
+DIST smlnj-110.75-boot.ppc-unix.tgz 5772853 SHA256 06d04c97e15d3bc7e1ae4ea15182bec1748302600fc9c13b77538aed2ccf0006 SHA512 cf34f084a7bca7c1d5c21fa9f356be0224ec886512a44f3dfea0cb9e1af9954662ae6e602250e9c834ccc6e1d3556ff1839a28505776038183b7b77bdb9d6dc7 WHIRLPOOL f1b1aeb8ffaa74dbf01e077426f8874b4e81799685fbbe5eef82c80c882528f06bf5cd4942fd14bd16e8a60abf98593672e4c68497e6a6ca4552c3026fad4ef1
+DIST smlnj-110.75-boot.sparc-unix.tgz 5900426 SHA256 24d4cae7879e0a0f7f5412cd8728b31aaee034f04c551f6c82a830e989d53460 SHA512 19f26bb68d94f03dc5bde68b36c4d6efbe9efd25fe089b3ce16f2ff2baa499af79d18ce2d834900bcf3e709f64c00cdacca149d0cf264fe86c23f93fb94dc1fa WHIRLPOOL 4b49cf4c102e53be1704f1bc58dbe6f7ef3c69637bd0398bdf1355bb0b620b447f73ee4b325739dd16c3b644e292009b6c19cd584f3a2b24a21170412a3a47f5
+DIST smlnj-110.75-boot.x86-unix.tgz 5848139 SHA256 99f986c12474d663984156df9784b2bc8578ce89927fe5c8ba9e68ac09b4469d SHA512 9d482b6546792936345ba54616e74550feb34a8629c547bd095b7f3d70724d8f652118ed41436a3d2f6a1965a81ad59417ae0021b45bf2e52fc4f338a3f5f051 WHIRLPOOL 2853806c10bc4f095a3e5b9f67dfd3cfc2b6e9db43156278c788938af013248599f118c4259901c35a3718a6c7459e0386727cd41aa02abfb5b481924ccd190c
+DIST smlnj-110.75-ckit.tgz 194523 SHA256 b5849f96b3cde1d8d33ba94e41c9093fc2f9f35db3499086c69a8552630f9477 SHA512 79cfb8442e5a95418404b94b82981d93cbbac67d70712814a49a53ef97360b8c7ba6ec13ad79b84182d1c6ddb613848041836a947c1ab4a45d822cc7e94f8403 WHIRLPOOL 2f01dc5e57457bb920bf19339705b8a7318f7c51dbb0d39e2ae19c2ee6ec911054d4781d3ed5a49b851311afb042c993efc01cf805603390ca4af7860c85ae2a
+DIST smlnj-110.75-cm.tgz 200429 SHA256 4604fac13f3810673233ab7b31649035256f78d0ad86b6a6b43f37ffc5ddb12b SHA512 52b05e0497f8dafd415e42522a42bed5a96b9fbfce09430c914d987cf4983386a3a89f9a8aa9e67163af1428e387cd11f85207f2250083eaf3363e176921aff6 WHIRLPOOL b9fe64a2de84914ffda392251111a700851d757a67c032e86d1e9002f62f5d910cd1a0bc1004353080f228d55191daf3fb443fc7e8dd0a12e4e803c1b9d52751
+DIST smlnj-110.75-cml.tgz 105902 SHA256 0bb3ae6feda0f2b4dc86a3e386462319761733c71aeff36aadcd625790d562c6 SHA512 22237c41a41c5b006ce80d57ef759a5825bf6156296f8755352dcda95c4650e5efd87c554959554bd42673996438a448cb5fab614ccdc7d9e2798a846bfcc2e5 WHIRLPOOL 9782f8c3e263ae50be46fe4d9793084c3d410a9495bf397f643f562cca97fbe7549f9fd611d7687ca7322c21c75f3d7fab15e8dc60b6bccf44faab8b1173affd
+DIST smlnj-110.75-compiler.tgz 816964 SHA256 c72c25fa9f844e085448ef07ec5c7f44ebaec44a4ecfbafab38e64193b49bf21 SHA512 ccbbeb2a7e7107c1406a14125d89bec86ebcf8478e8d01f61f1fb6d77d58040c2e85ef620d438321a7a4595d7f3662a275809b93db15c1320a38597130f6d39a WHIRLPOOL 13b63c138ae12b039fb796e3ff4080f613d1b2e9583228532773c15e0edc56004d9fae7e760c67a52a5ed6c7d867aa0ec46df0dea686d126b944dc6cebf2b0b8
+DIST smlnj-110.75-config.tgz 511117 SHA256 3c452eadc0da4eda4f1de1fe5c842eb42b88e1ea1fefe3212f82827052cfe1b0 SHA512 e1d5d2e169dbe799a64d983359e52acf326fae4f18c7c2444d94d792bd383365ac6a0c382dac3ed94ccbb8f8b29ba785517a6f94ee5f733b9a06ef0da85537a3 WHIRLPOOL c702578aaef2a2641424cc11c375bb7d62d7bb879ea42a8f6e2d6a3251be40b23cf909aeccb84015cac17e578d2c38de95f958b4d30f0cfa190e4075df558ea8
+DIST smlnj-110.75-eXene.tgz 703097 SHA256 f7fe66c65fbf2c32ec4a13b8600a86d9c6aa0acbd937cd27668036d6bc146908 SHA512 091fa935d731c4a07934a09a5b28c99bb1f79407ceeb3f68b4dd8877d0b29042f56afaa4f0d5a048ce0f203d185972622fefcc701f8359677e28d06953a861e8 WHIRLPOOL 5b860590aae60e6ba2441a577ab8e248cdd727e7b8751a3d12f9cc5077409c504dbc67480491e30066aa145ce92935b821e4eb4031b196ee1c4f5d30a5296532
+DIST smlnj-110.75-heap2asm.tgz 1315 SHA256 bca547875d99ae601a141b08319f716205b096560a13b3b7ec4298b25c4a742d SHA512 d2578a32c99ce5e81904eff7203df9550c4539be43a0a3252109fb2adc4862864c70c37ba89b2ebe68fdb21171430b4d13e44fc4860639ef960e81f01ac3749a WHIRLPOOL 30e5d82df273001766c617b1876b4801e9bd681d802cee5bb14c5eaa6f702fe505521380868b91956d08191134e615bccc5199c2fcdfa3574c4b96bd00636637
+DIST smlnj-110.75-ml-burg.tgz 36339 SHA256 d65e37281de97d3501356e6f5e842e3b247fb1a2f5580cc419d44d4f3f060e5f SHA512 a38a73c76e9b482cbec396cd445c058ef0db5e732900ee0597e52fd3af97acac5b78629af1e8e038b9cb9a403beed7524345c5e38f4a49b7602d73daee8fea2d WHIRLPOOL b5362de4a2a8f72472d773d5d15b9725118ac5a4f6235d652d33b55aac0fe227d132974ba24eab1b5e9f025cf853820a7543a1e051a7223dae657b991b5cd3ee
+DIST smlnj-110.75-ml-lex.tgz 33154 SHA256 307628841271f942df4db0d782e164f25a9fb07ce12b2083e4d6eef898c07266 SHA512 2840117c2891d09acb762cd7f161a15cd9351478a007d08c8d1c2be1e828b1175fb31f427e0a6eeb96cbadf7b92da1dda23b3ff3a7123c1c800892157fd58fa6 WHIRLPOOL 1358132f0bac81400886fa988e3f479d3d33dc89954dadc6e209ad16a740917d91a367df3b163d74900bdcad2ea1759ee6167370ece0ccfc8b836581cffafb2a
+DIST smlnj-110.75-ml-lpt.tgz 256313 SHA256 2a8138c219dd5f42970c1a8ed9fb1e00dcf45d450c5f129bfb184819c36a2c06 SHA512 b36b8250862d0d9eb6e4576ab47e20b535095c8ab7c1cae913f7e8748f7677cf89dce0061fabe56dbda0df3ae0311970adbb0bd96630aa638ea5652277d978b6 WHIRLPOOL 741372a65ac3ba42df836ab975dc087a8838e48c403eaeb5bd0a9576ff37d9ff0027205d74494fc0b032bdd1b8f8e3be0a94a14026b5cdea46a52fa63b84976f
+DIST smlnj-110.75-ml-yacc.tgz 99940 SHA256 bd9b35557c520af1251a19b096ec0106bc6c03b7ebab2cf1391649c5c6b222f3 SHA512 930dc545e49769a3d153753e19da1352fafea621f17d86881d5454d2d27f601e517fec09bd49ec732db4d311621e6cf8c26f714b095b9e07147bbe3b6ec885c2 WHIRLPOOL 410c0195b16584ebc113bf554bf4b6da7f4d2fdda0c1d19805b006e18d85ede572f0bd4e1dbbf4622d157915cadb0d69d7bb0aa5ca4718be196ecc53a8283606
+DIST smlnj-110.75-nlffi.tgz 74481 SHA256 0daea7803edb7e836d45676d00e8c2cef1439daff89eaccda608144d23ad82d6 SHA512 bfaa0e4ddc43d3695ef2be5cc74218435f6004b99a07ec585ec65158eaeb22ac7309ee9d584e880048655eb7110866ec25055fcc196b5d904510cf0c4c498eb5 WHIRLPOOL 0d6eddab0ee64aeb81143cc17c6f12df7e63af8548a62339960035fcc500d25b33c181e0c58817e04de5bc0be099bb13314daa5463957101b9ba87ff5101ad1d
+DIST smlnj-110.75-pgraph.tgz 5439 SHA256 71ccfbc78227dbc9ddac08bdc6c3bf01c7e1139ee84706a0e8572a0653c8b80f SHA512 cf8de19c5d3f258cc6fa145d837bf8e307e04577ab45e20861f53fc47612c2238cc5c1964ad3f1697dceb1d56b84c1d0d1e9ecd5da8dfb7ad24b1946b82691e8 WHIRLPOOL caef565f6abf5506f2ac2a660843e1b698294d8b96e855177992a1b69d89bfcf40e0c426e7dcf5fa7d8ba1e9a6524405b2cd813881f8bb554e619608986cd24c
+DIST smlnj-110.75-runtime.tgz 324054 SHA256 30fe442f42414908df3377a06c8e79af569ea13a43c9a7d3bbf052debbdec412 SHA512 65b05ceb31d719874c5b06ebaf4179c1e1b12da648635332eb4bdd5ffc5af86a00f7e8c45062d9f03e9a445f9eefe741c92f7ca207beecf31733a3a849902aaa WHIRLPOOL 27a0f5c318a4bcfd5514a711f2fcc17258514c8f4ec5b429273f13ea0bfbf8de304a15be6de6a91a7f33d923f86aeeb2a906ea0816e7f1a70d1f650164471541
+DIST smlnj-110.75-smlnj-c.tgz 10531 SHA256 a8645509f80fad32fa3e50cc26015b179952ba63d72a89c1f280a464a6585d76 SHA512 ada4f0055f4f3f49c05ad4b55edfbda6cc7534491c1d304d7f51977170a3f68f367e1cba6a75d145b2ba497ca25bbb793c84f0bc7eeea0ad9657eecd72f85b87 WHIRLPOOL 5fe6d0d9c6378377968f82650f2ccf3aaba4f1c88b4718256b03dcae622adf3bb74356975271ab7450d3d888cb734d3eee047abf33f5b6740d847f4cc32b1d03
+DIST smlnj-110.75-smlnj-lib.tgz 396628 SHA256 2f8196ce2f7509c0ac0a0a69107c1d681554d1c58ba1bee92ef833816341caed SHA512 47d20c09fbd0a6e59db429e02b55b6307f5c61a9166bfc839261a21267da6e4ca0f99aa1080b2a8556a6046818177ad61b854a2dac0248b17a2ef79eac4ad35d WHIRLPOOL 9236dad0c616d2f680d0fd8efdf7d1aafb4a69afa26a676f0d90680b7dae1c5099313873e1e44546493090d8f3a99db01d7d22847ea8be046f7f891a35a6db5c
+DIST smlnj-110.75-system.tgz 227376 SHA256 973f5ebd3b9823365b9dadbf370c0aa131df94d4d80ada660bb05a3010776a2e SHA512 ee6a941f269d51bdd48328c35ae642d6b5f35ef7e9516fef58fad7f6ac3b4a527678265eb7a8a9783eb5e483713fbade17cd6e204234fb9419ad430e42a536a4 WHIRLPOOL a8000d6f22a539922033e740f262b8bb0832d25fd1ba204aed53f4d979d7a2193a7b49b73187c9e4621407d43dd9aeec680b1c57780279fab81549dba29db8f1
+DIST smlnj-110.75-trace-debug-profile.tgz 3902 SHA256 e04a6740166d7f2da41923400fae3b9661d1e52dce4f64efff3a3780c9a6a43c SHA512 b2eed46e58f7b2dd6857debea4ae329dcc79946bd59a63747746d916b2dc29866d3e23a3accd678a981f2ebed0924d1fe1d03744000e877313abc33b144ec694 WHIRLPOOL a4d357c718259d076cad19174d2b4e5ae5949fe47314dca261cf16c5c37c788b5ab43c6f75ca2e37ada45ac67ac0d13df86a2c4cf2a1a4ad046912b0dc22d1c5
diff --git a/dev-lang/smlnj/metadata.xml b/dev-lang/smlnj/metadata.xml
new file mode 100644
index 00000000000..2193d772e35
--- /dev/null
+++ b/dev-lang/smlnj/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ml</herd>
+</pkgmetadata>
diff --git a/dev-lang/smlnj/smlnj-110.75.ebuild b/dev-lang/smlnj/smlnj-110.75.ebuild
new file mode 100644
index 00000000000..109471074c0
--- /dev/null
+++ b/dev-lang/smlnj/smlnj-110.75.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Standard ML of New Jersey compiler and libraries"
+HOMEPAGE="http://www.smlnj.org"
+
+BASE_URI="http://smlnj.cs.uchicago.edu/dist/working/${PV}"
+
+FILES="
+config.tgz
+
+cm.tgz
+compiler.tgz
+runtime.tgz
+system.tgz
+MLRISC.tgz
+smlnj-lib.tgz
+
+ckit.tgz
+nlffi.tgz
+
+cml.tgz
+eXene.tgz
+
+ml-lex.tgz
+ml-yacc.tgz
+ml-burg.tgz
+ml-lpt.tgz
+
+pgraph.tgz
+trace-debug-profile.tgz
+
+heap2asm.tgz
+
+smlnj-c.tgz
+"
+
+#use amd64 in 32-bit mode
+SRC_URI="amd64? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )
+ ppc? ( ${BASE_URI}/boot.ppc-unix.tgz -> ${P}-boot.ppc-unix.tgz )
+ sparc? ( ${BASE_URI}/boot.sparc-unix.tgz -> ${P}-boot.sparc-unix.tgz )
+ x86? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )"
+
+for file in ${FILES}; do
+ SRC_URI+=" ${BASE_URI}/${file} -> ${P}-${file} "
+done
+
+LICENSE="BSD"
+SLOT="0"
+
+#sparc support should be there but is untested
+KEYWORDS="-* ~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ mkdir -p "${S}"
+ for file in ${A}; do
+ [[ ${file} != ${P}-config.tgz ]] && cp "${DISTDIR}/${file}" "${S}/${file#${P}-}"
+ done
+
+# make sure we don't use the internet to download anything
+ unpack ${P}-config.tgz && rm config/*.bat
+ echo SRCARCHIVEURL=\"file:/${S}\" > "${S}"/config/srcarchiveurl
+}
+
+DIR=/usr
+
+src_prepare() {
+ # respect CC et al. (bug 243886)
+ mkdir base || die # without this unpacking runtime will fail
+ ./config/unpack "${S}" runtime || die
+ for file in mk.*; do
+ sed -e "/^AS/s:as:$(tc-getAS):" \
+ -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^CPP/s:gcc:$(tc-getCC):" \
+ -e "/^CFLAGS/{s:-O[0123s]:: ; s:=:= ${CFLAGS}:}" \
+ -i base/runtime/objs/${file}
+ done
+
+# # stash bin and lib somewhere (bug 248162)
+# sed -e "/@BINDIR@/s:\$BINDIR:${DIR}:" \
+# -e "/@LIBDIR@/s:\$LIBDIR:${DIR}/lib:" \
+# -i config/install.sh || die
+}
+
+src_compile() {
+ SMLNJ_HOME="${S}" ./config/install.sh || die "compilation failed"
+}
+
+src_install() {
+ mkdir -p "${D}"/${DIR} || die
+ mv bin lib "${D}"/${DIR} || die
+
+# for file in "${D}"/${DIR}/bin/*; do
+# dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
+# done
+
+# for file in $(find "${D}"/usr/lib/${PN}/bin/ -maxdepth 1 -type f ! -name ".*"); do
+# dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
+# done
+
+ for file in "${D}"/usr/bin/{*,.*}; do
+ [[ -f ${file} ]] && sed "2iSMLNJ_HOME=/usr" -i ${file}
+# [[ -f ${file} ]] && sed "s:${WORKDIR}:/usr:" -i ${file}
+ done
+}
diff --git a/dev-lang/snobol/Manifest b/dev-lang/snobol/Manifest
new file mode 100644
index 00000000000..87e5d125d54
--- /dev/null
+++ b/dev-lang/snobol/Manifest
@@ -0,0 +1,4 @@
+DIST snobol-0.99.4.tar.gz 388020 SHA256 f5ca03e4d2fe276d470c38bb6e75815949ff53853a3ee084c1b5e8b0090ec0df SHA512 4333c83302363ed47dd98318add93b584b67b8b38bdf01f9dd38981b7711978b5dbec71e9e4aa964e82a35700a927650d3abd3e3074651ab02a7021973af1a6c WHIRLPOOL 7b7722502b8040f0f0fb463e5458fbb5b6a7f402ed8e9935d7efcf16626a8ed39d771a77ec4f6a9d183fe2ed752f75c533006560c9b962ae10d3a6806fc7083e
+DIST snobol4-0.99.44.tar.gz 528205 SHA256 1018d8a7776b072972c0021ba7472baff632b63d8d535243c7cb277f89930d5c SHA512 46ffd03e4f392c7e7cb2a532b0ab6536750c57c78284bb02fa15a0a3a0166adb60779e068c3baf542d81cb01b7cd881d952ad4ecb9cf50a9c109e3b68e292720 WHIRLPOOL e48f35881e3e08effdd95a2e22974b68507cef0066bacb252c7787cecf4337c60fd330eb586ecdeaea33cf8e1034647e1ee5859812525f2e4a66ad77b19a539f
+DIST snobol4-1.1.tar.gz 677333 SHA256 53503e412953ddf31149cd36aa3cd7ce164c2a149e33309fe7c583be54c791ae SHA512 ae8482bc64f3d9020dc4d7e390296114e7498ef2764ebb69b6c4960d0c1b01daf4d77dff1aa583231a7f50d4c54f7f72cedc3e4744b03f4b2370fa6de837a3cc WHIRLPOOL 40730f2f8ec30a617636ad515f0f71b93638fa0bb9c3367ea562c8a74f37b411d7e7a865fbb7ce6b322c036d9d712e73bd609747e0524e6191b0cddfa453bbc9
+DIST snobol4-1.4.1.tar.gz 736837 SHA256 af346b9b8087ecc5432bc6d83c62b61a02e38ebd07d3b6f9477e1c0aef598d04 SHA512 5413af10018141e93f05c9ea637711bb3981f2b67557691d05dde8911178d90900f0fdef6c1d2416ebdda6afeeabd21b9e371b6711b2d093df629cc865fc61f9 WHIRLPOOL 9a82de95afff23d762e722220c0761694e2b807d1cb1564a075df955bfe2bbb049ea857d980ab0343284f15594ad9fde02b08e10fcd68fbaa024eeb786a5f5dc
diff --git a/dev-lang/snobol/metadata.xml b/dev-lang/snobol/metadata.xml
new file mode 100644
index 00000000000..a732fd8b2f0
--- /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>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/snobol/snobol-0.99.4.ebuild b/dev-lang/snobol/snobol-0.99.4.ebuild
new file mode 100644
index 00000000000..bd609a2cddb
--- /dev/null
+++ b/dev-lang/snobol/snobol-0.99.4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+SRC_URI="mirror://snobol4/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc
+ sys-devel/m4"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ sed '/autoconf/s:autoconf:./autoconf:g' -i ${S}/configure
+ echo "OPT=${CFLAGS}" >${S}/local-config
+ echo "ADD_CPPFLAGS(-DUSE_STDARG_H)" >>${S}/local-config
+ echo "BINDEST=/usr/bin/snobol4" >>${S}/local-config
+ echo "MANDEST=/usr/share/man/man4/snobol4.1" >>${S}/local-config
+ echo "SNOLIB_DIR=/usr/lib/snobol4" >>${S}/local-config
+}
+
+src_compile() {
+ # WARNING
+ # The configure script is NOT what you expect
+ emake || die "emake failed"
+ emake doc/snobol4.1 || die "emake doc/snobol4.1 failed"
+}
+
+src_install() {
+ into /usr
+ newbin xsnobol4 snobol4
+ dodir /usr/lib/snobol4
+ insinto /usr/lib/snobol4
+ doins snolib.a snolib/bq.sno
+
+ doman doc/*.1
+ dohtml doc/*.html
+ rm doc/*.html
+ dodoc doc/*.ps doc/*.doc
+}
diff --git a/dev-lang/snobol/snobol-0.99.44.ebuild b/dev-lang/snobol/snobol-0.99.44.ebuild
new file mode 100644
index 00000000000..4e28249804b
--- /dev/null
+++ b/dev-lang/snobol/snobol-0.99.44.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+#SRC_URI="mirror://snobol4/${P}.tar.gz"
+MY_PN="snobol4"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="ftp://ftp.snobol4.org/snobol4/beta/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc
+ sys-devel/m4"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ sed '/autoconf/s:autoconf:./autoconf:g' -i ${S}/configure
+ echo "ADD_OPT([${CFLAGS}])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >>${S}/local-config
+ echo "BINDEST=/usr/bin/snobol4" >>${S}/local-config
+ echo "MANDEST=/usr/share/man/man4/snobol4.1" >>${S}/local-config
+ echo "SNOLIB_DIR=/usr/lib/snobol4" >>${S}/local-config
+}
+
+src_compile() {
+ # WARNING
+ # The configure script is NOT what you expect
+ emake || die "emake failed"
+ emake doc/snobol4.1 || die "emake doc/snobol4.1 failed"
+}
+
+src_install() {
+ into /usr
+ newbin xsnobol4 snobol4
+ dodir /usr/lib/snobol4
+ insinto /usr/lib/snobol4
+ doins snolib.a snolib/bq.sno
+
+ doman doc/*.1
+ dohtml doc/*.html
+ rm doc/*.html
+ dodoc doc/*.ps doc/*.doc doc/*.txt doc/*.pdf
+}
diff --git a/dev-lang/snobol/snobol-1.1.ebuild b/dev-lang/snobol/snobol-1.1.ebuild
new file mode 100644
index 00000000000..10c1c87dfc0
--- /dev/null
+++ b/dev-lang/snobol/snobol-1.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..01314ec1659
--- /dev/null
+++ b/dev-lang/snobol/snobol-1.4.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
new file mode 100644
index 00000000000..bd16fe6e9ab
--- /dev/null
+++ b/dev-lang/spidermonkey/Manifest
@@ -0,0 +1,5 @@
+DIST firefox-3.6.15.source.tar.bz2 51552828 SHA256 405aa411a8ddb456017564522cbb486850e34fe14485b1c31fa93fc5c750870f SHA512 82bf0a6c6cb30fc0b18b067ac3d9cb7e48a0fd0126edd851e628d49e429aea33500a5a5eba87bce922e51b1b7410ccccfe4f8b7ce5573bdbd718c76da7acb1da WHIRLPOOL b788d7ba2cfcaec4f317e615878401a7a1fb985aaa43829831c17b699812e59adb7874247114e0143da63198118cab059796fc5d5fd08d72ccc54b4fef279f85
+DIST js-1.7.0.tar.gz 1165607 SHA256 44363f0f3895800ee6010763eae90c0d15ed28e07d783bc7b3c607ce98d8668b SHA512 9d9fbd9c1dae969ca19ddb0f977ac56f3e0479ec393b859de252fcdd8b7fc325e80399073540884ed365ce56a3219be34c0db9300d5e50f32969660c90527e51 WHIRLPOOL 8044b306b3a1f0abed5ac8a6bf4f9ed70e1ebc6f83f44934a6306d9ed68cd73124f82e40430d764f158377031f5ee986595e58fdb52259ab6a3a8674eaf4eed1
+DIST js185-1.0.0.tar.gz 6164605 SHA256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 WHIRLPOOL 58b372713275874d3ae3c6b58c12c56bf8d17d024d591e321538bcdd8e615332e41655954368ce86b90e970209e3fd650c39d931000880f5ec22cb044b5d7a4e
+DIST mozjs-24.2.0.tar.bz2 15624530 SHA256 e62f3f331ddd90df1e238c09d61a505c516fe9fd8c5c95336611d191d18437d8 SHA512 49805e256f6fa797505c01b7596d5bb941ed7a2454862c52ed42ad48b5ae4540b777e77ed8da1b98c89f8622ed2c76052187983687008a4ff53594addb328df4 WHIRLPOOL ea74d19c79b1a0fe407e2803900c49c23e8b76444fb4e20995072c3c59427e8df1895df04f2f4de779a1c58cd1166dd97aeaf7564350832011efe89dbcf9583e
+DIST mozjs17.0.0.tar.gz 6778934 SHA256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4 WHIRLPOOL 4df7b51577787194065162b09d2c3dda849c13fa901305f9925d4ca5d38bb7f8e2daa943099e003fb9d11f9264ae2d77ccf04e5eea11e3ddcb624b504b99d52f
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch b/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch
new file mode 100644
index 00000000000..a5c4b47db52
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch
@@ -0,0 +1,138 @@
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -127,7 +127,7 @@ endif
+ ifdef JS_READLINE
+ # For those platforms with the readline library installed.
+ DEFINES += -DEDITLINE
+-PROG_LIBS += -lreadline -ltermcap
++PROG_LIBS += -lreadline
+ else
+ ifdef JS_EDITLINE
+ # Use the editline library, built locally.
+@@ -370,3 +370,16 @@ TARFILES = files `cat files`
+ SUFFIXES: .i
+ %.i: %.c
+ $(CC) -C -E $(CFLAGS) $< > $*.i
++
++DESTDIR :=
++PREFIX := /usr
++BINDIR := $(PREFIX)/bin
++MY_LIBDIR := $(PREFIX)/$(LIBDIR)
++INCLUDEDIR := $(PREFIX)/include/js
++INSTALL := install -g 0 -o root
++install:
++ $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(MY_LIBDIR) $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++ $(INSTALL) -m 755 $(OBJDIR)/js $(OBJDIR)/jscpucfg $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 644 $(HFILES) $(DESTDIR)$(INCLUDEDIR)
+--- js/src/config/Linux_All.mk
++++ js/src/config/Linux_All.mk
+@@ -41,37 +41,15 @@
+ # Config for all versions of Linux
+ #
+
+-CC = gcc
+-CCC = g++
+ CFLAGS += -Wall -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
+
+ RANLIB = echo
+-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
++MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -soname $(notdir $@)
+
+ #.c.o:
+ # $(CC) -c -MD $*.d $(CFLAGS) $<
+
+-CPU_ARCH = $(shell uname -m)
+-# don't filter in x86-64 architecture
+-ifneq (x86_64,$(CPU_ARCH))
+-ifeq (86,$(findstring 86,$(CPU_ARCH)))
+-CPU_ARCH = x86
+-OS_CFLAGS+= -DX86_LINUX
+-
+-ifeq (gcc, $(CC))
+-# if using gcc on x86, check version for opt bug
+-# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892)
+-GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }')
+-GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) )
+-
+-ifeq (2.91.66, $(firstword $(GCC_LIST)))
+-CFLAGS+= -DGCC_OPT_BUG
+-endif
+-endif
+-endif
+-endif
+-
+ GFX_ARCH = x
+
+ OS_LIBS = -lm -lc
+@@ -88,16 +66,6 @@
+ endif
+
+ # Use the editline library to provide line-editing support.
+-JS_EDITLINE = 1
++JS_READLINE = 1
+
+-ifeq ($(CPU_ARCH),x86_64)
+-# Use VA_COPY() standard macro on x86-64
+-# FIXME: better use it everywhere
+ OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy
+-endif
+-
+-ifeq ($(CPU_ARCH),x86_64)
+-# We need PIC code for shared libraries
+-# FIXME: better patch rules.mk & fdlibm/Makefile*
+-OS_CFLAGS += -DPIC -fPIC
+-endif
+--- js/src/rules.mk
++++ js/src/rules.mk
+@@ -82,6 +82,10 @@ $(OBJDIR)/%.o: %.c
+ @$(MAKE_OBJDIR)
+ $(CC) -o $@ -c $(CFLAGS) $*.c
+
++$(OBJDIR)/%.lo: %.c
++ @$(MAKE_OBJDIR)
++ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
++
+ $(OBJDIR)/%.o: %.s
+ @$(MAKE_OBJDIR)
+ $(AS) -o $@ $(ASFLAGS) $*.s
+@@ -111,11 +115,12 @@ $(SHARED_LIBRARY): $(LIB_OBJS)
+ /implib:"$(OBJDIR)/$(@F:.dll=.lib)" $^
+ else
+ $(LIBRARY): $(LIB_OBJS)
+- $(AR) rv $@ $?
++ $(AR) cr $@ $?
+ $(RANLIB) $@
+
+-$(SHARED_LIBRARY): $(LIB_OBJS)
+- $(MKSHLIB) -o $@ $(LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
++SHARED_LIB_OBJS := $(LIB_OBJS:.o=.lo)
++$(SHARED_LIBRARY): $(SHARED_LIB_OBJS)
++ $(MKSHLIB) -o $@ $(SHARED_LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
+ endif
+ endif
+
+--- js/src/fdlibm/Makefile.ref
++++ js/src/fdlibm/Makefile.ref
+@@ -151,7 +151,7 @@
+
+ $(OBJDIR)/%.o: %.c
+ @$(MAKE_OBJDIR)
+- $(CC) -o $@ -c $(CFLAGS) $*.c
++ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
+
+ $(OBJDIR)/%.o: %.s
+ @$(MAKE_OBJDIR)
+--- js/src/config.mk
++++ js/src/config.mk
+@@ -112,6 +112,8 @@
+ CP = cp
+ endif
+
++BUILD_OPT := 1
++
+ ifdef BUILD_OPT
+ OPTIMIZER = -O
+ DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch b/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch
new file mode 100644
index 00000000000..df4cf7d5074
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch
@@ -0,0 +1,13 @@
+Index: src/Makefile.ref
+===================================================================
+--- src.orig/Makefile.ref
++++ src/Makefile.ref
+@@ -185,6 +185,8 @@ JS_HFILES = \
+ jsstr.h \
+ jsxdrapi.h \
+ jsxml.h \
++ jsutil.h \
++ jsprf.h \
+ $(NULL)
+
+ API_HFILES = \
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
new file mode 100644
index 00000000000..4ddc3461ea1
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
@@ -0,0 +1,42 @@
+Respect LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=331129
+
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -87,7 +87,7 @@
+ LDFLAGS = $(XLDFLAGS)
+
+ ifndef NO_LIBM
+-LDFLAGS += -lm
++OTHER_LIBS += -lm
+ endif
+
+ # Prevent floating point errors caused by VC++ optimizations
+@@ -325,7 +325,7 @@
+ $(CC) -o $@ -c $(CFLAGS) $<
+
+ $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
+- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
++ $(CC) $(HOST_LDFLAGS) -o $@ $(CFLAGS) $(OTHER_LIBS) $^
+
+ endif
+
+@@ -338,7 +338,7 @@
+ link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
+ else
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
+- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
++ $(CC) $(HOST_LDFLAGS) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(OTHER_LIBS) \
+ $(PROG_LIBS)
+ endif
+
+@@ -355,7 +355,7 @@
+ $(OBJDIR)/jscpucfg > $@
+
+ $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
+- $(CC) -o $@ $(OBJDIR)/jscpucfg.o
++ $(CC) $(HOST_LDFLAGS) -o $@ $(OBJDIR)/jscpucfg.o
+
+ # Add to TARGETS for clobber rule
+ TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff
new file mode 100644
index 00000000000..8728811fbfc
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff
@@ -0,0 +1,18 @@
+Index: src/Makefile.ref
+===================================================================
+--- src.orig/Makefile.ref
++++ src/Makefile.ref
+@@ -63,11 +63,11 @@ INCLUDES += -I$(OBJDIR)
+
+ ifdef JS_THREADSAFE
+ DEFINES += -DJS_THREADSAFE
+-INCLUDES += -I$(DIST)/include/nspr
++INCLUDES += -I/usr/include/nspr
+ ifdef USE_MSVC
+ OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib
+ else
+-OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX)
++OTHER_LIBS += -L/usr/$(LIBDIR)/nspr -lnspr$(NSPR_LIBSUFFIX)
+ endif
+ endif
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch
new file mode 100644
index 00000000000..106ec144f89
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch
@@ -0,0 +1,102 @@
+--- a/js-1.8.5/js/src/configure.in 2011-03-31 15:08:36.000000000 -0400
++++ b/js-1.8.5/js/src/configure.in 2012-11-02 15:32:38.000000000 -0400
+@@ -3550,7 +3550,7 @@
+ _SAVE_CFLAGS="$CFLAGS"
+ if test "$GNU_CC"; then
+ # gcc needs -mfpu=neon to recognize NEON instructions
+- CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
++ CFLAGS="$CFLAGS -mfpu=neon"
+ fi
+ AC_TRY_COMPILE([],
+ [asm("vadd.i8 d0, d0, d0");],
+@@ -4654,12 +4654,6 @@
+ dnl ========================================================
+ MOZ_ARG_HEADER(Individual module options)
+
+-dnl Setup default CPU arch for arm target
+-case "$target_cpu" in
+- arm*)
+- MOZ_ARM_ARCH=armv7
+- ;;
+-esac
+ dnl ========================================================
+ dnl = Enable building the Thumb2 instruction set
+ dnl ========================================================
+@@ -4668,66 +4662,35 @@
+ MOZ_THUMB2=1,
+ MOZ_THUMB2=)
+ if test -n "$MOZ_THUMB2"; then
+- MOZ_ARM_ARCH=armv7
++ AC_MSG_WARN([thumb2 enabled instead of autodetected -- hope you know what you are doing])
++else
++ AC_MSG_CHECKING([for thumb2 support in arm architecture])
++ AC_LANG_SAVE
++ AC_LANG_C
++ AC_TRY_LINK([int ac_test(int i) { return i; }],[asm(".syntax unified\n.thumb\nb.w ac_test\n.arm"); if (ac_test(1)) return 1;],
++ [MOZ_THUMB2=1
++ AC_MSG_RESULT([yes])],
++ [MOZ_THUMB2=
++ AC_MSG_RESULT([no])])
++ AC_LANG_RESTORE
+ fi
+
+ dnl ========================================================
+ dnl = Enable building for ARM specific CPU features
+ dnl ========================================================
+-MOZ_ARG_WITH_STRING(cpu-arch,
+-[ --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7],
+- MOZ_ARM_ARCH=$withval)
+-
+ if test -n "$MOZ_THUMB2"; then
+ case "$target_cpu" in
+ arm*)
+- if test "$MOZ_ARM_ARCH" != "armv7"; then
+- AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
+- fi
+ if test "$GNU_CC"; then
+ AC_DEFINE(MOZ_THUMB2)
+- AC_DEFINE(MOZ_ARM_ARCH)
+- CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+ else
+ AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
+ fi
+ ;;
+- *)
+- AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
+- ;;
+- esac
+-elif test "$MOZ_ARM_ARCH" = "armv7"; then
+- case "$target_cpu" in
+- arm*)
+- if test "$GNU_CC"; then
+- AC_DEFINE(MOZ_ARM_ARCH)
+- CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- else
+- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
+- fi
+- ;;
+- *)
+- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
+- ;;
+- esac
+-else
+- case "$target_cpu" in
+- arm*)
+- if test "$GNU_CC"; then
+- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- fi
+- ;;
+ esac
+ fi
+
+ AC_SUBST(MOZ_THUMB2)
+-AC_SUBST(MOZ_ARM_ARCH)
+
+ dnl ========================================================
+ dnl =
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-3.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-3.patch
new file mode 100644
index 00000000000..ed497ceebb0
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-3.patch
@@ -0,0 +1,99 @@
+--- a/js-1.8.5/js/src/configure.in 2011-03-31 15:08:36.000000000 -0400
++++ b/js-1.8.5/js/src/configure.in 2012-11-02 15:32:38.000000000 -0400
+@@ -3550,7 +3550,7 @@
+ _SAVE_CFLAGS="$CFLAGS"
+ if test "$GNU_CC"; then
+ # gcc needs -mfpu=neon to recognize NEON instructions
+- CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
++ CFLAGS="$CFLAGS -mfpu=neon"
+ fi
+ AC_TRY_COMPILE([],
+ [asm("vadd.i8 d0, d0, d0");],
+@@ -4654,12 +4654,6 @@
+ dnl ========================================================
+ MOZ_ARG_HEADER(Individual module options)
+
+-dnl Setup default CPU arch for arm target
+-case "$target_cpu" in
+- arm*)
+- MOZ_ARM_ARCH=armv7
+- ;;
+-esac
+ dnl ========================================================
+ dnl = Enable building the Thumb2 instruction set
+ dnl ========================================================
+@@ -4668,66 +4662,32 @@
+ MOZ_THUMB2=1,
+ MOZ_THUMB2=)
+ if test -n "$MOZ_THUMB2"; then
+- MOZ_ARM_ARCH=armv7
++ AC_MSG_WARN([thumb2 enabled instead of autodetected -- hope you know what you are doing])
++else
++ AC_MSG_CHECKING([whether to build for thumb2])
++ AC_TRY_COMPILE([],[return sizeof(__thumb2__);],
++ [MOZ_THUMB2=1
++ AC_MSG_RESULT([yes])],
++ [MOZ_THUMB2=
++ AC_MSG_RESULT([no])])
+ fi
+
+ dnl ========================================================
+ dnl = Enable building for ARM specific CPU features
+ dnl ========================================================
+-MOZ_ARG_WITH_STRING(cpu-arch,
+-[ --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7],
+- MOZ_ARM_ARCH=$withval)
+-
+ if test -n "$MOZ_THUMB2"; then
+ case "$target_cpu" in
+ arm*)
+- if test "$MOZ_ARM_ARCH" != "armv7"; then
+- AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
+- fi
+ if test "$GNU_CC"; then
+ AC_DEFINE(MOZ_THUMB2)
+- AC_DEFINE(MOZ_ARM_ARCH)
+- CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+ else
+ AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
+ fi
+ ;;
+- *)
+- AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
+- ;;
+- esac
+-elif test "$MOZ_ARM_ARCH" = "armv7"; then
+- case "$target_cpu" in
+- arm*)
+- if test "$GNU_CC"; then
+- AC_DEFINE(MOZ_ARM_ARCH)
+- CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
+- else
+- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
+- fi
+- ;;
+- *)
+- AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
+- ;;
+- esac
+-else
+- case "$target_cpu" in
+- arm*)
+- if test "$GNU_CC"; then
+- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
+- fi
+- ;;
+ esac
+ fi
+
+ AC_SUBST(MOZ_THUMB2)
+-AC_SUBST(MOZ_ARM_ARCH)
+
+ dnl ========================================================
+ dnl =
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-install-symlinks.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-install-symlinks.patch
new file mode 100644
index 00000000000..c867e45ee4f
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-install-symlinks.patch
@@ -0,0 +1,15 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c43
+
+--- js/src/Makefile.in
++++ js/src/Makefile.in
+@@ -888,8 +888,8 @@
+ ifeq (,$(HOST_BIN_SUFFIX))
+ mv -f $(SHLIB_ANY_VER) $(SHLIB_EXACT_VER)
+ @[ ! -h $(SHLIB_ABI_VER) ] || rm -f $(SHLIB_ABI_VER)
+- ln -s $(SHLIB_EXACT_VER) $(SHLIB_ABI_VER)
+- ln -s $(SHLIB_ABI_VER) $(SHLIB_ANY_VER)
++ ln -s $(notdir $(SHLIB_EXACT_VER)) $(SHLIB_ABI_VER)
++ ln -s $(notdir $(SHLIB_ABI_VER)) $(SHLIB_ANY_VER)
+ endif
+ endif
+ ifneq (,$(IMPORT_LIBRARY))
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-ppc64.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-ppc64.patch
new file mode 100644
index 00000000000..3927c871793
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-fix-ppc64.patch
@@ -0,0 +1,61 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1303461188 -7200
+# Node ID 59771590e9203d48ef8cbcd7eaf2f8ae45dbb1c1
+# Parent c4b82ec27d6d6e1c02ef0abb3b6e805bfdd092ec
+Bug 638056 - Avoid "The cacheFlush support is missing on this platform" error on exotic platforms. r=cdleary
+
+diff --git a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -383,17 +383,17 @@ CPPSRCS += checks.cc \
+ platform.cc \
+ utils.cc \
+ $(NONE)
+
+ #
+ # END enclude sources for V8 dtoa
+ #############################################
+
+-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU)))
++ifeq (,$(filter arm% %86 x86_64,$(TARGET_CPU)))
+
+ VPATH += $(srcdir)/assembler \
+ $(srcdir)/assembler/wtf \
+ $(srcdir)/yarr/pcre \
+ $(NULL)
+
+ CPPSRCS += pcre_compile.cpp \
+ pcre_exec.cpp \
+
+# HG changeset patch
+# User Luke Wagner <lw@mozilla.com>
+# Date 1299520258 28800
+# Node ID 68203913d04cf5be53fd16278816183d5670ba5c
+# Parent 27e5814815491ebb68e474e453aff6c2ea908c43
+Bug 618485 - Add missing 64-bit big-endian jsval_layout field (r=luke)
+
+diff --git a/js/src/jsval.h b/js/src/jsval.h
+--- a/js/src/jsval.h
++++ b/js/src/jsval.h
+@@ -342,16 +342,17 @@ typedef union jsval_layout
+ JSValueTag tag : 17;
+ uint64 payload47 : 47;
+ } debugView;
+ struct {
+ union {
+ int32 i32;
+ uint32 u32;
+ JSWhyMagic why;
++ jsuword word;
+ } payload;
+ } s;
+ double asDouble;
+ void *asPtr;
+ } jsval_layout;
+ # endif /* JS_BITS_PER_WORD */
+ #endif /* defined(IS_LITTLE_ENDIAN) */
+
+
+
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-fix.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-fix.patch
new file mode 100644
index 00000000000..bebe5587180
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-fix.patch
@@ -0,0 +1,53 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=589735
+
+--- a/js/src/jsgcchunk.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsgcchunk.cpp 2012-11-02 10:36:08.324453878 +0100
+@@ -318,15 +318,48 @@
+ static void *
+ MapPages(void *addr, size_t size)
+ {
++#if defined(__ia64__)
++ /*
++ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
++ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
++ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
++ * or the nearest available memory above that address, providing a near-guarantee
++ * that those bits are clear. If they are not, we return NULL below to indicate
++ * out-of-memory.
++ *
++ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
++ * address space.
++ *
++ * See Bug 589735 for more information.
++ */
++#endif
++
+ /*
+ * We don't use MAP_FIXED here, because it can cause the *replacement*
+ * of existing mappings, and we only want to create new mappings.
+ */
++#if defined(__ia64__)
++ void *p = mmap(addr ? addr : (void*)0x0000070000000000,
++ size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
++ -1, 0);
++#else
+ void *p = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
+ -1, 0);
++#endif
+ if (p == MAP_FAILED)
+ return NULL;
++#if defined(__ia64__)
++ /*
++ * If the caller requested a specific memory location, verify that's what mmap returned.
++ * Otherwise: If the allocated memory doesn't have its upper 17 bits clear, consider it
++ * as out of memory.
++ */
++ if (addr && p != addr
++ || !addr && ((long long)p & 0xffff800000000000)) {
++#else
++ /* If the caller requested a specific memory location, verify that's what mmap returned. */
+ if (addr && p != addr) {
++#endif
+ /* We succeeded in mapping memory, but not in the right place. */
+ JS_ALWAYS_TRUE(munmap(p, size) == 0);
+ return NULL;
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-static-strings.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-static-strings.patch
new file mode 100644
index 00000000000..5cfed32ae68
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-ia64-static-strings.patch
@@ -0,0 +1,381 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=589735
+
+--- a/js/src/jsatom.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsatom.cpp 2012-11-02 10:43:16.970562590 +0100
+@@ -603,11 +603,13 @@
+ JSString str, *str2;
+ JSAtomState *state;
+
++#ifdef JS_HAS_STATIC_STRINGS
+ if (length == 1) {
+ jschar c = *chars;
+ if (c < UNIT_STRING_LIMIT)
+ return STRING_TO_ATOM(JSString::unitString(c));
+ }
++#endif
+
+ str.initFlatNotTerminated((jschar *)chars, length);
+ state = &cx->runtime->atomState;
+--- a/js/src/jsiter.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsiter.cpp 2012-11-02 10:43:16.974562590 +0100
+@@ -1002,9 +1002,12 @@
+
+ JSString *str;
+ jsint i;
++#ifdef JS_HAS_STATIC_STRINGS
+ if (rval->isInt32() && (jsuint(i = rval->toInt32()) < INT_STRING_LIMIT)) {
+ str = JSString::intString(i);
+- } else {
++ } else
++#endif
++ {
+ str = js_ValueToString(cx, *rval);
+ if (!str)
+ return false;
+--- a/js/src/jsnum.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsnum.cpp 2012-11-02 10:43:16.982562589 +0100
+@@ -605,8 +605,10 @@
+ {
+ uint32 ui;
+ if (si >= 0) {
++#ifdef JS_HAS_STATIC_STRINGS
+ if (si < INT_STRING_LIMIT)
+ return JSString::intString(si);
++#endif
+ ui = si;
+ } else {
+ ui = uint32(-si);
+@@ -1169,6 +1171,7 @@
+
+ int32_t i;
+ if (JSDOUBLE_IS_INT32(d, &i)) {
++#ifdef JS_HAS_STATIC_STRINGS
+ if (base == 10 && jsuint(i) < INT_STRING_LIMIT)
+ return JSString::intString(i);
+ if (jsuint(i) < jsuint(base)) {
+@@ -1176,6 +1179,7 @@
+ return JSString::intString(i);
+ return JSString::unitString(jschar('a' + i - 10));
+ }
++#endif
+
+ if (JSString *str = c->dtoaCache.lookup(base, d))
+ return str;
+--- a/js/src/jsstr.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsstr.cpp 2012-11-02 10:43:16.990562588 +0100
+@@ -3121,6 +3121,8 @@
+ JS_FS_END
+ };
+
++#ifdef JS_HAS_STATIC_STRINGS
++
+ /*
+ * Set up some tools to make it easier to generate large tables. After constant
+ * folding, for each n, Rn(0) is the comma-separated list R(0), R(1), ..., R(2^n-1).
+@@ -3291,6 +3293,8 @@
+ #undef R3
+ #undef R7
+
++#endif /* defined(JS_HAS_STATIC_STRINGS) */
++
+ JSBool
+ js_String(JSContext *cx, uintN argc, Value *vp)
+ {
+@@ -3331,6 +3335,7 @@
+ uint16_t code;
+ if (!ValueToUint16(cx, argv[0], &code))
+ return JS_FALSE;
++#ifdef JS_HAS_STATIC_STRINGS
+ if (code < UNIT_STRING_LIMIT) {
+ str = JSString::unitString(code);
+ if (!str)
+@@ -3338,6 +3343,7 @@
+ vp->setString(str);
+ return JS_TRUE;
+ }
++#endif
+ argv[0].setInt32(code);
+ }
+ chars = (jschar *) cx->malloc((argc + 1) * sizeof(jschar));
+@@ -3367,8 +3373,10 @@
+ {
+ JS_ASSERT(JS_ON_TRACE(cx));
+ jschar c = (jschar)i;
++#ifdef JS_HAS_STATIC_STRINGS
+ if (c < UNIT_STRING_LIMIT)
+ return JSString::unitString(c);
++#endif
+ return js_NewStringCopyN(cx, &c, 1);
+ }
+ #endif
+--- a/js/src/jsstr.h 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsstr.h 2012-11-02 10:43:16.998562587 +0100
+@@ -57,6 +57,15 @@
+ #include "jsvalue.h"
+ #include "jscell.h"
+
++#if !defined(__ia64__)
++/*
++ * Don't use static strings on ia64 since the compiler may put the static
++ * memory out of the acceptable 47-bit jsval pointer range.
++ */
++# define JS_HAS_STATIC_STRINGS
++#endif
++
++#ifdef JS_HAS_STATIC_STRINGS
+ enum {
+ UNIT_STRING_LIMIT = 256U,
+ SMALL_CHAR_LIMIT = 128U, /* Bigger chars cannot be in a length-2 string. */
+@@ -64,6 +73,7 @@
+ INT_STRING_LIMIT = 256U,
+ NUM_HUNDRED_STRINGS = 156U
+ };
++#endif
+
+ extern jschar *
+ js_GetDependentStringChars(JSString *str);
+@@ -380,10 +390,15 @@
+ typedef uint8 SmallChar;
+
+ static inline bool fitsInSmallChar(jschar c) {
++#ifdef JS_HAS_STATIC_STRINGS
+ return c < SMALL_CHAR_LIMIT && toSmallChar[c] != INVALID_SMALL_CHAR;
++#else
++ return false;
++#endif
+ }
+
+ static inline bool isUnitString(void *ptr) {
++#ifdef JS_HAS_STATIC_STRINGS
+ jsuword delta = reinterpret_cast<jsuword>(ptr) -
+ reinterpret_cast<jsuword>(unitStringTable);
+ if (delta >= UNIT_STRING_LIMIT * sizeof(JSString))
+@@ -392,9 +407,13 @@
+ /* If ptr points inside the static array, it must be well-aligned. */
+ JS_ASSERT(delta % sizeof(JSString) == 0);
+ return true;
++#else
++ return false;
++#endif
+ }
+
+ static inline bool isLength2String(void *ptr) {
++#ifdef JS_HAS_STATIC_STRINGS
+ jsuword delta = reinterpret_cast<jsuword>(ptr) -
+ reinterpret_cast<jsuword>(length2StringTable);
+ if (delta >= NUM_SMALL_CHARS * NUM_SMALL_CHARS * sizeof(JSString))
+@@ -403,9 +422,13 @@
+ /* If ptr points inside the static array, it must be well-aligned. */
+ JS_ASSERT(delta % sizeof(JSString) == 0);
+ return true;
++#else
++ return false;
++#endif
+ }
+
+ static inline bool isHundredString(void *ptr) {
++#ifdef JS_HAS_STATIC_STRINGS
+ jsuword delta = reinterpret_cast<jsuword>(ptr) -
+ reinterpret_cast<jsuword>(hundredStringTable);
+ if (delta >= NUM_HUNDRED_STRINGS * sizeof(JSString))
+@@ -414,6 +437,9 @@
+ /* If ptr points inside the static array, it must be well-aligned. */
+ JS_ASSERT(delta % sizeof(JSString) == 0);
+ return true;
++#else
++ return false;
++#endif
+ }
+
+ static inline bool isStatic(void *ptr) {
+@@ -424,6 +450,7 @@
+ #pragma align 8 (__1cIJSStringPunitStringTable_, __1cIJSStringSlength2StringTable_, __1cIJSStringShundredStringTable_)
+ #endif
+
++#ifdef JS_HAS_STATIC_STRINGS
+ static const SmallChar INVALID_SMALL_CHAR = -1;
+
+ static const jschar fromSmallChar[];
+@@ -436,6 +463,7 @@
+ * strings, we keep a table to map from integer to the correct string.
+ */
+ static const JSString *const intStringTable[];
++#endif
+
+ static JSFlatString *unitString(jschar c);
+ static JSLinearString *getUnitString(JSContext *cx, JSString *str, size_t index);
+--- a/js/src/jsstrinlines.h 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jsstrinlines.h 2012-11-02 10:43:17.010562586 +0100
+@@ -215,52 +215,75 @@
+ inline JSFlatString *
+ JSString::unitString(jschar c)
+ {
++#ifdef JS_HAS_STATIC_STRINGS
+ JS_ASSERT(c < UNIT_STRING_LIMIT);
+ return const_cast<JSString *>(&unitStringTable[c])->assertIsFlat();
++#else
++ JS_NOT_REACHED("no static strings");
++ return NULL;
++#endif
+ }
+
+ inline JSLinearString *
+ JSString::getUnitString(JSContext *cx, JSString *str, size_t index)
+ {
+ JS_ASSERT(index < str->length());
++#ifdef JS_HAS_STATIC_STRINGS
+ const jschar *chars = str->getChars(cx);
+ if (!chars)
+ return NULL;
+ jschar c = chars[index];
+ if (c < UNIT_STRING_LIMIT)
+ return unitString(c);
++#endif
+ return js_NewDependentString(cx, str, index, 1);
+ }
+
+ inline JSFlatString *
+ JSString::length2String(jschar c1, jschar c2)
+ {
++#ifdef JS_HAS_STATIC_STRINGS
+ JS_ASSERT(fitsInSmallChar(c1));
+ JS_ASSERT(fitsInSmallChar(c2));
+ return const_cast<JSString *> (
+ &length2StringTable[(((size_t)toSmallChar[c1]) << 6) + toSmallChar[c2]]
+ )->assertIsFlat();
++#else
++ JS_NOT_REACHED("no static strings");
++ return NULL;
++#endif
+ }
+
+ inline JSFlatString *
+ JSString::length2String(uint32 i)
+ {
++#ifdef JS_HAS_STATIC_STRINGS
+ JS_ASSERT(i < 100);
+ return length2String('0' + i / 10, '0' + i % 10);
++#else
++ JS_NOT_REACHED("no static strings");
++ return NULL;
++#endif
+ }
+
+ inline JSFlatString *
+ JSString::intString(jsint i)
+ {
++#ifdef JS_HAS_STATIC_STRINGS
+ jsuint u = jsuint(i);
+ JS_ASSERT(u < INT_STRING_LIMIT);
+ return const_cast<JSString *>(JSString::intStringTable[u])->assertIsFlat();
++#else
++ JS_NOT_REACHED("no static strings");
++ return NULL;
++#endif
+ }
+
+ /* Get a static atomized string for chars if possible. */
+ inline JSFlatString *
+ JSString::lookupStaticString(const jschar *chars, size_t length)
+ {
++#ifdef JS_HAS_STATIC_STRINGS
+ if (length == 1) {
+ if (chars[0] < UNIT_STRING_LIMIT)
+ return unitString(chars[0]);
+@@ -290,6 +313,7 @@
+ return intString(i);
+ }
+ }
++#endif
+
+ return NULL;
+ }
+--- a/js/src/jstracer.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jstracer.cpp 2012-11-02 10:43:17.022562584 +0100
+@@ -11505,6 +11505,7 @@
+ }
+ if (vp[1].isString()) {
+ JSString *str = vp[1].toString();
++#ifdef JS_HAS_STATIC_STRINGS
+ if (native == js_str_charAt) {
+ jsdouble i = vp[2].toNumber();
+ if (JSDOUBLE_IS_NaN(i))
+@@ -11518,7 +11519,9 @@
+ set(&vp[0], char_ins);
+ pendingSpecializedNative = IGNORE_NATIVE_CALL_COMPLETE_CALLBACK;
+ return RECORD_CONTINUE;
+- } else if (native == js_str_charCodeAt) {
++ } else
++#endif
++ if (native == js_str_charCodeAt) {
+ jsdouble i = vp[2].toNumber();
+ if (JSDOUBLE_IS_NaN(i))
+ i = 0;
+@@ -12967,6 +12970,7 @@
+ JS_STATIC_ASSERT(sizeof(JSString) == 16 || sizeof(JSString) == 32);
+
+
++#ifdef JS_HAS_STATIC_STRINGS
+ JS_REQUIRES_STACK LIns*
+ TraceRecorder::getUnitString(LIns* str_ins, LIns* idx_ins)
+ {
+@@ -13010,6 +13014,7 @@
+ }
+ return RECORD_CONTINUE;
+ }
++#endif
+
+ // Typed array tracing depends on EXPANDED_LOADSTORE and F2I
+ #if NJ_EXPANDED_LOADSTORE_SUPPORTED && NJ_F2I_SUPPORTED
+@@ -13044,6 +13049,7 @@
+ LIns* obj_ins = get(&lval);
+ LIns* idx_ins = get(&idx);
+
++#ifdef JS_HAS_STATIC_STRINGS
+ // Special case for array-like access of strings.
+ if (lval.isString() && hasInt32Repr(idx)) {
+ if (call)
+@@ -13056,6 +13062,7 @@
+ set(&lval, char_ins);
+ return ARECORD_CONTINUE;
+ }
++#endif
+
+ if (lval.isPrimitive())
+ RETURN_STOP_A("JSOP_GETLEM on a primitive");
+--- a/js/src/jstracer.h 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/jstracer.h 2012-11-02 10:43:17.034562582 +0100
+@@ -1394,10 +1394,12 @@
+ JS_REQUIRES_STACK RecordingStatus getCharCodeAt(JSString *str,
+ nanojit::LIns* str_ins, nanojit::LIns* idx_ins,
+ nanojit::LIns** out_ins);
++#ifdef JS_HAS_STATIC_STRINGS
+ JS_REQUIRES_STACK nanojit::LIns* getUnitString(nanojit::LIns* str_ins, nanojit::LIns* idx_ins);
+ JS_REQUIRES_STACK RecordingStatus getCharAt(JSString *str,
+ nanojit::LIns* str_ins, nanojit::LIns* idx_ins,
+ JSOp mode, nanojit::LIns** out_ins);
++#endif
+
+ JS_REQUIRES_STACK RecordingStatus initOrSetPropertyByName(nanojit::LIns* obj_ins,
+ Value* idvalp, Value* rvalp,
+--- a/js/src/tracejit/Writer.cpp 2011-03-31 21:08:36.000000000 +0200
++++ b/js/src/tracejit/Writer.cpp 2012-11-02 10:43:17.038562582 +0100
+@@ -246,7 +246,9 @@
+ // ins = andq ins_oprnd1, ins_oprnd2
+ ret = true;
+ #endif
+- } else if (ins->isop(LIR_addp) &&
++ }
++#ifdef JS_HAS_STATIC_STRINGS
++ else if (ins->isop(LIR_addp) &&
+ ((ins->oprnd1()->isImmP() &&
+ (void *)ins->oprnd1()->immP() == JSString::unitStringTable) ||
+ (ins->oprnd2()->isImmP() &&
+@@ -258,6 +260,7 @@
+ // ins = addp JSString::unitStringTable, ...
+ ret = true;
+ }
++#endif
+
+ return ret;
+ }
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-isfinite.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-isfinite.patch
new file mode 100644
index 00000000000..edf4d01e64b
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-isfinite.patch
@@ -0,0 +1,11 @@
+--- js/src/jsnum.h 2011-03-03 05:43:06.000000000 -0500
++++ js/src/jsnum.h.new 2012-08-16 14:58:04.000000000 -0400
+@@ -97,6 +97,8 @@
+ {
+ #ifdef WIN32
+ return _finite(d);
++#elif defined(__UCLIBC__)
++ return isfinite(d);
+ #else
+ return finite(d);
+ #endif
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch
new file mode 100644
index 00000000000..66475b6c34c
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-perf_event-check.patch
@@ -0,0 +1,21 @@
+--- a/js/src/configure.in 2012-11-01 19:42:20.130330321 +0100
++++ b/js/src/configure.in 2012-11-01 20:34:03.561351492 +0100
+@@ -3477,7 +3477,16 @@
+ esac
+
+ dnl Performance measurement headers.
+-AC_CHECK_HEADER(linux/perf_event.h, HAVE_LINUX_PERF_EVENT_H=1)
++AC_CHECK_HEADER(linux/perf_event.h,
++ [AC_CACHE_CHECK(for perf_event_open system call,ac_cv_perf_event_open,
++ [AC_TRY_COMPILE([#include <sys/syscall.h>],[return sizeof(__NR_perf_event_open);],
++ ac_cv_perf_event_open=yes,
++ ac_cv_perf_event_open=no)])])
++if test "$ac_cv_perf_event_open" = "yes"; then
++ HAVE_LINUX_PERF_EVENT_H=1
++else
++ HAVE_LINUX_PERF_EVENT_H=
++fi
+ AC_SUBST(HAVE_LINUX_PERF_EVENT_H)
+
+ dnl Checks for libraries.
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.5-symbol-versions.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-symbol-versions.patch
new file mode 100644
index 00000000000..460394d33f1
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.5-symbol-versions.patch
@@ -0,0 +1,32 @@
+diff -Naur js/src/configure.in js.new/src/configure.in
+--- a/js/src/symverscript.in 2012-11-07 09:36:16.000000000 -0500
++++ b/js/src/symverscript.in 2012-11-07 09:37:05.000000000 -0500
+@@ -0,0 +1,4 @@
++mozjs185 {
++ global: *;
++};
++
+diff -Naur js/src/Makefile.in js.new/src/Makefile.in
+--- a/js/src/Makefile.in 2012-11-07 09:36:16.000000000 -0500
++++ b/js/src/Makefile.in 2012-11-07 09:37:09.000000000 -0500
+@@ -837,7 +837,10 @@
+ mozjs185.pc \
+ $(NULL)
+
+-GARBAGE += $(pkg_config_files)
++symverscript: symverscript.in
++ cat $< > $@
++
++GARBAGE += $(pkg_config_files) symverscript
+
+ %.pc: $(srcdir)/%.pc.in Makefile
+ cat $< | sed \
+@@ -872,6 +875,8 @@
+ SHLIB_ABI_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_ABI_VERSION)
+ SHLIB_EXACT_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_VERSION)
+ $(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-soname,$(notdir $(SHLIB_ABI_VER))
++$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
++$(SHARED_LIBRARY): symverscript
+ endif
+ endif
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.7-filter_desc.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-filter_desc.patch
new file mode 100644
index 00000000000..65d0a2df8ba
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-filter_desc.patch
@@ -0,0 +1,18 @@
+--- a/js/src/Makefile.in 2012-06-18 13:53:41.000000000 -0400
++++ b/js/src/Makefile.in 2012-06-18 13:55:44.000000000 -0400
+@@ -965,10 +965,10 @@
+ endif
+ endif
+
+-install:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
+-ifneq (,$(LIBRARY))
+- $(SYSINSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
+- mv -f $(DESTDIR)$(libdir)/$(LIBRARY) $(subst $(STATIC_LIBRARY_NAME),mozjs187-$(SRCREL_ABI_VERSION),$(DESTDIR)$(libdir)/$(LIBRARY))
++install:: $(filter-out %.$(LIBS_DESC_SUFFIX),$(LIBRARY)) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
++ifneq (,$(filter-out %.$(LIBS_DESC_SUFFIX),$(LIBRARY)))
++ $(SYSINSTALL) $(filter-out %.$(LIBS_DESC_SUFFIX),$(LIBRARY)) $(DESTDIR)$(libdir)
++ mv -f $(DESTDIR)$(libdir)/$(filter-out %.$(LIBS_DESC_SUFFIX),$(LIBRARY)) $(subst $(STATIC_LIBRARY_NAME),mozjs187-$(SRCREL_ABI_VERSION),$(DESTDIR)$(libdir)/$(filter-out %.$(LIBS_DESC_SUFFIX),$(LIBRARY)))
+ endif
+ ifneq (,$(SHARED_LIBRARY))
+ ifeq (,$(HOST_BIN_SUFFIX))
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.7-freebsd-pthreads.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-freebsd-pthreads.patch
new file mode 100644
index 00000000000..4324df0d609
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-freebsd-pthreads.patch
@@ -0,0 +1,11 @@
+--- a/js/src/config/system-headers
++++ b/js/src/config/system-headers
+@@ -595,6 +595,7 @@ proto/exec.h
+ psap.h
+ Pt.h
+ pthread.h
++pthread_np.h
+ pwd.h
+ Python.h
+ QDOffscreen.h
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.7-symbol-versions.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-symbol-versions.patch
new file mode 100644
index 00000000000..3945172688d
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-symbol-versions.patch
@@ -0,0 +1,32 @@
+diff -Naur js/src/configure.in js.new/src/configure.in
+--- a/js/src/symverscript.in 2012-11-07 09:36:16.000000000 -0500
++++ b/js/src/symverscript.in 2012-11-07 09:37:05.000000000 -0500
+@@ -0,0 +1,4 @@
++mozjs187 {
++ global: *;
++};
++
+diff -Naur js/src/Makefile.in js.new/src/Makefile.in
+--- a/js/src/Makefile.in 2012-11-07 09:36:16.000000000 -0500
++++ b/js/src/Makefile.in 2012-11-07 09:37:09.000000000 -0500
+@@ -837,7 +837,10 @@
+ mozjs185.pc \
+ $(NULL)
+
+-GARBAGE += $(pkg_config_files)
++symverscript: symverscript.in
++ cat $< > $@
++
++GARBAGE += $(pkg_config_files) symverscript
+
+ %.pc: $(srcdir)/%.pc.in Makefile
+ cat $< | sed \
+@@ -872,6 +875,8 @@
+ SHLIB_ABI_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_ABI_VERSION)
+ SHLIB_EXACT_VER := $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).$(SRCREL_VERSION)
+ $(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-soname,$(notdir $(SHLIB_ABI_VER))
++$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
++$(SHARED_LIBRARY): symverscript
+ endif
+ endif
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch
new file mode 100644
index 00000000000..f14a269ee3f
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.8.7-x32.patch
@@ -0,0 +1,25 @@
+--- a/js/src/jslock.cpp 2012-04-06 16:24:51.000000000 -0500
++++ b/js/src/jslock.cpp 2012-06-21 20:57:00.877937542 -0500
+@@ -150,17 +150,22 @@
+
+ static JS_ALWAYS_INLINE int
+ NativeCompareAndSwap(volatile jsword *w, jsword ov, jsword nv)
+ {
+ unsigned int res;
+
+ __asm__ __volatile__ (
+ "lock\n"
++/* GCC's x32 abi support */
++#if defined(__LP64__)
+ "cmpxchgq %2, (%1)\n"
++#else
++ "cmpxchg %2, (%1)\n"
++#endif
+ "sete %%al\n"
+ "movzbl %%al, %%eax\n"
+ : "=a" (res)
+ : "r" (w), "r" (nv), "a" (ov)
+ : "cc", "memory");
+ return (int)res;
+ }
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.9.2.13-as-needed.patch b/dev-lang/spidermonkey/files/spidermonkey-1.9.2.13-as-needed.patch
new file mode 100644
index 00000000000..847bf792c5b
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.9.2.13-as-needed.patch
@@ -0,0 +1,22 @@
+diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in
+--- a/js/src/jsapi-tests/Makefile.in
++++ b/js/src/jsapi-tests/Makefile.in
+@@ -55,17 +55,17 @@ CPPSRCS = \
+ testSameValue.cpp \
+ testDebugger.cpp \
+ testDefineGetterSetterNonEnumerable.cpp \
+ testExtendedEq.cpp \
+ $(NULL)
+
+ DEFINES += -DEXPORT_JS_API
+
+-LIBS = $(NSPR_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX)
++LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS)
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
+ ifdef _MSC_VER
+ ifdef WINCE
+ WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
+ endif
+ endif
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch b/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch
new file mode 100644
index 00000000000..7adbd118d40
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17-ia64-mmap.patch
@@ -0,0 +1,67 @@
+--- a/js/src/gc/Memory.cpp 2013-02-11 17:33:22.000000000 -0500
++++ b/js/src/gc/Memory.cpp 2014-01-08 12:36:29.406851422 -0500
+@@ -302,10 +302,46 @@
+ void
+ InitMemorySubsystem()
+ {
++#if !defined(__ia64__)
+ if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
+ MOZ_CRASH();
++#endif
+ }
+
++static inline void *
++MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
++{
++#if defined(__ia64__)
++ /*
++ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
++ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
++ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
++ * or the nearest available memory above that address, providing a near-guarantee
++ * that those bits are clear. If they are not, we return NULL below to indicate
++ * out-of-memory.
++ *
++ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
++ * address space.
++ *
++ * See Bug 589735 for more information.
++ */
++ void *region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
++ if (region == MAP_FAILED)
++ return MAP_FAILED;
++ /*
++ * If the allocated memory doesn't have its upper 17 bits clear, consider it
++ * as out of memory.
++ */
++ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
++ JS_ALWAYS_TRUE(0 == munmap(region, length));
++ return MAP_FAILED;
++ }
++ return region;
++#else
++ return mmap(NULL, length, prot, flags, fd, offset);
++#endif
++}
++
+ void *
+ MapAlignedPages(size_t size, size_t alignment)
+ {
+@@ -319,12 +353,15 @@
+
+ /* Special case: If we want page alignment, no further work is needed. */
+ if (alignment == PageSize) {
+- return mmap(NULL, size, prot, flags, -1, 0);
++ void *region = MapMemory(size, prot, flags, -1, 0);
++ if (region == MAP_FAILED)
++ return NULL;
++ return region;
+ }
+
+ /* Overallocate and unmap the region's edges. */
+ size_t reqSize = Min(size + 2 * alignment, 2 * size);
+- void *region = mmap(NULL, reqSize, prot, flags, -1, 0);
++ void *region = MapMemory(reqSize, prot, flags, -1, 0);
+ if (region == MAP_FAILED)
+ return NULL;
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17-js-config-shebang.patch b/dev-lang/spidermonkey/files/spidermonkey-17-js-config-shebang.patch
new file mode 100644
index 00000000000..ec77b236828
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17-js-config-shebang.patch
@@ -0,0 +1,22 @@
+--- a/js/src/js-config.in 2013-03-25 16:34:20.000000000 -0400
++++ b/js/src/js-config.in 2013-08-09 22:15:29.000901763 -0400
+@@ -2,7 +2,7 @@
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+-#filter substitution
++%filter substitution
+
+ prefix='@prefix@'
+ mozilla_version='@MOZILLA_VERSION@'
+--- a/js/src/Makefile.in 2013-03-25 16:34:20.000000000 -0400
++++ b/js/src/Makefile.in 2013-08-09 22:17:20.211903793 -0400
+@@ -778,7 +778,7 @@
+
+ $(JS_CONFIG_NAME): js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk $(topsrcdir)/config/rules.mk
+ $(RM) $@.tmp
+- $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@.tmp \
++ $(PYTHON) $(topsrcdir)/config/Preprocessor.py --marker="%" $(JS_CONFIG_SUBSTITUTIONS) $< > $@.tmp \
+ && mv $@.tmp $@ && chmod +x $@
+
+ SCRIPTS = $(JS_CONFIG_NAME)
diff --git a/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch
new file mode 100644
index 00000000000..f4eee930542
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-17.0.0-fix-file-permissions.patch
@@ -0,0 +1,37 @@
+diff -urN a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in 2013-03-25 15:34:20.000000000 -0500
++++ b/js/src/Makefile.in 2014-03-08 08:26:36.726979744 -0600
+@@ -788,7 +788,7 @@
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@
+
+ install:: $(LIBRARY_NAME).pc
+- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(libdir)/pkgconfig
+
+ ######################################################
+ # BEGIN SpiderMonkey header installation
+@@ -836,19 +836,19 @@
+ #
+
+ install:: $(INSTALLED_HEADERS)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)
+
+ install:: $(EXPORTS_ds)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/ds
+
+ install:: $(EXPORTS_gc)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/gc
+
+ install:: $(EXPORTS_js)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/js
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/js
+
+ install:: $(EXPORTS_mozilla)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(MODULE)/mozilla
+
+ #
+ # END SpiderMonkey header installation
diff --git a/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch
new file mode 100644
index 00000000000..59ba0c958ea
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-24-system-icu.patch
@@ -0,0 +1,199 @@
+diff --git a/js/src/Makefile.in b/js/src/Makefile.in
+index 4944d31..4176e14 100644
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -237,12 +237,17 @@ endif
+ # ICU headers need to be available whether we build with the complete
+ # Internationalization API or not - ICU stubs rely on them.
+
++ifdef MOZ_NATIVE_ICU
++LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
++else
+ LOCAL_INCLUDES += \
+ -I$(topsrcdir)/../../intl/icu/source/common \
+ -I$(topsrcdir)/../../intl/icu/source/i18n \
+ $(NULL)
++endif
+
+ ifdef ENABLE_INTL_API
++ifndef MOZ_NATIVE_ICU
+
+ ifeq ($(OS_ARCH),WINNT)
+ # Parallel gmake is buggy on Windows
+@@ -271,6 +276,7 @@ distclean clean::
+ $(call SUBMAKE,$@,intl/icu)
+
+ endif
++endif
+
+ #
+ # END ECMAScript Internationalization API
+@@ -403,7 +409,11 @@ ifneq (,$(MOZ_ZLIB_LIBS)$(MOZ_GLUE_LDFLAGS))
+ DEFINES += -DUSE_ZLIB
+ endif
+
+-SHARED_LIBRARY_LIBS += $(ICU_LIBS)
++ifdef MOZ_NATIVE_ICU
++EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
++else
++SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS)
++endif
+
+ # Prevent floating point errors caused by VC++ optimizations
+ ifdef _MSC_VER
+diff --git a/js/src/config/Makefile.in b/js/src/config/Makefile.in
+index 5f60d15..e1fe1f8 100644
+--- a/js/src/config/Makefile.in
++++ b/js/src/config/Makefile.in
+@@ -59,6 +59,7 @@ export:: \
+ $(call mkdir_deps,system_wrappers_js) \
+ $(NULL)
+ $(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \
++ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+ $(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js
+ $(INSTALL) system_wrappers_js $(DIST)
+
+diff --git a/js/src/config/system-headers b/js/src/config/system-headers
+index b52aed6..1ca7420 100644
+--- a/js/src/config/system-headers
++++ b/js/src/config/system-headers
+@@ -1132,3 +1132,14 @@ kvm.h
+ spawn.h
+ err.h
+ xlocale.h
++#if MOZ_NATIVE_ICU==1
++unicode/locid.h
++unicode/numsys.h
++unicode/ucal.h
++unicode/ucol.h
++unicode/udat.h
++unicode/udatpg.h
++unicode/uenum.h
++unicode/unum.h
++unicode/ustring.h
++#endif
+diff --git a/js/src/configure.in b/js/src/configure.in
+index 4bccbe3..d535491 100644
+--- a/js/src/configure.in
++++ b/js/src/configure.in
+@@ -4409,6 +4409,16 @@ fi
+ dnl ========================================================
+ dnl ECMAScript Internationalization API Support (uses ICU)
+ dnl ========================================================
++ICU_LIB_NAMES=
++MOZ_NATIVE_ICU=
++MOZ_ARG_WITH_BOOL(system-icu,
++[ --with-system-icu
++ Use system icu (located with pkgconfig)],
++ MOZ_NATIVE_ICU=1)
++
++if test -n "$MOZ_NATIVE_ICU"; then
++ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
++fi
+
+ if test -n "$JS_STANDALONE"; then
+ ENABLE_INTL_API=1
+@@ -4421,37 +4431,34 @@ MOZ_ARG_ENABLE_BOOL(intl-api,
+ dnl Settings for the implementation of the ECMAScript Internationalization API
+ if test -n "$ENABLE_INTL_API"; then
+ AC_DEFINE(ENABLE_INTL_API)
+- # We build ICU as a static library.
+- AC_DEFINE(U_STATIC_IMPLEMENTATION)
+-
+- case "$OS_TARGET" in
+- WINNT)
+- ICU_LIB_NAMES="icuin icuuc icudt"
+- ;;
+- Darwin|Linux)
+- ICU_LIB_NAMES="icui18n icuuc icudata"
+- ;;
+- *)
+- AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
+- esac
+-
+- ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
+-else
+- ICU_LIB_NAMES=
+- ICU_LIBS=
++ if test -z "$MOZ_NATIVE_ICU"; then
++ case "$OS_TARGET" in
++ WINNT)
++ ICU_LIB_NAMES="icuin icuuc icudt"
++ ;;
++ Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
++ ICU_LIB_NAMES="icui18n icuuc icudata"
++ ;;
++ *)
++ AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
++ esac
++ MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
++ fi
+ fi
+
+ AC_SUBST(ENABLE_INTL_API)
+ AC_SUBST(ICU_LIB_NAMES)
+-AC_SUBST(ICU_LIBS)
+-
+-dnl Source files that use ICU should have control over which parts of the ICU
+-dnl namespace they want to use.
+-AC_DEFINE(U_USING_ICU_NAMESPACE,0)
+-
++AC_SUBST(MOZ_ICU_LIBS)
++AC_SUBST(MOZ_NATIVE_ICU)
+
+ dnl Settings for ICU
+-if test -n "$ENABLE_INTL_API" ; then
++if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
++ dnl We build ICU as a static library.
++ AC_DEFINE(U_STATIC_IMPLEMENTATION)
++
++ dnl Source files that use ICU should have control over which parts of the ICU
++ dnl namespace they want to use.
++ AC_DEFINE(U_USING_ICU_NAMESPACE,0)
+ # Set ICU compile options
+ ICU_CPPFLAGS=""
+ # don't use icu namespace automatically in client code
+diff --git a/js/src/gdb/Makefile.in b/js/src/gdb/Makefile.in
+index 288934a..a582dfe 100644
+--- a/js/src/gdb/Makefile.in
++++ b/js/src/gdb/Makefile.in
+@@ -19,6 +19,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIB
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
++
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+
+ # Place a GDB Python auto-load file next to the gdb-tests executable, both
+diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in
+index 5f7d594..10d7054 100644
+--- a/js/src/jsapi-tests/Makefile.in
++++ b/js/src/jsapi-tests/Makefile.in
+@@ -20,6 +20,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLI
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
++
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+
+ ifdef QEMU_EXE
+diff --git a/js/src/shell/Makefile.in b/js/src/shell/Makefile.in
+index 2e1df09..db66c69 100644
+--- a/js/src/shell/Makefile.in
++++ b/js/src/shell/Makefile.in
+@@ -27,6 +27,9 @@ LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_
+ ifdef MOZ_NATIVE_FFI
+ EXTRA_LIBS += $(MOZ_FFI_LIBS)
+ endif
++ifdef MOZ_NATIVE_ICU
++EXTRA_LIBS += $(MOZ_ICU_LIBS)
++endif
+
+ LOCAL_INCLUDES += -I$(topsrcdir) -I..
+
diff --git a/dev-lang/spidermonkey/files/spidermonkey-24-upward-growing-stack.patch b/dev-lang/spidermonkey/files/spidermonkey-24-upward-growing-stack.patch
new file mode 100644
index 00000000000..70963627bcc
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-24-upward-growing-stack.patch
@@ -0,0 +1,41 @@
+diff -Naur mozjs-24.2.0/js/src/gc/RootMarking.cpp mozjs-24.2.0.new/js/src/gc/RootMarking.cpp
+--- mozjs-24.2.0/js/src/gc/RootMarking.cpp 2013-10-29 16:40:26.000000000 -0400
++++ mozjs-24.2.0.new/js/src/gc/RootMarking.cpp 2014-05-05 16:16:15.570098309 -0400
+@@ -320,7 +320,7 @@
+
+ uintptr_t *stackMin, *stackEnd;
+ #if JS_STACK_GROWTH_DIRECTION > 0
+- stackMin = rt->nativeStackBase;
++ stackMin = reinterpret_cast<uintptr_t *>(rt->nativeStackBase);
+ stackEnd = cgcd->nativeStackTop;
+ #else
+ stackMin = cgcd->nativeStackTop + 1;
+diff -Naur mozjs-24.2.0/js/src/jsapi.cpp mozjs-24.2.0.new/js/src/jsapi.cpp
+--- mozjs-24.2.0/js/src/jsapi.cpp 2013-12-06 17:52:35.000000000 -0500
++++ mozjs-24.2.0.new/js/src/jsapi.cpp 2014-05-05 16:17:01.330099145 -0400
+@@ -863,10 +863,6 @@
+
+ PodZero(&debugHooks);
+ PodZero(&atomState);
+-
+-#if JS_STACK_GROWTH_DIRECTION > 0
+- nativeStackLimit = UINTPTR_MAX;
+-#endif
+ }
+
+ bool
+diff -Naur mozjs-24.2.0/js/src/jsfriendapi.cpp mozjs-24.2.0.new/js/src/jsfriendapi.cpp
+--- mozjs-24.2.0/js/src/jsfriendapi.cpp 2013-10-29 16:40:20.000000000 -0400
++++ mozjs-24.2.0.new/js/src/jsfriendapi.cpp 2014-05-05 16:18:30.350100769 -0400
+@@ -32,7 +32,11 @@
+ PerThreadDataFriendFields::RuntimeMainThreadOffset);
+
+ PerThreadDataFriendFields::PerThreadDataFriendFields()
++#if JS_STACK_GROWTH_DIRECTION > 0
++ : nativeStackLimit(UINTPTR_MAX)
++#else
+ : nativeStackLimit(0)
++#endif
+ {
+ #if defined(JSGC_ROOT_ANALYSIS) || defined(JSGC_USE_EXACT_ROOTING)
+ PodArrayZero(thingGCRooters);
diff --git a/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch b/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch
new file mode 100644
index 00000000000..a2247164111
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-24.2.0-fix-file-permissions.patch
@@ -0,0 +1,29 @@
+diff -urN a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in 2013-11-19 13:42:43.000000000 -0600
++++ b/js/src/Makefile.in 2014-03-08 08:07:28.331006149 -0600
+@@ -542,7 +542,7 @@
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(JS_CONFIG_SUBSTITUTIONS) $< > $@
+
+ install:: $(LIBRARY_NAME).pc
+- $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(libdir)/pkgconfig
+
+ ######################################################
+ # BEGIN SpiderMonkey header installation
+@@ -569,13 +569,13 @@
+ #
+
+ install:: $(EXPORTS)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)
+
+ install:: $(EXPORTS_js)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/js
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/js
+
+ install:: $(EXPORTS_mozilla)
+- $(SYSINSTALL) $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/mozilla
++ $(SYSINSTALL) -m 0644 $^ $(DESTDIR)$(includedir)/$(LIBRARY_NAME)/mozilla
+
+ #
+ # END SpiderMonkey header installation
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 00000000000..c3996ae82bb
--- /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 00000000000..ec0cd3c674e
--- /dev/null
+++ b/dev-lang/spidermonkey/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mozilla</herd>
+ <longdescription lang="en">
+ Stand-alone JavaScript C library
+ </longdescription>
+ <use>
+ <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-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild
new file mode 100644
index 00000000000..b38ada4235d
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs multilib flag-o-matic
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+LICENSE="NPL-1.1"
+SLOT="0"
+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_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-1.5-build.patch"
+ epatch "${FILESDIR}/${PN}-1.6-header.patch"
+ epatch "${FILESDIR}/${P}-threadsafe.diff"
+ 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
+ if use threadsafe; then
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" JS_THREADSAFE=1 \
+ || die "emake with threadsafe enabled failed";
+ else
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" \
+ || die "emake without threadsafe enabled failed";
+ fi
+}
+
+src_install() {
+ emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die
+ dodoc ../jsd/README
+ dohtml README.html
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild
new file mode 100644
index 00000000000..9fc66714efa
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs multilib flag-o-matic
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+LICENSE="NPL-1.1"
+SLOT="0"
+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_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-1.5-build.patch"
+ epatch "${FILESDIR}/${PN}-1.6-header.patch"
+ epatch "${FILESDIR}/${P}-threadsafe.diff" \
+ "${FILESDIR}"/${P}-ldflags.patch
+ 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
+ if use threadsafe; then
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" JS_THREADSAFE=1 \
+ XLDFLAGS="$(raw-ldflags)" HOST_LDFLAGS="${LDFLAGS}" \
+ || die "emake with threadsafe enabled failed";
+ else
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" XLDFLAGS="$(raw-ldflags)" \
+ HOST_LDFLAGS="${LDFLAGS}" || die "emake without threadsafe enabled failed";
+ fi
+}
+
+src_install() {
+ emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die
+ dodoc ../jsd/README
+ dohtml README.html
+}
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 00000000000..354fadc8ca4
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib flag-o-matic
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+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 "${FILESDIR}/${PN}-1.5-build.patch"
+ epatch "${FILESDIR}/${PN}-1.6-header.patch"
+ epatch "${FILESDIR}/${P}-threadsafe.diff" \
+ "${FILESDIR}"/${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.7.0.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0.ebuild
new file mode 100644
index 00000000000..2a130bc464c
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs multilib
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+LICENSE="NPL-1.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="threadsafe"
+
+S="${WORKDIR}/js/src"
+
+RDEPEND="threadsafe? ( dev-libs/nspr )"
+
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-1.5-build.patch"
+ epatch "${FILESDIR}/${PN}-1.6-header.patch"
+ epatch "${FILESDIR}/${P}-threadsafe.diff"
+ 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() {
+ tc-export CC LD AR
+ if use threadsafe; then
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" JS_THREADSAFE=1 \
+ || die "emake with threadsafe enabled failed";
+ else
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" \
+ || die "emake without threadsafe enabled failed";
+ fi
+}
+
+src_install() {
+ emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die
+ dodoc ../jsd/README
+ dohtml README.html
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.2.15-r2.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.2.15-r2.ebuild
new file mode 100644
index 00000000000..da38130333a
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.2.15-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit eutils toolchain-funcs multilib python-any-r1
+
+MY_PV="${PV}"
+MY_PV="${MY_PV/1.8.2/3.6}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
+SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2"
+
+LICENSE="NPL-1.1"
+SLOT="0/mozjs"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd ~x64-macos ~x86-macos"
+IUSE="threadsafe"
+
+S="${WORKDIR}/mozilla-1.9.2"
+BUILDDIR="${S}/js/src"
+
+RDEPEND="threadsafe? ( >=dev-libs/nspr-4.8.6 )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.9.2.13-as-needed.patch"
+
+ epatch_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -s "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk"
+ fi
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ local myconf
+
+ use threadsafe && myconf="${myconf} \
+ --with-system-nspr --enable-threadsafe"
+
+ # Disable no-print-directory
+ MAKEOPTS=${MAKEOPTS/--no-print-directory/}
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" econf \
+ ${myconf}
+}
+
+src_compile() {
+ cd "${BUILDDIR}" || die
+ emake -j1
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake install DESTDIR="${D}"
+ dobin shell/js
+ dodoc ../jsd/README
+ dohtml README.html
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fixup install_name
+ install_name_tool -id "${EPREFIX}"/usr/$(get_libdir)/libmozjs.dylib \
+ "${ED}"/usr/$(get_libdir)/libmozjs.dylib || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild
new file mode 100644
index 00000000000..45eca06fd06
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${TARBALL_P}.tar.gz"
+
+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
+ 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 "${FILESDIR}/${P}-fix-install-symlinks.patch"
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=638056#c9
+ epatch "${FILESDIR}/${P}-fix-ppc64.patch"
+ # https://bugs.gentoo.org/show_bug.cgi?id=400727
+ # https://bugs.gentoo.org/show_bug.cgi?id=420471
+ epatch "${FILESDIR}/${P}-arm_respect_cflags-3.patch"
+ # https://bugs.gentoo.org/show_bug.cgi?id=438746
+ epatch "${FILESDIR}"/${PN}-1.8.7-freebsd-pthreads.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441928
+ epatch "${FILESDIR}"/${PN}-1.8.5-perf_event-check.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=439260
+ epatch "${FILESDIR}"/${P}-symbol-versions.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441934
+ epatch "${FILESDIR}"/${PN}-1.8.5-ia64-fix.patch
+ epatch "${FILESDIR}"/${PN}-1.8.5-ia64-static-strings.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=431560
+ epatch "${FILESDIR}"/${PN}-1.8.5-isfinite.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=552786
+ epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+
+ epatch_user
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile || die
+ sed -e 's@/nsinstall@/native-nsinstall@' -i 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 00000000000..1237f594b14
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/js/${MY_PN}${PV}.tar.gz"
+
+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/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 "${FILESDIR}"/${PN}-${SLOT}-js-config-shebang.patch
+ epatch "${FILESDIR}"/${PN}-${SLOT}-ia64-mmap.patch
+ epatch "${FILESDIR}"/${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)
+}
+
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile || die
+ sed -e 's@/nsinstall@/native-nsinstall@' -i 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-24.2.0-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild
new file mode 100644
index 00000000000..2e862bd3956
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.bz2"
+
+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/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 "${FILESDIR}"/${PN}-${SLOT}-system-icu.patch
+ epatch "${FILESDIR}"/${PN}-24.2.0-fix-file-permissions.patch
+ epatch "${FILESDIR}"/${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)
+}
+
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ jscpucfg host_jsoplengen host_jskwgen || die
+ make CFLAGS="" CXXFLAGS="" \
+ CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) \
+ AR=$(tc-getBUILD_AR) RANLIB=$(tc-getBUILD_RANLIB) \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall || die
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ -i Makefile || die
+ sed -e 's@/nsinstall@/native-nsinstall@' -i 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/squirrel/Manifest b/dev-lang/squirrel/Manifest
new file mode 100644
index 00000000000..9a833786b7c
--- /dev/null
+++ b/dev-lang/squirrel/Manifest
@@ -0,0 +1 @@
+DIST squirrel_2.2.4_stable.tar.gz 419567 SHA256 936ca05469ab19f16a730685ef4ad1ca5a3838195765d47935a4ba9052d8b2d4 SHA512 91fe260b362d682eb5d21334c0ffa532120550c1c49a40412ac87118bee5f045e79c260f42247bd2c897d33b7a593dd2bc2e5c8e78e219553682f8b6cd79201d WHIRLPOOL 7cc953f1bbfc8e228be9310eff714b682f0e77b5e1ae9bf0a5bb0ec1c9f53b873c9199bb0679b7b13759bbe54e96de674a9b42b90db3ddd2a3caa36bc067ab50
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch b/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch
new file mode 100644
index 00000000000..e39ddedc9eb
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch
@@ -0,0 +1,302 @@
+Author: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Purpose: Makes squirrel buildable and installable using autotools, a buildsystem everybody is comfortable with.
+Source: http://ohnopub.net/hg/SQUIRREL2
+Generate with: hg diff -r 0 -r -1 -I '**Makefile*' -I configure.ac -I '**.in'
+
+diff -r d6d89bbc08e5 -r c89309f5be40 Makefile
+--- a/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,18 +0,0 @@
+-
+-SQUIRREL=.
+-MAKE=make
+-
+-sq32:
+- cd squirrel; $(MAKE)
+- cd sqstdlib; $(MAKE)
+- cd sq; $(MAKE)
+-
+-sqprof:
+- cd squirrel; $(MAKE) sqprof
+- cd sqstdlib; $(MAKE) sqprof
+- cd sq; $(MAKE) sqprof
+-
+-sq64:
+- cd squirrel; $(MAKE) sq64
+- cd sqstdlib; $(MAKE) sq64
+- cd sq; $(MAKE) sq64
+diff -r d6d89bbc08e5 -r c89309f5be40 Makefile.am
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Makefile.am Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,89 @@
++# autoreconf variables, recommended by libtoolize
++ACLOCAL_FLAGS = -I m4
++
++AM_CPPFLAGS = -I$(top_srcdir)/include
++
++# custom installation directories
++examplesdir = $(docdir)/examples
++pkgconfigdir = $(libdir)/pkgconfig
++
++# installed things
++if ENABLE_DOC
++dist_doc_DATA = doc/sqstdlib2.pdf \
++ doc/squirrel2.pdf
++endif
++if ENABLE_EXAMPLES
++dist_examples_DATA = samples/ackermann.nut \
++ samples/array.nut \
++ samples/class.nut \
++ samples/classattributes.nut \
++ samples/coroutines.nut \
++ samples/delegation.nut \
++ samples/fibonacci.nut \
++ samples/flow.nut \
++ samples/generators.nut \
++ samples/hello.nut \
++ samples/list.nut \
++ samples/loops.nut \
++ samples/matrix.nut \
++ samples/metamethods.nut \
++ samples/methcall.nut \
++ samples/tailstate.nut
++endif
++
++nodist_pkgconfig_DATA = libsqstdlib.pc \
++ libsquirrel.pc
++bin_PROGRAMS = sq/sq
++lib_LTLIBRARIES = libsquirrel.la \
++ libsqstdlib.la
++include_HEADERS = include/sqstdaux.h \
++ include/sqstdblob.h \
++ include/sqstdio.h \
++ include/sqstdmath.h \
++ include/sqstdstring.h \
++ include/sqstdsystem.h \
++ include/squirrel.h
++
++
++# sources for installed things
++
++libsqstdlib_la_SOURCES = sqstdlib/sqstdaux.cpp \
++ sqstdlib/sqstdblob.cpp sqstdlib/sqstdblobimpl.h \
++ sqstdlib/sqstdio.cpp \
++ sqstdlib/sqstdmath.cpp \
++ sqstdlib/sqstdrex.cpp \
++ sqstdlib/sqstdstream.cpp sqstdlib/sqstdstream.h \
++ sqstdlib/sqstdstring.cpp \
++ sqstdlib/sqstdsystem.cpp
++libsqstdlib_la_LDFLAGS = -version-info 0:0:0
++libsqstdlib_la_LIBADD = libsquirrel.la
++
++libsquirrel_la_SOURCES = squirrel/sqapi.cpp \
++ squirrel/sqarray.h \
++ squirrel/sqbaselib.cpp \
++ squirrel/sqclass.cpp squirrel/sqclass.h \
++ squirrel/sqclosure.h \
++ squirrel/sqcompiler.cpp squirrel/sqcompiler.h \
++ squirrel/sqdebug.cpp \
++ squirrel/sqfuncproto.h \
++ squirrel/sqfuncstate.cpp squirrel/sqfuncstate.h \
++ squirrel/sqlexer.cpp squirrel/sqlexer.h \
++ squirrel/sqmem.cpp \
++ squirrel/sqobject.cpp squirrel/sqobject.h \
++ squirrel/sqopcodes.h \
++ squirrel/sqpcheader.h \
++ squirrel/sqstate.cpp squirrel/sqstate.h \
++ squirrel/sqstring.h \
++ squirrel/sqtable.cpp squirrel/sqtable.h \
++ squirrel/squserdata.h \
++ squirrel/squtils.h \
++ squirrel/sqvm.cpp squirrel/sqvm.h
++libsquirrel_la_LDFLAGS = -version-info 0:0:0
++
++sq_sq_SOURCES = sq/sq.c
++sq_sq_LDADD = libsqstdlib.la
++
++EXTRA_DIST = COMPILE COPYRIGHT HISTORY README \
++ doc/sqstdlib2.chm doc/squirrel2.chm \
++ squirrel.dsw sq/sq.dsp squirrel/squirrel.dsp sqstdlib/sqstdlib.dsp \
++ etc/minimal.c etc/test.nut
+diff -r d6d89bbc08e5 -r c89309f5be40 configure.ac
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/configure.ac Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,29 @@
++AC_INIT([squirrel],[2.2.4],[http://squirrel-lang.org/])
++
++# recommended by libtoolize:
++AC_CONFIG_MACRO_DIR([m4])
++
++AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
++
++AC_PROG_LIBTOOL
++AC_PROG_CC_C_O
++AC_PROG_CXX
++
++AC_ARG_ENABLE([doc],
++ [AS_HELP_STRING([--disable-doc], [Control whether or not the API docs (pdfs) are installed.])],
++ [enable_docs=$enableval],
++ [enable_docs=yes])
++AM_CONDITIONAL([ENABLE_DOC],
++ [test "x$enable_docs" = "xyes"])
++
++AC_ARG_ENABLE([examples],
++ [AS_HELP_STRING([--disable-exampels], [Control whether or not examples of libsquirrel use are installed.])],
++ [enable_examples=$enableval],
++ [enable_examples=yes])
++AM_CONDITIONAL([ENABLE_EXAMPLES],
++ [test "x$enable_examples" = "xyes"])
++
++AC_CONFIG_FILES([Makefile
++libsquirrel.pc
++libsqstdlib.pc])
++AC_OUTPUT
+diff -r d6d89bbc08e5 -r c89309f5be40 libsqstdlib.pc.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/libsqstdlib.pc.in Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,14 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A library for libsquirrel users
++Version: @VERSION@
++URL: @PACKAGE_BUGREPORT@
++Libs: -L${libdir} -lsqstdlib
++# I don't like hard-coding this here, but it's an internal
++# dependency so it's justified.
++Libs.private: -lsquirrel
++Cflags: -I${includedir}
+diff -r d6d89bbc08e5 -r c89309f5be40 libsquirrel.pc.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/libsquirrel.pc.in Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A dynamic scripting language for games
++Version: @VERSION@
++URL: @PACKAGE_BUGREPORT@
++Libs: -L${libdir} -lsquirrel
++Cflags: -I${includedir}
+diff -r d6d89bbc08e5 -r c89309f5be40 sq/Makefile
+--- a/sq/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,21 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/bin/sq
+-INCZ= -I$(SQUIRREL)/include -I. -I$(SQUIRREL)/sqlibs
+-LIBZ= -L$(SQUIRREL)/lib
+-LIB= -lsquirrel -lsqstdlib
+-
+-OBJS= sq.o
+-
+-SRCS= sq.c
+-
+-
+-sq32:
+- g++ -O2 -fno-rtti -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+-
+-sqprof:
+- g++ -O2 -pg -fno-rtti -pie -gstabs -g3 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+-
+-sq64:
+- g++ -O2 -fno-rtti -D_SQ64 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+\ No newline at end of file
+diff -r d6d89bbc08e5 -r c89309f5be40 sqstdlib/Makefile
+--- a/sqstdlib/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,30 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/lib/libsqstdlib.a
+-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
+-
+-SRCS= \
+- sqstdblob.cpp \
+- sqstdio.cpp \
+- sqstdstream.cpp \
+- sqstdmath.cpp \
+- sqstdsystem.cpp \
+- sqstdstring.cpp \
+- sqstdaux.cpp \
+- sqstdrex.cpp
+-
+-
+-sq32:
+- gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sqprof:
+- gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+-sq64:
+- gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+diff -r d6d89bbc08e5 -r c89309f5be40 squirrel/Makefile
+--- a/squirrel/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,52 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/lib/libsquirrel.a
+-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
+-DEFS=
+-LIB=
+-
+-OBJS= \
+- sqapi.o \
+- sqbaselib.o \
+- sqcompiler.o \
+- sqdebug.o \
+- sqlexer.o \
+- sqobject.o \
+- sqparser.o \
+- sqstate.o \
+- sqtable.o \
+- sqvm.o \
+- sqmem.o \
+- sqclass.o
+-
+-SRCS= \
+- sqapi.cpp \
+- sqbaselib.cpp \
+- sqfuncstate.cpp \
+- sqdebug.cpp \
+- sqlexer.cpp \
+- sqobject.cpp \
+- sqcompiler.cpp \
+- sqstate.cpp \
+- sqtable.cpp \
+- sqmem.cpp \
+- sqvm.cpp \
+- sqclass.cpp
+-
+-
+-
+-sq32:
+- gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sqprof:
+- gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sq64:
+- gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
new file mode 100644
index 00000000000..032a4eb914a
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
@@ -0,0 +1,59 @@
+From fd2d422f16ca1134f3be8d693290e6b1c536bf71 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 7 Jun 2012 10:10:28 +0300
+Subject: [squirrel: PATCH] fix build breakage on gcc-4.7 and clang++
+
+gcc 4.7 got proper support for argument dependent lookup
+for builtin types:
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46075
+
+It exposed old problem:
+> gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp \
+ sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude
+ In file included from sqobject.h:5:0,
+ from sqpcheader.h:16,
+ from sqapi.cpp:4:
+ squtils.h: In instantiation of 'sqvector<T>::~sqvector() [with T = long long int]':
+ sqclosure.h:142:52: required from here
+ squtils.h:46:4: error: 'sq_vm_free' was not declared in this scope, and no declarations were found by argument-dependent
+ lookup at the point of instantiation [-fpermissive]
+ In file included from sqpcheader.h:17:0,
+ from sqapi.cpp:4:
+ sqstate.h:143:6: note: 'void sq_vm_free(void*, SQUnsignedInteger)' declared here, later in the translation unit
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ squirrel/sqstate.h | 3 ---
+ squirrel/squtils.h | 4 ++++
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/squirrel/sqstate.h b/squirrel/sqstate.h
+index 3ed3307..e931404 100755
+--- a/squirrel/sqstate.h
++++ b/squirrel/sqstate.h
+@@ -138,7 +138,4 @@ private:
+
+ bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
+
+-void *sq_vm_malloc(SQUnsignedInteger size);
+-void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
+-void sq_vm_free(void *p,SQUnsignedInteger size);
+ #endif //_SQSTATE_H_
+diff --git a/squirrel/squtils.h b/squirrel/squtils.h
+index bff7d24..ac3aef9 100755
+--- a/squirrel/squtils.h
++++ b/squirrel/squtils.h
+@@ -10,6 +10,10 @@
+
+ #define sq_aligning(v) (((size_t)(v) + (SQ_ALIGNMENT-1)) & (~(SQ_ALIGNMENT-1)))
+
++
++void *sq_vm_malloc(SQUnsignedInteger size);
++void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
++void sq_vm_free(void *p,SQUnsignedInteger size);
+ //sqvector mini vector class, supports objects by value
+ template<typename T> class sqvector
+ {
+--
+1.7.8.6
+
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch b/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch
new file mode 100644
index 00000000000..911edcc79d3
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch
@@ -0,0 +1,75 @@
+diff -r d6d89bbc08e5 -r 692b7872324b include/squirrel.h
+--- a/include/squirrel.h Thu Feb 11 15:08:35 2010 -0500
++++ b/include/squirrel.h Sat Feb 13 01:04:21 2010 -0500
+@@ -39,28 +39,22 @@
+ #define SQUIRREL_API extern
+ #endif
+
+-#if (defined(_WIN64) || defined(_LP64))
+-#define _SQ64
+-#endif
++/* Get uintptr_t from a non standard or standard location */
++#ifdef _MSC_VER
++#include <stddef.h>
+
+-#ifdef _SQ64
+-#ifdef _MSC_VER
+-typedef __int64 SQInteger;
+-typedef unsigned __int64 SQUnsignedInteger;
+-typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
+-#else
+-typedef long SQInteger;
+-typedef unsigned long SQUnsignedInteger;
+-typedef unsigned long SQHash; /*should be the same size of a pointer*/
+-#endif
+-typedef int SQInt32;
+-#else
+-typedef int SQInteger;
+-typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
+-typedef unsigned int SQUnsignedInteger;
+-typedef unsigned int SQHash; /*should be the same size of a pointer*/
+-#endif
++typedef __int32 SQInt32;
++typedef __int64 SQInt64;
++#else /* _MSC_VER */
++#include <stdint.h>
+
++typedef int32_t SQInt32;
++typedef int64_t SQInt64;
++#endif /* _MSC_VER */
++
++typedef intptr_t SQInteger;
++typedef uintptr_t SQUnsignedInteger;
++typedef uintptr_t SQHash;
+
+ #ifdef SQUSEDOUBLE
+ typedef double SQFloat;
+@@ -68,12 +62,8 @@
+ typedef float SQFloat;
+ #endif
+
+-#if defined(SQUSEDOUBLE) && !defined(_SQ64)
+-#ifdef _MSC_VER
+-typedef __int64 SQRawObjectVal; //must be 64bits
+-#else
+-typedef long SQRawObjectVal; //must be 64bits
+-#endif
++#if defined(SQUSEDOUBLE)
++typedef SQInt64 SQRawObjectVal; /* must be 64 bits */
+ #define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
+ #else
+ typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise
+@@ -453,4 +443,13 @@
+ } /*extern "C"*/
+ #endif
+
++/*
++ Define for code which depends on squirrel to
++ determine bitiness. IMO, this should be discouraged.
++ --ohnobinki
++*/
++#if (defined(_WIN64) || defined(_LP64))
++#define _SQ64
++#endif
++
+ #endif /*_SQUIRREL_H_*/
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch b/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch
new file mode 100644
index 00000000000..e31eca5c1f9
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch
@@ -0,0 +1,22 @@
+diff -r 3e8a1ff66c3c -r bd1cfd3e3cdd sqstdlib/sqstdstream.cpp
+--- a/sqstdlib/sqstdstream.cpp Fri Feb 12 20:35:23 2010 -0500
++++ b/sqstdlib/sqstdstream.cpp Fri Feb 12 23:58:35 2010 -0500
+@@ -277,7 +277,7 @@
+ sq_pop(v,1);
+ }
+
+-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
++SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
+ {
+ if(sq_gettype(v,-1) != OT_TABLE)
+ return sq_throwerror(v,_SC("table expected"));
+diff -r 3e8a1ff66c3c -r bd1cfd3e3cdd sqstdlib/sqstdstream.h
+--- a/sqstdlib/sqstdstream.h Fri Feb 12 20:35:23 2010 -0500
++++ b/sqstdlib/sqstdstream.h Fri Feb 12 23:58:35 2010 -0500
+@@ -14,5 +14,5 @@
+ SQInteger _stream_flush(HSQUIRRELVM v);
+
+ #define _DECL_STREAM_FUNC(name,nparams,typecheck) {_SC(#name),_stream_##name,nparams,typecheck}
+-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
++SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
+ #endif /*_SQSTD_STREAM_H_*/
diff --git a/dev-lang/squirrel/metadata.xml b/dev-lang/squirrel/metadata.xml
new file mode 100644
index 00000000000..ed69b5a943f
--- /dev/null
+++ b/dev-lang/squirrel/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>
+ <email>binki@gentoo.org</email>
+ <name>Nathan Phillip Brink</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">squirrel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/squirrel/squirrel-2.2.4-r1.ebuild b/dev-lang/squirrel/squirrel-2.2.4-r1.ebuild
new file mode 100644
index 00000000000..4c3e8b23519
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-2.2.4-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit autotools eutils multilib
+
+MY_P="${PN}_${PV}_stable"
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}${PV:0:1}/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples static-libs"
+
+# /usr/bin/sq conflicts
+RDEPEND="!app-text/ispell"
+
+S="${WORKDIR}/SQUIRREL${PV:0:1}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ epatch "${FILESDIR}"/${P}-supertux-const.patch
+ epatch "${FILESDIR}"/${P}-stdint.h.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ if ! use static-libs; then
+ rm -v "${ED}"/usr/$(get_libdir)/*.la || die
+ fi
+
+ dodoc HISTORY README || die
+}
diff --git a/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
new file mode 100644
index 00000000000..d8fb4bbe197
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit autotools eutils multilib
+
+MY_P="${PN}_${PV}_stable"
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}${PV:0:1}/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples static-libs"
+
+# /usr/bin/sq conflicts
+RDEPEND="!app-text/ispell"
+
+S="${WORKDIR}/SQUIRREL${PV:0:1}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ epatch "${FILESDIR}"/${P}-supertux-const.patch
+ epatch "${FILESDIR}"/${P}-stdint.h.patch
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ if ! use static-libs; then
+ rm -v "${ED}"/usr/$(get_libdir)/*.la || die
+ fi
+
+ dodoc HISTORY README || die
+}
diff --git a/dev-lang/srf/Manifest b/dev-lang/srf/Manifest
new file mode 100644
index 00000000000..5b18fb85520
--- /dev/null
+++ b/dev-lang/srf/Manifest
@@ -0,0 +1 @@
+DIST srf-1.0.tar.gz 222493 SHA256 f7c1bba0cf661e0a33432fafa658ccb6b060eefc29159326b790ba9fe5cbe554 SHA512 420f691a937fa30220cd436faaf75299991452fd5f026dcc7aaa767e276eb245cb8eb88d875911826b66abad62fa10326b694301b4372b91e4ac20bf32c78388 WHIRLPOOL 115ca53b6a8b8a2b6acafefa631caa77cc19e717eff88433503f9ba1499d7a169294ed09ec1acb8e28839e7a64172fc3e15319a33d2a1ad82e510123ca539c46
diff --git a/dev-lang/srf/metadata.xml b/dev-lang/srf/metadata.xml
new file mode 100644
index 00000000000..c0594a6b0e0
--- /dev/null
+++ b/dev-lang/srf/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>
+<email>araujo@gentoo.org</email>
+<name>Luis F. Araujo</name>
+</maintainer>
+<longdescription lang="en">
+srf (Simple Recursive Functions) interprets a very simple programming language
+similar to Stephen Kleene's recursive functions. You can use srf to help
+understand recursive functions, or Peano arithmetic.
+</longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/srf/srf-1.0-r1.ebuild b/dev-lang/srf/srf-1.0-r1.ebuild
new file mode 100644
index 00000000000..87ecdd28eda
--- /dev/null
+++ b/dev-lang/srf/srf-1.0-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="The Simple Recursive Functions programming language"
+HOMEPAGE="http://www.stratigery.com/srf.html"
+SRC_URI="http://www.stratigery.com/srf.html/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~x86-linux ~ppc-macos ~amd64"
+IUSE=""
+
+DEPEND="
+ sys-devel/flex
+ virtual/yacc"
+RDEPEND=""
+
+src_prepare() {
+ # Remove CVS directory Bug#371821
+ ecvs_clean
+}
+
+src_install() {
+ dobin srf rfunc/rfunc
+ doman srf.1
+ dohtml srf.html
+ dodoc README
+ docinto examples
+ dodoc examples/*
+}
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
new file mode 100644
index 00000000000..79859193935
--- /dev/null
+++ b/dev-lang/swi-prolog/Manifest
@@ -0,0 +1,14 @@
+DIST pl-6.6.6.tar.gz 14838653 SHA256 9f80bb274e2f31fd68b0acbe35982c012d5f8311dbe44ec1d8d04351a776996d SHA512 a850b0f6b283d34aa77d5e9d8a0053161fa534fa6d8935c7472362ff7b59ea6035de0658d9e38c317e2d92ed810370f2adc3e92b6346fc0ff392d18f1c8012a6 WHIRLPOOL 448d844fe45aee97ad2e37bea3f81dd5eb388e1dcb9f1c4dc54c18991aa91d481bff5b70174fb06edb06c1361759621a570a083fe36d62bffdf6028c49244b2a
+DIST swi-prolog-6.6.6-gentoo-patchset-0.tar.gz 1590 SHA256 2b240d15562603120e0314bb69bde50089326c11876b7a62106c05f9d48ace71 SHA512 807c7e897dd5b9eef14e063ea53c03047f3acb23174a70a613258adf7f85dc1f7637158fde70aab2e0f40de4bc6ac5e3548dd09dbe3745d916a388f43eb832eb WHIRLPOOL 0a0dbc361cfbe343c8b3562a2c0535905eb1443eea0783b14f96bda43c04e8db6264f476c07da766c6936dc6088e34059f799a3244717390644bf0f5ae83018e
+DIST swi-prolog-7.2.0-gentoo-patchset-0.tar.gz 1629 SHA256 b41a9c416ea0976c1a5f49d6d10090fa8ac41a6fe82982410fec0f09e73e09f0 SHA512 35449b56aa671ca937b2ee0e40ab7b19cd5a1b68277084a22c06c9e00f1318ab4d6603993b4aa44e9a6d8ab1418661a4d409160b93db04b7ca6e7c199831348e WHIRLPOOL 8a46b84865a2da2f315bf877cc1e464b59abc2891a91a5ee20530af39b353127c9d5ffabc4dea076137d619354dff259524ca28f0d4407c165be08e1b5c6fd38
+DIST swi-prolog-7.2.1-gentoo-patchset-0.tar.gz 1636 SHA256 b8aa8cda2e5903341e4f51187a4901d810ad3b4c03db514315fbf1dea671b924 SHA512 839ebe9ceaf010198edd36a8bd19eccfaba779e95b83a1908f1532d16eb650656758de68ee70195057e4c975d76aff46b2ca3f5c3f93e1698355227678148510 WHIRLPOOL efe93a16272ab99c6dc1bfaedabaddaef389c8c07d34f3ee5af1d417612601c85a39c56ce5b0d7ca167a84537277fcab76290f3fb2427e4b30ff7911d79f8d2d
+DIST swi-prolog-7.2.2-gentoo-patchset-0.tar.gz 1414 SHA256 145f585828da45d89c6abebb7707ef224334a6e102dd50302b1af549d8d8a3c8 SHA512 32642e5e133971fbcec777791c050dd548545050353e23e08e0457487d3b5ec46e9491be4cdfb8d0a0a8af613dc64b569969aaa31a0d8691e0c3fdd9b5c645d0 WHIRLPOOL f394d4da284e31e4f431cda1af54d3dd4f2995bf04de985750c7b0f89f2ad6ed2fca8c921ffe711ae83b8f0d478c864bf81b531a9fe71ab9be73df20083e5c21
+DIST swi-prolog-7.3.2-gentoo-patchset-0.tar.gz 1628 SHA256 0c019e7bb12d6c81aab94f5940577bc354f6283933da9975d1bedad76582ffea SHA512 66d87771af1c205e79210fe5e41a057b600d5910c0d413adf84147a10664e7f0caa18939f8707e810563785ce932423581f8b4c312f72174d12c76a7e8194d9b WHIRLPOOL 857a1f702bb26e0b1efcb8e1f5d7351216e253f1260d0a4652489074d0d4716452f3fd0b970f9c26cea3e1c9af26d0029284c644c523d081404f451d5d1e9e2b
+DIST swi-prolog-7.3.3-gentoo-patchset-0.tar.gz 1401 SHA256 d8c65ac2c3f7b6681d270741d23e56c30ecc249199efff385cbf20daa94f56c9 SHA512 55c9d84a1bf16720c32488a73b0250a426ce1d4f17853051a939a217a24126bf357bbc9407a8ce7537656b9848f09409e709116d158272c25b4e95cf4ced6c90 WHIRLPOOL bc21bca3e9943946838afb9961fe45f1b12b92a79a92f34eaf46e1d6aaef43c35cb0f1acf7145225aca8b3b975ff59ace289990fb4012bdb7ef93afe59af6c58
+DIST swi-prolog-7.3.4-gentoo-patchset-0.tar.gz 1415 SHA256 bd1c8717d7d1022a27c6ececb7037c69b816924dcda42132edb8b044cf3f6c07 SHA512 82a8af01325997a6a6f2d517d94040c1f706356f8404b9a4e002fe1df0293b5bcd374aaa3897997e148d2520c2ce7a970e270c5c84520142c7b404689e0cff32 WHIRLPOOL 322770dca3eed47d33025affe86336c060b446f3686055cb0b75c3deb13505a7fecdecad7d0752f2a34813098c6f838bf277bd34da850ad26492763aa3fa5bee
+DIST swipl-7.2.0.tar.gz 16211509 SHA256 801423b8293d08b96b575ffa96d91cce3acf2473f04c23d58657dd668287f8cb SHA512 94c89e7f76ff545821e2e984a630d37863f305fe71f0cc79a3fd4e41e1b69f4a74f924a4f429d054480b2dd030ceba5fc65fefb75933cf19aeb18c0a03863bf6 WHIRLPOOL 815d1a900a501ad8d9cb843bd42bf1756f1d5c70d994637960c7849140b3ab414b26da06c85998870027ec27678050a68d3480bb81ed23978be9e10e7920e631
+DIST swipl-7.2.1.tar.gz 16175699 SHA256 f81bd713c5a7544f9b2af694cc0e74aaaf7a70e0a67203caab6ee9493e1dd01f SHA512 514d89963a7b6cae2e33cb01a2b67cb7ec6fd0dbfa7010608b87a3207626f04cd57ce71f816d10be9ac0266d0f2d243f773fc0bd46b37caf04fc2435748d96be WHIRLPOOL ba396ec4465d9ebdf14efea44fa958d655c87b14af201421a6ac88db17bb46391129f0a9ce9a29229457b0f940892a126f6ee55285dbf0ba9395ed01066585ff
+DIST swipl-7.2.2.tar.gz 16179490 SHA256 c137bbe1d652a6aaa003278045e592637cd9fd5f1d52b05f9f0751bfd9449c8d SHA512 b25ed01e49628d9b463acd0e3687eaef0e3f74e8f834a1442e66913fabf948ae6f6d662c21e3cbb1ca5793ceb96701be31c3b1d2d3a0a9694ea4706f9a64939e WHIRLPOOL 1309284a4d610cb37196aca678d4823bba384ba04a84ef1212c3580bad40da3359fbe4035a13cbfdd21a4eca75df2b8a3c398a1da9061a71ba8da8276c2b17dd
+DIST swipl-7.3.2.tar.gz 16172495 SHA256 8d8a503b1f36a8635afb7614219d64f4a2f43052bc589de2adbe7f995ec6cc6e SHA512 e74c3fa7e29ea2a4121a839c8d77229913c94367077affb991ae7543ec2da84feef724376a9f47c880ad131b1f43a8f7905722f382b7aab4d6f2f268056ae2c3 WHIRLPOOL 78104539d3210a8296e45ff48b13dcbf958ead19909331b4edb78722915d9ae87af959917f3ebcc62b888f44632c38dfbc59e0bae02128b7f6fa6946a3a5fe72
+DIST swipl-7.3.3.tar.gz 16178897 SHA256 fbdb14d4b780f210feb9a3656fb8fabcc2f8aa95d172b1cf2847189e2bd7df6f SHA512 bfe66e0bf12f9c0e044f5af6feccc1b26bde43e0e182f8252e8ec6be09eae96dfc9f1b0517149a1539fd76920f797017ab9550545578edfa3f6d7db4e823801d WHIRLPOOL b307d3c8b6a25216b1411c1bea2e1f3e6fa509cd911496efd0bae473be88df4f0ae5e1929cf3dded01e34583536ecae11806ea5be69e5383f1ef74178eb5761d
+DIST swipl-7.3.4.tar.gz 16179711 SHA256 6be554bc594783fe72d146cc248d64bc59aebc3195ce3bc0613eeabd048d9779 SHA512 09f0f6494a5a0b97433055f61305c602d43b2184b1213db6af55414e9b320a3e745b8838fc4262b217ae1ce9bd03fcc74616d23a80a10389000ba4779e861440 WHIRLPOOL 904ff7e47d8b8283cc7309fb68473f8522d25c05855999b30b3b0a93e75dfe1fb2a1a6cc418d2b454ee495bbee7dfe90638af94b92bd9161657152c72cba7c06
diff --git a/dev-lang/swi-prolog/metadata.xml b/dev-lang/swi-prolog/metadata.xml
new file mode 100644
index 00000000000..2adce0b3609
--- /dev/null
+++ b/dev-lang/swi-prolog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+<use>
+ <flag name='archive'>Use libarchive for extension packs</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild b/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild
new file mode 100644
index 00000000000..066febc1613
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/pl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.4 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/pl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.2.0.ebuild b/dev-lang/swi-prolog/swi-prolog-7.2.0.ebuild
new file mode 100644
index 00000000000..55e2a4878ac
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.2.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+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
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.2.1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.2.1.ebuild
new file mode 100644
index 00000000000..55e2a4878ac
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.2.1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+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
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.2.2.ebuild b/dev-lang/swi-prolog/swi-prolog-7.2.2.ebuild
new file mode 100644
index 00000000000..55e2a4878ac
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.2.2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+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
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.3.2.ebuild b/dev-lang/swi-prolog/swi-prolog-7.3.2.ebuild
new file mode 100644
index 00000000000..fbf2c6937c8
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.3.2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.3.3.ebuild b/dev-lang/swi-prolog/swi-prolog-7.3.3.ebuild
new file mode 100644
index 00000000000..fbf2c6937c8
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.3.3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.3.4.ebuild b/dev-lang/swi-prolog/swi-prolog-7.3.4.ebuild
new file mode 100644
index 00000000000..fbf2c6937c8
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.3.4.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline )
+ gmp? ( dev-libs/gmp )
+ ssl? ( dev-libs/openssl )
+ java? ( >=virtual/jdk-1.5 )
+ X? (
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swig/Manifest b/dev-lang/swig/Manifest
new file mode 100644
index 00000000000..4738421a2d3
--- /dev/null
+++ b/dev-lang/swig/Manifest
@@ -0,0 +1,7 @@
+DIST swig-1.3.40.tar.gz 4891020 SHA256 1945b3693bcda6777bd05fef1015a0ad1a4604cde4a4a0a368b61ccfd143ac09 SHA512 bd959d29cf2d61d12dd2c5764bbd11d8fb045827267f8633ab99515175e675554c709f43a8334ce74d77e71e737118962bc5ce8fd09d3b87070ecab1133cc9d7 WHIRLPOOL 48c71d1c88271e8b2be171b159c41150460bc79bba9d40ff224fad8c1498c94e6328c89f1c2e02e294c17b0174f1e7aeddbc39c2e341c85effbbf311e87f061c
+DIST swig-2.0.12.tar.gz 5312394 SHA256 65e13f22a60cecd7279c59882ff8ebe1ffe34078e85c602821a541817a4317f7 SHA512 7969cd8ce309ca46316fa4851b5cdd72122cb075cde8c17d74ee97969cd9555eff0d995f60bf17ff4090c83f66f6c66df2c61d9c06e2e30a2b36a4b8204c5890 WHIRLPOOL fdc0477d049c793267420769b0346283087bcf14d519d279bae15b5ffaff7c079fa6a6de3f18b74825f7ea0bce13913e591f7d48b396cd7eaf941fa57dfe925e
+DIST swig-2.0.9.tar.gz 5307341 SHA256 586954000d297fafd7e91d1ad31089cc7e249f658889d11a44605d3662569539 SHA512 9967eb2e1733c11ceb813bfa18c8c4187ba527d45de9b2ad962f287afba9cb0e1432b921670c5fe07ed31decc2e2785a16f42f69148a4e8a1959a9b66ce2e91f WHIRLPOOL 6649934f33d36b7bf9314a7f6582245217795b6e9c36eb02436ed769f8fb06a3a038af2380f444a1311aa353d3f29c4a3159765f873d09ed90980998e0752e81
+DIST swig-3.0.2.tar.gz 5690863 SHA256 a2669657cabcedc371f63c0457407a183e0b6b2ef4e7e303c1ec9a3964cc7813 SHA512 9aa027d53b2cc1534458abbf2137e59c4aac747e1406dcd45fedab91d4899872fab2aae3d7297fa38bf5093a21f19eaa543f0e0dee2c54497efcdd7e31ee7ccf WHIRLPOOL 7ebca2390c8a9b35196a74c028ff59ffc8c7b19cbe2f53379b2eb2b3c33c9b6dcdfd210102239ea2587824a5dcf164f015d6c2e73b8206ba7e778c012b77e19d
+DIST swig-3.0.4.tar.gz 5720119 SHA256 410ffa80ef5535244b500933d70c1b65206333b546ca5a6c89373afb65413795 SHA512 22e24dde95c81d586176d9135d62fec70fd6dbf785641e001ab89ba4d64ea1018a9b1abf7b9c52149613732701c6fb30336fbf8b5d0e2c9af1c84de83ca24c03 WHIRLPOOL f5af725c2345529ad355d5fb30b345569d75e648e4a3fb2932a06ee93aca58406408eb9492107c03c6f5f5c6520468343ecd087b14d6f9b36b1eccfba0c78f42
+DIST swig-3.0.5.tar.gz 5873209 SHA256 9f4cb9e8f213f041853646f58fe5e8428d63250d05f5c943b6fa759c77322a3c SHA512 1cd9eaea1443d08ac0f9a80f9cb3d60121e888e30c9f00aaaf285d6afe8a5494a3be017a38092b879d332305911c177202cfccd2570cb61eb40554fcc573fd01 WHIRLPOOL 49dc145dbd24bbe0dd9d5baa82ab8e1b79b0cec14035038d22fd506010ce5185731876a157c811d2087f35360ce04aafed8c7beff7f7feaf246f964891395ea9
+DIST swig-3.0.6.tar.gz 5911929 SHA256 c67f63ea11956106e4cda66416d5020330dc4ce2ee45057d39a9494ce33eca05 SHA512 b640ca98a668973b33e5079bfdd01dd722c136ee077fcb2990b82878409cb5ebf3ffb78baee8427f44ca1eb01f55f21b2a01c9e1f34986cd134609b4eb208610 WHIRLPOOL 2086565968909e1d4800e4413a761944d6ddd158a34ba77ae7438c456c4b685f4727fa5f4678bd75cd5093f157f7317bc5cee6ca9ff331394b53e3e9c49649ea
diff --git a/dev-lang/swig/metadata.xml b/dev-lang/swig/metadata.xml
new file mode 100644
index 00000000000..4104001f76e
--- /dev/null
+++ b/dev-lang/swig/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>scheme</herd>
+ <maintainer>
+ <email>pchrist@gentoo.org</email>
+ <name>Panagiotis Christopoulos</name>
+ </maintainer>
+ <maintainer>
+ <email>hkBst@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">
+SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, Python, Tcl/Tk and Ruby. The list of supported languages also includes non-scripting languages such as C#, Common Lisp (Allegro CL), Java, Modula-3 and OCAML. Also several interpreted and compiled Scheme implementations (Chicken, Guile, MzScheme) are supported.
+ </longdescription>
+ <use>
+ <flag name="ccache">build ccache-swig(a fast compiler cache)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">swig</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/swig/swig-1.3.40-r2.ebuild b/dev-lang/swig/swig-1.3.40-r2.ebuild
new file mode 100644
index 00000000000..a6fbc7b2331
--- /dev/null
+++ b/dev-lang/swig/swig-1.3.40-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD BSD-2"
+SLOT="1"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc"
+RESTRICT="test"
+DEPEND=""
+RDEPEND=""
+
+src_prepare () {
+ rm -v aclocal.m4 || die "Unable to remove aclocal.m4"
+ ./autogen.sh || die "Autogen script failed"
+
+ # Use swig1.3 as binary instead of swig
+ sed -i -e 's:TARGET_NOEXE= swig:TARGET_NOEXE= swig1.3:' Makefile.in
+ sed -i -e 's:/swig@EXEEXT@:/swig1.3@EXEEXT@:g' Source/Makefile.{am,in}
+ sed -i -e "s:PACKAGE_NAME='ccache-swig':PACKAGE_NAME='ccache-swig1.3':" CCache/configure
+ mv CCache/ccache-swig.1 CCache/ccache-swig1.3.1
+}
+
+src_configure () {
+ econf \
+ $(use_enable ccache)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "target install failed"
+ dodoc ANNOUNCE CHANGES CHANGES.current FUTURE NEW README TODO || die "dodoc failed"
+ if use doc; then
+ dohtml -r Doc/{Devel,Manual} || die "Failed to install html documentation"
+ fi
+}
diff --git a/dev-lang/swig/swig-2.0.12.ebuild b/dev-lang/swig/swig-2.0.12.ebuild
new file mode 100644
index 00000000000..1002641c2aa
--- /dev/null
+++ b/dev-lang/swig/swig-2.0.12.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~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 00000000000..0639a752da3
--- /dev/null
+++ b/dev-lang/swig/swig-2.0.9.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~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.2.ebuild b/dev-lang/swig/swig-3.0.2.ebuild
new file mode 100644
index 00000000000..1002641c2aa
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.4.ebuild b/dev-lang/swig/swig-3.0.4.ebuild
new file mode 100644
index 00000000000..6d1b954f32d
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.5.ebuild b/dev-lang/swig/swig-3.0.5.ebuild
new file mode 100644
index 00000000000..64803340678
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.5.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.6.ebuild b/dev-lang/swig/swig-3.0.6.ebuild
new file mode 100644
index 00000000000..6d1b954f32d
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.6.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
new file mode 100644
index 00000000000..8ae3aebf876
--- /dev/null
+++ b/dev-lang/tcc/Manifest
@@ -0,0 +1 @@
+DIST tcc-0.9.26.tar.bz2 525906 SHA256 521e701ae436c302545c3f973a9c9b7e2694769c71d9be10f70a2460705b6d71 SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53 WHIRLPOOL 62fc30f8a72f8f78ba4b7e3d8d11f5e5a920615dff0ff799a64fdb9611017a4d1537c10228f94250ac202dedcd05d0aa90a8565dc5956d5639b70a7e4fe1009c
diff --git a/dev-lang/tcc/metadata.xml b/dev-lang/tcc/metadata.xml
new file mode 100644
index 00000000000..f376edc581d
--- /dev/null
+++ b/dev-lang/tcc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>lang-misc</herd>
+</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 00000000000..debf142f95b
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --bindir=/usr/bin \
+ --libdir=/usr/$(get_libdir) \
+ --tccdir=tcc \
+ --includedir=/usr/include \
+ --docdir=/usr/share/doc/${PF} \
+ --mandir=/usr/share/man
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcc/tcc-0.9.26-r2.ebuild b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
new file mode 100644
index 00000000000..511f5277e51
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcc/tcc-9999.ebuild b/dev-lang/tcc/tcc-9999.ebuild
new file mode 100644
index 00000000000..d54771601eb
--- /dev/null
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+EGIT_REPO_URI="http://repo.or.cz/r/tinycc.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcl/Manifest b/dev-lang/tcl/Manifest
new file mode 100644
index 00000000000..1084751dad2
--- /dev/null
+++ b/dev-lang/tcl/Manifest
@@ -0,0 +1,2 @@
+DIST tcl-core8.6.4-src.tar.gz 5813056 SHA256 373e849067f33159470060f35742110ff23b5fba07e42f01fbd0654d7a9a371f SHA512 cc73248b68528be46dbe1e29fa129bc827850e9a315ccd91bd0ca0afe61b8af633830a8da5706283de1c149df6cbf857da75ebd0f3998bb459e5456a4844a61f WHIRLPOOL 9b14d7dd31b2d8d1ca3bc44d4259514d8ff9df905a165fb7f95af018afffa1b87deeaf51ef602fd3d97a80c399687f842d24b539a301520dfeec172387de23b3
+DIST tcl8.5.17-src.tar.gz 4546317 SHA256 4c7cd8f2e0900cb36dde899b3f9f4d5c471ee3c4f8304cf9ec71fd18cd5e98d6 SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568 WHIRLPOOL 7e97049eb3875bcdc33b2d8ab02b0932173916fbbdfbc7970dd3c3ed1fe520c15ed1d6106215a823b5fc6f5008f12f3ccd1525dd536ec239388e6bf459352ab6
diff --git a/dev-lang/tcl/files/tcl-8.4.15-tclm4-soname.patch b/dev-lang/tcl/files/tcl-8.4.15-tclm4-soname.patch
new file mode 100644
index 00000000000..4f2dce927d5
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.4.15-tclm4-soname.patch
@@ -0,0 +1,11 @@
+--- tcl8.4.15.orig/unix/tcl.m4 2007-05-25 05:40:13.000000000 +0900
++++ tcl8.4.15/unix/tcl.m4 2007-07-20 08:40:41.000000000 +0900
+@@ -1345,7 +1345,7 @@
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+ if test "$have_dl" = yes; then
+- 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/tcl/files/tcl-8.4.16-multilib.patch b/dev-lang/tcl/files/tcl-8.4.16-multilib.patch
new file mode 100644
index 00000000000..59d1b8af2f1
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.4.16-multilib.patch
@@ -0,0 +1,21 @@
+diff -Naur tcl8.4.16.orig/unix/configure.in tcl8.4.16/unix/configure.in
+--- tcl8.4.16.orig/unix/configure.in 2007-09-22 02:07:02.000000000 +0900
++++ tcl8.4.16/unix/configure.in 2007-12-15 10:43:16.000000000 +0900
+@@ -570,7 +570,7 @@
+ DBGX='${TCL_DBGX}'
+ 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'
+
+@@ -669,7 +669,7 @@
+ if test "$FRAMEWORK_BUILD" = "1" ; then
+ test -z "$TCL_PACKAGE_PATH" && \
+ TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
+-elif test "$prefix" != "$exec_prefix"; then
++elif test "$prefix" != "$exec_prefix" -o "${libdir}" != "${prefix}/lib"; then
+ TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
+ else
+ TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
diff --git a/dev-lang/tcl/files/tcl-8.4.9-strtod.patch b/dev-lang/tcl/files/tcl-8.4.9-strtod.patch
new file mode 100644
index 00000000000..a9974546b74
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.4.9-strtod.patch
@@ -0,0 +1,11 @@
+--- tcl8.4.9/compat/strtod.c 2002-02-25 16:26:12.000000000 +0200
++++ tcl8.4.9/compat/strtod.c 2005-05-30 08:55:18.000000000 +0300
+@@ -24,6 +24,8 @@
+ #define NULL 0
+ #endif
+
++#undef strtod
++
+ static int maxExponent = 511; /* Largest possible base 10 exponent. Any
+ * exponent larger than this will already
+ * produce underflow or overflow, so there's
diff --git a/dev-lang/tcl/files/tcl-8.5.10-conf.patch b/dev-lang/tcl/files/tcl-8.5.10-conf.patch
new file mode 100644
index 00000000000..dd90b06a6e5
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.10-conf.patch
@@ -0,0 +1,26 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,12 +1427,12 @@ 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"
+ AS_IF([test $doRpath = yes], [
+- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++ CC_SEARCH_FLAGS=''])
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+ AS_IF([test $do64bit = yes], [
+@@ -1464,7 +1464,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_SUFFIX=".so"
+
+- SHLIB_LD='${CC} -shared'
++ SHLIB_LD='${CC} ${CFLAGS} -shared -fPIC'
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tcl/files/tcl-8.5.13-autopath.patch b/dev-lang/tcl/files/tcl-8.5.13-autopath.patch
new file mode 100644
index 00000000000..77f0ca6ced0
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.13-autopath.patch
@@ -0,0 +1,19 @@
+ unix/configure.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/unix/configure.in b/unix/configure.in
+index 65f712a..b606b74 100755
+--- a/unix/configure.in
++++ b/unix/configure.in
+@@ -840,9 +840,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
+ test -z "$TCL_MODULE_PATH" && \
+ TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl"
+ elif test "$prefix/lib" != "$libdir"; then
+- TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
++ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}"
+ else
+- TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
++ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}"
+ fi
+
+ #--------------------------------------------------------------------
diff --git a/dev-lang/tcl/files/tcl-8.5.13-conf.patch b/dev-lang/tcl/files/tcl-8.5.13-conf.patch
new file mode 100644
index 00000000000..2d7493c3b3d
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.13-conf.patch
@@ -0,0 +1,20 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+@@ -1464,7 +1464,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_SUFFIX=".so"
+
+- SHLIB_LD='${CC} -shared'
++ SHLIB_LD='${CC} ${CFLAGS} -shared -fPIC'
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
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 00000000000..de1580ce55b
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
@@ -0,0 +1,12 @@
+diff -Naur tcl8.5a6.orig/unix/configure.in tcl8.5a6/unix/configure.in
+--- tcl8.5a6.orig/unix/configure.in 2007-04-27 02:33:51.000000000 +0900
++++ tcl8.5a6/unix/configure.in 2007-05-16 10:27:25.000000000 +0900
+@@ -645,7 +645,7 @@
+
+ eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
+
+-TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
++TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+ PRIVATE_INCLUDE_DIR='$(includedir)'
+ HTML_DIR='$(DISTDIR)/html'
+
diff --git a/dev-lang/tcl/files/tcl-8.5.14-conf.patch b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
new file mode 100644
index 00000000000..be303e9f3ef
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
@@ -0,0 +1,11 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tcl/files/tcl-8.5.9-gentoo-fbsd.patch b/dev-lang/tcl/files/tcl-8.5.9-gentoo-fbsd.patch
new file mode 100644
index 00000000000..022d81d3e26
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.9-gentoo-fbsd.patch
@@ -0,0 +1,13 @@
+diff --git a/unix/tcl.m4 b/unix/tcl.m4
+index fdd9d44..31bfca8 100644
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -1601,7 +1601,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # Version numbers are dot-stripped by system policy.
+ TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
++ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ Darwin-*)
diff --git a/dev-lang/tcl/files/tcl-8.5_alpha6-multilib.patch b/dev-lang/tcl/files/tcl-8.5_alpha6-multilib.patch
new file mode 100644
index 00000000000..ca7535fe0bb
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5_alpha6-multilib.patch
@@ -0,0 +1,24 @@
+diff -Naur tcl8.5a6.orig/unix/configure tcl8.5a6/unix/configure
+--- tcl8.5a6.orig/unix/configure 2007-04-27 02:33:51.000000000 +0900
++++ tcl8.5a6/unix/configure 2007-05-16 10:27:25.000000000 +0900
+@@ -17623,7 +17623,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 -Naur tcl8.5a6.orig/unix/configure.in tcl8.5a6/unix/configure.in
+--- tcl8.5a6.orig/unix/configure.in 2007-04-27 02:33:51.000000000 +0900
++++ tcl8.5a6/unix/configure.in 2007-05-16 10:27:25.000000000 +0900
+@@ -645,7 +645,7 @@
+
+ eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
+
+-TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
++TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+ PRIVATE_INCLUDE_DIR='$(includedir)'
+ HTML_DIR='$(DISTDIR)/html'
+
diff --git a/dev-lang/tcl/files/tcl-8.5_alpha6-tclm4-soname.patch b/dev-lang/tcl/files/tcl-8.5_alpha6-tclm4-soname.patch
new file mode 100644
index 00000000000..f24cdc6088e
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5_alpha6-tclm4-soname.patch
@@ -0,0 +1,11 @@
+--- tcl8.5a6.orig/unix/tcl.m4 2007-04-27 02:33:51.000000000 +0900
++++ tcl8.5a6/unix/tcl.m4 2007-05-16 10:46:31.000000000 +0900
+@@ -1425,7 +1425,7 @@
+ # 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/tcl/files/tcl-8.6.1-conf.patch b/dev-lang/tcl/files/tcl-8.6.1-conf.patch
new file mode 100644
index 00000000000..be303e9f3ef
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.6.1-conf.patch
@@ -0,0 +1,11 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tcl/files/tcl-configure-LANG.patch b/dev-lang/tcl/files/tcl-configure-LANG.patch
new file mode 100644
index 00000000000..3ef76ef911c
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-configure-LANG.patch
@@ -0,0 +1,41 @@
+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,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# 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
++
+ # 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.
diff --git a/dev-lang/tcl/metadata.xml b/dev-lang/tcl/metadata.xml
new file mode 100644
index 00000000000..99ace7c4062
--- /dev/null
+++ b/dev-lang/tcl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <email>tcltk@gentoo.org</email>
+ <description>TCL/TK Herd.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/tcl/tcl-8.5.17-r100.ebuild b/dev-lang/tcl/tcl-8.5.17-r100.ebuild
new file mode 100644
index 00000000000..9444a78dc24
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17-r100.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# this ebuild is only for the libtcl8.5.so SONAME for ABI compat
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator multilib-minimal
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="8.5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~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 00000000000..60db894f49c
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator multilib-minimal
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.5"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~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.4.ebuild b/dev-lang/tcl/tcl-8.6.4.ebuild
new file mode 100644
index 00000000000..302366a3280
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.4.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${PN}-core${PV}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~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
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ "${SPARENT}"/doc/try.n \
+ -delete || die
+
+ epatch "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.6.1-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
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tcl${v1}/include/unix
+ doins *.h
+ insinto /usr/${mylibdir}/tcl${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
+ dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
+
+ if multilib_is_native_abi; then
+ dosym tclsh${v1} /usr/bin/tclsh
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
+
+pkg_postinst() {
+ for version in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 8.6 ${version}; then
+ echo
+ ewarn "You're upgrading from <${P}, you must recompile the other"
+ ewarn "packages on your system that link with tcl after the upgrade"
+ ewarn "completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
+ ewarn "upgrade them before this recompilation, too,"
+ echo
+ fi
+ done
+}
diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest
new file mode 100644
index 00000000000..722e1eb2bf6
--- /dev/null
+++ b/dev-lang/teyjus/Manifest
@@ -0,0 +1 @@
+DIST teyjus-source-2.0-b2.tar.gz 465815 SHA256 f589fb460d7095a6e674b7a6413772c41b98654c38602c3e8c477a976da99052 SHA512 071a25cd5341f7562f07dcaae1f87c35eb394ddab94a5160826c7fb2d9a51efea909b41947205503ebcc58df04388baf9eaf9f5a614186701940da29db1c1b29 WHIRLPOOL 0dfd8128d194ef5d6cf4fdf6d75c4c654ab834af6c090f595b2defd91645cc0fca4ae4a8483c7a77b4a7e8dae5b3c31069bf85d240538db2f88df69d6f7f42d0
diff --git a/dev-lang/teyjus/files/50teyjus-gentoo.el b/dev-lang/teyjus/files/50teyjus-gentoo.el
new file mode 100644
index 00000000000..7e05cdec7ae
--- /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 00000000000..dcccd25f9fe
--- /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 00000000000..e14550d0f53
--- /dev/null
+++ b/dev-lang/teyjus/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <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>
+</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 00000000000..41ac98c1164
--- /dev/null
+++ b/dev-lang/teyjus/teyjus-2.0.2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit base 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="http://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}
+
+PATCHES=("${FILESDIR}/${PN}-2.0.2-flags.patch")
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ base_src_prepare
+ 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"
+}
+
+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/tinycobol/Manifest b/dev-lang/tinycobol/Manifest
new file mode 100644
index 00000000000..b856156ad5b
--- /dev/null
+++ b/dev-lang/tinycobol/Manifest
@@ -0,0 +1 @@
+DIST tinycobol-0.65.9.tar.bz2 872989 SHA256 a5e431ae7e08cf0be921da302b3c19910a8066c78202cb21ee5ba5603db806e2 SHA512 4c6ae224ac68017994c78d80f6b452c90076f320a97b9d7b29b83d403f30211f7487f001bf769ca87693a9b9950c11434ba805e4abd85b50ebe75051f74a5394 WHIRLPOOL 40eccb0f0038ff972545bb66940b64b4f8d526a16b3e802f1d2bcb11d80fc3b1345c83fef26841038176723ede65e9e5809c288973764cced113e4c83f129f92
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 00000000000..4046b0249e1
--- /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 00000000000..2b77202cf27
--- /dev/null
+++ b/dev-lang/tinycobol/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <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 00000000000..4ea27efdbb4
--- /dev/null
+++ b/dev-lang/tinycobol/tinycobol-0.65.9.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="COBOL for linux"
+HOMEPAGE="http://tiny-cobol.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tiny-cobol/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="ppc x86"
+
+RDEPEND=">=dev-libs/glib-2.0
+ sys-libs/db
+ dev-db/vbisam"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}.patch"
+}
+
+src_compile() {
+ econf || die
+ emake CC="$(tc-getCC)" || die "make failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ dodir /usr/share/man/man1
+ dodir /usr/lib
+ dodir /usr/share/htcobol
+ dodir /usr/share/doc
+ emake DESTDIR="${D}" cobdir_docdir="/usr/share/doc/htcobol-${PV}" \
+ pkgdatadir="/usr/share/htcobol/" install
+ cd lib
+ emake DESTDIR="${D}" pkgdatadir="/usr/share/htcobol/" install \
+ install-shared-libs install-static-libs
+ rm -rf "${D}/usr/man" # empty dir, see bug #315401
+}
diff --git a/dev-lang/tk/Manifest b/dev-lang/tk/Manifest
new file mode 100644
index 00000000000..6c31ec8bda8
--- /dev/null
+++ b/dev-lang/tk/Manifest
@@ -0,0 +1,3 @@
+DIST tcl8.5.17-src.tar.gz 4546317 SHA256 4c7cd8f2e0900cb36dde899b3f9f4d5c471ee3c4f8304cf9ec71fd18cd5e98d6 SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568 WHIRLPOOL 7e97049eb3875bcdc33b2d8ab02b0932173916fbbdfbc7970dd3c3ed1fe520c15ed1d6106215a823b5fc6f5008f12f3ccd1525dd536ec239388e6bf459352ab6
+DIST tk8.5.17-src.tar.gz 4095985 SHA256 b517914d076fba047c4bbc02f7dd7f0b0b06d1931826ae440129162d8bba92d3 SHA512 ddadc738c2567e35d1257b59212c8a0eb70a1bf041d986bc6df3b841b51d934d79a0ef389c928223a64516a92cae3357b2c789edca9c8a626ff4c1cf320c4f4f WHIRLPOOL 431ad2d190755b997b07c8a59046c7f15a7be39cb8b162daccae8eca4c4b6e97a52d5823e7e566380935abefad347d18a28fc3a7e78892b6186ebcefce726fd3
+DIST tk8.6.4-src.tar.gz 4266426 SHA256 08f99df85e5dc9c4271762163c6aabb962c8b297dc5c4c1af8bdd05fc2dd26c1 SHA512 d0a1d1fd0938af4a9e532aa1bd4488647cff05f98e9e09b5fa16b773364a5d61030b7975541c688c7e0afc0bde60d49ce50a24d842549bab1622a0255e267909 WHIRLPOOL 8660c222d9b32d805d654ca9d9a881ec93705874790186a426fcbddf31e39316bccde4421a949684ba456351aeac619de0b7a27f39c1d3af14157d7553472801
diff --git a/dev-lang/tk/files/tcl-8.5.9-gentoo-fbsd.patch b/dev-lang/tk/files/tcl-8.5.9-gentoo-fbsd.patch
new file mode 100644
index 00000000000..022d81d3e26
--- /dev/null
+++ b/dev-lang/tk/files/tcl-8.5.9-gentoo-fbsd.patch
@@ -0,0 +1,13 @@
+diff --git a/unix/tcl.m4 b/unix/tcl.m4
+index fdd9d44..31bfca8 100644
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -1601,7 +1601,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # Version numbers are dot-stripped by system policy.
+ TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
++ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ Darwin-*)
diff --git a/dev-lang/tk/files/tk-8.4-lastevent.patch b/dev-lang/tk/files/tk-8.4-lastevent.patch
new file mode 100644
index 00000000000..f93d335bf96
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4-lastevent.patch
@@ -0,0 +1,28 @@
+Source: Jeffrey Gardner (je_fro) <jeffrey.e.gardner@comcast.net> - http://overlays.gentoo.org/dev/je_fro/browser/dev-lang/tk/files/tk-8.4-lastevent.patch
+Upstream: N/A
+Reason: Fix ABI incompatibility introduced by x11-proto/xproto-7.0.13 (bug #225999)
+--- generic/tk.h.orig 2008-02-06 16:31:40.000000000 +0100
++++ generic/tk.h 2008-07-24 08:21:46.000000000 +0200
+@@ -635,17 +635,15 @@
+ *
+ *---------------------------------------------------------------------------
+ */
+-#define VirtualEvent (LASTEvent)
+-#define ActivateNotify (LASTEvent + 1)
+-#define DeactivateNotify (LASTEvent + 2)
+-#define MouseWheelEvent (LASTEvent + 3)
+-#define TK_LASTEVENT (LASTEvent + 4)
++#define VirtualEvent (MappingNotify + 1)
++#define ActivateNotify (MappingNotify + 2)
++#define DeactivateNotify (MappingNotify + 3)
++#define MouseWheelEvent (MappingNotify + 4)
++#define TK_LASTEVENT (MappingNotify + 5)
+
+ #define MouseWheelMask (1L << 28)
+-
+ #define ActivateMask (1L << 29)
+ #define VirtualEventMask (1L << 30)
+-#define TK_LASTEVENT (LASTEvent + 4)
+
+
+ /*
diff --git a/dev-lang/tk/files/tk-8.4.11-multilib.patch b/dev-lang/tk/files/tk-8.4.11-multilib.patch
new file mode 100644
index 00000000000..092b806259f
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4.11-multilib.patch
@@ -0,0 +1,24 @@
+diff -Naur tk8.4.11.orig/unix/configure tk8.4.11/unix/configure
+--- tk8.4.11.orig/unix/configure 2005-06-30 01:43:10.000000000 +0900
++++ tk8.4.11/unix/configure 2005-07-02 23:22:35.000000000 +0900
+@@ -5721,7 +5721,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 -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.4.15-aqua.patch b/dev-lang/tk/files/tk-8.4.15-aqua.patch
new file mode 100644
index 00000000000..9e6f59d12ce
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4.15-aqua.patch
@@ -0,0 +1,11 @@
+--- unix/Makefile.in
++++ 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.4.15-tclm4-soname.patch b/dev-lang/tk/files/tk-8.4.15-tclm4-soname.patch
new file mode 100644
index 00000000000..b427d276f06
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4.15-tclm4-soname.patch
@@ -0,0 +1,12 @@
+diff -Naur tk8.4.15.orig/unix/tcl.m4 tk8.4.15/unix/tcl.m4
+--- tk8.4.15.orig/unix/tcl.m4 2007-05-26 01:09:54.000000000 +0900
++++ tk8.4.15/unix/tcl.m4 2007-07-21 02:16:13.000000000 +0900
+@@ -1345,7 +1345,7 @@
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+ if test "$have_dl" = yes; then
+- 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/files/tk-8.4.9-man.patch b/dev-lang/tk/files/tk-8.4.9-man.patch
new file mode 100644
index 00000000000..bb816f809c8
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4.9-man.patch
@@ -0,0 +1,29 @@
+diff -Naur tk8.4.9.orig/unix/installManPage tk8.4.9/unix/installManPage
+--- tk8.4.9.orig/unix/installManPage 2004-12-07 04:46:29.000000000 +0900
++++ tk8.4.9/unix/installManPage 2005-03-02 23:36:23.252797867 +0900
+@@ -3,7 +3,7 @@
+ ZIP=:
+ while true; do
+ case $1 in
+- -s | --symlinks ) S="-s ";;
++ -s | --symlinks ) TK_S="-s ";;
+ -z | --compress ) ZIP=$2; shift ;;
+ -e | --extension ) Z=$2; shift ;;
+ -s | --suffix ) SUFFIX=$2; shift ;;
+@@ -18,7 +18,7 @@
+
+ MANPAGE=$1
+ DIR=$2
+-test -z "$S" && S="$DIR/"
++test -z "$TK_S" && TK_S="$DIR/"
+
+ # A sed script to parse the alternative names out of a man page.
+ #
+@@ -62,6 +62,6 @@
+ $ZIP $DIR/$FIRST
+ else
+ rm -f $DIR/$f $DIR/$f.*
+- ln $S$FIRST$Z $DIR/$f$Z
++ ln $TK_S$FIRST$Z $DIR/$f$Z
+ fi
+ done
diff --git a/dev-lang/tk/files/tk-8.5.10-conf.patch b/dev-lang/tk/files/tk-8.5.10-conf.patch
new file mode 100644
index 00000000000..8a6104223d9
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.10-conf.patch
@@ -0,0 +1,31 @@
+ 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,12 +1420,12 @@ 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"
+ AS_IF([test $doRpath = yes], [
+- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++ CC_SEARCH_FLAGS=''])
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
+ AS_IF([test $do64bit = yes], [
+@@ -1452,7 +1452,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_SUFFIX=".so"
+
+- SHLIB_LD='${CC} -shared'
++ SHLIB_LD='${CC} ${CFLAGS} -shared'
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
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 00000000000..67640db085f
--- /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.11-fix-name-collision-uclibc.patch b/dev-lang/tk/files/tk-8.5.11-fix-name-collision-uclibc.patch
new file mode 100644
index 00000000000..a92717ac9d8
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.11-fix-name-collision-uclibc.patch
@@ -0,0 +1,35 @@
+diff -Naur tk8.5.11.orig/generic/ttk/ttkTreeview.c tk8.5.11/generic/ttk/ttkTreeview.c
+--- tk8.5.11.orig/generic/ttk/ttkTreeview.c 2011-11-01 10:05:27.000000000 -0400
++++ tk8.5.11/generic/ttk/ttkTreeview.c 2012-11-04 13:23:41.000000000 -0500
+@@ -485,11 +485,11 @@
+ }
+ }
+
+-/* + unshare(objPtr) --
++/* + unshareObj(objPtr) --
+ * Ensure that a Tcl_Obj * has refcount 1 -- either return objPtr
+ * itself, or a duplicated copy.
+ */
+-static Tcl_Obj *unshare(Tcl_Obj *objPtr)
++static Tcl_Obj *unshareObj(Tcl_Obj *objPtr)
+ {
+ if (Tcl_IsShared(objPtr)) {
+ Tcl_Obj *newObj = Tcl_DuplicateObj(objPtr);
+@@ -2525,7 +2525,7 @@
+ } else { /* set column */
+ int length;
+
+- item->valuesObj = unshare(item->valuesObj);
++ item->valuesObj = unshareObj(item->valuesObj);
+
+ /* Make sure -values is fully populated:
+ */
+@@ -2826,7 +2826,7 @@
+ */
+ for (parent = item->parent; parent; parent = parent->parent) {
+ if (!(parent->state & TTK_STATE_OPEN)) {
+- parent->openObj = unshare(parent->openObj);
++ parent->openObj = unshareObj(parent->openObj);
+ Tcl_SetBooleanObj(parent->openObj, 1);
+ parent->state |= TTK_STATE_OPEN;
+ TtkRedisplayWidget(&tv->core);
diff --git a/dev-lang/tk/files/tk-8.5.13-conf.patch b/dev-lang/tk/files/tk-8.5.13-conf.patch
new file mode 100644
index 00000000000..b77b8b3ad34
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.13-conf.patch
@@ -0,0 +1,25 @@
+ 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"
+@@ -1452,7 +1452,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_SUFFIX=".so"
+
+- SHLIB_LD='${CC} -shared'
++ SHLIB_LD='${CC} ${CFLAGS} -shared'
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
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 00000000000..db3d8cc0081
--- /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 00000000000..553f93f9b7d
--- /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/files/tk-8.5_alpha6-tclm4-soname.patch b/dev-lang/tk/files/tk-8.5_alpha6-tclm4-soname.patch
new file mode 100644
index 00000000000..3fdd4843136
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5_alpha6-tclm4-soname.patch
@@ -0,0 +1,12 @@
+diff -Naur tk8.5a6.orig/unix/tcl.m4 tk8.5a6/unix/tcl.m4
+--- tk8.5a6.orig/unix/tcl.m4 2007-04-27 06:02:27.000000000 +0900
++++ tk8.5a6/unix/tcl.m4 2007-07-21 02:47:58.000000000 +0900
+@@ -1425,7 +1425,7 @@
+ # 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/files/tk-configure-LANG.patch b/dev-lang/tk/files/tk-configure-LANG.patch
new file mode 100644
index 00000000000..3ef76ef911c
--- /dev/null
+++ b/dev-lang/tk/files/tk-configure-LANG.patch
@@ -0,0 +1,41 @@
+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,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# 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
++
+ # 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.
diff --git a/dev-lang/tk/metadata.xml b/dev-lang/tk/metadata.xml
new file mode 100644
index 00000000000..6aece7ec2ee
--- /dev/null
+++ b/dev-lang/tk/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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 00000000000..6763b41ba14
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17-r100.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="
+ mirror://sourceforge/tcl/${MY_P}-src.tar.gz
+ mirror://sourceforge/tcl/${MY_P//tk/tcl}-src.tar.gz
+ "
+
+LICENSE="tcltk"
+SLOT="8.5"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ x11-libs/libX11
+ x11-libs/libXt
+ truetype? ( x11-libs/libXft )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ )
+ ~dev-lang/tcl-${PV}:8.5=
+ !=dev-lang/tk-8.5:0"
+DEPEND="${RDEPEND}
+ !aqua? ( x11-proto/xproto )"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+DOCS=()
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+ eprefixify Makefile.in
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm -f configure || die
+
+ append-cppflags \
+ -I"${WORKDIR}/${MY_P//tk/tcl}/generic" \
+ -I"${WORKDIR}/${MY_P//tk/tcl}/unix"
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ tc-export CC
+
+ eautoconf
+}
+
+src_configure() {
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}/tcl${v1}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ dolib.so libtk8.5.so
+}
diff --git a/dev-lang/tk/tk-8.5.17.ebuild b/dev-lang/tk/tk-8.5.17.ebuild
new file mode 100644
index 00000000000..6c10f4701a9
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.5"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ x11-libs/libX11
+ x11-libs/libXt
+ truetype? ( x11-libs/libXft )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ )
+ ~dev-lang/tcl-${PV}:0="
+DEPEND="${RDEPEND}
+ !aqua? ( x11-proto/xproto )"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+ eprefixify Makefile.in
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm -f configure || die
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ tc-export CC
+
+ eautoconf
+}
+
+src_configure() {
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${SPARENT}.*unix:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ dosym wish${v1} /usr/bin/wish
+
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+}
diff --git a/dev-lang/tk/tk-8.6.4-r1.ebuild b/dev-lang/tk/tk-8.6.4-r1.ebuild
new file mode 100644
index 00000000000..106d6f53ad0
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.4-r1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug +threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )
+ ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ !aqua? ( >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+
+# Not bumped to 8.6
+#RESTRICT=test
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ -delete || die
+
+ 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
+
+ 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() {
+ Xemake test
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ if multilib_is_native_abi; then
+ dosym wish${v1} /usr/bin/wish
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest
new file mode 100644
index 00000000000..dd8fb1d0516
--- /dev/null
+++ b/dev-lang/tuprolog/Manifest
@@ -0,0 +1,6 @@
+DIST 2p-2.4.0.zip 2421675 SHA256 f674b282bd7bc60e92ea417f8766e635979366d84d48634dd622e60ad1aa78c6 SHA512 20c86f736efe526dfffe603b19648394aaeaadf326034bba4f5717a193d7f76a99c6f3cb7bb93e2f1b608abd4e4af30341a2727f61e60e60289c2a964da782e9 WHIRLPOOL 7a353f5c6df2dba877d6880fc91ff0356639900767eb346a2eba97773303e125d0d2ffeead35e83cb61ffd013b49d4a05498861207de228e208a3f690a65ec4b
+DIST tuprolog-2.5.0.zip 4847183 SHA256 227714576fb1815a3fcc017211758bfb2d5a0b6a07ce3a3a24f8cd93db2e5e04
+DIST tuprolog-2.6.0.tar.gz 8366655 SHA256 5c9416c72ddde806720c1bce122a8bb12cab04a9af35a42b88067e1b145bf0c5 SHA512 5253f0d65787e9f090a8b4da8df007da269492098686fa5847e8d624a6656d1820b36c5b096e51d6f40480fea02a64793797c23161627942f076fc5eae414b82 WHIRLPOOL 81de4453dd6b62558260f31ab2e3af1f2a256934cc8a24a9e18723bd95ef646b206941169a3d69994f26f20c65c00b14022392f35ccb8573d8a7cbc7af16b353
+DIST tuprolog-2.7.0.tar.gz 9005490 SHA256 93cec171d48e40a695baafcce419b75fc3d7b6e5ef06b0e787b4823e09f571a7 SHA512 88a9edb5c26317ea82e114a7e82d933d99f85ca89f1244d92de66e7eae11c8c61ed771c104a70ec210c1a65dca2b3ca2c3aba077d3afab4b250b62d14e83c7e4 WHIRLPOOL 3f4c76bea53b899d7be6fa93a9b24c5aaab84bd5ba4c65ca2a988e3a8acaeb1f2d0205c3a60720fbbf02a54d52bb6e7c39b5504ae9777d80d8f238b7c3c7050a
+DIST tuprolog-2.7.2.tar.gz 9104934 SHA256 8b0c653d3c9d701197f13d8dec6e45548565cddfd052a5bec9578f4e6a50f21e SHA512 c327893e0fcf777b6ad8951b3baf88bc9527bf88e9d06ac54af04e777e6c0fc255b15f492c2cf483859d3a1966897d5969e1496370b88287b96e83d92babc722 WHIRLPOOL cf5082d0ca07f8bc59e678c27b1fb8aaa8879f6b15dc887949cb61760dfd721ba4a6fd5b05fb979ea94e6ab607dfcff5707be47d5ac657623556426e734ca395
+DIST tuprolog-2.9.0.tar.gz 4841110 SHA256 e789c7f1777a4f57698ac4756d03574f8fd5be4cebb1d5226722c35df75e163f SHA512 be15c99c40f750f3d1d4b70ae7ced9fe3792e8747876b6190ec1a01dd287e0fa34f88671f99f9e3fd7249e6fd44da7c4dadce0cd111b44b24e0e43d31c85165e WHIRLPOOL ada10ff775dc5e55d5c55c4dc920f5a4e7f8654891a10cf815734649e384fe6351921b807c54f6a6e8503fcbd0cbd9ee7f1569140bb5eba7e77e4da85f907203
diff --git a/dev-lang/tuprolog/files/build.xml b/dev-lang/tuprolog/files/build.xml
new file mode 100644
index 00000000000..f5b946fd56d
--- /dev/null
+++ b/dev-lang/tuprolog/files/build.xml
@@ -0,0 +1,99 @@
+<?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"/>
+
+ <!-- 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 classpath="${gentoo.classpath}"
+ deprecation="off"
+ destdir="${build.dir}"
+ encoding="ISO-8859-1"
+ source="1.5"
+ srcdir="${src.dir}"
+ target="1.5"/>
+ <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"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target depends="init" name="javadoc">
+ <javadoc classpath="${gentoo.classpath}"
+ author="false"
+ destdir="${docs.dir}"
+ encoding="ISO-8859-1"
+ packagenames="alice.*"
+ source="1.5"
+ 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}"/>
+ <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"
+ source="1.5"
+ srcdir="${test.dir}"
+ target="1.5"
+ excludes="**/fixtures/**"/>
+ <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/tuprolog-2.3.1_beta-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.3.1_beta-javadocs.patch
new file mode 100644
index 00000000000..aa1f3dcbab2
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.3.1_beta-javadocs.patch
@@ -0,0 +1,228 @@
+diff -ur 2p-deploy.orig/src/alice/tuprolog/ChoicePointStore.java 2p-deploy/src/alice/tuprolog/ChoicePointStore.java
+--- 2p-deploy.orig/src/alice/tuprolog/ChoicePointStore.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/ChoicePointStore.java 2012-01-15 09:20:48.000000000 +1300
+@@ -35,7 +35,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -44,7 +43,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+diff -ur 2p-deploy.orig/src/alice/tuprolog/ClauseStore.java 2p-deploy/src/alice/tuprolog/ClauseStore.java
+--- 2p-deploy.orig/src/alice/tuprolog/ClauseStore.java 2010-11-04 11:55:42.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/ClauseStore.java 2012-01-15 09:20:48.000000000 +1300
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+diff -ur 2p-deploy.orig/src/alice/tuprolog/EngineManager.java 2p-deploy/src/alice/tuprolog/EngineManager.java
+--- 2p-deploy.orig/src/alice/tuprolog/EngineManager.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/EngineManager.java 2012-01-15 09:20:48.000000000 +1300
+@@ -87,7 +87,7 @@
+ /**
+ * Solves a query
+ *
+- * @param g the term representing the goal to be demonstrated
++ * @param query the term representing the goal to be demonstrated
+ * @return the result of the demonstration
+ * @see SolveInfo
+ **/
+diff -ur 2p-deploy.orig/src/alice/tuprolog/PrimitiveManager.java 2p-deploy/src/alice/tuprolog/PrimitiveManager.java
+--- 2p-deploy.orig/src/alice/tuprolog/PrimitiveManager.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/PrimitiveManager.java 2012-01-15 09:20:48.000000000 +1300
+@@ -87,7 +87,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+diff -ur 2p-deploy.orig/src/alice/tuprolog/lib/BasicLibrary.java 2p-deploy/src/alice/tuprolog/lib/BasicLibrary.java
+--- 2p-deploy.orig/src/alice/tuprolog/lib/BasicLibrary.java 2011-01-28 16:31:44.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/lib/BasicLibrary.java 2012-01-15 09:20:48.000000000 +1300
+@@ -109,7 +109,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+diff -ur 2p-deploy.orig/src/alice/tuprolog/lib/IOLibrary.java 2p-deploy/src/alice/tuprolog/lib/IOLibrary.java
+--- 2p-deploy.orig/src/alice/tuprolog/lib/IOLibrary.java 2011-01-19 16:34:24.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/lib/IOLibrary.java 2012-01-15 09:20:48.000000000 +1300
+@@ -372,7 +372,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+diff -ur 2p-deploy.orig/src/alice/tuprolog/lib/JavaLibrary.java 2p-deploy/src/alice/tuprolog/lib/JavaLibrary.java
+--- 2p-deploy.orig/src/alice/tuprolog/lib/JavaLibrary.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/tuprolog/lib/JavaLibrary.java 2012-01-15 09:20:48.000000000 +1300
+@@ -1390,8 +1390,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur 2p-deploy.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2p-deploy/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- 2p-deploy.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2010-01-21 21:29:22.000000000 +1300
++++ 2p-deploy/src/alice/tuprologx/ide/LibraryDialogFrame.java 2012-01-15 09:20:48.000000000 +1300
+@@ -317,7 +317,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur 2p-deploy.orig/src/alice/tuprologx/ide/ToolBar.java 2p-deploy/src/alice/tuprologx/ide/ToolBar.java
+--- 2p-deploy.orig/src/alice/tuprologx/ide/ToolBar.java 2010-01-21 21:29:22.000000000 +1300
++++ 2p-deploy/src/alice/tuprologx/ide/ToolBar.java 2012-01-15 09:20:48.000000000 +1300
+@@ -232,8 +232,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur 2p-deploy.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2p-deploy/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- 2p-deploy.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2010-01-21 21:29:48.000000000 +1300
++++ 2p-deploy/src/alice/tuprologx/pj/lib/PJLibrary.java 2012-01-15 09:20:48.000000000 +1300
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur 2p-deploy.orig/src/alice/util/ReadOnlyLinkedList.java 2p-deploy/src/alice/util/ReadOnlyLinkedList.java
+--- 2p-deploy.orig/src/alice/util/ReadOnlyLinkedList.java 2010-03-17 18:14:10.000000000 +1300
++++ 2p-deploy/src/alice/util/ReadOnlyLinkedList.java 2012-01-15 09:32:03.000000000 +1300
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
+diff -ur 2p-deploy.orig/src/alice/util/jedit/InputHandler.java 2p-deploy/src/alice/util/jedit/InputHandler.java
+--- 2p-deploy.orig/src/alice/util/jedit/InputHandler.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/util/jedit/InputHandler.java 2012-01-15 09:20:48.000000000 +1300
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur 2p-deploy.orig/src/alice/util/jedit/JEditTextArea.java 2p-deploy/src/alice/util/jedit/JEditTextArea.java
+--- 2p-deploy.orig/src/alice/util/jedit/JEditTextArea.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/util/jedit/JEditTextArea.java 2012-01-15 09:20:48.000000000 +1300
+@@ -1389,7 +1389,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur 2p-deploy.orig/src/alice/util/jedit/KeywordMap.java 2p-deploy/src/alice/util/jedit/KeywordMap.java
+--- 2p-deploy.orig/src/alice/util/jedit/KeywordMap.java 2010-01-21 21:29:22.000000000 +1300
++++ 2p-deploy/src/alice/util/jedit/KeywordMap.java 2012-01-15 09:20:48.000000000 +1300
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+diff -ur 2p-deploy.orig/src/alice/util/jedit/TextAreaPainter.java 2p-deploy/src/alice/util/jedit/TextAreaPainter.java
+--- 2p-deploy.orig/src/alice/util/jedit/TextAreaPainter.java 2010-01-21 21:29:24.000000000 +1300
++++ 2p-deploy/src/alice/util/jedit/TextAreaPainter.java 2012-01-15 09:20:48.000000000 +1300
+@@ -75,7 +75,7 @@
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i>
+ * will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -86,7 +86,7 @@
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i>
+ * will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur 2p-deploy.orig/src/alice/util/jedit/TokenMarker.java 2p-deploy/src/alice/util/jedit/TokenMarker.java
+--- 2p-deploy.orig/src/alice/util/jedit/TokenMarker.java 2010-01-21 21:29:22.000000000 +1300
++++ 2p-deploy/src/alice/util/jedit/TokenMarker.java 2012-01-15 09:20:48.000000000 +1300
+@@ -24,7 +24,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
diff --git a/dev-lang/tuprolog/files/tuprolog-2.4.0_rc5-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.4.0_rc5-javadocs.patch
new file mode 100644
index 00000000000..618ead12da8
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.4.0_rc5-javadocs.patch
@@ -0,0 +1,315 @@
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/ChoicePointStore.java 2p-2.4.0-RC5/src/alice/tuprolog/ChoicePointStore.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/ChoicePointStore.java 2011-07-18 18:49:42.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/ChoicePointStore.java 2012-01-15 10:02:51.000000000 +1300
+@@ -36,7 +36,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -45,7 +44,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+@@ -93,4 +91,4 @@
+ return l;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/ClauseStore.java 2p-2.4.0-RC5/src/alice/tuprolog/ClauseStore.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/ClauseStore.java 2011-07-21 15:19:52.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/ClauseStore.java 2012-01-15 10:03:27.000000000 +1300
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+@@ -160,4 +158,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/EngineManager.java 2p-2.4.0-RC5/src/alice/tuprolog/EngineManager.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/EngineManager.java 2011-07-21 15:21:30.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/EngineManager.java 2012-01-15 10:03:54.000000000 +1300
+@@ -96,7 +96,7 @@
+ /**
+ * Solves a query
+ *
+- * @param g the term representing the goal to be demonstrated
++ * @param query the term representing the goal to be demonstrated
+ * @return the result of the demonstration
+ * @see SolveInfo
+ **/
+@@ -243,4 +243,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/PrimitiveManager.java 2p-2.4.0-RC5/src/alice/tuprolog/PrimitiveManager.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/PrimitiveManager.java 2011-07-21 15:35:50.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/PrimitiveManager.java 2012-01-15 10:04:20.000000000 +1300
+@@ -89,7 +89,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+@@ -192,4 +192,4 @@
+ return (functorHashMap.containsKey(name + "/" + nArgs) || predicateHashMap.containsKey(name + "/" + nArgs));
+ }
+ /**/
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/event/SpyEvent.java 2p-2.4.0-RC5/src/alice/tuprolog/event/SpyEvent.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/event/SpyEvent.java 2011-07-21 15:47:18.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/event/SpyEvent.java 2012-01-15 10:21:13.000000000 +1300
+@@ -33,10 +33,6 @@
+ * event description
+ */
+ private String msg;
+- /**
+- * @uml.property name="env"
+- * @uml.associationEnd
+- */
+ private Engine env;
+
+ public SpyEvent(Object source, String msg_) {
+@@ -63,4 +59,4 @@
+ return msg + ((env == null) ? "" : env.toString());
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/BasicLibrary.java 2p-2.4.0-RC5/src/alice/tuprolog/lib/BasicLibrary.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/BasicLibrary.java 2011-09-16 18:00:58.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/lib/BasicLibrary.java 2012-01-15 10:04:49.000000000 +1300
+@@ -114,7 +114,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+@@ -1264,4 +1264,4 @@
+ { "\\", "expression_bitwise_not", "functor" } };
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/IOLibrary.java 2p-2.4.0-RC5/src/alice/tuprolog/lib/IOLibrary.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/IOLibrary.java 2011-07-21 15:50:40.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/lib/IOLibrary.java 2012-01-15 10:06:27.000000000 +1300
+@@ -375,7 +375,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+@@ -470,4 +470,4 @@
+ }
+ return true;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/JavaLibrary.java 2p-2.4.0-RC5/src/alice/tuprolog/lib/JavaLibrary.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprolog/lib/JavaLibrary.java 2011-07-21 15:50:42.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprolog/lib/JavaLibrary.java 2012-01-15 10:10:02.000000000 +1300
+@@ -1393,8 +1393,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/Console.java 2p-2.4.0-RC5/src/alice/tuprologx/ide/Console.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/Console.java 2011-06-29 17:00:06.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprologx/ide/Console.java 2012-01-15 10:10:45.000000000 +1300
+@@ -10,8 +10,5 @@
+ public void getNextSolution();
+ public void acceptSolution();
+ public void stopEngine();
+- /**
+- * @uml.property name="goal"
+- */
+ public String getGoal();
+-}
+\ No newline at end of file
++}
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2p-2.4.0-RC5/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2011-07-21 16:02:44.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprologx/ide/LibraryDialogFrame.java 2012-01-15 10:11:41.000000000 +1300
+@@ -325,7 +325,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/ToolBar.java 2p-2.4.0-RC5/src/alice/tuprologx/ide/ToolBar.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprologx/ide/ToolBar.java 2011-07-21 16:10:16.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprologx/ide/ToolBar.java 2012-01-15 10:12:21.000000000 +1300
+@@ -242,8 +242,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur 2p-2.4.0-RC5.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2p-2.4.0-RC5/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- 2p-2.4.0-RC5.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2011-07-21 16:18:14.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/tuprologx/pj/lib/PJLibrary.java 2012-01-15 10:13:01.000000000 +1300
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/ReadOnlyLinkedList.java 2p-2.4.0-RC5/src/alice/util/ReadOnlyLinkedList.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/ReadOnlyLinkedList.java 2011-07-21 16:27:00.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/util/ReadOnlyLinkedList.java 2012-01-15 10:01:28.000000000 +1300
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/jedit/InputHandler.java 2p-2.4.0-RC5/src/alice/util/jedit/InputHandler.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/jedit/InputHandler.java 2011-07-21 16:33:22.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/util/jedit/InputHandler.java 2012-01-15 10:19:53.000000000 +1300
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/jedit/JEditTextArea.java 2p-2.4.0-RC5/src/alice/util/jedit/JEditTextArea.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/jedit/JEditTextArea.java 2011-09-28 12:26:10.000000000 +1300
++++ 2p-2.4.0-RC5/src/alice/util/jedit/JEditTextArea.java 2012-01-15 10:16:47.000000000 +1300
+@@ -1392,7 +1392,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/jedit/KeywordMap.java 2p-2.4.0-RC5/src/alice/util/jedit/KeywordMap.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/jedit/KeywordMap.java 2011-07-21 16:34:58.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/util/jedit/KeywordMap.java 2012-01-15 10:17:35.000000000 +1300
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+@@ -102,9 +102,6 @@
+ }
+
+ // protected members
+- /**
+- * @uml.property name="mapLength"
+- */
+ protected int mapLength;
+
+ protected int getStringMapKey(String s)
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/jedit/TextAreaPainter.java 2p-2.4.0-RC5/src/alice/util/jedit/TextAreaPainter.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/jedit/TextAreaPainter.java 2011-07-21 16:39:24.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/util/jedit/TextAreaPainter.java 2012-01-15 10:20:32.000000000 +1300
+@@ -75,7 +75,7 @@
+
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -85,7 +85,7 @@
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur 2p-2.4.0-RC5.orig/src/alice/util/jedit/TokenMarker.java 2p-2.4.0-RC5/src/alice/util/jedit/TokenMarker.java
+--- 2p-2.4.0-RC5.orig/src/alice/util/jedit/TokenMarker.java 2011-07-21 16:39:24.000000000 +1200
++++ 2p-2.4.0-RC5/src/alice/util/jedit/TokenMarker.java 2012-01-15 10:20:47.000000000 +1300
+@@ -23,7 +23,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
diff --git a/dev-lang/tuprolog/files/tuprolog-2.5.0-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.5.0-javadocs.patch
new file mode 100644
index 00000000000..25671093466
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.5.0-javadocs.patch
@@ -0,0 +1,315 @@
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/ChoicePointStore.java tuprolog-2.5.0/src/alice/tuprolog/ChoicePointStore.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/ChoicePointStore.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/ChoicePointStore.java 2012-08-03 03:45:45.000000000 +0200
+@@ -36,7 +36,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -45,7 +44,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+@@ -93,4 +91,4 @@
+ return l;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/ClauseStore.java tuprolog-2.5.0/src/alice/tuprolog/ClauseStore.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/ClauseStore.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/ClauseStore.java 2012-08-03 03:45:45.000000000 +0200
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+@@ -160,4 +158,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/EngineManager.java tuprolog-2.5.0/src/alice/tuprolog/EngineManager.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/EngineManager.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/EngineManager.java 2012-08-03 03:45:45.000000000 +0200
+@@ -96,7 +96,7 @@
+ /**
+ * Solves a query
+ *
+- * @param g the term representing the goal to be demonstrated
++ * @param query the term representing the goal to be demonstrated
+ * @return the result of the demonstration
+ * @see SolveInfo
+ **/
+@@ -243,4 +243,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/event/SpyEvent.java tuprolog-2.5.0/src/alice/tuprolog/event/SpyEvent.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/event/SpyEvent.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/event/SpyEvent.java 2012-08-03 03:45:45.000000000 +0200
+@@ -33,10 +33,6 @@
+ * event description
+ */
+ private String msg;
+- /**
+- * @uml.property name="env"
+- * @uml.associationEnd
+- */
+ private Engine env;
+
+ public SpyEvent(Object source, String msg_) {
+@@ -63,4 +59,4 @@
+ return msg + ((env == null) ? "" : env.toString());
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/lib/BasicLibrary.java tuprolog-2.5.0/src/alice/tuprolog/lib/BasicLibrary.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/lib/BasicLibrary.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/lib/BasicLibrary.java 2012-08-03 03:45:45.000000000 +0200
+@@ -114,7 +114,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+@@ -1356,4 +1356,4 @@
+ { "\\", "expression_bitwise_not", "functor" } };
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/lib/IOLibrary.java tuprolog-2.5.0/src/alice/tuprolog/lib/IOLibrary.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/lib/IOLibrary.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/lib/IOLibrary.java 2012-08-03 03:45:45.000000000 +0200
+@@ -375,7 +375,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+@@ -470,4 +470,4 @@
+ }
+ return true;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/lib/JavaLibrary.java tuprolog-2.5.0/src/alice/tuprolog/lib/JavaLibrary.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/lib/JavaLibrary.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/lib/JavaLibrary.java 2012-08-03 03:45:45.000000000 +0200
+@@ -1393,8 +1393,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprolog/PrimitiveManager.java tuprolog-2.5.0/src/alice/tuprolog/PrimitiveManager.java
+--- tuprolog-2.5.0.orig/src/alice/tuprolog/PrimitiveManager.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprolog/PrimitiveManager.java 2012-08-03 03:45:45.000000000 +0200
+@@ -89,7 +89,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+@@ -192,4 +192,4 @@
+ return (functorHashMap.containsKey(name + "/" + nArgs) || predicateHashMap.containsKey(name + "/" + nArgs));
+ }
+ /**/
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprologx/ide/Console.java tuprolog-2.5.0/src/alice/tuprologx/ide/Console.java
+--- tuprolog-2.5.0.orig/src/alice/tuprologx/ide/Console.java 2012-08-03 02:38:20.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprologx/ide/Console.java 2012-08-03 03:45:45.000000000 +0200
+@@ -10,8 +10,5 @@
+ public void getNextSolution();
+ public void acceptSolution();
+ public void stopEngine();
+- /**
+- * @uml.property name="goal"
+- */
+ public String getGoal();
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java tuprolog-2.5.0/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- tuprolog-2.5.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2012-08-03 02:38:20.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprologx/ide/LibraryDialogFrame.java 2012-08-03 03:45:45.000000000 +0200
+@@ -325,7 +325,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprologx/ide/ToolBar.java tuprolog-2.5.0/src/alice/tuprologx/ide/ToolBar.java
+--- tuprolog-2.5.0.orig/src/alice/tuprologx/ide/ToolBar.java 2012-08-03 02:38:20.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprologx/ide/ToolBar.java 2012-08-03 03:45:45.000000000 +0200
+@@ -242,8 +242,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur tuprolog-2.5.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java tuprolog-2.5.0/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- tuprolog-2.5.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2012-08-03 02:38:20.000000000 +0200
++++ tuprolog-2.5.0/src/alice/tuprologx/pj/lib/PJLibrary.java 2012-08-03 03:45:45.000000000 +0200
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur tuprolog-2.5.0.orig/src/alice/util/jedit/InputHandler.java tuprolog-2.5.0/src/alice/util/jedit/InputHandler.java
+--- tuprolog-2.5.0.orig/src/alice/util/jedit/InputHandler.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/jedit/InputHandler.java 2012-08-03 03:45:45.000000000 +0200
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur tuprolog-2.5.0.orig/src/alice/util/jedit/JEditTextArea.java tuprolog-2.5.0/src/alice/util/jedit/JEditTextArea.java
+--- tuprolog-2.5.0.orig/src/alice/util/jedit/JEditTextArea.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/jedit/JEditTextArea.java 2012-08-03 03:48:07.000000000 +0200
+@@ -1401,7 +1401,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur tuprolog-2.5.0.orig/src/alice/util/jedit/KeywordMap.java tuprolog-2.5.0/src/alice/util/jedit/KeywordMap.java
+--- tuprolog-2.5.0.orig/src/alice/util/jedit/KeywordMap.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/jedit/KeywordMap.java 2012-08-03 03:45:45.000000000 +0200
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+@@ -102,9 +102,6 @@
+ }
+
+ // protected members
+- /**
+- * @uml.property name="mapLength"
+- */
+ protected int mapLength;
+
+ protected int getStringMapKey(String s)
+diff -ur tuprolog-2.5.0.orig/src/alice/util/jedit/TextAreaPainter.java tuprolog-2.5.0/src/alice/util/jedit/TextAreaPainter.java
+--- tuprolog-2.5.0.orig/src/alice/util/jedit/TextAreaPainter.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/jedit/TextAreaPainter.java 2012-08-03 03:45:45.000000000 +0200
+@@ -75,7 +75,7 @@
+
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -85,7 +85,7 @@
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur tuprolog-2.5.0.orig/src/alice/util/jedit/TokenMarker.java tuprolog-2.5.0/src/alice/util/jedit/TokenMarker.java
+--- tuprolog-2.5.0.orig/src/alice/util/jedit/TokenMarker.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/jedit/TokenMarker.java 2012-08-03 03:45:45.000000000 +0200
+@@ -23,7 +23,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
+diff -ur tuprolog-2.5.0.orig/src/alice/util/ReadOnlyLinkedList.java tuprolog-2.5.0/src/alice/util/ReadOnlyLinkedList.java
+--- tuprolog-2.5.0.orig/src/alice/util/ReadOnlyLinkedList.java 2012-08-03 02:38:21.000000000 +0200
++++ tuprolog-2.5.0/src/alice/util/ReadOnlyLinkedList.java 2012-08-03 03:45:45.000000000 +0200
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
diff --git a/dev-lang/tuprolog/files/tuprolog-2.6.0-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.6.0-javadocs.patch
new file mode 100644
index 00000000000..7eba988d5ba
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.6.0-javadocs.patch
@@ -0,0 +1,454 @@
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/ChoicePointStore.java tuprolog-2.6.0/src/alice/tuprolog/ChoicePointStore.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/ChoicePointStore.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/ChoicePointStore.java 2013-02-14 12:01:56.000000000 +0100
+@@ -36,7 +36,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -45,7 +44,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+@@ -93,4 +91,4 @@
+ return l;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/ClauseStore.java tuprolog-2.6.0/src/alice/tuprolog/ClauseStore.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/ClauseStore.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/ClauseStore.java 2013-02-14 12:01:56.000000000 +0100
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+@@ -160,4 +158,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/EngineManager.java tuprolog-2.6.0/src/alice/tuprolog/EngineManager.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/EngineManager.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/EngineManager.java 2013-02-14 12:01:56.000000000 +0100
+@@ -96,7 +96,7 @@
+ /**
+ * Solves a query
+ *
+- * @param g the term representing the goal to be demonstrated
++ * @param query the term representing the goal to be demonstrated
+ * @return the result of the demonstration
+ * @see SolveInfo
+ **/
+@@ -243,4 +243,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/event/SpyEvent.java tuprolog-2.6.0/src/alice/tuprolog/event/SpyEvent.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/event/SpyEvent.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/event/SpyEvent.java 2013-02-14 12:01:56.000000000 +0100
+@@ -33,10 +33,6 @@
+ * event description
+ */
+ private String msg;
+- /**
+- * @uml.property name="env"
+- * @uml.associationEnd
+- */
+ private Engine env;
+
+ public SpyEvent(Object source, String msg_) {
+@@ -63,4 +59,4 @@
+ return msg + ((env == null) ? "" : env.toString());
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/lib/BasicLibrary.java tuprolog-2.6.0/src/alice/tuprolog/lib/BasicLibrary.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/lib/BasicLibrary.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/lib/BasicLibrary.java 2013-02-14 12:01:56.000000000 +0100
+@@ -116,7 +116,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+@@ -1358,4 +1358,4 @@
+ { "\\", "expression_bitwise_not", "functor" } };
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/lib/IOLibrary.java tuprolog-2.6.0/src/alice/tuprolog/lib/IOLibrary.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/lib/IOLibrary.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/lib/IOLibrary.java 2013-02-14 12:01:56.000000000 +0100
+@@ -375,7 +375,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+@@ -470,4 +470,4 @@
+ }
+ return true;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/lib/JavaLibrary.java tuprolog-2.6.0/src/alice/tuprolog/lib/JavaLibrary.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/lib/JavaLibrary.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/lib/JavaLibrary.java 2013-02-14 12:12:49.000000000 +0100
+@@ -265,7 +265,7 @@
+ * @author Michele Mannino
+ * Creates of a java object - not backtrackable case
+ * @param className The name of the class
+- * @oaram path The list of the paths where the class may be contained
++ * @param paths The list of the paths where the class may be contained
+ * @param argl The list of the arguments used by the constructor
+ * @param id The name of the prolog term
+ * @throws JavaException
+@@ -1745,8 +1745,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+@@ -2099,4 +2097,4 @@
+ this.eventFullClass = eventClass;
+ listenerInterfaceName = n;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.6.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/LibraryManager.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/LibraryManager.java 2013-02-14 12:05:56.000000000 +0100
+@@ -49,7 +49,7 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
++ * @param className the name of the Java class containing the library to be loaded
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -81,8 +81,8 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
+- * @param the list of the paths where the library may be contained
++ * @param className the name of the Java class containing the library to be loaded
++ * @param paths the list of the paths where the library may be contained
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -305,4 +305,4 @@
+
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/PrimitiveManager.java tuprolog-2.6.0/src/alice/tuprolog/PrimitiveManager.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/PrimitiveManager.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/PrimitiveManager.java 2013-02-14 12:01:56.000000000 +0100
+@@ -89,7 +89,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+@@ -192,4 +192,4 @@
+ return (functorHashMap.containsKey(name + "/" + nArgs) || predicateHashMap.containsKey(name + "/" + nArgs));
+ }
+ /**/
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprolog/Struct.java tuprolog-2.6.0/src/alice/tuprolog/Struct.java
+--- tuprolog-2.6.0.orig/src/alice/tuprolog/Struct.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprolog/Struct.java 2013-02-14 12:06:46.000000000 +0100
+@@ -201,7 +201,7 @@
+ }
+
+ /**
+- * @return
++ * @return predicateIndicator
+ */
+ String getPredicateIndicator() {
+ return predicateIndicator;
+@@ -894,4 +894,4 @@
+ }
+ /**/
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprologx/ide/Console.java tuprolog-2.6.0/src/alice/tuprologx/ide/Console.java
+--- tuprolog-2.6.0.orig/src/alice/tuprologx/ide/Console.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprologx/ide/Console.java 2013-02-14 12:01:56.000000000 +0100
+@@ -10,8 +10,5 @@
+ public void getNextSolution();
+ public void acceptSolution();
+ public void stopEngine();
+- /**
+- * @uml.property name="goal"
+- */
+ public String getGoal();
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java tuprolog-2.6.0/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- tuprolog-2.6.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-02-14 12:12:14.000000000 +0100
+@@ -370,7 +370,7 @@
+ * Add a library from file chooser path.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path from file chooser.
++ * @param file from file chooser.
+ */
+ public void addLibrary(String libraryClassname, File file)
+ {
+@@ -498,7 +498,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.6.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-2.6.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprologx/ide/LibraryManager.java 2013-02-14 12:11:42.000000000 +0100
+@@ -131,7 +131,7 @@
+ * Add a library to the manager.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path The path where is contained the library.
++ * @param file The path where is contained the library.
+ * @throws ClassNotFoundException if the library class cannot be found.
+ * @throws InvalidLibraryException if the library is not a valid tuProlog library.
+ */
+@@ -235,7 +235,7 @@
+ * Load a library from the Library Manager into the engine.
+ *
+ * @param library The library to be loaded into the engine.
+- * @param path The library path where is contained the library.
++ * @param file The library path where is contained the library.
+ * @throws InvalidLibraryException
+ */
+ public void loadLibrary(String library, File file) throws InvalidLibraryException {
+@@ -290,4 +290,4 @@
+ klass.getName().replace('.', '/') + ".class");
+ }
+
+-} // end LibraryManager class
+\ No newline at end of file
++} // end LibraryManager class
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprologx/ide/ToolBar.java tuprolog-2.6.0/src/alice/tuprologx/ide/ToolBar.java
+--- tuprolog-2.6.0.orig/src/alice/tuprologx/ide/ToolBar.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprologx/ide/ToolBar.java 2013-02-14 12:01:56.000000000 +0100
+@@ -242,8 +242,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur tuprolog-2.6.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java tuprolog-2.6.0/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- tuprolog-2.6.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-02-14 12:01:56.000000000 +0100
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur tuprolog-2.6.0.orig/src/alice/util/DynamicURLClassLoader.java tuprolog-2.6.0/src/alice/util/DynamicURLClassLoader.java
+--- tuprolog-2.6.0.orig/src/alice/util/DynamicURLClassLoader.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/DynamicURLClassLoader.java 2013-02-14 12:10:02.000000000 +0100
+@@ -35,7 +35,7 @@
+
+ /**
+ * Constructor that specifies the URLs array.
+- * @param URL[] urls - Used to load a directory a URL ends with "/" or "\"
++ * @param urls - Used to load a directory a URL ends with "/" or "\"
+ * otherwise it loads a class contained into a .jar
+ */
+
+@@ -148,7 +148,7 @@
+
+ /**
+ * Remove array URLs method.
+- * @param urls - URL to be removed.
++ * @param url - URL to be removed.
+ */
+
+ public void removeURL(URL url) throws IllegalArgumentException
+diff -ur tuprolog-2.6.0.orig/src/alice/util/InspectionUtils.java tuprolog-2.6.0/src/alice/util/InspectionUtils.java
+--- tuprolog-2.6.0.orig/src/alice/util/InspectionUtils.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/InspectionUtils.java 2013-02-14 12:09:22.000000000 +0100
+@@ -14,9 +14,9 @@
+ /**
+ * @author Michele Mannino
+ *
+- * @param type: class to be inspected
+- * @param methodName: name of method
+- * @param parms: array of params
++ * @param type class to be inspected
++ * @param methodName name of method
++ * @param parms array of params
+ */
+ public static Method searchForMethod(Class<?> type, String methodName, Class<?>[] parms) {
+ Method[] methods = type.getMethods();
+diff -ur tuprolog-2.6.0.orig/src/alice/util/jedit/InputHandler.java tuprolog-2.6.0/src/alice/util/jedit/InputHandler.java
+--- tuprolog-2.6.0.orig/src/alice/util/jedit/InputHandler.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/jedit/InputHandler.java 2013-02-14 12:01:56.000000000 +0100
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur tuprolog-2.6.0.orig/src/alice/util/jedit/JEditTextArea.java tuprolog-2.6.0/src/alice/util/jedit/JEditTextArea.java
+--- tuprolog-2.6.0.orig/src/alice/util/jedit/JEditTextArea.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/jedit/JEditTextArea.java 2013-02-14 12:01:56.000000000 +0100
+@@ -1401,7 +1401,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur tuprolog-2.6.0.orig/src/alice/util/jedit/KeywordMap.java tuprolog-2.6.0/src/alice/util/jedit/KeywordMap.java
+--- tuprolog-2.6.0.orig/src/alice/util/jedit/KeywordMap.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/jedit/KeywordMap.java 2013-02-14 12:01:56.000000000 +0100
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+@@ -102,9 +102,6 @@
+ }
+
+ // protected members
+- /**
+- * @uml.property name="mapLength"
+- */
+ protected int mapLength;
+
+ protected int getStringMapKey(String s)
+diff -ur tuprolog-2.6.0.orig/src/alice/util/jedit/TextAreaPainter.java tuprolog-2.6.0/src/alice/util/jedit/TextAreaPainter.java
+--- tuprolog-2.6.0.orig/src/alice/util/jedit/TextAreaPainter.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/jedit/TextAreaPainter.java 2013-02-14 12:01:56.000000000 +0100
+@@ -75,7 +75,7 @@
+
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -85,7 +85,7 @@
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur tuprolog-2.6.0.orig/src/alice/util/jedit/TokenMarker.java tuprolog-2.6.0/src/alice/util/jedit/TokenMarker.java
+--- tuprolog-2.6.0.orig/src/alice/util/jedit/TokenMarker.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/jedit/TokenMarker.java 2013-02-14 12:01:56.000000000 +0100
+@@ -23,7 +23,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
+diff -ur tuprolog-2.6.0.orig/src/alice/util/ReadOnlyLinkedList.java tuprolog-2.6.0/src/alice/util/ReadOnlyLinkedList.java
+--- tuprolog-2.6.0.orig/src/alice/util/ReadOnlyLinkedList.java 2013-02-14 12:01:32.000000000 +0100
++++ tuprolog-2.6.0/src/alice/util/ReadOnlyLinkedList.java 2013-02-14 12:01:56.000000000 +0100
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
diff --git a/dev-lang/tuprolog/files/tuprolog-2.7.0-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.7.0-javadocs.patch
new file mode 100644
index 00000000000..cd67ac58daf
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.7.0-javadocs.patch
@@ -0,0 +1,437 @@
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/ChoicePointStore.java tuprolog-2.7.0/src/alice/tuprolog/ChoicePointStore.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/ChoicePointStore.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/ChoicePointStore.java 2013-05-16 13:56:42.000000000 +0200
+@@ -36,7 +36,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -45,7 +44,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+@@ -93,4 +91,4 @@
+ return l;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/ClauseStore.java tuprolog-2.7.0/src/alice/tuprolog/ClauseStore.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/ClauseStore.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/ClauseStore.java 2013-05-16 13:56:42.000000000 +0200
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+@@ -160,4 +158,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/event/SpyEvent.java tuprolog-2.7.0/src/alice/tuprolog/event/SpyEvent.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/event/SpyEvent.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/event/SpyEvent.java 2013-05-16 13:56:42.000000000 +0200
+@@ -33,10 +33,6 @@
+ * event description
+ */
+ private String msg;
+- /**
+- * @uml.property name="env"
+- * @uml.associationEnd
+- */
+ private Engine env;
+
+ public SpyEvent(Object source, String msg_) {
+@@ -63,4 +59,4 @@
+ return msg + ((env == null) ? "" : env.toString());
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/lib/BasicLibrary.java tuprolog-2.7.0/src/alice/tuprolog/lib/BasicLibrary.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/lib/BasicLibrary.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/lib/BasicLibrary.java 2013-05-16 13:56:42.000000000 +0200
+@@ -116,7 +116,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+@@ -1358,4 +1358,4 @@
+ { "\\", "expression_bitwise_not", "functor" } };
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/lib/IOLibrary.java tuprolog-2.7.0/src/alice/tuprolog/lib/IOLibrary.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/lib/IOLibrary.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/lib/IOLibrary.java 2013-05-16 13:56:42.000000000 +0200
+@@ -379,7 +379,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+@@ -474,4 +474,4 @@
+ }
+ return true;
+ }
+-}
+\ No newline at end of file
++}
+Only in tuprolog-2.7.0/src/alice/tuprolog/lib: IOLibrary.java.orig
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/lib/JavaLibrary.java tuprolog-2.7.0/src/alice/tuprolog/lib/JavaLibrary.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/lib/JavaLibrary.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/lib/JavaLibrary.java 2013-05-16 13:56:42.000000000 +0200
+@@ -265,7 +265,7 @@
+ * @author Michele Mannino
+ * Creates of a java object - not backtrackable case
+ * @param className The name of the class
+- * @oaram path The list of the paths where the class may be contained
++ * @param paths The list of the paths where the class may be contained
+ * @param argl The list of the arguments used by the constructor
+ * @param id The name of the prolog term
+ * @throws JavaException
+@@ -1745,8 +1745,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+@@ -2099,4 +2097,4 @@
+ this.eventFullClass = eventClass;
+ listenerInterfaceName = n;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.7.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/LibraryManager.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/LibraryManager.java 2013-05-16 13:56:42.000000000 +0200
+@@ -49,7 +49,7 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
++ * @param className the name of the Java class containing the library to be loaded
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -83,8 +83,8 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
+- * @param the list of the paths where the library may be contained
++ * @param className the name of the Java class containing the library to be loaded
++ * @param paths the list of the paths where the library may be contained
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -314,4 +314,4 @@
+
+
+
+-}
+\ No newline at end of file
++}
+Only in tuprolog-2.7.0/src/alice/tuprolog: LibraryManager.java.orig
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/PrimitiveManager.java tuprolog-2.7.0/src/alice/tuprolog/PrimitiveManager.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/PrimitiveManager.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/PrimitiveManager.java 2013-05-16 13:56:42.000000000 +0200
+@@ -89,7 +89,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+@@ -192,4 +192,4 @@
+ return (functorHashMap.containsKey(name + "/" + nArgs) || predicateHashMap.containsKey(name + "/" + nArgs));
+ }
+ /**/
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprolog/Struct.java tuprolog-2.7.0/src/alice/tuprolog/Struct.java
+--- tuprolog-2.7.0.orig/src/alice/tuprolog/Struct.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprolog/Struct.java 2013-05-16 13:56:42.000000000 +0200
+@@ -201,7 +201,7 @@
+ }
+
+ /**
+- * @return
++ * @return predicateIndicator
+ */
+ String getPredicateIndicator() {
+ return predicateIndicator;
+@@ -894,4 +894,4 @@
+ }
+ /**/
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprologx/ide/Console.java tuprolog-2.7.0/src/alice/tuprologx/ide/Console.java
+--- tuprolog-2.7.0.orig/src/alice/tuprologx/ide/Console.java 2013-05-16 13:50:41.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprologx/ide/Console.java 2013-05-16 13:56:42.000000000 +0200
+@@ -10,8 +10,5 @@
+ public void getNextSolution();
+ public void acceptSolution();
+ public void stopEngine();
+- /**
+- * @uml.property name="goal"
+- */
+ public String getGoal();
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java tuprolog-2.7.0/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- tuprolog-2.7.0.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-05-16 13:50:41.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-05-16 13:56:42.000000000 +0200
+@@ -370,7 +370,7 @@
+ * Add a library from file chooser path.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path from file chooser.
++ * @param file from file chooser.
+ */
+ public void addLibrary(String libraryClassname, File file)
+ {
+@@ -498,7 +498,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.7.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-2.7.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2013-05-16 13:50:41.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprologx/ide/LibraryManager.java 2013-05-16 13:56:42.000000000 +0200
+@@ -131,7 +131,7 @@
+ * Add a library to the manager.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path The path where is contained the library.
++ * @param file The path where is contained the library.
+ * @throws ClassNotFoundException if the library class cannot be found.
+ * @throws InvalidLibraryException if the library is not a valid tuProlog library.
+ */
+@@ -235,7 +235,7 @@
+ * Load a library from the Library Manager into the engine.
+ *
+ * @param library The library to be loaded into the engine.
+- * @param path The library path where is contained the library.
++ * @param file The library path where is contained the library.
+ * @throws InvalidLibraryException
+ */
+ public void loadLibrary(String library, File file) throws InvalidLibraryException {
+@@ -290,4 +290,4 @@
+ klass.getName().replace('.', '/') + ".class");
+ }
+
+-} // end LibraryManager class
+\ No newline at end of file
++} // end LibraryManager class
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprologx/ide/ToolBar.java tuprolog-2.7.0/src/alice/tuprologx/ide/ToolBar.java
+--- tuprolog-2.7.0.orig/src/alice/tuprologx/ide/ToolBar.java 2013-05-16 13:50:41.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprologx/ide/ToolBar.java 2013-05-16 13:56:42.000000000 +0200
+@@ -242,8 +242,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur tuprolog-2.7.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java tuprolog-2.7.0/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- tuprolog-2.7.0.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-05-16 13:50:41.000000000 +0200
++++ tuprolog-2.7.0/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-05-16 13:56:42.000000000 +0200
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur tuprolog-2.7.0.orig/src/alice/util/DynamicURLClassLoader.java tuprolog-2.7.0/src/alice/util/DynamicURLClassLoader.java
+--- tuprolog-2.7.0.orig/src/alice/util/DynamicURLClassLoader.java 2013-05-16 13:50:43.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/DynamicURLClassLoader.java 2013-05-16 13:56:42.000000000 +0200
+@@ -35,7 +35,7 @@
+
+ /**
+ * Constructor that specifies the URLs array.
+- * @param URL[] urls - Used to load a directory a URL ends with "/" or "\"
++ * @param urls - Used to load a directory a URL ends with "/" or "\"
+ * otherwise it loads a class contained into a .jar
+ */
+
+@@ -148,7 +148,7 @@
+
+ /**
+ * Remove array URLs method.
+- * @param urls - URL to be removed.
++ * @param url - URL to be removed.
+ */
+
+ public void removeURL(URL url) throws IllegalArgumentException
+diff -ur tuprolog-2.7.0.orig/src/alice/util/InspectionUtils.java tuprolog-2.7.0/src/alice/util/InspectionUtils.java
+--- tuprolog-2.7.0.orig/src/alice/util/InspectionUtils.java 2013-05-16 13:50:43.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/InspectionUtils.java 2013-05-16 13:56:42.000000000 +0200
+@@ -14,9 +14,9 @@
+ /**
+ * @author Michele Mannino
+ *
+- * @param type: class to be inspected
+- * @param methodName: name of method
+- * @param parms: array of params
++ * @param type class to be inspected
++ * @param methodName name of method
++ * @param parms array of params
+ */
+ public static Method searchForMethod(Class<?> type, String methodName, Class<?>[] parms) {
+ Method[] methods = type.getMethods();
+diff -ur tuprolog-2.7.0.orig/src/alice/util/jedit/InputHandler.java tuprolog-2.7.0/src/alice/util/jedit/InputHandler.java
+--- tuprolog-2.7.0.orig/src/alice/util/jedit/InputHandler.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/jedit/InputHandler.java 2013-05-16 13:56:42.000000000 +0200
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur tuprolog-2.7.0.orig/src/alice/util/jedit/JEditTextArea.java tuprolog-2.7.0/src/alice/util/jedit/JEditTextArea.java
+--- tuprolog-2.7.0.orig/src/alice/util/jedit/JEditTextArea.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/jedit/JEditTextArea.java 2013-05-16 13:56:42.000000000 +0200
+@@ -1401,7 +1401,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur tuprolog-2.7.0.orig/src/alice/util/jedit/KeywordMap.java tuprolog-2.7.0/src/alice/util/jedit/KeywordMap.java
+--- tuprolog-2.7.0.orig/src/alice/util/jedit/KeywordMap.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/jedit/KeywordMap.java 2013-05-16 13:56:42.000000000 +0200
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+@@ -102,9 +102,6 @@
+ }
+
+ // protected members
+- /**
+- * @uml.property name="mapLength"
+- */
+ protected int mapLength;
+
+ protected int getStringMapKey(String s)
+diff -ur tuprolog-2.7.0.orig/src/alice/util/jedit/TextAreaPainter.java tuprolog-2.7.0/src/alice/util/jedit/TextAreaPainter.java
+--- tuprolog-2.7.0.orig/src/alice/util/jedit/TextAreaPainter.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/jedit/TextAreaPainter.java 2013-05-16 13:56:42.000000000 +0200
+@@ -75,7 +75,7 @@
+
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -85,7 +85,7 @@
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur tuprolog-2.7.0.orig/src/alice/util/jedit/TokenMarker.java tuprolog-2.7.0/src/alice/util/jedit/TokenMarker.java
+--- tuprolog-2.7.0.orig/src/alice/util/jedit/TokenMarker.java 2013-05-16 13:50:42.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/jedit/TokenMarker.java 2013-05-16 13:56:42.000000000 +0200
+@@ -23,7 +23,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
+diff -ur tuprolog-2.7.0.orig/src/alice/util/ReadOnlyLinkedList.java tuprolog-2.7.0/src/alice/util/ReadOnlyLinkedList.java
+--- tuprolog-2.7.0.orig/src/alice/util/ReadOnlyLinkedList.java 2013-05-16 13:50:43.000000000 +0200
++++ tuprolog-2.7.0/src/alice/util/ReadOnlyLinkedList.java 2013-05-16 13:56:42.000000000 +0200
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
diff --git a/dev-lang/tuprolog/files/tuprolog-2.7.2-javadocs.patch b/dev-lang/tuprolog/files/tuprolog-2.7.2-javadocs.patch
new file mode 100644
index 00000000000..9a42cb89851
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.7.2-javadocs.patch
@@ -0,0 +1,479 @@
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/ChoicePointStore.java tuprolog-2.7.2/src/alice/tuprolog/ChoicePointStore.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/ChoicePointStore.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/ChoicePointStore.java 2013-07-15 13:46:01.000000000 +0200
+@@ -36,7 +36,6 @@
+
+ /**
+ * Return the actual choice-point store
+- * @return
+ */
+ public ChoicePointContext getPointer() {
+ return pointer;
+@@ -45,7 +44,6 @@
+ /**
+ * Check if a choice point exists in the store.
+ * As a side effect, removes choice points which have been already used and are now empty.
+- * @return
+ */
+ protected boolean existChoicePoint() {
+ if (pointer == null) return false;
+@@ -93,4 +91,4 @@
+ return l;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/ClauseStore.java tuprolog-2.7.2/src/alice/tuprolog/ClauseStore.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/ClauseStore.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/ClauseStore.java 2013-07-15 13:46:01.000000000 +0200
+@@ -62,8 +62,6 @@
+
+ /**
+ * Verify if there is a term in compatibleGoals compatible with goal.
+- * @param goal
+- * @param compGoals
+ * @return true if compatible or false otherwise.
+ */
+ protected boolean existCompatibleClause() {
+@@ -160,4 +158,4 @@
+ }
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/event/SpyEvent.java tuprolog-2.7.2/src/alice/tuprolog/event/SpyEvent.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/event/SpyEvent.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/event/SpyEvent.java 2013-07-15 13:46:01.000000000 +0200
+@@ -33,10 +33,6 @@
+ * event description
+ */
+ private String msg;
+- /**
+- * @uml.property name="env"
+- * @uml.associationEnd
+- */
+ private Engine env;
+
+ public SpyEvent(Object source, String msg_) {
+@@ -63,4 +59,4 @@
+ return msg + ((env == null) ? "" : env.toString());
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/lib/BasicLibrary.java tuprolog-2.7.2/src/alice/tuprolog/lib/BasicLibrary.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/lib/BasicLibrary.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/lib/BasicLibrary.java 2013-07-15 13:46:01.000000000 +0200
+@@ -116,7 +116,7 @@
+ /**
+ * Loads a library constructed from a theory.
+ *
+- * @param theory
++ * @param th
+ * theory text
+ * @param libName
+ * name of the library
+@@ -1358,4 +1358,4 @@
+ { "\\", "expression_bitwise_not", "functor" } };
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/lib/IOLibrary.java tuprolog-2.7.2/src/alice/tuprolog/lib/IOLibrary.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/lib/IOLibrary.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/lib/IOLibrary.java 2013-07-15 13:46:01.000000000 +0200
+@@ -379,7 +379,7 @@
+ /**
+ * Sets an arbitrary seed for the Random object.
+ *
+- * @param seed Seed to use
++ * @param t Seed to use
+ * @return true if seed Term has a valid long value, false otherwise
+ */
+ public boolean set_seed_1(Term t) throws PrologError {
+@@ -474,4 +474,4 @@
+ }
+ return true;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/lib/JavaLibrary.java tuprolog-2.7.2/src/alice/tuprolog/lib/JavaLibrary.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/lib/JavaLibrary.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/lib/JavaLibrary.java 2013-07-15 13:46:01.000000000 +0200
+@@ -265,7 +265,7 @@
+ * @author Michele Mannino
+ * Creates of a java object - not backtrackable case
+ * @param className The name of the class
+- * @oaram path The list of the paths where the class may be contained
++ * @param paths The list of the paths where the class may be contained
+ * @param argl The list of the arguments used by the constructor
+ * @param id The name of the prolog term
+ * @throws JavaException
+@@ -1745,8 +1745,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- *
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+@@ -2099,4 +2097,4 @@
+ this.eventFullClass = eventClass;
+ listenerInterfaceName = n;
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.7.2/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/LibraryManager.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/LibraryManager.java 2013-07-15 13:46:01.000000000 +0200
+@@ -49,7 +49,7 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
++ * @param className the name of the Java class containing the library to be loaded
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -83,8 +83,8 @@
+ * If a library with the same name is already present,
+ * a warning event is notified and the request is ignored.
+ *
+- * @param the name of the Java class containing the library to be loaded
+- * @param the list of the paths where the library may be contained
++ * @param className the name of the Java class containing the library to be loaded
++ * @param paths the list of the paths where the library may be contained
+ * @return the reference to the Library just loaded
+ * @throws InvalidLibraryException if name is not a valid library
+ */
+@@ -314,4 +314,4 @@
+
+
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/PrimitiveManager.java tuprolog-2.7.2/src/alice/tuprolog/PrimitiveManager.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/PrimitiveManager.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/PrimitiveManager.java 2013-07-15 13:46:01.000000000 +0200
+@@ -89,7 +89,7 @@
+ * This involves identifying structs representing builtin
+ * predicates and functors, and setting up related structures and links
+ *
+- * @parm term the term to be identified
++ * @param term the term to be identified
+ * @return term with the identified built-in directive
+ */
+ public Term identifyDirective(Term term) {
+@@ -192,4 +192,4 @@
+ return (functorHashMap.containsKey(name + "/" + nArgs) || predicateHashMap.containsKey(name + "/" + nArgs));
+ }
+ /**/
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprolog/Struct.java tuprolog-2.7.2/src/alice/tuprolog/Struct.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/Struct.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/Struct.java 2013-07-15 13:46:01.000000000 +0200
+@@ -201,7 +201,7 @@
+ }
+
+ /**
+- * @return
++ * @return predicateIndicator
+ */
+ String getPredicateIndicator() {
+ return predicateIndicator;
+@@ -894,4 +894,4 @@
+ }
+ /**/
+
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/ide/Console.java tuprolog-2.7.2/src/alice/tuprologx/ide/Console.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/ide/Console.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/ide/Console.java 2013-07-15 13:46:01.000000000 +0200
+@@ -10,8 +10,5 @@
+ public void getNextSolution();
+ public void acceptSolution();
+ public void stopEngine();
+- /**
+- * @uml.property name="goal"
+- */
+ public String getGoal();
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryDialogFrame.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryDialogFrame.java 2013-07-15 13:46:01.000000000 +0200
+@@ -370,7 +370,7 @@
+ * Add a library from file chooser path.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path from file chooser.
++ * @param file from file chooser.
+ */
+ public void addLibrary(String libraryClassname, File file)
+ {
+@@ -500,7 +500,6 @@
+ displayLibraryManagerStatus();
+ }
+
+- /** @see alice.tuprologx.ide.SwingFrame#onClose()*/
+ public void closeLibraryDialog()
+ {
+ onClose();
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryManager.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryManager.java 2013-07-15 13:46:01.000000000 +0200
+@@ -131,7 +131,7 @@
+ * Add a library to the manager.
+ *
+ * @param libraryClassname The name of the .class of the library to be added.
+- * @param path The path where is contained the library.
++ * @param file The path where is contained the library.
+ * @throws ClassNotFoundException if the library class cannot be found.
+ * @throws InvalidLibraryException if the library is not a valid tuProlog library.
+ */
+@@ -236,7 +236,7 @@
+ * Load a library from the Library Manager into the engine.
+ *
+ * @param library The library to be loaded into the engine.
+- * @param path The library path where is contained the library.
++ * @param file The library path where is contained the library.
+ * @throws InvalidLibraryException
+ */
+ public void loadLibrary(String library, File file) throws InvalidLibraryException {
+@@ -291,4 +291,4 @@
+ klass.getName().replace('.', '/') + ".class");
+ }
+
+-} // end LibraryManager class
+\ No newline at end of file
++} // end LibraryManager class
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/ide/ToolBar.java tuprolog-2.7.2/src/alice/tuprologx/ide/ToolBar.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/ide/ToolBar.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/ide/ToolBar.java 2013-07-15 13:46:01.000000000 +0200
+@@ -269,8 +269,6 @@
+
+ /**
+ * Set the tuProlog config frame
+- *
+- * @param libraryManager a libraryManager to associate to the libraryDialog
+ */
+ public void setPrologConfig(PrologConfigFrame configFrame)
+ {
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/pj/lib/PJLibrary.java tuprolog-2.7.2/src/alice/tuprologx/pj/lib/PJLibrary.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/pj/lib/PJLibrary.java 2013-07-15 13:46:01.000000000 +0200
+@@ -1252,7 +1252,6 @@
+
+ /**
+ * Generates a fresh numeric identifier
+- * @return
+ */
+ protected Struct generateFreshId() {
+ return new Struct("$obj_" + id++);
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/spyframe/SpyFrame.java tuprolog-2.7.2/src/alice/tuprologx/spyframe/SpyFrame.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/spyframe/SpyFrame.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/spyframe/SpyFrame.java 2013-07-15 13:51:08.000000000 +0200
+@@ -199,7 +199,7 @@
+
+ /**Display the spied information in form of a tree. This method reacts only
+ * on prolog-Calls and skips even those if the number of steps set in
+- * {@link actionPerformed} is bigger than 1. In this case the number is
++ * actionPerformed is bigger than 1. In this case the number is
+ * decremented to skip these steps. After display the prolog process is
+ * suspended until the user presses enter.
+ *
+@@ -229,4 +229,4 @@
+ SpyFrame tf=new SpyFrame(theory, goal);
+ tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/tuprologx/spyframe/Tree.java tuprolog-2.7.2/src/alice/tuprologx/spyframe/Tree.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/spyframe/Tree.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/spyframe/Tree.java 2013-07-15 13:50:25.000000000 +0200
+@@ -47,12 +47,12 @@
+ private Line2D.Float line=new Line2D.Float();
+
+ /**Creates a component to display a tree.
+- * @param totree to consult for constructing the tree.
++ * @param treemaker to consult for constructing the tree.
+ */
+ public Tree(ToTree<T> treemaker){this.totree=treemaker;}
+
+ /**Creates a component to display a tree.
+- * @param totree to consult for constructing the tree.
++ * @param treemaker to consult for constructing the tree.
+ * @param str the structure to be displayed as a tree.
+ */
+ public Tree(ToTree<T> treemaker, T str){
+@@ -184,4 +184,4 @@
+ g2.setColor(node.textcolor);
+ g2.drawString(node.text, node.x+border, node.y+border+asc);
+ }
+-}
+\ No newline at end of file
++}
+diff -ur tuprolog-2.7.2.orig/src/alice/util/DynamicURLClassLoader.java tuprolog-2.7.2/src/alice/util/DynamicURLClassLoader.java
+--- tuprolog-2.7.2.orig/src/alice/util/DynamicURLClassLoader.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/DynamicURLClassLoader.java 2013-07-15 13:46:01.000000000 +0200
+@@ -35,7 +35,7 @@
+
+ /**
+ * Constructor that specifies the URLs array.
+- * @param URL[] urls - Used to load a directory a URL ends with "/" or "\"
++ * @param urls - Used to load a directory a URL ends with "/" or "\"
+ * otherwise it loads a class contained into a .jar
+ */
+
+@@ -148,7 +148,7 @@
+
+ /**
+ * Remove array URLs method.
+- * @param urls - URL to be removed.
++ * @param url - URL to be removed.
+ */
+
+ public void removeURL(URL url) throws IllegalArgumentException
+diff -ur tuprolog-2.7.2.orig/src/alice/util/InspectionUtils.java tuprolog-2.7.2/src/alice/util/InspectionUtils.java
+--- tuprolog-2.7.2.orig/src/alice/util/InspectionUtils.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/InspectionUtils.java 2013-07-15 13:46:01.000000000 +0200
+@@ -14,9 +14,9 @@
+ /**
+ * @author Michele Mannino
+ *
+- * @param type: class to be inspected
+- * @param methodName: name of method
+- * @param parms: array of params
++ * @param type class to be inspected
++ * @param methodName name of method
++ * @param parms array of params
+ */
+ public static Method searchForMethod(Class<?> type, String methodName, Class<?>[] parms) {
+ Method[] methods = type.getMethods();
+diff -ur tuprolog-2.7.2.orig/src/alice/util/jedit/InputHandler.java tuprolog-2.7.2/src/alice/util/jedit/InputHandler.java
+--- tuprolog-2.7.2.orig/src/alice/util/jedit/InputHandler.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/jedit/InputHandler.java 2013-07-15 13:46:01.000000000 +0200
+@@ -24,7 +24,7 @@
+ *
+ * @author Slava Pestov
+ * @version $Id: InputHandler.java,v 1.14 1999/12/13 03:40:30 sp Exp $
+- * @see org.gjt.sp.jedit.textarea.DefaultInputHandler
++ * @see alice.util.jedit.DefaultInputHandler
+ */
+ public abstract class InputHandler extends KeyAdapter
+ {
+@@ -187,7 +187,7 @@
+ /**
+ * Grabs the next key typed event and invokes the specified
+ * action with the key as a the action command.
+- * @param action The action
++ * @param listener The action
+ */
+ public void grabNextKeyStroke(ActionListener listener)
+ {
+diff -ur tuprolog-2.7.2.orig/src/alice/util/jedit/JEditTextArea.java tuprolog-2.7.2/src/alice/util/jedit/JEditTextArea.java
+--- tuprolog-2.7.2.orig/src/alice/util/jedit/JEditTextArea.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/jedit/JEditTextArea.java 2013-07-15 13:46:01.000000000 +0200
+@@ -1401,7 +1401,7 @@
+
+ /**
+ * Sets if the selection should be rectangular.
+- * @param overwrite True if the selection should be rectangular,
++ * @param rectSelect True if the selection should be rectangular,
+ * false otherwise.
+ */
+ public final void setSelectionRectangular(boolean rectSelect)
+diff -ur tuprolog-2.7.2.orig/src/alice/util/jedit/KeywordMap.java tuprolog-2.7.2/src/alice/util/jedit/KeywordMap.java
+--- tuprolog-2.7.2.orig/src/alice/util/jedit/KeywordMap.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/jedit/KeywordMap.java 2013-07-15 13:46:01.000000000 +0200
+@@ -75,7 +75,7 @@
+ /**
+ * Adds a key-value mapping.
+ * @param keyword The key
+- * @Param id The value
++ * @param id The value
+ */
+ public void add(String keyword, byte id)
+ {
+@@ -102,9 +102,6 @@
+ }
+
+ // protected members
+- /**
+- * @uml.property name="mapLength"
+- */
+ protected int mapLength;
+
+ protected int getStringMapKey(String s)
+diff -ur tuprolog-2.7.2.orig/src/alice/util/jedit/TextAreaPainter.java tuprolog-2.7.2/src/alice/util/jedit/TextAreaPainter.java
+--- tuprolog-2.7.2.orig/src/alice/util/jedit/TextAreaPainter.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/jedit/TextAreaPainter.java 2013-07-15 13:46:01.000000000 +0200
+@@ -75,7 +75,7 @@
+
+ /**
+ * Returns the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final SyntaxStyle[] getStyles()
+ {
+@@ -85,7 +85,7 @@
+ /**
+ * Sets the syntax styles used to paint colorized text. Entry <i>n</i> will be used to paint tokens with id = <i>n</i>.
+ * @param styles The syntax styles
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public final void setStyles(SyntaxStyle[] styles)
+ {
+@@ -356,7 +356,7 @@
+
+ /**
+ * Repaints the text.
+- * @param g The graphics context
++ * @param gfx The graphics context
+ */
+ public void paint(Graphics gfx)
+ {
+diff -ur tuprolog-2.7.2.orig/src/alice/util/jedit/TokenMarker.java tuprolog-2.7.2/src/alice/util/jedit/TokenMarker.java
+--- tuprolog-2.7.2.orig/src/alice/util/jedit/TokenMarker.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/jedit/TokenMarker.java 2013-07-15 13:46:01.000000000 +0200
+@@ -23,7 +23,7 @@
+ * @author Slava Pestov
+ * @version $Id: TokenMarker.java,v 1.32 1999/12/13 03:40:30 sp Exp $
+ *
+- * @see org.gjt.sp.jedit.syntax.Token
++ * @see alice.util.jedit.Token
+ */
+ public abstract class TokenMarker
+ {
+diff -ur tuprolog-2.7.2.orig/src/alice/util/ReadOnlyLinkedList.java tuprolog-2.7.2/src/alice/util/ReadOnlyLinkedList.java
+--- tuprolog-2.7.2.orig/src/alice/util/ReadOnlyLinkedList.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/src/alice/util/ReadOnlyLinkedList.java 2013-07-15 13:46:01.000000000 +0200
+@@ -12,10 +12,10 @@
+ import java.util.ListIterator;
+
+ /**
+- * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList<E>}
++ * ReadOnlyLinkedList<E> encapsulate a {@link LinkedList}
+ * and ensures that the given list is navigated only.
+ *
+- * Even if ReadOnlyLinkedList<E> implements {@link List<E>} it doesn't
++ * Even if ReadOnlyLinkedList<E> implements {@link List} it doesn't
+ * support modifiers methods, and throws {@link UnsupportedOperationException}
+ * if invoked.
+ *
diff --git a/dev-lang/tuprolog/files/tuprolog-2.7.2-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-2.7.2-no-ikvm.patch
new file mode 100644
index 00000000000..539aea342de
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.7.2-no-ikvm.patch
@@ -0,0 +1,105 @@
+diff -urN tuprolog-2.7.2.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.7.2/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-2.7.2.orig/src/alice/tuprolog/LibraryManager.java 2013-07-15 13:38:22.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprolog/LibraryManager.java 2014-11-09 18:24:47.000000000 +0100
+@@ -8,11 +8,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;
+
+
+ /**
+@@ -112,27 +112,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);
+ }
+ String name = lib.getName();
+ Library alib = getLibrary(name);
+diff -urN tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-2.7.2.orig/src/alice/tuprologx/ide/LibraryManager.java 2013-07-15 13:38:21.000000000 +0200
++++ tuprolog-2.7.2/src/alice/tuprologx/ide/LibraryManager.java 2014-11-09 18:25:45.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.
+@@ -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-2.7.2.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-2.7.2/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-2.7.2.orig/src/alice/util/AssemblyCustomClassLoader.java 2013-07-15 13:38:23.000000000 +0200
++++ tuprolog-2.7.2/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-2.9.0-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-2.9.0-no-ikvm.patch
new file mode 100644
index 00000000000..d94dc66bbac
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.9.0-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/metadata.xml b/dev-lang/tuprolog/metadata.xml
new file mode 100644
index 00000000000..1990bb86aac
--- /dev/null
+++ b/dev-lang/tuprolog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+</pkgmetadata>
diff --git a/dev-lang/tuprolog/tuprolog-2.4.0_rc5.ebuild b/dev-lang/tuprolog/tuprolog-2.4.0_rc5.ebuild
new file mode 100644
index 00000000000..1b64ec6dfe1
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.4.0_rc5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils java-pkg-2 java-ant-2
+
+MY_P="2p-${PV/_rc5/}"
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://www.alice.unibo.it/tuProlog/"
+SRC_URI="mirror://sourceforge/tuprolog/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc test"
+
+RDEPEND=">=virtual/jdk-1.5
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ test? ( dev-java/ant-junit )"
+
+S="${WORKDIR}"/${MY_P}-RC5
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-javadocs.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit
+ cd "${S}"
+ ANT_TASKS="ant-junit" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-2.5.0.ebuild b/dev-lang/tuprolog/tuprolog-2.5.0.ebuild
new file mode 100644
index 00000000000..2d96f8135f7
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.5.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://www.alice.unibo.it/tuProlog/"
+SRC_URI="mirror://gentoo/${P}.zip"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc test"
+
+RDEPEND=">=virtual/jdk-1.5
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ test? ( dev-java/ant-junit )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-javadocs.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit
+ cd "${S}"
+ ANT_TASKS="ant-junit" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-2.6.0.ebuild b/dev-lang/tuprolog/tuprolog-2.6.0.ebuild
new file mode 100644
index 00000000000..74294621632
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.6.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://www.alice.unibo.it/tuProlog/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+RDEPEND=">=virtual/jdk-1.7
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4
+ dev-java/hamcrest-core
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-javadocs.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit-4
+ java-pkg_jar-from hamcrest-core
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test \
+ || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-2.7.0.ebuild b/dev-lang/tuprolog/tuprolog-2.7.0.ebuild
new file mode 100644
index 00000000000..106d4967412
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.7.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+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 test"
+
+RDEPEND=">=virtual/jdk-1.7
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4
+ dev-java/hamcrest-core
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-javadocs.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit-4
+ java-pkg_jar-from hamcrest-core
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test \
+ || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-2.7.2.ebuild b/dev-lang/tuprolog/tuprolog-2.7.2.ebuild
new file mode 100644
index 00000000000..bce34ee8b0f
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.7.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+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 test"
+
+RDEPEND=">=virtual/jdk-1.7
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4
+ dev-java/hamcrest-core
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-javadocs.patch
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit-4
+ java-pkg_jar-from hamcrest-core
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test \
+ || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-2.9.0.ebuild b/dev-lang/tuprolog/tuprolog-2.9.0.ebuild
new file mode 100644
index 00000000000..99ffc984455
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.9.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+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 test"
+
+RDEPEND=">=virtual/jdk-1.7
+ >=dev-java/javassist-3"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4
+ dev-java/hamcrest-core
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist-3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch
+
+ cp "${FILESDIR}"/build.xml "${S}" || die
+ sed -i -e "s|test/unit|test|" "${S}"/build.xml \
+ || die "sed build.xml failed"
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit-4
+ java-pkg_jar-from hamcrest-core
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar 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
+ fi
+}
diff --git a/dev-lang/ucblogo/Manifest b/dev-lang/ucblogo/Manifest
new file mode 100644
index 00000000000..0e9ed5847b7
--- /dev/null
+++ b/dev-lang/ucblogo/Manifest
@@ -0,0 +1 @@
+DIST ucblogo-5.5.tar.gz 1290273 SHA256 a2922e065113274dd701ba3b03448134cceb047f3d6cadbe5322e23061e2ff9d SHA512 cd1f74cc7402d9e0905a41ad6a2e98cbe508cf5fd838afd46f3f6cb3d15453cf0d44c9f97c8dfe2925f3d973909abba1196cd9abfc95cd1e05d5482e7788ec4c WHIRLPOOL 1403926522fa5aca8ca1d83e10f4cc473f40c5597b45404c443f859691c2bd51e67a1ecbdd75031b896ebba730c634e7c4c63a0e36782cad4ea801fe30f077ad
diff --git a/dev-lang/ucblogo/files/50ucblogo-gentoo.el b/dev-lang/ucblogo/files/50ucblogo-gentoo.el
new file mode 100644
index 00000000000..b9d2c3eba07
--- /dev/null
+++ b/dev-lang/ucblogo/files/50ucblogo-gentoo.el
@@ -0,0 +1,12 @@
+
+;;; ucblogo site-lisp configuration
+
+(add-to-list 'load-path "/usr/lib/logo/emacs")
+(autoload 'logo-mode "logo" nil t)
+(add-to-list 'auto-mode-alist '("\\.lgo?\\'" . logo-mode))
+
+(setq logo-help-path "/usr/lib/logo/helpfiles/")
+(setq logo-tutorial-path "/usr/lib/logo/emacs/")
+(setq logo-info-file "/usr/share/info/ucblogo.info")
+;; font/color defaults are intrusive, disable them
+(setq dont-mess-with-logo-colors t)
diff --git a/dev-lang/ucblogo/files/ucblogo-5.5-destdir.patch b/dev-lang/ucblogo/files/ucblogo-5.5-destdir.patch
new file mode 100644
index 00000000000..89fd129c488
--- /dev/null
+++ b/dev-lang/ucblogo/files/ucblogo-5.5-destdir.patch
@@ -0,0 +1,75 @@
+--- makefile.in
++++ makefile.in
+@@ -65,13 +65,13 @@
+ cd docs; $(MAKE) ship
+
+ install: all
+- for d in $(BINDIR) $(LIBLOC) $(LIBLOC)/logolib $(LIBLOC)/helpfiles $(LIBLOC)/csls; do [ -d $$d ] || mkdir -p $$d || exit 1; done
+- cp logo $(BINDIR)/.
+- cp -f logolib/* $(LIBLOC)/logolib/.
+- cp -f helpfiles/* $(LIBLOC)/helpfiles/.
+- cp -f csls/* $(LIBLOC)/csls/.
+- (cd emacs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install)
+- (cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install)
++ for d in $(BINDIR) $(LIBLOC) $(LIBLOC)/logolib $(LIBLOC)/helpfiles $(LIBLOC)/csls; do [ -d $(DESTDIR)$$d ] || mkdir -p $(DESTDIR)$$d || exit 1; done
++ cp logo $(DESTDIR)$(BINDIR)/.
++ cp -f logolib/* $(DESTDIR)$(LIBLOC)/logolib/.
++ cp -f helpfiles/* $(DESTDIR)$(LIBLOC)/helpfiles/.
++ cp -f csls/* $(DESTDIR)$(LIBLOC)/csls/.
++ (cd emacs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) DESTDIR=$(DESTDIR) $(MAKE) install)
++ (cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) DESTDIR=$(DESTDIR) $(MAKE) install)
+ # prefix=$(prefix); LIBLOC=$(LIBLOC); BINDIR=$(BINDIR); export prefix LIBLOC BINDIR; cd emacs; $(MAKE) install
+
+ logo-mode:
+--- docs/makefile
++++ docs/makefile
+@@ -30,10 +30,10 @@
+ -rm -f *.{aux,cp,cps,dvi,fn,ky,log,pg,toc,tp,vr}
+
+ install: all
+- for d in $(INFODIR) $(DOCSDIR) $(HTMLDIR); do [ -d $$d ] || mkdir -p $$d || exit 1; done
+- -cp -f *.info* $(INFODIR)/.
+- -cp -f html/*.html $(HTMLDIR)/.
+- -cp -f usermanual.ps $(DOCSDIR)/.
+- -cp -f usermanual.pdf $(DOCSDIR)/.
+- -cp -f usermanual.texi $(DOCSDIR)/.
+- -cp -f ../usermanual $(DOCSDIR)/.
++ for d in $(INFODIR) $(DOCSDIR) $(HTMLDIR); do [ -d $(DESTDIR)$$d ] || mkdir -p $(DESTDIR)$$d || exit 1; done
++ -cp -f *.info* $(DESTDIR)$(INFODIR)/.
++ -cp -f html/*.html $(DESTDIR)$(HTMLDIR)/.
++ -cp -f usermanual.ps $(DESTDIR)$(DOCSDIR)/.
++ -cp -f usermanual.pdf $(DESTDIR)$(DOCSDIR)/.
++ -cp -f usermanual.texi $(DESTDIR)$(DOCSDIR)/.
++ -cp -f ../usermanual $(DESTDIR)$(DOCSDIR)/.
+--- emacs/makefile
++++ emacs/makefile
+@@ -40,16 +40,16 @@
+ -rm -f add.user install-logo-mode dot.emacs dot.loops *.elc
+
+ install: all
+- for d in $(EMACSDIR); do [ -d $$d ] || mkdir -p $$d || exit 1; done
+- cp -f logo.* $(EMACSDIR)/.
+- cp -f letrec.* $(EMACSDIR)/.
+- cp -f comint*.* $(EMACSDIR)/.
+- cp -f tutor* $(EMACSDIR)/.
+- cp -f dot.loops $(EMACSDIR)/.
+- cp -f dot.logo $(EMACSDIR)/.logo
+- cp -f dot.LOOPS $(EMACSDIR)/.LOOPS
+- cp -f dot.emacs $(EMACSDIR)/.
+- cp -f README $(EMACSDIR)/.
+- cp -p install-logo-mode $(BINDIR)/.
+- cp -f edfunc.el $(EMACSDIR)/.
+- cp -f check.lg $(EMACSDIR)/.
++ for d in $(EMACSDIR); do [ -d $(DESTDIR)$$d ] || mkdir -p $(DESTDIR)$$d || exit 1; done
++ cp -f logo.* $(DESTDIR)$(EMACSDIR)/.
++ cp -f letrec.* $(DESTDIR)$(EMACSDIR)/.
++ cp -f comint*.* $(DESTDIR)$(EMACSDIR)/.
++ cp -f tutor* $(DESTDIR)$(EMACSDIR)/.
++ cp -f dot.loops $(DESTDIR)$(EMACSDIR)/.
++ cp -f dot.logo $(DESTDIR)$(EMACSDIR)/.logo
++ cp -f dot.LOOPS $(DESTDIR)$(EMACSDIR)/.LOOPS
++ cp -f dot.emacs $(DESTDIR)$(EMACSDIR)/.
++ cp -f README $(DESTDIR)$(EMACSDIR)/.
++ cp -p install-logo-mode $(DESTDIR)$(BINDIR)/.
++ cp -f edfunc.el $(DESTDIR)$(EMACSDIR)/.
++ cp -f check.lg $(DESTDIR)$(EMACSDIR)/.
diff --git a/dev-lang/ucblogo/files/ucblogo-5.5-dont-require-tetex.patch b/dev-lang/ucblogo/files/ucblogo-5.5-dont-require-tetex.patch
new file mode 100644
index 00000000000..1007f6f4822
--- /dev/null
+++ b/dev-lang/ucblogo/files/ucblogo-5.5-dont-require-tetex.patch
@@ -0,0 +1,40 @@
+Only build extra docs if we have tetex installed #113023
+
+--- docs/makefile
++++ docs/makefile
+@@ -14,25 +14,25 @@
+ all: usermanual.ps usermanual.pdf html/usermanual_1.html ucblogo.info
+
+ ucblogo.info: usermanual.texi
+- makeinfo usermanual.texi
++ -makeinfo usermanual.texi
+
+ usermanual.dvi: usermanual.texi
+- tex --interaction batchmode usermanual.texi
+- tex --interaction batchmode usermanual.texi
+- texindex usermanual.cp
+- tex --interaction batchmode usermanual.texi
++ -tex --interaction batchmode usermanual.texi
++ -tex --interaction batchmode usermanual.texi
++ -texindex usermanual.cp
++ -tex --interaction batchmode usermanual.texi
+
+ usermanual.ps: usermanual.dvi
+- dvips -t letter -o usermanual.ps usermanual.dvi
++ -dvips -t letter -o usermanual.ps usermanual.dvi
+
+ usermanual.pdf: usermanual.ps usermanual.dvi
+- ps2pdf usermanual.ps
+- dvipdf usermanual.dvi
++ -ps2pdf usermanual.ps
++ -dvipdf usermanual.dvi
+
+ html/usermanual_1.html: usermanual.texi
+ for d in html; do [ -d $$d ] || mkdir -p $$d || exit 1; done
+- texi2html -expand tex -split chapter usermanual.texi
+- mv *.html html
++ -texi2html -expand tex -split chapter usermanual.texi
++ -mv *.html html
+
+ ship:
+ -rm -f *.{aux,cp,cps,dvi,fn,ky,log,pg,toc,tp,vr}
diff --git a/dev-lang/ucblogo/files/ucblogo-5.5-fhs.patch b/dev-lang/ucblogo/files/ucblogo-5.5-fhs.patch
new file mode 100644
index 00000000000..86485550b9f
--- /dev/null
+++ b/dev-lang/ucblogo/files/ucblogo-5.5-fhs.patch
@@ -0,0 +1,28 @@
+--- makefile.in
++++ makefile.in
+@@ -3,6 +3,7 @@
+ LDFLAGS = @LDFLAGS@
+ LIBS = @X_PRE_LIBS@ @X_LIBS@ @LIBS@ @X_EXTRA_LIBS@
+ prefix = @prefix@
++export infodir = @infodir@
+ BINDIR = $(prefix)/bin
+ LIBLOC = $(prefix)/lib/logo
+ MAKE = @MAKE@
+--- docs/makefile
++++ docs/makefile
+@@ -1,6 +1,14 @@
+ BUILDIR = `pwd`
++ifdef infodir
++INFODIR = $(infodir)
++else
+ INFODIR = $(prefix)/info
+-DOCSDIR = $(LIBLOC)/docs
++endif
++ifdef PF
++DOCSDIR = $(prefix)/share/doc/$(PF)
++else
++DOCSDIR = $(prefix)/share/doc/logo
++endif
+ HTMLDIR = $(DOCSDIR)/html
+
+ all: usermanual.ps usermanual.pdf html/usermanual_1.html ucblogo.info
diff --git a/dev-lang/ucblogo/files/ucblogo-5.5-no-emacs.patch b/dev-lang/ucblogo/files/ucblogo-5.5-no-emacs.patch
new file mode 100644
index 00000000000..03c78fc179f
--- /dev/null
+++ b/dev-lang/ucblogo/files/ucblogo-5.5-no-emacs.patch
@@ -0,0 +1,28 @@
+--- makefile.in~ 2007-04-03 22:50:58.000000000 +0100
++++ makefile.in 2007-04-03 22:50:58.000000000 +0100
+@@ -57,12 +57,10 @@
+
+ clean:
+ rm -f *.o libloc.c
+- cd emacs; $(MAKE) clean
+
+ ship:
+ rm -f config.h config.cache config.log config.status
+ rm -f makefile makehelp logo *.o libloc.c
+- cd emacs; $(MAKE) ship
+ cd docs; $(MAKE) ship
+
+ install: all
+@@ -71,12 +69,10 @@
+ cp -f logolib/* $(DESTDIR)$(LIBLOC)/logolib/.
+ cp -f helpfiles/* $(DESTDIR)$(LIBLOC)/helpfiles/.
+ cp -f csls/* $(DESTDIR)$(LIBLOC)/csls/.
+- (cd emacs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) DESTDIR=$(DESTDIR) $(MAKE) install)
+ (cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) DESTDIR=$(DESTDIR) $(MAKE) install)
+ # prefix=$(prefix); LIBLOC=$(LIBLOC); BINDIR=$(BINDIR); export prefix LIBLOC BINDIR; cd emacs; $(MAKE) install
+
+ logo-mode:
+- (cd emacs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE))
+ # @prefix=$(prefix); LIBLOC=$(LIBLOC); BINDIR=$(BINDIR); export prefix LIBLOC BINDIR; cd emacs; $(MAKE)
+
+ make-docs:
diff --git a/dev-lang/ucblogo/metadata.xml b/dev-lang/ucblogo/metadata.xml
new file mode 100644
index 00000000000..bf21719baa8
--- /dev/null
+++ b/dev-lang/ucblogo/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>
+ <email>tomk@gentoo.org</email>
+ <name>Tom Knight</name>
+</maintainer>
+<longdescription>
+ Logo is the educational programming language best known for its "turtle
+ graphics" but also featuring easy and powerful facilities for computing
+ with words and sentences. Sample projects included with the Berkeley
+ Logo distribution range from a tic-tac-toe game to a Pascal compiler and
+ a Logo implementation of Student, Daniel Bobrow's program that solves
+ algebra word problems.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ucblogo/ucblogo-5.5-r1.ebuild b/dev-lang/ucblogo/ucblogo-5.5-r1.ebuild
new file mode 100644
index 00000000000..cd9bdb22ef3
--- /dev/null
+++ b/dev-lang/ucblogo/ucblogo-5.5-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils elisp-common toolchain-funcs
+
+DESCRIPTION="a reflective, functional programming language"
+HOMEPAGE="http://www.cs.berkeley.edu/~bh/logo.html"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="emacs X"
+
+DEPEND="emacs? ( virtual/emacs )
+ X? ( x11-libs/libICE x11-libs/libSM x11-libs/libX11 )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ epatch "${FILESDIR}"/${P}-fhs.patch
+ epatch "${FILESDIR}"/${P}-dont-require-tetex.patch
+ use emacs || epatch "${FILESDIR}"/${P}-no-emacs.patch
+# use emacs || echo 'all install:' > emacs/makefile
+}
+
+src_compile() {
+ econf $(use_with X x) || die
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ dodoc README
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/ucblogo/ucblogo-5.5.ebuild b/dev-lang/ucblogo/ucblogo-5.5.ebuild
new file mode 100644
index 00000000000..a584f61add6
--- /dev/null
+++ b/dev-lang/ucblogo/ucblogo-5.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="a reflective, functional programming language"
+HOMEPAGE="http://www.cs.berkeley.edu/~bh/logo.html"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs X"
+
+DEPEND="emacs? ( virtual/emacs )
+ X? ( x11-libs/libICE x11-libs/libSM x11-libs/libX11 )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ epatch "${FILESDIR}"/${P}-fhs.patch
+ epatch "${FILESDIR}"/${P}-dont-require-tetex.patch
+ use emacs || epatch "${FILESDIR}"/${P}-no-emacs.patch
+# use emacs || echo 'all install:' > emacs/makefile
+}
+
+src_compile() {
+ econf $(use_with X x) || die
+ emake || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ dodoc README
+}
diff --git a/dev-lang/vala/Manifest b/dev-lang/vala/Manifest
new file mode 100644
index 00000000000..a901431ed92
--- /dev/null
+++ b/dev-lang/vala/Manifest
@@ -0,0 +1,5 @@
+DIST vala-0.20.1.tar.xz 2627808 SHA256 9cb7ecd18a23525e401c204d4d08341c7d911cd5d78078eee10b747ecb45e481 SHA512 6246228815bcc042de0aeea3f4593c95b0d81fdfec8a4336a8e9178dd8a4a7013694a2cec543c3c49aad026d5d3597e194884b6cfecb10040db886afba9e72e1 WHIRLPOOL 91a7017c1801ebe29f5f9704b98e9bc65d26bb66122ef25f684da43dee116a2da5c9d7a91a1f73c5a7a580c9c8e5515f024a2b8ad615ae367faf37bef022f905
+DIST vala-0.22.1.tar.xz 2690324 SHA256 92c61b94a427f281ba2537b69135a3be23248b153268057d7195003dd6aba28c SHA512 e65f6d368d50264cdd497251ca6ebf8f0be21455afe5b9d74b146d58229f32e5906cfe323cef2cf4c6677e01fcbf599ab98852d4930df89cb69740b8fffacb34 WHIRLPOOL d3252642b35ab619f3b08dbda3ab4ef201b665c55682e122b4ffd1e5138d60a38b017ae20140de31372c9f61f20532a7a04d77f8cfe5ae04f93ea1c55338e09a
+DIST vala-0.24.0.tar.xz 2666032 SHA256 22a37c977512c19cd29c373eaaef96cb2c994795d491106f32387f3f9d1e899c SHA512 a5897af7926affbdb018f0c31d4ec84d3322dc03e7cc64cb8b28c60fd4887a64b94760e061145aab5c36442a0d8665f3e3d584e09502e5f2587860d199317479 WHIRLPOOL d19cdf123abc3689c84c3746729a1452a8a9051271aaa64782db226ab4c276e963fa574900b4d145577d4fd0329cb29f73782b5f67ac1650ad1bdf663096e88f
+DIST vala-0.26.2.tar.xz 2682856 SHA256 37f13f430c56a93b6dac85239084681fd8f31c407d386809c43bc2f2836e03c4 SHA512 9c8dcb59f01e7f77c79f5f9ed996930c23444bddf22898ee775602e54f817b4cbd7c477c9a46a140acca57db9d8047b8fcffdb87f51276ff1719857faed6e535 WHIRLPOOL 492790367f93b0e913ccb1c3c04c098473020f68236f6ec3c70eeb85023bbb913ecef366793996e4952b79dadd4d3687e167d8b9eed87daac950c6d66d9153bc
+DIST vala-0.28.0.tar.xz 2720652 SHA256 0d9e3bd3f82145664875f7c29b2f544ba92d2814f75412948f774c0727fc977f SHA512 4f9adc4a3e672c25b508f5193bb1984e848dcaca059c2eb733e93ca7f58b5d58028a56f4234a62baa30ff50b63d87af24510334eba41630692c5f16e580bad88 WHIRLPOOL cfdd97f90f033b030d768ed66e78b5f86b6e1e50bac34806cd70dda168a5ff3192249d08ee9e020e0ea33d753b20aa69c6e269c65fa193a19e6ae4353912c7d2
diff --git a/dev-lang/vala/files/vala-0.24.0-atk-metadata.patch b/dev-lang/vala/files/vala-0.24.0-atk-metadata.patch
new file mode 100644
index 00000000000..1863e8e370d
--- /dev/null
+++ b/dev-lang/vala/files/vala-0.24.0-atk-metadata.patch
@@ -0,0 +1,248 @@
+From: Luca Bruno <lucabru@src.gnome.org>
+Date: Sun, 30 Mar 2014 13:47:08 +0200
+Subject: atk: Update and fix metadata
+
+Fixes bug 727029
+
+Conflicts:
+ vapi/metadata/Atk-1.0-custom.vala
+ vapi/metadata/Atk-1.0.metadata
+---
+ vapi/atk.vapi | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 81 insertions(+), 4 deletions(-)
+
+diff --git a/vapi/atk.vapi b/vapi/atk.vapi
+index 55db067..cc17cfb 100644
+--- a/vapi/atk.vapi
++++ b/vapi/atk.vapi
+@@ -41,12 +41,15 @@ namespace Atk {
+ public class Misc : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Misc ();
++ [Deprecated]
+ public static unowned Atk.Misc get_instance ();
++ [Deprecated]
+ public virtual void threads_enter ();
++ [Deprecated]
+ public virtual void threads_leave ();
+ }
+ [CCode (cheader_filename = "atk/atk.h", type_id = "atk_no_op_object_get_type ()")]
+- public class NoOpObject : Atk.Object, Atk.Action, Atk.Component, Atk.Document, Atk.EditableText, Atk.Hypertext, Atk.Image, Atk.Selection, Atk.Table, Atk.Text, Atk.Value, Atk.Window {
++ public class NoOpObject : Atk.Object, Atk.Action, Atk.Component, Atk.Document, Atk.EditableText, Atk.Hypertext, Atk.Image, Atk.Selection, Atk.Table, Atk.TableCell, Atk.Text, Atk.Value, Atk.Window {
+ [CCode (has_construct_function = false, type = "AtkObject*")]
+ public NoOpObject (GLib.Object obj);
+ }
+@@ -65,6 +68,7 @@ namespace Atk {
+ [CCode (has_construct_function = false)]
+ protected Object ();
+ public bool add_relationship (Atk.RelationType relationship, Atk.Object target);
++ [Deprecated]
+ public virtual uint connect_property_change_handler (Atk.PropertyChangeHandler handler);
+ public virtual Atk.AttributeSet get_attributes ();
+ public virtual unowned string get_description ();
+@@ -82,9 +86,11 @@ namespace Atk {
+ public virtual Atk.Role get_role ();
+ public virtual void initialize (void* data);
+ public void notify_state_change (Atk.State state, bool value);
++ public unowned Atk.Object peek_parent ();
+ public Atk.Object ref_accessible_child (int i);
+ public virtual Atk.RelationSet ref_relation_set ();
+ public virtual Atk.StateSet ref_state_set ();
++ [Deprecated]
+ public virtual void remove_property_change_handler (uint handler_id);
+ public bool remove_relationship (Atk.RelationType relationship, Atk.Object target);
+ public virtual void set_description (string description);
+@@ -105,27 +111,33 @@ namespace Atk {
+ public Atk.Object accessible_parent { owned get; set; }
+ [NoAccessorMethod]
+ public int accessible_role { get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public string accessible_table_caption { owned get; set; }
+ [NoAccessorMethod]
+ public Atk.Object accessible_table_caption_object { owned get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public string accessible_table_column_description { owned get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public Atk.Object accessible_table_column_header { owned get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public string accessible_table_row_description { owned get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public Atk.Object accessible_table_row_header { owned get; set; }
+ [NoAccessorMethod]
+ public Atk.Object accessible_table_summary { owned get; set; }
++ [Deprecated]
+ [NoAccessorMethod]
+ public double accessible_value { get; set; }
+ public virtual signal void active_descendant_changed (void* child);
+ public virtual signal void children_changed (uint change_index, void* changed_child);
+ [Deprecated]
+ public virtual signal void focus_event (bool focus_in);
+- public signal void property_change (void* arg1);
++ public virtual signal void property_change (void* values);
+ public virtual signal void state_change (string name, bool state_set);
+ public virtual signal void visible_data_changed ();
+ }
+@@ -145,6 +157,17 @@ namespace Atk {
+ [NoWrapper]
+ public virtual string get_object_id ();
+ }
++ [CCode (cheader_filename = "atk/atk.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "atk_range_get_type ()")]
++ [Compact]
++ public class Range {
++ [CCode (has_construct_function = false)]
++ public Range (double lower_limit, double upper_limit, string description);
++ public Atk.Range copy ();
++ public void free ();
++ public unowned string get_description ();
++ public double get_lower_limit ();
++ public double get_upper_limit ();
++ }
+ [CCode (cheader_filename = "atk/atk.h")]
+ public class Registry : GLib.Object {
+ [Deprecated]
+@@ -280,7 +303,9 @@ namespace Atk {
+ public abstract void get_extents (int x, int y, int width, int height, Atk.CoordType coord_type);
+ public abstract Atk.Layer get_layer ();
+ public abstract int get_mdi_zorder ();
++ [Deprecated]
+ public abstract void get_position (int x, int y, Atk.CoordType coord_type);
++ [Deprecated]
+ public abstract void get_size (int width, int height);
+ public abstract bool grab_focus ();
+ public abstract Atk.Object ref_accessible_at_point (int x, int y, Atk.CoordType coord_type);
+@@ -371,13 +396,16 @@ namespace Atk {
+ public abstract bool add_column_selection (int column);
+ public abstract bool add_row_selection (int row);
+ public abstract unowned Atk.Object get_caption ();
++ [Deprecated]
+ public abstract int get_column_at_index (int index_);
+ public abstract unowned string get_column_description (int column);
+ public abstract int get_column_extent_at (int row, int column);
+ public abstract unowned Atk.Object get_column_header (int column);
++ [Deprecated]
+ public abstract int get_index_at (int row, int column);
+ public abstract int get_n_columns ();
+ public abstract int get_n_rows ();
++ [Deprecated]
+ public abstract int get_row_at_index (int index_);
+ public abstract unowned string get_row_description (int row);
+ public abstract int get_row_extent_at (int row, int column);
+@@ -405,6 +433,16 @@ namespace Atk {
+ public virtual signal void row_inserted (int row, int num_inserted);
+ public virtual signal void row_reordered ();
+ }
++ [CCode (cheader_filename = "atk/atk.h", type_id = "atk_table_cell_get_type ()")]
++ public interface TableCell : Atk.Object {
++ public abstract GLib.GenericArray<Atk.Object> get_column_header_cells ();
++ public abstract int get_column_span ();
++ public abstract bool get_position (out int row, out int column);
++ public abstract bool get_row_column_span (out int row, out int column, out int row_span, out int column_span);
++ public abstract GLib.GenericArray<Atk.Object> get_row_header_cells ();
++ public abstract int get_row_span ();
++ public abstract Atk.Object get_table ();
++ }
+ [CCode (cheader_filename = "atk/atk.h")]
+ public interface Text : GLib.Object {
+ public abstract bool add_selection (int start_offset, int end_offset);
+@@ -418,6 +456,7 @@ namespace Atk {
+ public static Atk.TextAttribute attribute_register (string name);
+ public static void free_ranges ([CCode (array_length = false)] Atk.TextRange[] ranges);
+ [CCode (array_length = false, array_null_terminated = true)]
++ [NoWrapper]
+ public virtual Atk.TextRange[] get_bounded_ranges (Atk.TextRectangle rect, Atk.CoordType coord_type, Atk.TextClipType x_clip_type, Atk.TextClipType y_clip_type);
+ public abstract int get_caret_offset ();
+ public abstract unichar get_character_at_offset (int offset);
+@@ -450,11 +489,22 @@ namespace Atk {
+ }
+ [CCode (cheader_filename = "atk/atk.h", type_id = "atk_value_get_type ()")]
+ public interface Value : GLib.Object {
++ [Deprecated]
+ public abstract void get_current_value (GLib.Value value);
++ public abstract double get_increment ();
++ [Deprecated]
+ public abstract void get_maximum_value (GLib.Value value);
++ [Deprecated]
+ public abstract void get_minimum_increment (GLib.Value value);
++ [Deprecated]
+ public abstract void get_minimum_value (GLib.Value value);
++ public abstract Atk.Range get_range ();
++ public abstract GLib.SList<Atk.Range> get_sub_ranges ();
++ public abstract void get_value_and_text (out double value, out string text);
++ [Deprecated]
+ public abstract bool set_current_value (GLib.Value value);
++ public abstract void set_value (double new_value);
++ public signal void value_changed (double value, string text);
+ }
+ [CCode (cheader_filename = "atk/atk.h", type_id = "atk_window_get_type ()")]
+ public interface Window : Atk.Object {
+@@ -484,8 +534,7 @@ namespace Atk {
+ public uint16 keycode;
+ public uint32 timestamp;
+ }
+- [CCode (cheader_filename = "atk/atk.h", cname = "_AtkPropertyValues", has_type_id = false)]
+- [GIR (name = "_PropertyValues")]
++ [CCode (cheader_filename = "atk/atk.h", has_type_id = false)]
+ public struct PropertyValues {
+ public weak string property_name;
+ public GLib.Value old_value;
+@@ -688,6 +737,9 @@ namespace Atk {
+ MATH,
+ RATING,
+ TIMER,
++ DESCRIPTION_LIST,
++ DESCRIPTION_TERM,
++ DESCRIPTION_VALUE,
+ LAST_DEFINED;
+ [CCode (cheader_filename = "atk/atk.h")]
+ public static Atk.Role for_name (string name);
+@@ -696,6 +748,7 @@ namespace Atk {
+ [CCode (cheader_filename = "atk/atk.h")]
+ public static unowned string get_name (Atk.Role role);
+ [CCode (cheader_filename = "atk/atk.h")]
++ [Deprecated]
+ public static Atk.Role register (string name);
+ }
+ [CCode (cheader_filename = "atk/atk.h", cprefix = "ATK_STATE_", type_id = "atk_state_type_get_type ()")]
+@@ -814,6 +867,29 @@ namespace Atk {
+ LINE,
+ PARAGRAPH
+ }
++ [CCode (cheader_filename = "atk/atk.h", cprefix = "ATK_VALUE_", type_id = "atk_value_type_get_type ()")]
++ public enum ValueType {
++ VERY_WEAK,
++ WEAK,
++ ACCEPTABLE,
++ STRONG,
++ VERY_STRONG,
++ VERY_LOW,
++ LOW,
++ MEDIUM,
++ HIGH,
++ VERY_HIGH,
++ VERY_BAD,
++ BAD,
++ GOOD,
++ VERY_GOOD,
++ BEST,
++ LAST_DEFINED;
++ [CCode (cheader_filename = "atk/atk.h")]
++ public static unowned string get_localized_name (Atk.ValueType value_type);
++ [CCode (cheader_filename = "atk/atk.h")]
++ public static unowned string get_name (Atk.ValueType value_type);
++ }
+ [CCode (cheader_filename = "atk/atk.h", has_target = false)]
+ public delegate void EventListener (Atk.Object obj);
+ [CCode (cheader_filename = "atk/atk.h", has_target = false)]
+@@ -826,6 +902,7 @@ namespace Atk {
+ [CCode (cheader_filename = "atk/atk.h", instance_pos = 1.9)]
+ public delegate int KeySnoopFunc (Atk.KeyEventStruct event);
+ [CCode (cheader_filename = "atk/atk.h", has_target = false)]
++ [Deprecated]
+ public delegate void PropertyChangeHandler (Atk.Object obj, Atk.PropertyValues vals);
+ [CCode (cheader_filename = "atk/atk.h", cname = "GSignalEmissionHook", has_target = false)]
+ public delegate bool SignalEmissionHook (GLib.SignalInvocationHint ihint, [CCode (array_length_pos = 1.9)] Atk.Value[] param_values, void* data);
diff --git a/dev-lang/vala/metadata.xml b/dev-lang/vala/metadata.xml
new file mode 100644
index 00000000000..04928dda5ee
--- /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>
+ <herd>gnome</herd>
+ <use>
+ <flag name="vapigen">Enable vala's library binding generator</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/vala/vala-0.20.1.ebuild b/dev-lang/vala/vala-0.20.1.ebuild
new file mode 100644
index 00000000000..7a78c841b2e
--- /dev/null
+++ b/dev-lang/vala/vala-0.20.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="http://live.gnome.org/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.20"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test +vapigen"
+
+RDEPEND="
+ >=dev-libs/glib-2.18: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 )"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README"
+ gnome2_src_configure \
+ --disable-unversioned \
+ $(use_enable vapigen)
+}
diff --git a/dev-lang/vala/vala-0.22.1.ebuild b/dev-lang/vala/vala-0.22.1.ebuild
new file mode 100644
index 00000000000..4342ee393b4
--- /dev/null
+++ b/dev-lang/vala/vala-0.22.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.22"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test +vapigen"
+
+RDEPEND="
+ >=dev-libs/glib-2.18: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 )
+"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README"
+ gnome2_src_configure \
+ --disable-unversioned \
+ $(use_enable vapigen)
+}
diff --git a/dev-lang/vala/vala-0.24.0-r1.ebuild b/dev-lang/vala/vala-0.24.0-r1.ebuild
new file mode 100644
index 00000000000..64409701d2b
--- /dev/null
+++ b/dev-lang/vala/vala-0.24.0-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 eutils
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.24"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test +vapigen"
+
+RDEPEND="
+ >=dev-libs/glib-2.18: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 )
+"
+
+src_prepare() {
+ # atk: Update and fix metadata (from 'master', backport from Debian), bug #508704
+ epatch "${FILESDIR}/${PN}-0.24.0-atk-metadata.patch"
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README"
+ gnome2_src_configure \
+ --disable-unversioned \
+ $(use_enable vapigen)
+}
diff --git a/dev-lang/vala/vala-0.26.2.ebuild b/dev-lang/vala/vala-0.26.2.ebuild
new file mode 100644
index 00000000000..2264275e1bf
--- /dev/null
+++ b/dev-lang/vala/vala-0.26.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.26"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.24: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 )
+"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README"
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.28.0.ebuild b/dev-lang/vala/vala-0.28.0.ebuild
new file mode 100644
index 00000000000..55cc4339590
--- /dev/null
+++ b/dev-lang/vala/vala-0.28.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.28"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.24: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 )
+"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README"
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/whitespace/Manifest b/dev-lang/whitespace/Manifest
new file mode 100644
index 00000000000..dc1f50556e8
--- /dev/null
+++ b/dev-lang/whitespace/Manifest
@@ -0,0 +1 @@
+DIST wspace-0.3.tgz 15471 SHA256 53e47bf05df991c1d0f88a75cf5208bfc42d42b87f8fe3e8ee6a05ac78544a73 SHA512 d162e804b0b6c4cba164552678ef3a094153e89a0df5f684e52b93229d88699cf9c7fd31641b88fd8c4653c158b1e77193ebd9cd1edfc47863a09798f67d3487 WHIRLPOOL 48f71bab55c281607d0d537d9b532b95439744f7e11a6fd96b60145ef2489413ebd85617a3292b2a016eadc9d4cf6146505b614d50fba0d1c9b156be1ba87db9
diff --git a/dev-lang/whitespace/files/whitespace-cabal.patch b/dev-lang/whitespace/files/whitespace-cabal.patch
new file mode 100644
index 00000000000..f686d8c4851
--- /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 00000000000..410c5e5c0b8
--- /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>
+ <email>yac@gentoo.org</email>
+ <name>Jan Matejka</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-lang/whitespace/whitespace-0.3.ebuild b/dev-lang/whitespace/whitespace-0.3.ebuild
new file mode 100644
index 00000000000..6915b81adfb
--- /dev/null
+++ b/dev-lang/whitespace/whitespace-0.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/xsb/Manifest b/dev-lang/xsb/Manifest
new file mode 100644
index 00000000000..011cee3f8d4
--- /dev/null
+++ b/dev-lang/xsb/Manifest
@@ -0,0 +1,6 @@
+DIST XSB336.tar.gz 11823814 SHA256 3ac7448d7c323717d67edd09f37515ef991d71871ca3ce521975981fee1d9de7 SHA512 dc227e1338454a181ee2c3f84b2c8083bd4607252d89368a614a9894c5403eaf173fdc036a548aab8c6eb2ed7252e5e69a5caedff20710e83cf8c6ec66a8317a WHIRLPOOL bc48fe7dced9c3050253f2122507715abb0a528ba702432ca63a0385cccf47d9a8a1f47b901f779811c238d2015a368a420adbb93d4f68f0640396069112ad19
+DIST XSB337.tar.gz 12176947 SHA256 6deb73ed8774ff2e0414ee7a1af29a3768b964f3fe22e7579670d61c3ca7ff40 SHA512 e98c56ad7fb107252160a03a1c07567119921be6a06c7be22960f2334517ccc8799d8bc49d4e260697f5d5912dda0236dc697b4fb8016652b4f81255ae442883 WHIRLPOOL 2daac410add67fcdffcd47660d0bf52701626be23dd6c2400efbe21e2f3f02b5f11d5231e9fac19787369ddf9a8499d9c876889849078dcd4714ca0ed5c75f8a
+DIST XSB350.tar.gz 12122366 SHA256 f9664f89e56294d0d174d81b23ebd8314a5f9cc38816ee6ce5ab9d51bfeca63f SHA512 2ef45ef3427f331ad678deb41f7b9ef8bbc4f6d8ef6ec060e755115e91a002f3ac694c53f8f777d1b0790040f3318c23116a6b98c50faeeb541b3e9c2ed22e9f WHIRLPOOL bbdfea2ff42e28abfaf6532a46517c538fc391bef629589445903403435b2227adb2c6ce5705bc0edc16cb478b32f4b86a1250ad27b9b2fa91d49683e25ae887
+DIST xsb-3.3.6-gentoo-patchset-1.tar.gz 17711 SHA256 7630aa3497a80e6a39580bb050da8169318842de3f6b17a8b1f8a721ea6ec0e4 SHA512 a554833e974973f3bf6ad9d63d1e7bcbe358cfccdd35ad3f982375cfa171637484277c9c8be95c5eea34dac87845d02b6abc7d4675e1ff324c64603ae06338d1 WHIRLPOOL 5a0c6bfcc554e5c34f57acf1de2001bfbdea7e18e2ed1037409f58dc2151199c79af01f7d7cca8b7dea79bfe571fca8ff6b1f78ab368d7255e49dab8fe61fa3e
+DIST xsb-3.3.7-gentoo-patchset-0.tar.gz 18248 SHA256 2eaad6dedac906f207c24713d92115086196f3c626d1b0e0401c71b4bfe10038 SHA512 3943000e40abad25da8fef2983e059dadf6d794a5a40406a3fb9d7e29506afb0d5ad1d86b0825849ea7dd9741fdfafa2b71fc2fd26cc2b679e39d85f76a91959 WHIRLPOOL d2d51c482d1ff207709c8ed280eb148c632d81d4670ead646c8eb5a62651932dbe292adca03060d1b591405fdbad274be1b767fd3e19e5a4f4e4da3fd4277ea6
+DIST xsb-3.5.0-gentoo-patchset-0.tar.gz 5337 SHA256 3dbdbc3bbbfeac4083221ec89d524026fa9ec8a528baacb1c1e3495629a0bbee SHA512 a1158d4480dada855c3cdb80b065b1c3ac2c9b7e8da16ce0a39e7ffb70821c547ae2ba3bf1776a2c70f02bf85828bedbaa81cf4be469c7aeced5d8df541aa998 WHIRLPOOL 1b61a1136433e3119eb6a4018adf8aafd67bbc90333452fb9cb4ac49957a05fd4b40fd64ef7bfc5e472cd2c4277d62f8d3b5db1bf3f9e5f9d396133ae78c8e84
diff --git a/dev-lang/xsb/metadata.xml b/dev-lang/xsb/metadata.xml
new file mode 100644
index 00000000000..1990bb86aac
--- /dev/null
+++ b/dev-lang/xsb/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+</pkgmetadata>
diff --git a/dev-lang/xsb/xsb-3.3.6.ebuild b/dev-lang/xsb/xsb-3.3.6.ebuild
new file mode 100644
index 00000000000..0d25dc4e5a5
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.3.6.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MY_P="XSB${PV//./}"
+
+PATCHSET_VER="1"
+
+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 examples 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
+
+ find "${S}"/emu -name '*\.o' | xargs rm -f
+}
+
+src_configure() {
+ cd "${S}"/build
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --disable-optimization \
+ --without-smodels \
+ --with-config-tag="" \
+ $(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 -rf *.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}/chr_d
+ doins chr_d/*.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}/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
+
+ if use examples ; then
+ cd "${S}"/build
+ emake \
+ DESTDIR="${D}" \
+ install_examples="${D}"/usr/share/doc/${PF}/examples \
+ install_examples || die "make install_examples failed"
+ fi
+
+ cd "${S}"
+ dodoc FAQ README || die
+}
diff --git a/dev-lang/xsb/xsb-3.3.7.ebuild b/dev-lang/xsb/xsb-3.3.7.ebuild
new file mode 100644
index 00000000000..3ca1afb58c3
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.3.7.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MY_P="XSB${PV//./}"
+
+PATCHSET_VER="0"
+
+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 examples 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
+
+ find "${S}"/emu -name '*\.o' | xargs rm -f
+}
+
+src_configure() {
+ cd "${S}"/build
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --disable-optimization \
+ --without-smodels \
+ --with-config-tag="" \
+ $(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 -rf *.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}/chr_d
+ doins chr_d/*.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}/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
+
+ if use examples ; then
+ cd "${S}"/build
+ emake \
+ DESTDIR="${D}" \
+ install_examples="${D}"/usr/share/doc/${PF}/examples \
+ install_examples || die "make install_examples failed"
+ fi
+
+ cd "${S}"
+ dodoc FAQ README || die
+}
diff --git a/dev-lang/xsb/xsb-3.5.0.ebuild b/dev-lang/xsb/xsb-3.5.0.ebuild
new file mode 100644
index 00000000000..3685883bac4
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.5.0.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MY_P="XSB${PV//./}"
+
+PATCHSET_VER="0"
+
+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
+
+ find "${S}"/emu -name '*\.o' | xargs rm -f
+ find "${S}" -name 'Installation_summary' | xargs rm -f
+}
+
+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}/chr_d
+ doins chr_d/*.xwam || die
+
+ insinto ${PACKAGES}/clpqr
+ doins clpqr/*.xwam || die
+
+ insinto ${PACKAGES}/gap
+ doins gap/*.xwam || die
+
+ insinto ${PACKAGES}/justify
+ doins justify/*.xwam || die
+ doins justify/*.H || die
+
+ insinto ${PACKAGES}/regmatch
+ doins regmatch/*.xwam || die
+ insinto ${PACKAGES}/regmatch/cc
+ doins regmatch/cc/*.H || die
+
+ insinto ${PACKAGES}/slx
+ doins slx/*.xwam || die
+
+ insinto ${PACKAGES}/wildmatch
+ doins wildmatch/*.xwam || die
+ insinto ${PACKAGES}/wildmatch/cc
+ doins wildmatch/cc/*.H || die
+
+ if use curl ; then
+ insinto ${PACKAGES}/curl
+ doins curl/*.xwam || die
+ insinto ${PACKAGES}/curl/cc
+ doins curl/cc/*.H || die
+ insinto ${PACKAGES}/sgml
+ doins sgml/*.xwam || die
+ insinto ${PACKAGES}/sgml/cc
+ doins sgml/cc/*.H || die
+ insinto ${PACKAGES}/sgml/cc/dtd
+ doins sgml/cc/dtd/* || die
+ if use xml ; then
+ insinto ${PACKAGES}/xpath
+ doins xpath/*xwam || die
+ insinto ${PACKAGES}/xpath/cc
+ doins xpath/cc/*.H || die
+ fi
+ fi
+
+ if use mysql || use odbc ; then
+ insinto ${PACKAGES}/dbdrivers
+ doins dbdrivers/*.xwam || die
+ doins dbdrivers/*.H || die
+ insinto ${PACKAGES}/dbdrivers/cc
+ doins dbdrivers/cc/*.H || die
+ if use mysql ; then
+ insinto ${PACKAGES}/dbdrivers/mysql
+ doins dbdrivers/mysql/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/mysql/cc
+ doins dbdrivers/mysql/cc/*.H || die
+ fi
+ if use odbc ; then
+ insinto ${PACKAGES}/dbdrivers/odbc
+ doins dbdrivers/odbc/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/odbc/cc
+ doins dbdrivers/odbc/cc/*.H || die
+ fi
+ fi
+
+ if use pcre ; then
+ insinto ${PACKAGES}/pcre
+ doins pcre/*.xwam || die
+ insinto ${PACKAGES}/pcre/cc
+ doins pcre/cc/*.H || die
+ fi
+
+ cd "${S}"
+ dodoc FAQ README || die
+}
diff --git a/dev-lang/yap/Manifest b/dev-lang/yap/Manifest
new file mode 100644
index 00000000000..32f5a6a8656
--- /dev/null
+++ b/dev-lang/yap/Manifest
@@ -0,0 +1,6 @@
+DIST yap-6.2.2-gentoo-patchset-2.tar.gz 5736 SHA256 a4c74594a1342ae748c6f00b2ddd28c0d2b8decaa42d0d481617c98a1a34fdae SHA512 046dcab1fe630da06d8b2b5c4a51551fda7ac9e359db8ac92efa2d0880a8aa57ba0fac1ae6947c3fc9aa4e3498a88644f095e69f9deeea63f5433d2c5a687bf4 WHIRLPOOL f91c1aa3d377e8194fba0970a0dcb58fc5e1d45c5ac1764ed56b0904c08433c8ef0e28241efa86c85d29259771d75156fe6a981204d34571c87302435e03e941
+DIST yap-6.2.2.tar.gz 5496746 SHA256 c9b5feb1ac6488797e8c722053db239cc208f7f6f09135f1e6d5f5802f90878e SHA512 8b357f02cd631b7e4d6a44911d82d329b82a654b24637d448ba0e4393ab34918df685c453f4e8b8ebb3aba71034f653c4522478cfafbb24f157c083b623bfc5e WHIRLPOOL 7d266b06874aab2c5b56391ee0d03be025f7cf2ae5ab9a2ca2ef5989b6ef5229bde491919a1b77f3af362798af83bc47614fd3bd293c0d9f4b74d202adb86ea5
+DIST yap-6.3.2-gentoo-patchset-6.tar.gz 4138 SHA256 a5691612842b89e8dc3f5755fe076f3203574da34256bcba78ce282451cfde27 SHA512 c2dc49c0e185e6b6d7bdae175d470926f7b072dad1e46d30e36e885ca4d0abc8a7908b3abc946b1d7c77006973f8ef9e7dc862ecc4ef756eff5d83a06674e5a7 WHIRLPOOL 7046a9d74d34e9f561f71b762f81ae208784eb6daccb4e0bfe7980729bd5094d34858f7d88b54c9d4589e6b835707a0150fd0a6c2b98d41d9238efbc1badb805
+DIST yap-6.3.2.tar.gz 6447312 SHA256 876a31a05a8e50a32bda8597d3381953e3ed99f37f06e7075209a501b8e2d1ed SHA512 8fd93d4e448e92f5dfd4b0dd18e0ce988766d99b3bf7a72bce3931d551c873a11468764bef6bbb132a5518870f2bce0a00658536614db3cdc6586af27d56555d WHIRLPOOL f4507cb41735f40bf343b608a443f017e118c2b99da38e8a59e630b397c4812ce087ce097e85d5af9552191b5f77559609b22f446d05a3513fec08582ea43804
+DIST yap-6.3.3-gentoo-patchset-2.tar.gz 3295 SHA256 770976f1ca7454083274f240f3a1f89e3571606ec5d0f7a9234cf850a98ce395 SHA512 945fc8ba3a6b29fb2e065c8a64bb07d51d74cbb0daa693828ff78130eb83bfd81651771eaa0296e708c434cf42955c71c860b038ad0f8406a9632549284b12e8 WHIRLPOOL 596cf57db3a0e950099170b4744e240e3dbce0f73ea7dab5e9fa140420ad224e31dd2e8e72b6440ae847b3330a2566acb484fc24fde853e12bae7afadad5b578
+DIST yap-6.3.3.tar.gz 7879301 SHA256 aee3b449b1669af07a8291ce6e7fb0a9b35e1343e2ab96fadb1a37552397fa78 SHA512 4ef45277ec84b6e072fa54afc7d6c18f11c3a0cdf477e35e35a0ce2181c9ff2e693f8735f63a1899373f6baf79ce0a972b37e1ae6ed8271bec60663f477bbe80 WHIRLPOOL 3b4095ff9ecbd532d2211e9158f6bd400248b43386027894c08754aadc14712a60325aeb950b361f14b2bc105053ff8a70b025e305fb79003a68f4226a39b724
diff --git a/dev-lang/yap/metadata.xml b/dev-lang/yap/metadata.xml
new file mode 100644
index 00000000000..9720e3e3e80
--- /dev/null
+++ b/dev-lang/yap/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>prolog</herd>
+<use>
+ <flag name='R'>Enable support for connecting R to Prolog</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/yap/yap-6.2.2.ebuild b/dev-lang/yap/yap-6.2.2.ebuild
new file mode 100644
index 00000000000..5f9eea19ffa
--- /dev/null
+++ b/dev-lang/yap/yap-6.2.2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="2"
+
+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="debug doc examples gmp java mpi mysql odbc readline static threads"
+
+RDEPEND="sys-libs/zlib
+ gmp? ( dev-libs/gmp )
+ java? ( >=virtual/jdk-1.4 )
+ mpi? ( virtual/mpi )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline sys-libs/ncurses )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/texi2html )"
+
+S="${WORKDIR}"/${PN}-6.2
+
+src_prepare() {
+ cd "${WORKDIR}"
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ local myddas_conf
+ if use mysql || use odbc; then
+ myddas_conf="--enable-myddas \
+ --enable-myddas-stats \
+ --enable-myddas-top-level"
+ else
+ myddas_conf="--disable-myddas"
+ fi
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(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) \
+ ${myddas_conf}
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use doc ; then
+ emake html || die "emake html failed"
+ fi
+}
+
+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/yap/yap-6.3.2.ebuild b/dev-lang/yap/yap-6.3.2.ebuild
new file mode 100644
index 00000000000..969a2fbaa85
--- /dev/null
+++ b/dev-lang/yap/yap-6.3.2.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="6"
+
+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 )
+ 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
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(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/yap/yap-6.3.3.ebuild b/dev-lang/yap/yap-6.3.3.ebuild
new file mode 100644
index 00000000000..2ad9b4672b2
--- /dev/null
+++ b/dev-lang/yap/yap-6.3.3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="2"
+
+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 )
+ 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
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable !static dynamic-loading) \
+ $(use_enable threads) \
+ $(use_enable threads pthread-locking) \
+ $(use_enable debug debug-yap) \
+ $(use_enable debug low-level-tracer) \
+ $(use_with gmp) \
+ $(use_with readline) \
+ $(use_with mpi) \
+ $(use_with mpi mpe) \
+ $(use_with java) \
+ $(use_with R) \
+ ${myddas_conf}
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use doc ; then
+ emake html || die "emake html failed"
+ fi
+}
+
+src_test() {
+ # libtai package contains check.c which confuses the default
+ # src_test() function
+ true
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed."
+
+ dodoc changes*.html README || die
+
+ if use doc ; then
+ dodoc yap.html || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples/chr
+ doins packages/chr/Examples/* || die
+ insinto /usr/share/doc/${PF}/examples/clib
+ doins packages/clib/demo/* || die
+ insinto /usr/share/doc/${PF}/examples/http
+ doins -r packages/http/examples/* || die
+ insinto /usr/share/doc/${PF}/examples/plunit
+ doins packages/plunit/examples/* || die
+ if use java ; then
+ insinto /usr/share/doc/${PF}/examples/jpl/prolog
+ doins packages/jpl/examples/prolog/* || die
+ insinto /usr/share/doc/${PF}/examples/jpl/java
+ doins packages/jpl/examples/java/README || die
+ doins -r packages/jpl/examples/java/*/*.{java,pl} || die
+ fi
+ if use mpi ; then
+ insinto /usr/share/doc/${PF}/examples/mpi
+ doins library/mpi/examples/*.pl || die
+ fi
+ fi
+}
diff --git a/dev-lang/yasm/Manifest b/dev-lang/yasm/Manifest
new file mode 100644
index 00000000000..791f36dc8fa
--- /dev/null
+++ b/dev-lang/yasm/Manifest
@@ -0,0 +1,3 @@
+DIST yasm-1.2.0-x32.patch.xz 9656 SHA256 d5a623243b1b2a73b4b25d9395a5be1483adca38cec8f50a7f1e4e9107cd9d83 SHA512 93961d0690c0018a3645bc3d610b1f12172f5311609716fec0efcf8af5d70578a1fc74ab42fcc75f2b75ed8837fa03cbc66ddd6386baeb56a519e7639ff64874 WHIRLPOOL 410c940995fc31b2e12f9eec67b6873f1f4629fcdf8a58c2165ab3d9721f21e295901e8917cfd613b30ea319594aeaff21d38ec4e9bd2b693e6e3230e9d637d9
+DIST yasm-1.2.0.tar.gz 1436502 SHA256 768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31 SHA512 e80ace766e145f6486e76da1a5a9819221b7f406745a02529b4ad220ef7f51ddd67f23d0d8b187bffc9725d9f9742ae5f3a0bb23ee5b2a61153332fb3e286b77 WHIRLPOOL 2a1fd73beeea8128c67e0172684e3dac9d0c16b9e35e905a5e313948d685da9ace15a2b18001c02c0aff9113fec9059af5984aeacf8e4ae5e8bbe91dd00d9d9e
+DIST yasm-1.3.0.tar.gz 1492156 SHA256 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f SHA512 572d3b45568b10f58e48f1188c2d6bcbdd16429c8afaccc8c6d37859b45635e106885d679e41d0bee78c23822108c7ae75aa7475eed5ba58057e0a6fe1b68645 WHIRLPOOL 025454780e4e7ccc443fc604e49a5cc9b8489eaff9d50a443786c462604dc16890a07fba6985e2cc53c1076b23fda472aedb6c1cf9c8adcac6c05f90fdf696a7
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 00000000000..c894f821a2a
--- /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 00000000000..eb72a808254
--- /dev/null
+++ b/dev-lang/yasm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</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 00000000000..c63e197d589
--- /dev/null
+++ b/dev-lang/yasm/yasm-1.2.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="nls python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="nls? ( sys-devel/gettext )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/cython-0.14[${PYTHON_USEDEP}]
+ )"
+
+DOCS=( AUTHORS )
+
+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 00000000000..2fd14cc4dc2
--- /dev/null
+++ b/dev-lang/yasm/yasm-1.3.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="nls python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="nls? ( sys-devel/gettext )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/cython-0.14[${PYTHON_USEDEP}]
+ )"
+
+DOCS=( AUTHORS )
+
+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 00000000000..04cec4c0cf7
--- /dev/null
+++ b/dev-lang/yasm/yasm-9999.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils python-r1
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="git://github.com/yasm/yasm.git"
+ inherit git-2
+else
+ SRC_URI="http://www.tortall.net/projects/yasm/releases/${P}.tar.gz"
+ KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~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 )"
+DEPEND="nls? ( sys-devel/gettext )
+ python? (
+ ${PYTHON_DEPS}
+ >=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
+
+DOCS=( AUTHORS )
+
+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
+}