summaryrefslogtreecommitdiff
path: root/sci-physics
diff options
context:
space:
mode:
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/bullet/Manifest13
-rw-r--r--sci-physics/bullet/bullet-2.83.4.ebuild62
-rw-r--r--sci-physics/bullet/bullet-2.83.5.ebuild62
-rw-r--r--sci-physics/bullet/bullet-2.85.ebuild73
-rw-r--r--sci-physics/bullet/bullet-2.86.ebuild72
-rw-r--r--sci-physics/bullet/files/bullet-2.78-soversion.patch44
-rw-r--r--sci-physics/bullet/files/bullet-2.85-soversion.patch31
-rw-r--r--sci-physics/bullet/metadata.xml22
-rw-r--r--sci-physics/cernlib-montecarlo/Manifest9
-rw-r--r--sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r3.ebuild88
-rw-r--r--sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r4.ebuild88
-rw-r--r--sci-physics/cernlib-montecarlo/files/cernlib-montecarlo-2006-noherwig.patch52
-rw-r--r--sci-physics/cernlib-montecarlo/metadata.xml19
-rw-r--r--sci-physics/cernlib/Manifest11
-rw-r--r--sci-physics/cernlib/cernlib-2006-r5.ebuild107
-rw-r--r--sci-physics/cernlib/cernlib-2006-r6.ebuild107
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-fgets.patch20
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-nogfortran.patch56
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-ypatchy-short-name.patch11
-rw-r--r--sci-physics/cernlib/metadata.xml17
-rw-r--r--sci-physics/clhep/Manifest15
-rw-r--r--sci-physics/clhep/clhep-2.1.4.1.ebuild53
-rw-r--r--sci-physics/clhep/clhep-2.1.4.2.ebuild53
-rw-r--r--sci-physics/clhep/clhep-2.2.0.1.ebuild53
-rw-r--r--sci-physics/clhep/clhep-2.2.0.5.ebuild53
-rw-r--r--sci-physics/clhep/clhep-2.3.1.0.ebuild53
-rw-r--r--sci-physics/clhep/clhep-2.3.3.1.ebuild52
-rw-r--r--sci-physics/clhep/metadata.xml13
-rw-r--r--sci-physics/espresso++/Manifest6
-rw-r--r--sci-physics/espresso++/espresso++-1.9.4.ebuild60
-rw-r--r--sci-physics/espresso++/espresso++-9999.ebuild58
-rw-r--r--sci-physics/espresso++/metadata.xml16
-rw-r--r--sci-physics/espresso/Manifest7
-rw-r--r--sci-physics/espresso/espresso-4.0_pre20170228.ebuild117
-rw-r--r--sci-physics/espresso/espresso-9999.ebuild130
-rw-r--r--sci-physics/espresso/files/1056.patch190
-rw-r--r--sci-physics/espresso/metadata.xml20
-rw-r--r--sci-physics/fastjet/Manifest9
-rw-r--r--sci-physics/fastjet/fastjet-3.0.3-r1.ebuild54
-rw-r--r--sci-physics/fastjet/fastjet-3.0.6-r1.ebuild54
-rw-r--r--sci-physics/fastjet/files/fastjet-3.0.3-system-siscone.patch83
-rw-r--r--sci-physics/fastjet/files/fastjet-3.0.6-system-siscone.patch74
-rw-r--r--sci-physics/fastjet/metadata.xml21
-rw-r--r--sci-physics/geant-data/Manifest38
-rw-r--r--sci-physics/geant-data/geant-data-4.10.00.ebuild56
-rw-r--r--sci-physics/geant-data/geant-data-4.10.01.ebuild56
-rw-r--r--sci-physics/geant-data/geant-data-4.10.02.ebuild50
-rw-r--r--sci-physics/geant-data/geant-data-4.10.03.ebuild51
-rw-r--r--sci-physics/geant-data/geant-data-4.9.6_p02.ebuild57
-rw-r--r--sci-physics/geant-data/metadata.xml12
-rw-r--r--sci-physics/geant-python/Manifest10
-rw-r--r--sci-physics/geant-python/files/geant-python-4.10.0-config.patch27
-rw-r--r--sci-physics/geant-python/files/geant-python-4.10.0-polycone.patch15
-rw-r--r--sci-physics/geant-python/files/geant-python-4.9.5-visverbose.patch13
-rw-r--r--sci-physics/geant-python/geant-python-4.10.00.ebuild122
-rw-r--r--sci-physics/geant-python/geant-python-4.9.6_p02.ebuild120
-rw-r--r--sci-physics/geant-python/metadata.xml11
-rw-r--r--sci-physics/geant/Manifest25
-rw-r--r--sci-physics/geant/files/geant-4.10.0-TrackingNavigator.patch60
-rw-r--r--sci-physics/geant/files/geant-4.10.0-no-examples.patch22
-rw-r--r--sci-physics/geant/files/geant-4.10.02-std-isnan.patch17
-rw-r--r--sci-physics/geant/files/geant-4.10.2-no-examples.patch18
-rw-r--r--sci-physics/geant/files/geant-4.9.4-zlib.patch35
-rw-r--r--sci-physics/geant/geant-3.21.14-r4.ebuild67
-rw-r--r--sci-physics/geant/geant-4.10.00.ebuild88
-rw-r--r--sci-physics/geant/geant-4.10.00_p01.ebuild85
-rw-r--r--sci-physics/geant/geant-4.10.01.ebuild86
-rw-r--r--sci-physics/geant/geant-4.10.01_p02.ebuild87
-rw-r--r--sci-physics/geant/geant-4.10.02.ebuild87
-rw-r--r--sci-physics/geant/geant-4.10.03.ebuild93
-rw-r--r--sci-physics/geant/geant-4.9.6_p02-r1.ebuild85
-rw-r--r--sci-physics/geant/metadata.xml27
-rw-r--r--sci-physics/h2o-gtk/Manifest6
-rw-r--r--sci-physics/h2o-gtk/h2o-gtk-0.1.ebuild24
-rw-r--r--sci-physics/h2o-gtk/h2o-gtk-9999.ebuild32
-rw-r--r--sci-physics/h2o-gtk/metadata.xml16
-rw-r--r--sci-physics/harminv/Manifest6
-rw-r--r--sci-physics/harminv/files/harminv-1.3.1-configure.ac.patch31
-rw-r--r--sci-physics/harminv/harminv-1.3.1-r1.ebuild33
-rw-r--r--sci-physics/harminv/metadata.xml15
-rw-r--r--sci-physics/hepmc/Manifest5
-rw-r--r--sci-physics/hepmc/hepmc-2.06.09-r1.ebuild92
-rw-r--r--sci-physics/hepmc/metadata.xml28
-rw-r--r--sci-physics/heppdt/Manifest5
-rw-r--r--sci-physics/heppdt/heppdt-3.04.01-r1.ebuild57
-rw-r--r--sci-physics/heppdt/metadata.xml17
-rw-r--r--sci-physics/herwig++/Manifest5
-rw-r--r--sci-physics/herwig++/files/herwig++-2.6.3-looptools.patch64
-rw-r--r--sci-physics/herwig++/herwig++-2.7.1-r1.ebuild60
-rw-r--r--sci-physics/herwig++/metadata.xml20
-rw-r--r--sci-physics/herwig/Manifest8
-rw-r--r--sci-physics/herwig/herwig-6.5.21-r1.ebuild70
-rw-r--r--sci-physics/herwig/metadata.xml12
-rw-r--r--sci-physics/hoomd-blue/Manifest7
-rw-r--r--sci-physics/hoomd-blue/hoomd-blue-2.0.2.ebuild69
-rw-r--r--sci-physics/hoomd-blue/hoomd-blue-9999.ebuild69
-rw-r--r--sci-physics/hoomd-blue/metadata.xml18
-rw-r--r--sci-physics/jaxodraw/Manifest6
-rw-r--r--sci-physics/jaxodraw/jaxodraw-2.0.1-r1.ebuild64
-rw-r--r--sci-physics/jaxodraw/metadata.xml11
-rw-r--r--sci-physics/lammps/Manifest52
-rw-r--r--sci-physics/lammps/files/fm_exp.patch11
-rw-r--r--sci-physics/lammps/files/gcc-6.patch11
-rw-r--r--sci-physics/lammps/files/lammps-python3-r1.patch11
-rw-r--r--sci-physics/lammps/files/lammps-python3-r2.patch11
-rw-r--r--sci-physics/lammps/files/lammps-python3.patch11
-rw-r--r--sci-physics/lammps/files/python-shebang.patch7
-rw-r--r--sci-physics/lammps/lammps-20150210.ebuild205
-rw-r--r--sci-physics/lammps/lammps-20150515-r1.ebuild266
-rw-r--r--sci-physics/lammps/lammps-20150515.ebuild266
-rw-r--r--sci-physics/lammps/lammps-20150810.ebuild266
-rw-r--r--sci-physics/lammps/lammps-20151106.ebuild212
-rw-r--r--sci-physics/lammps/lammps-20151120.ebuild212
-rw-r--r--sci-physics/lammps/lammps-20151207.ebuild216
-rw-r--r--sci-physics/lammps/lammps-20151208.ebuild216
-rw-r--r--sci-physics/lammps/lammps-20151209.ebuild216
-rw-r--r--sci-physics/lammps/lammps-20151211.ebuild216
-rw-r--r--sci-physics/lammps/lammps-20160115.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160122.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160216.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160301.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160310.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160314.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160321.ebuild217
-rw-r--r--sci-physics/lammps/lammps-20160407.ebuild218
-rw-r--r--sci-physics/lammps/lammps-20160730.ebuild220
-rw-r--r--sci-physics/lammps/lammps-20170109.ebuild220
-rw-r--r--sci-physics/lammps/lammps-20170706.ebuild219
-rw-r--r--sci-physics/lammps/lammps-20170901.ebuild129
-rw-r--r--sci-physics/lammps/metadata.xml32
-rw-r--r--sci-physics/lhapdf/Manifest12
-rw-r--r--sci-physics/lhapdf/lhapdf-5.9.1.ebuild91
-rw-r--r--sci-physics/lhapdf/lhapdf-6.1.6.ebuild67
-rw-r--r--sci-physics/lhapdf/metadata.xml24
-rw-r--r--sci-physics/lightspeed/Manifest10
-rw-r--r--sci-physics/lightspeed/files/lightspeed-1.2a-autoconf.patch16
-rw-r--r--sci-physics/lightspeed/files/lightspeed-1.2a-libpng15.patch19
-rw-r--r--sci-physics/lightspeed/lightspeed-1.2a-r1.ebuild80
-rw-r--r--sci-physics/lightspeed/lightspeed-1.2a-r2.ebuild75
-rw-r--r--sci-physics/lightspeed/metadata.xml19
-rw-r--r--sci-physics/looptools/Manifest10
-rw-r--r--sci-physics/looptools/files/looptools-2.10-makefile.patch98
-rw-r--r--sci-physics/looptools/files/looptools-2.8-makefile.patch96
-rw-r--r--sci-physics/looptools/looptools-2.12.ebuild37
-rw-r--r--sci-physics/looptools/looptools-2.13.ebuild41
-rw-r--r--sci-physics/looptools/looptools-2.8.ebuild37
-rw-r--r--sci-physics/looptools/metadata.xml15
-rw-r--r--sci-physics/meep/Manifest7
-rw-r--r--sci-physics/meep/files/meep-1.2-no-auto-mpb.patch16
-rw-r--r--sci-physics/meep/files/meep-1.2-pc-no-ldflags.patch12
-rw-r--r--sci-physics/meep/meep-1.3.ebuild58
-rw-r--r--sci-physics/meep/metadata.xml14
-rw-r--r--sci-physics/metadata.xml16
-rw-r--r--sci-physics/paw/Manifest9
-rw-r--r--sci-physics/paw/files/paw-2.14.04-glibc-2.10.patch11
-rw-r--r--sci-physics/paw/metadata.xml18
-rw-r--r--sci-physics/paw/paw-2.14.04-r4.ebuild71
-rw-r--r--sci-physics/paw/paw-2.14.04-r5.ebuild71
-rw-r--r--sci-physics/pythia/Manifest27
-rw-r--r--sci-physics/pythia/files/pythia-8.2.26-run-tests.patch27
-rw-r--r--sci-physics/pythia/files/pythia8209-root-noninteractive.patch17
-rw-r--r--sci-physics/pythia/files/pythia8209-run-tests.patch20
-rw-r--r--sci-physics/pythia/metadata.xml25
-rw-r--r--sci-physics/pythia/pythia-6.4.28-r1.ebuild68
-rw-r--r--sci-physics/pythia/pythia-6.4.28.ebuild67
-rw-r--r--sci-physics/pythia/pythia-8.1.86-r1.ebuild100
-rw-r--r--sci-physics/pythia/pythia-8.1.86.ebuild100
-rw-r--r--sci-physics/pythia/pythia-8.2.10.ebuild183
-rw-r--r--sci-physics/pythia/pythia-8.2.26.ebuild184
-rw-r--r--sci-physics/qutip/Manifest3
-rw-r--r--sci-physics/qutip/metadata.xml22
-rw-r--r--sci-physics/qutip/qutip-4.2.0.ebuild50
-rw-r--r--sci-physics/reduze/Manifest9
-rw-r--r--sci-physics/reduze/files/reduze-2.0.9-gcc6.patch58
-rw-r--r--sci-physics/reduze/files/reduze-2.1-gcc6.patch29
-rw-r--r--sci-physics/reduze/metadata.xml15
-rw-r--r--sci-physics/reduze/reduze-2.0.9.ebuild67
-rw-r--r--sci-physics/reduze/reduze-2.1.ebuild67
-rw-r--r--sci-physics/rivet/Manifest7
-rw-r--r--sci-physics/rivet/metadata.xml19
-rw-r--r--sci-physics/rivet/rivet-2.3.0.ebuild59
-rw-r--r--sci-physics/rivet/rivet-2.5.2.ebuild79
-rw-r--r--sci-physics/root/Manifest25
-rw-r--r--sci-physics/root/files/proofd.confd12
-rw-r--r--sci-physics/root/files/proofd.initd25
-rw-r--r--sci-physics/root/files/root-5.28.00b-glibc212.patch11
-rw-r--r--sci-physics/root/files/root-5.32.00-afs.patch33
-rw-r--r--sci-physics/root/files/root-5.32.00-cfitsio.patch13
-rw-r--r--sci-physics/root/files/root-5.32.00-chklib64.patch24
-rw-r--r--sci-physics/root/files/root-5.32.00-dotfont.patch58
-rw-r--r--sci-physics/root/files/root-5.34.05-nobyte-compile.patch137
-rw-r--r--sci-physics/root/files/root-5.34.13-unuran.patch40
-rw-r--r--sci-physics/root/files/root-5.34.26-ldflags.patch19
-rw-r--r--sci-physics/root/files/root-6.00.01-dotfont.patch58
-rw-r--r--sci-physics/root/files/root-6.00.01-llvm.patch13
-rw-r--r--sci-physics/root/files/root-6.00.01-nobyte-compile.patch33
-rw-r--r--sci-physics/root/files/root-6.02.05-xrootd4.patch11
-rw-r--r--sci-physics/root/files/root-6.04.06-gsl2.patch58
-rw-r--r--sci-physics/root/files/root-6.04.06-prop-flags.patch22
-rw-r--r--sci-physics/root/files/rootd.confd8
-rw-r--r--sci-physics/root/files/rootd.initd27
-rw-r--r--sci-physics/root/metadata.xml37
-rw-r--r--sci-physics/root/root-5.34.36.ebuild441
-rw-r--r--sci-physics/root/root-6.04.06.ebuild498
-rw-r--r--sci-physics/sassena/Manifest8
-rw-r--r--sci-physics/sassena/files/sassena-1.4.2_cmake-remove-missing.patch33
-rw-r--r--sci-physics/sassena/files/sassena-1.4.2_link_boost_thread.patch92
-rw-r--r--sci-physics/sassena/files/sassena-1.4.2_uint32_t.patch11
-rw-r--r--sci-physics/sassena/metadata.xml11
-rw-r--r--sci-physics/sassena/sassena-1.4.2.ebuild31
-rw-r--r--sci-physics/siscone/Manifest7
-rw-r--r--sci-physics/siscone/metadata.xml13
-rw-r--r--sci-physics/siscone/siscone-2.0.6.ebuild28
-rw-r--r--sci-physics/siscone/siscone-3.0.3.ebuild31
-rw-r--r--sci-physics/thepeg/Manifest13
-rw-r--r--sci-physics/thepeg/files/thepeg-1.8.3-java.patch37
-rw-r--r--sci-physics/thepeg/metadata.xml24
-rw-r--r--sci-physics/thepeg/thepeg-1.9.2.ebuild96
-rw-r--r--sci-physics/thepeg/thepeg-2.0.0.ebuild96
-rw-r--r--sci-physics/thepeg/thepeg-2.0.4.ebuild93
-rw-r--r--sci-physics/xfoil/Manifest11
-rw-r--r--sci-physics/xfoil/files/xfoil-6.96-gfortran.patch29
-rw-r--r--sci-physics/xfoil/files/xfoil-6.97-overflow.patch22
-rw-r--r--sci-physics/xfoil/files/xfoil-6.99-overflow.patch11
-rw-r--r--sci-physics/xfoil/metadata.xml21
-rw-r--r--sci-physics/xfoil/xfoil-6.97-r1.ebuild74
-rw-r--r--sci-physics/xfoil/xfoil-6.99.ebuild75
-rw-r--r--sci-physics/yoda/Manifest6
-rw-r--r--sci-physics/yoda/metadata.xml19
-rw-r--r--sci-physics/yoda/yoda-1.4.0.ebuild50
-rw-r--r--sci-physics/yoda/yoda-1.6.5.ebuild47
231 files changed, 14484 insertions, 0 deletions
diff --git a/sci-physics/bullet/Manifest b/sci-physics/bullet/Manifest
new file mode 100644
index 000000000000..238de9c4214b
--- /dev/null
+++ b/sci-physics/bullet/Manifest
@@ -0,0 +1,13 @@
+AUX bullet-2.78-soversion.patch 2032 SHA256 f642efb05bee6098b3f1a0a8a4259bdf71f5529e432c9cd1efd81ef5f52be080 SHA512 313e15d119a541c69e977415b393a85bb452414552d11a7ad2b9866d483895543d9920bfbef140ce68b078afc9f3aed2295f45ea7d1537c4bf47f10596787627 WHIRLPOOL d6d647c8905ca81c18990c40c1511d1d64d7c373c0098857448661b7c0fc8e409bbdf20e4e29ca998260891ada05f0c117e3fb89ca1dde565a2c86d660930e97
+AUX bullet-2.85-soversion.patch 1480 SHA256 c4b49e7d9962dca3b66b80c850a4af7686f16d7dc7fe82aa4ba6212bb254c00b SHA512 7679a0e91c06c664c8677f5947d523999eaa496444045c652356f5b49c4f0023488673988a3d8ff84dda4cdbe172d80e95b635773bf74b18b0a1524153f8e6bf WHIRLPOOL 64ac4ee9b7b11fd7844306762ed7aa793c2cb734ba7220db74a41891ddf3e45637008da49565e756c04d9b2c83b358b8e421b6785cc1814827a0a6c60cc2d999
+DIST bullet-2.83.4.tar.gz 17529283 SHA256 2cf287cead9a116c56f6d6f15f73dc8b3ed1fe407ef2ca894027d585fab07341 SHA512 1a10a11671bd152835a45d44a1b3214e29c255338405705f2aaa41adfbdb545ec02f09b94003b836fafcc2b59b836e5b749696a5bb3489ec7050af0d02d9b2e1 WHIRLPOOL 7a472291128888fdd1c96e232b91d734ff10c2b6cf6ff0563bd3e6fa4c113112fe3f169dc0e42fee56aacf66b6717a10901f0c61c618a6c691bf1eb3cbcefbf2
+DIST bullet-2.83.5.tar.gz 17759627 SHA256 df6d58898d3d3bf117854dd64467dbd09625e048624c797649b46bf1c595b152 SHA512 9e1ca7b3afb700bfafc2d39d8ec8b004b5bae7788385e763c15a63a7754c50bfd79e1a6ab501569b613eb5a9c132688c747aa70db0b80099cfe40b6146c32290 WHIRLPOOL 6c304902dd6bc9e800befe5c214adcec48e068e6db288ddf211ce17af74abd8ebc44a34ee1349a17bd22e1f9c316782d7680bb55566b4100b2f788377921be29
+DIST bullet-2.85.tar.gz 24020355 SHA256 0dc3c9488c2b4176f916640ca57860d6689890d0f58c6fceed0f10ddc1fa082f SHA512 f13abb85864202161d1c19596e290735848a7de53ffe09aa8f656d80a523f6382c0f7864a104ee8c437cf88e0f593c4682ecbb87d74adfe1cc868c1a36d3ecea WHIRLPOOL 1c4c576df02633f53d255dad0f690e2e30e26604b95a87c79032ce8059b5705f7685af5cc832151c83d410624d41cc21ab35c38593c662ea0bd78ddb1247946c
+DIST bullet-2.86.tar.gz 25806558 SHA256 e6e8b755280ce2c1a8218529eae5dd78e184f7036854229cea611374ad5a671f SHA512 af8a6b282ab606437d7975a59cd8a9c2bf273c83b0e79f0c4c1de6fa51695ba6d5f3c853dce2fdba9cb55e7572214e15089e54db51afc465ca26f502cbd5a4f9 WHIRLPOOL 210b772b1952ef5a8a3d1e95fb18ccd29e0b63b7b3aa5dc44e8130339a28f9d1e12e22cfbcceb3a3782f27ebff22775ea9e9f27093973178f7c2b560267becc2
+EBUILD bullet-2.83.4.ebuild 1423 SHA256 0497d60b8fd1a60636b7848b77c2e6729d0d1755094f13ac77e84b3a6a5e5a41 SHA512 b1678661e9c88a7322bc3fa3d24f9371a40ed2c2002aa5b2ce957366ed5541df372d0bbcb2ae62a3627554da1b938fd9e2ae080074498489cecc861da1e1dbb9 WHIRLPOOL cd936d651176a2876dca0d718db1f22dc41eaf340a5b20582b0e706a23816745d4fd54d826a65e2fdc829fa21acc0e258d1061a66520e470952c0518a4e20d43
+EBUILD bullet-2.83.5.ebuild 1425 SHA256 97dd6c43afe373818d90b9c98b990c849bee0b00a0ff2f07854fc3d19845d768 SHA512 8e453e02afbb923106ca86d486ff4519f773db990dc06babc5ad804d051e14dd2a59e7507a334adc791ed5203e21d50d98ec1d743c9508a3ec0fb1758ddf5101 WHIRLPOOL a5ab7702d6b9a7e6afc017a636df38d8ef3b8eea5d26967a10334b28d384c96bc4e4b650246019c17a1b433ffbf9fe81575352991db3b16856dcd6f50e161445
+EBUILD bullet-2.85.ebuild 1596 SHA256 963eeda693b9cb8766bd546e53c0d8406403bd8cb0b905c3efb91648e29001a1 SHA512 f88b82ed50baea8bba06cd03a469a069b6ce32c3e09c1f048d3a1f02747dfba38f13217bf0dfb92f187321c76901de84ae7958cc713a6cb8be378f811e991d0a WHIRLPOOL 95f249e564915e2963043dee650a2f550a75112b8d9be10d50f39e901dafe9fae780297afafbeadb85d88b38f8b6b10c7b11703c734560197f48e202fa12b17e
+EBUILD bullet-2.86.ebuild 1560 SHA256 3dc06502521ceb041179f87097c9b831ddd11422147eaabe5342bdb3ff66de16 SHA512 3bfaf67eb248f8790a2dac686e75718b09ec5773cd23935fff54585ffc6bb70a83e18d2a55baf70cbf5a5085a2a398e755e318039e39f0185e0f790419c617fa WHIRLPOOL f8eb1455e3e9726ed5b64b34756286c53876c1e3b1300af7913dc6d4c25bb45ab92bbaf003eb54c08fd229dcca1ccff9e4d36fee25d3dd2dbcbda90f129e39c9
+MISC ChangeLog 4146 SHA256 70db366ef8b93d7ed03e1d8735b8e2021cfbdc014884ac1ed118f0abb6c544c3 SHA512 6a3012831f7beb9b976c263ff60371674f5ed4eb8747846e02120ee4b6b0e9948c6da87552f7c22025f426b1c3bb164b5d70ebc7242b04db57a91a0a5ce92983 WHIRLPOOL f795cd82f1066ff9b9429d023537cfa0edf407a4f88979914474e7dcf98e970f3f552c51236a25bfe250f60d156812f00467f10fef0ee21bc05356ba220942fe
+MISC ChangeLog-2015 5614 SHA256 e1bb953de65fe8713a92a4ff0ac9cecc1d3331ced3edea4a8ed66066ef0172be SHA512 ba254da5a2ae2c719d478e44e8fefd1805a056c3ba04634ab546be02822497b8c6923fa672a0067570db9aeecf2110f3cac8dbc7df018ca88e744123c59d89ae WHIRLPOOL 0c1c97b871e03314d81f73156c789af62915ba4006e2b89bb25ecce044dc04f46d90e908ab0131afd71f9f0f95b6aab777b8f14f27b5110842ac3e0744395545
+MISC metadata.xml 797 SHA256 d48d4c20a681a16cad0853d392efc9d8a9b0645d6491a2f49954beba0d9e543c SHA512 812a02f3145a9a4b7f73f4549b358af86e698efb9fe17c11aafcdb2fa066171d95cf0eb2992150cf0d1a6b919d8ddba22f483623d3dfb5fbd23d42e8ec39f689 WHIRLPOOL 536f866ee04ae0e0c00adbc181d1ccbe10397b3b710b0fb4d7875ff8a76f08c94633e830cb3c57aa37b52e4469b9f63a245071dfffad529da288e6a224f9f6e3
diff --git a/sci-physics/bullet/bullet-2.83.4.ebuild b/sci-physics/bullet/bullet-2.83.4.ebuild
new file mode 100644
index 000000000000..0349165b5aad
--- /dev/null
+++ b/sci-physics/bullet/bullet-2.83.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils
+
+DESCRIPTION="Continuous Collision Detection and Physics Library"
+HOMEPAGE="http://www.bulletphysics.com/"
+SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="+bullet3 doc double-precision examples extras"
+
+RDEPEND="
+ virtual/opengl
+ media-libs/freeglut"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.78-soversion.patch )
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+src_prepare() {
+ # allow to generate docs
+ sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_CPU_DEMOS=OFF
+ -DBUILD_OPENGL3_DEMOS=OFF
+ -DBUILD_BULLET2_DEMOS=OFF
+ -DUSE_GRAPHICAL_BENCHMARK=OFF
+ -DINSTALL_LIBS=ON
+ -DINSTALL_EXTRA_LIBS=ON
+ $(cmake-utils_use_build bullet3 BULLET3)
+ $(cmake-utils_use_build extras EXTRAS)
+ $(cmake-utils_use_use double-precision DOUBLE_PRECISION)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ doxygen || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc docs/*.pdf && dohtml -r html/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r Extras examples
+ fi
+}
diff --git a/sci-physics/bullet/bullet-2.83.5.ebuild b/sci-physics/bullet/bullet-2.83.5.ebuild
new file mode 100644
index 000000000000..dea774e6092c
--- /dev/null
+++ b/sci-physics/bullet/bullet-2.83.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils
+
+DESCRIPTION="Continuous Collision Detection and Physics Library"
+HOMEPAGE="http://www.bulletphysics.com/"
+SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+bullet3 doc double-precision examples extras"
+
+RDEPEND="
+ virtual/opengl
+ media-libs/freeglut"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.78-soversion.patch )
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+src_prepare() {
+ # allow to generate docs
+ sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_CPU_DEMOS=OFF
+ -DBUILD_OPENGL3_DEMOS=OFF
+ -DBUILD_BULLET2_DEMOS=OFF
+ -DUSE_GRAPHICAL_BENCHMARK=OFF
+ -DINSTALL_LIBS=ON
+ -DINSTALL_EXTRA_LIBS=ON
+ $(cmake-utils_use_build bullet3 BULLET3)
+ $(cmake-utils_use_build extras EXTRAS)
+ $(cmake-utils_use_use double-precision DOUBLE_PRECISION)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ doxygen || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc docs/*.pdf && dohtml -r html/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r Extras examples
+ fi
+}
diff --git a/sci-physics/bullet/bullet-2.85.ebuild b/sci-physics/bullet/bullet-2.85.ebuild
new file mode 100644
index 000000000000..724386f2a95b
--- /dev/null
+++ b/sci-physics/bullet/bullet-2.85.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Continuous Collision Detection and Physics Library"
+HOMEPAGE="http://www.bulletphysics.com/"
+SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+bullet3 doc double-precision examples extras test"
+
+RDEPEND="
+ virtual/opengl
+ media-libs/freeglut"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.85-soversion.patch )
+
+DOCS=( AUTHORS.txt LICENSE.txt README.md )
+
+# Building / linking of third Party library BussIK does not work out of the box
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # allow to generate docs
+ sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_CPU_DEMOS=OFF
+ -DBUILD_OPENGL3_DEMOS=OFF
+ -DBUILD_BULLET2_DEMOS=OFF
+ -DUSE_GRAPHICAL_BENCHMARK=OFF
+ -DINSTALL_LIBS=ON
+ -DINSTALL_EXTRA_LIBS=ON
+ -DBUILD_BULLET3=$(usex bullet3)
+ -DBUILD_EXTRAS=$(usex extras)
+ -DUSE_DOUBLE_PRECISION=$(usex double-precision)
+ -DBUILD_UNIT_TESTS=$(usex test)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use doc; then
+ doxygen || die
+ HTML_DOCS+=( html/. )
+ DOCS+=( docs/*.pdf )
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sci-physics/bullet/bullet-2.86.ebuild b/sci-physics/bullet/bullet-2.86.ebuild
new file mode 100644
index 000000000000..3a22c4b3a915
--- /dev/null
+++ b/sci-physics/bullet/bullet-2.86.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Continuous Collision Detection and Physics Library"
+HOMEPAGE="http://www.bulletphysics.com/"
+SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+bullet3 doc double-precision examples extras test"
+
+RDEPEND="
+ virtual/opengl
+ media-libs/freeglut"
+
+DEPEND="
+ ${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.85-soversion.patch )
+
+DOCS=( AUTHORS.txt LICENSE.txt README.md )
+
+# Building / linking of third Party library BussIK does not work out of the box
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # allow to generate docs
+ sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_CPU_DEMOS=OFF
+ -DBUILD_OPENGL3_DEMOS=OFF
+ -DBUILD_BULLET2_DEMOS=OFF
+ -DUSE_GRAPHICAL_BENCHMARK=OFF
+ -DINSTALL_LIBS=ON
+ -DINSTALL_EXTRA_LIBS=ON
+ -DBUILD_BULLET3=$(usex bullet3)
+ -DBUILD_EXTRAS=$(usex extras)
+ -DUSE_DOUBLE_PRECISION=$(usex double-precision)
+ -DBUILD_UNIT_TESTS=$(usex test)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use doc; then
+ doxygen || die
+ HTML_DOCS+=( html/. )
+ DOCS+=( docs/*.pdf )
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use examples && DOCS+=( examples )
+ einstalldocs
+}
diff --git a/sci-physics/bullet/files/bullet-2.78-soversion.patch b/sci-physics/bullet/files/bullet-2.78-soversion.patch
new file mode 100644
index 000000000000..b54ffa777ee3
--- /dev/null
+++ b/sci-physics/bullet/files/bullet-2.78-soversion.patch
@@ -0,0 +1,44 @@
+ Extras/Serialize/BulletFileLoader/CMakeLists.txt | 2 ++
+ .../Serialize/BulletWorldImporter/CMakeLists.txt | 2 ++
+ Extras/glui/CMakeLists.txt | 2 ++
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/Extras/Serialize/BulletFileLoader/CMakeLists.txt b/Extras/Serialize/BulletFileLoader/CMakeLists.txt
+index 486cfdc..f1e0884 100644
+--- a/Extras/Serialize/BulletFileLoader/CMakeLists.txt
++++ b/Extras/Serialize/BulletFileLoader/CMakeLists.txt
+@@ -16,6 +16,8 @@ btBulletFile.cpp
+ btBulletFile.h
+ )
+
++SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION})
++SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath)
+ ENDIF (BUILD_SHARED_LIBS)
+diff --git a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
+index e620315..e04e8e9 100644
+--- a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
++++ b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
+@@ -9,6 +9,8 @@ btBulletWorldImporter.cpp
+ btBulletWorldImporter.h
+ )
+
++SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES VERSION ${BULLET_VERSION})
++SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath)
+ ENDIF (BUILD_SHARED_LIBS)
+diff --git a/Extras/glui/CMakeLists.txt b/Extras/glui/CMakeLists.txt
+index c2018a7..9a8d90f 100644
+--- a/Extras/glui/CMakeLists.txt
++++ b/Extras/glui/CMakeLists.txt
+@@ -61,6 +61,8 @@ arcball.cpp glui_button.cpp glui_filebrowser.cpp glui_node.cpp glui_separ
+
+ )
+
++SET_TARGET_PROPERTIES(GLUI PROPERTIES VERSION ${BULLET_VERSION})
++SET_TARGET_PROPERTIES(GLUI PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+ ENDIF (BUILD_SHARED_LIBS)
diff --git a/sci-physics/bullet/files/bullet-2.85-soversion.patch b/sci-physics/bullet/files/bullet-2.85-soversion.patch
new file mode 100644
index 000000000000..74cfe4e8f8aa
--- /dev/null
+++ b/sci-physics/bullet/files/bullet-2.85-soversion.patch
@@ -0,0 +1,31 @@
+ Extras/Serialize/BulletFileLoader/CMakeLists.txt | 2 ++
+ .../Serialize/BulletWorldImporter/CMakeLists.txt | 2 ++
+ Extras/glui/CMakeLists.txt | 2 ++
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/Extras/Serialize/BulletFileLoader/CMakeLists.txt b/Extras/Serialize/BulletFileLoader/CMakeLists.txt
+index 486cfdc..f1e0884 100644
+--- a/Extras/Serialize/BulletFileLoader/CMakeLists.txt
++++ b/Extras/Serialize/BulletFileLoader/CMakeLists.txt
+@@ -16,6 +16,8 @@ btBulletFile.cpp
+ btBulletFile.h
+ )
+
++SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION})
++SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath)
+ ENDIF (BUILD_SHARED_LIBS)
+diff --git a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
+index e620315..e04e8e9 100644
+--- a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
++++ b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt
+@@ -9,6 +9,8 @@ btBulletWorldImporter.cpp
+ btBulletWorldImporter.h
+ )
+
++SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES VERSION ${BULLET_VERSION})
++SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath)
+ ENDIF (BUILD_SHARED_LIBS)
diff --git a/sci-physics/bullet/metadata.xml b/sci-physics/bullet/metadata.xml
new file mode 100644
index 000000000000..884f06af0bae
--- /dev/null
+++ b/sci-physics/bullet/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Bullet is a professional open source multi-threaded
+ 3D Collision Detection and Rigid Body Dynamics Library
+ for games and animation.
+</longdescription>
+ <use>
+ <flag name="bullet3">Build Bullet 3</flag>
+ <flag name="double-precision">Build libraries in double precision</flag>
+ <flag name="extras">Build additional libraries</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">bullet</remote-id>
+ <remote-id type="github">bulletphysics/bullet3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/cernlib-montecarlo/Manifest b/sci-physics/cernlib-montecarlo/Manifest
new file mode 100644
index 000000000000..a9b2e7c0ebc6
--- /dev/null
+++ b/sci-physics/cernlib-montecarlo/Manifest
@@ -0,0 +1,9 @@
+AUX cernlib-montecarlo-2006-noherwig.patch 1993 SHA256 bb85c46eb9d2acaf95dad615aac3b3c08b2607aea3368f7bbadd2532d58e177d SHA512 e53794aeefdda4667bc71826b9514f44dd23fb0076cb55284ff4af0277facf5d3e1664f76dff80f975157350a02b871437230c66b49816c75730b4afed9d5ec9 WHIRLPOOL 088f7786549f24b1fcb47bdd1fd4ee98a973d7ef0a5add7f327ad84def85ddd0be38467e478aa5028e324fff26d3a50e0f7f6bb63074192a28b26d55440bd715
+DIST mclibs_20061220+dfsg3-1.debian.tar.gz 46362 SHA256 17a9f61860237b963bc4b6240296add2bbe45cf16ce994061c3f20c33994cf73 SHA512 ddb31fd218f0f051155548011415d9526e7866ec7caf7041a5f572d8064cb4f19c188724e839f445a47f490dacf0d67ef9ba871725756892e0ba1d569d575fe3 WHIRLPOOL c8db51ed7e1e78ffcdca96af3aeb388391473acc796b35af838fa60cb3129816e787dce325c8ac8be411d98ec2d1392959df97dd560ccae172c230ce2c342676
+DIST mclibs_20061220+dfsg3-3.debian.tar.gz 44763 SHA256 9796094d6b27a07a342c8f7572cae40b8717e13d04c8b1acb4b337901cb0c5af SHA512 2ef3c54026e86182200d4d7fce1889a2dd8c252743d0819e74679e2a5067794bea574530b59a7f08c394f8b75f7d31cac31f638fb72045700b379bd686a8f92f WHIRLPOOL 515ba362e11897c02cbbcecd25340ca7aba87c608b537103b38afe2fb65f0d1f7fcdd025d2fe4d835f488580608f53c1c606751996fe0e7fb55fb828c2d35997
+DIST mclibs_20061220+dfsg3.orig.tar.gz 7642494 SHA256 cb5ea19bc54a06c031c90192685748ce0f7df016bfae6b9d7d672d77a3444ce5 SHA512 add98b585648994ab616d040e9a3410b0eba13ab54a812674d3940bae0effed4446b02ce6a34887841c114bc444b1b83598e2c89c22b4df8dcd3fd4c1d8aaba3 WHIRLPOOL cee4c265ae610bbc1b2a48fdc6d769848bf936c78862a298725e5ac11fc2620a18b748dcd41e8b7622cf369c2a43f9641cc67e5f902a88e2f083f7b7587a1771
+EBUILD cernlib-montecarlo-2006-r3.ebuild 2302 SHA256 fffd26ca8026be56042f031a3773203849bf889a681d9be75430f40df32ffde0 SHA512 e0a96145f15fcb2e8887818ad1e2a6af41a5afcd2ae7a6fb2de2230b353dfd856db30cb5610d4d168d15fcaa6e951f5a278ebd0741c3fed444df8c0a612c736b WHIRLPOOL 9a5d93051921f211946666aae243991d2b59987c87d6fd6a7ea1816204171244cb44361263b61e4cca83409016fa5ecba67cb3b4c24025232749d264932bea33
+EBUILD cernlib-montecarlo-2006-r4.ebuild 2304 SHA256 1bb966c28b525c2c98c34f95794193accc630850100517b7b77e537f52c5b511 SHA512 bf7542ef5d6a628950ab6a98fa1cdc526b419697f0582942965792c9fbe9e3d0a313b5782ba106ad693a840529d961c7713922708dea457778335d92fc673bb4 WHIRLPOOL 1bfee55c324f62462622d272096fd72fec43b80957293cecdce2c73352e7a496508214500a9dbf5f6b7a705a4157a1fc847fc92d3db250706fc814dabd40aad2
+MISC ChangeLog 2594 SHA256 3610793f227947f5fb83e89ae052ede4d7aec7cadd00d1a771e0c95703b69336 SHA512 459121093ad8b0bea7955cb589e6b58181dc57494ed16d4c6d95a755d044de421712c52c21b1b5f966833f4d93bbcadcbdf391be04d234e780cabb974eb38deb WHIRLPOOL 4b11bf47bcd53d1efcd7905874c0ea82dd7b9cdd84ac1f90edf48b1e7330ac8cc293566f09acb66228672cb3ec777b3a45de1f3fe425f45ed0c351d2a16c8c1e
+MISC ChangeLog-2015 4539 SHA256 cfe56d28d5b93bf69478816a7dc405354a8b9ec33d9c6d823cc550dffc692987 SHA512 61a25a81ab90dd9ccb00d8a11112da46cbfb8899439d022fe15b51ac65728b8feee161ca36fef0fff3feb4f81578271ca4f4bde680aac1c4752264cff763d6dd WHIRLPOOL dbd00b3fe3710125a1c6b979cf636364b4bb032e64fa696f5b7d4e9049969c88ef9a9dccb539e792e61e2b17632484db54c121bbd07bda0ccce48a2d3b1e6666
+MISC metadata.xml 772 SHA256 b50a703e16c0b89e6d3549fc95b3d5f7eb0e8ae73cbf1444484ebbb899f3dc05 SHA512 652f5e009b03b95f15b0ee34d6847c99435a9ad7420eb0cfb5fbf51e052a3a21d7655a8e817fd2c685154e68c946f433302670d49eabb7779a73963a99ed145a WHIRLPOOL e78ce584535925b1e225cf025302febcbe4a82b7918d623a323641f9816ec891124f0da91cfde30d354c9c614ed8e572e4e99751888bb6aa95933e31969947ee
diff --git a/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r3.ebuild b/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r3.ebuild
new file mode 100644
index 000000000000..95abf6114f41
--- /dev/null
+++ b/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r3.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs
+
+DEB_PN=mclibs
+DEB_PV=20061220+dfsg3
+DEB_PR=1
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="Monte-carlo library and tools for the cernlib"
+HOMEPAGE="https://cernlib.web.cern.ch/cernlib/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+IUSE="+herwig"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ x11-libs/motif:0
+ dev-lang/cfortran
+ sci-physics/cernlib
+ herwig? ( !sci-physics/herwig )"
+
+DEPEND="${RDEPEND}
+ virtual/latex-base
+ x11-misc/imake
+ x11-misc/makedepend"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}.orig"
+
+src_prepare() {
+ mv ../debian . || die
+ cp debian/add-ons/Makefile . || die
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ Makefile || die
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+ use herwig || epatch "${FILESDIR}"/${P}-noherwig.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+ # respect users flags
+ sed -i \
+ -e 's/-O3/-O2/g' \
+ -e "s/-O2/${CFLAGS}/g" \
+ -e "s|\(CcCmd[[:space:]]*\)gcc|\1$(tc-getCC)|g" \
+ -e "s|\(CplusplusCmd[[:space:]]*\)g++|\1$(tc-getCXX)|g" \
+ -e "s|\(FortranCmd[[:space:]]*\)gfortran|\1$(tc-getFC)|g" \
+ src/config/linux.cf \
+ || die "sed linux.cf failed"
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+
+ sed -i \
+ -e 's/\$(FCLINK)/\$(FCLINK) $(LDFLAGS)/' \
+ -e 's/\$(CCLINK)/\$(CCLINK) $(LDFLAGS)/' \
+ src/config/{biglib,fortran,Imake}.rules \
+ || die "sed for ldflags propagation failed"
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}"/fonts
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}"/shlib \
+ emake -j1 cernlib-test
+}
+
+src_install() {
+ export VARTEXFONTS="${T}"/fonts
+ emake DESTDIR="${D}" MCDOC="${ED}usr/share/doc/${PF}" install
+ cd debian
+ dodoc changelog README.* deadpool.txt copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r4.ebuild b/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r4.ebuild
new file mode 100644
index 000000000000..4bc56cab02e3
--- /dev/null
+++ b/sci-physics/cernlib-montecarlo/cernlib-montecarlo-2006-r4.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs
+
+DEB_PN=mclibs
+DEB_PV=20061220+dfsg3
+DEB_PR=3
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="Monte-carlo library and tools for the cernlib"
+HOMEPAGE="https://cernlib.web.cern.ch/cernlib/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+IUSE="+herwig"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ x11-libs/motif:0
+ dev-lang/cfortran
+ sci-physics/cernlib
+ herwig? ( !sci-physics/herwig )"
+
+DEPEND="${RDEPEND}
+ virtual/latex-base
+ x11-misc/imake
+ x11-misc/makedepend"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}.orig"
+
+src_prepare() {
+ mv ../debian . || die
+ cp debian/add-ons/Makefile . || die
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ Makefile || die
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+ use herwig || epatch "${FILESDIR}"/${P}-noherwig.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+ # respect users flags
+ sed -i \
+ -e 's/-O3/-O2/g' \
+ -e "s/-O2/${CFLAGS}/g" \
+ -e "s|\(CcCmd[[:space:]]*\)gcc|\1$(tc-getCC)|g" \
+ -e "s|\(CplusplusCmd[[:space:]]*\)g++|\1$(tc-getCXX)|g" \
+ -e "s|\(FortranCmd[[:space:]]*\)gfortran|\1$(tc-getFC)|g" \
+ src/config/linux.cf \
+ || die "sed linux.cf failed"
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+
+ sed -i \
+ -e 's/\$(FCLINK)/\$(FCLINK) $(LDFLAGS)/' \
+ -e 's/\$(CCLINK)/\$(CCLINK) $(LDFLAGS)/' \
+ src/config/{biglib,fortran,Imake}.rules \
+ || die "sed for ldflags propagation failed"
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}"/fonts
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_test() {
+ export VARTEXFONTS="${T}"/fonts
+ LD_LIBRARY_PATH="${S}"/shlib \
+ emake -j1 cernlib-test
+}
+
+src_install() {
+ emake DESTDIR="${D}" MCDOC="${ED}usr/share/doc/${PF}" install
+ cd debian
+ dodoc changelog README.* deadpool.txt copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/cernlib-montecarlo/files/cernlib-montecarlo-2006-noherwig.patch b/sci-physics/cernlib-montecarlo/files/cernlib-montecarlo-2006-noherwig.patch
new file mode 100644
index 000000000000..d0cb42d1ba42
--- /dev/null
+++ b/sci-physics/cernlib-montecarlo/files/cernlib-montecarlo-2006-noherwig.patch
@@ -0,0 +1,52 @@
+diff --git a/mclibs-2006.dfsg.2.orig/Makefile b/mclibs-2006.dfsg.2.orig/Makefile
+index f3c89fd..780499e 100644
+--- a/mclibs-2006.dfsg.2.orig/Makefile
++++ b/mclibs-2006.dfsg.2.orig/Makefile
+@@ -89,9 +89,6 @@ install-includes:
+ done ; \
+ done
+
+- # install some symlinks, e.g. herwig$$version -> herwig
+- rm -f $(DESTDIR)$(includedir)/herwig && \
+- ln -sf herwig59 $(DESTDIR)$(includedir)/herwig
+ rm -rf $(DESTDIR)$(includedir)/isajet758
+ mv $(DESTDIR)$(includedir)/isajet $(DESTDIR)$(includedir)/isajet758
+ ln -sf isajet758 $(DESTDIR)$(includedir)/isajet
+@@ -128,14 +125,12 @@ install-arch: install-includes
+ fi
+
+ # ... and mclibs documentation
+- for dir in cojets eurodec herwig isajet pdflib ; do \
++ for dir in cojets eurodec isajet pdflib ; do \
+ install -d -m 0755 $(MCDOC)/$$dir ; \
+ done
+ install -p -m 0644 $(CERN_DOCDIR)/cojets.txt $(MCDOC)/cojets/
+ install -p -m 0644 $(CERN_DOCDIR)/isa* $(MCDOC)/isajet/
+ install -p -m 0644 $(CERN_DOCDIR)/eurodec.txt $(MCDOC)/eurodec/
+- install -p -m 0644 $(CVSCOSRC)/mclibs/herwig/doc/herwig59 \
+- $(MCDOC)/herwig/herwig59.txt
+ install -p -m 0644 $(CVSCOSRC)/mclibs/pdf/dpdf/pdfdoc.doc \
+ $(MCDOC)/pdflib/pdfdoc.txt
+
+diff --git a/mclibs-2006.dfsg.2.orig/src/mclibs/Imakefile b/mclibs-2006.dfsg.2.orig/src/mclibs/Imakefile
+index 0c9867d..0f04f1b 100644
+--- a/mclibs-2006.dfsg.2.orig/src/mclibs/Imakefile
++++ b/mclibs-2006.dfsg.2.orig/src/mclibs/Imakefile
+@@ -6,7 +6,7 @@
+ to them and their dependents. They have already been purged from
+ Debianized source code. Also, re-order libs so that dependent ones
+ come after dependees. */
+-LIBDIRS= cojets eurodec pdf photos herwig isajet
++LIBDIRS= cojets eurodec pdf photos isajet
+
+ SUBDIRS = $(LIBDIRS)
+
+@@ -16,7 +16,7 @@ InstallLibSubdirs($(LIBDIRS))
+ InstallSharedLibSubdirs($(LIBDIRS))
+
+ /* Again, purge Pythia, Jetset and dependents. */
+-INCLUDEDIRS= cojets eurodec herwig isajet pdf
++INCLUDEDIRS= cojets eurodec isajet pdf
+
+ InstallIncludeSubdirs($(INCLUDEDIRS))
+
diff --git a/sci-physics/cernlib-montecarlo/metadata.xml b/sci-physics/cernlib-montecarlo/metadata.xml
new file mode 100644
index 000000000000..8c84153e4f42
--- /dev/null
+++ b/sci-physics/cernlib-montecarlo/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ This metapackage provides various Monte Carlo libraries included in
+ Cernlib (both shared and static). Likely only physicists will be
+ interested in these packages.
+ The libraries of Ariadne, Fritiof, Jetset, Lepto, and Pythia are not
+ available for Gentoo: see cernlib Debian packaging for explanation.
+</longdescription>
+ <use>
+ <flag name="herwig">Build Herwig internal event generator, newer version
+ available in <pkg>sci-physics/herwig</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/cernlib/Manifest b/sci-physics/cernlib/Manifest
new file mode 100644
index 000000000000..cca26d85ee77
--- /dev/null
+++ b/sci-physics/cernlib/Manifest
@@ -0,0 +1,11 @@
+AUX cernlib-2006-fgets.patch 759 SHA256 eb1e965627b094a698af5f9629f5f69cb4b966f33c01b48a7bcf75b80c3e9eaf SHA512 efd017d9164e94870364e7124ae7ffd001989ffafe44ee85c5161bcc6399de4559430fdb39daf25e4fdb788a74ada06f00b9023651e714ca0c5ccf1ca248e821 WHIRLPOOL 17e8dfd1e788c7fae1276f08af3bcb6d5b50c7d0bc3885498317a702e27502d0cf697346ce25afe9cc964c96912878e44c20f8cf6b299c147f978bade2825547
+AUX cernlib-2006-nogfortran.patch 1994 SHA256 f9839ef5dc005715387bd997f69565aa1e5984502e6c6e625659e35bbaf9d997 SHA512 9446e85f57c5cdc78468e738f2a5d7227a2a91d4d6591b063fbc0a976bdb1b1f34edceee92ed7fbac558b1f6ba2663d1b43c373e92da3f414df21c601a0f1f72 WHIRLPOOL cab7f7b2ba7e71b539306b198649368324c75bbeb3e514ad7562ce6ec421f5c57a5b6502b99e78b5b35e954b64abb44b3a423212c14dda88bcddba8fa04ca498
+AUX cernlib-2006-ypatchy-short-name.patch 331 SHA256 c71212efa6e33ec4dd55d4080bd22db86438fbda1091186d146699496f1cd101 SHA512 dd97e328706c243b84c6464ee1db3c546280dba838766e6aefd8a5349e57a3b430c38d81909f5ad445af7c3a602e0a6e64110b7f8eb6e44a907a7311828142e9 WHIRLPOOL bd2b7c886ecf3937e0c189b04b3f13c4b9fe131b2cac8e150b4bfda0218eebd984ba9978ca3b704d59b5098718f9ff5424b1163ad7ade078164224a7642d2548
+DIST cernlib_20061220+dfsg3-2.debian.tar.gz 257093 SHA256 54d01b7c16015586b09d54940f8e4389eb9f9a85e93be8058a2f1349a009029a SHA512 43a2ca55d42b92bfb551b029c75728e80b4c83473397b52f746d9481c7503762bc5a281732908bfeb29a64f728fed4c127ed1cb9101c16e4fb2dd28c452730ea WHIRLPOOL e11e127c2ef22c96a8f309a1828b076064b87419d7b2fa2f0e93f254582ded6ce41ca678c757921e9a732f75a4bd0392cd4edb7c0752ce04986fe8c1ee210c46
+DIST cernlib_20061220+dfsg3-4.1.debian.tar.xz 170100 SHA256 6f19d776b0a6f22ac688c4e5db9d0ad35f99d8ae1906422f02cca92353d4f9d6 SHA512 d259ab304b040c6bab8535c0db60aaa466ef7bb9bbcce9b2d8931505a180c92935d428e0dd45bfa6199ec939f67580a6d3ac1035c0384bdcf9e6601a351ce90a WHIRLPOOL bf1da58ace8294ff6df710dad8c333122f005437819b8923d53f5fe680f1798f7d22cd917138b679b92363e399759a5b44aa4902b788aa6666f38da7738a3857
+DIST cernlib_20061220+dfsg3.orig.tar.gz 6434476 SHA256 767ecf344cb00a7b2ec232a61c67645ce0fe1a6af861e60a9aa2f96544470f1b SHA512 11fade45c5ae69c858f37a82e74ab1a69416314a23c12ec5205ee6b918590d66f26d3ae68afa466ae3109d736212968ece956a444270ddd189a27a24c0ccece8 WHIRLPOOL fce13048cff43b6abc7e52e9729f5e484ebf85b53f09e6bfbf8acd970ea13b160de6d6d9593779b6b485dfb9843dec4d2d58bac0df20dfce9809a3560eec079c
+EBUILD cernlib-2006-r5.ebuild 2941 SHA256 ff7082d877f0b1e46436ba7d3b239d62277e3439a619b646dc0bf1645d7265a6 SHA512 5b5de782e64937d08d7b748d16efbfcd927f99fe05f127426e5bd52be3ce21f741f6ac42157efb6c95318acd38e217c714e39c2c736f8cd5335d3bf26d961557 WHIRLPOOL c5802fa54a96ad4c62158a4aae69a92589d52ac855f84dd091789f541992f16fe734dc2ae2b71d744c0dd45c751af479e67bed0fde401a7ad0bc8b8c3ef54e09
+EBUILD cernlib-2006-r6.ebuild 2996 SHA256 0c978cf0fb2ed1c42e9bf6d6296bc57e2ef5fd4de8398239f8de1c3cdc2678c4 SHA512 d2721cd22118e0ab7bcbdd39cc94c2c5620f99775c089f3918e128ee23e0d34ae96238c0c1e0b80d2fe062c12434085993f7d84cd5f90bb4781ad130ff2e62a6 WHIRLPOOL 006c4769443ccfbe0afe5e9112b32d45049407e8cd36509314ae167a8f474f717590303c7d116f11e497abfb7861a031d5945df0faf42609863054de0e5ddbc7
+MISC ChangeLog 2611 SHA256 d91afa9a4bda660fb5ddb76f125ffcace0e4e0f5d3c747e843b21423c8ad99a8 SHA512 f4773e1e5233cd0ee7985649613825a624f2d1d3d848810fc2a5960a5d22a78355f3645df23668d8edd19855084ea9e398e362b665976cce31d241e9fde77041 WHIRLPOOL f71bd22a62b1abc01109997a33483d77f86e4d07cd6ae006b5e8403a7575c3b36f4c9752be7d92a89cae91875f977e045c944afa1ac0eb42f6c68271aaacc6c9
+MISC ChangeLog-2015 6514 SHA256 08ba6ad8b22a6e2ef819b782efd6583db4454f3a7239237d9ff5c96d50001d1b SHA512 bca9a0a7635f4a4e65f2d25aa08f64ea4682c756a96c3e94b003ffb6ec860279eef78386c846a89e01e7e1f4374b1d060513cb8aff4b264573e2e63f3a51eba2 WHIRLPOOL 9eb7bd90347160579981b1c5e99ae1d38d001fac2676a5bd76dc2258b2593a1f4ffafee9618e617ac5cb34a77610238af7c111c5c516a9c214d63f178000701d
+MISC metadata.xml 759 SHA256 a6a36dfe32be685ff4ff67a1c329bbae798d7ab3c5bd198118c1c262b8e6bf38 SHA512 133dd51ec200866d1886a1c077dad4a1a7ec786d77b59e1da147a7e95a5b6e8c9f1ce41dfcfa35c406625ed4aa966891cc5247ef35d7a82791d9b42c91fc7477 WHIRLPOOL ccabbc7805f4d813f73749bd0cbcc4ed102ac638834c47998622eb4be0136424ee2c0f1c036c3c76720edee783ecd8a5a51f5ad94ff819f41e65e6ce56744178
diff --git a/sci-physics/cernlib/cernlib-2006-r5.ebuild b/sci-physics/cernlib/cernlib-2006-r5.ebuild
new file mode 100644
index 000000000000..8a03a5909c64
--- /dev/null
+++ b/sci-physics/cernlib/cernlib-2006-r5.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DEB_PN=cernlib
+DEB_PV=20061220+dfsg3
+DEB_PR=2
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="CERN program library for High Energy Physics"
+HOMEPAGE="https://cernlib.web.cern.ch/cernlib/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+KEYWORDS="amd64 hppa sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ x11-libs/motif:0
+ virtual/lapack
+ dev-lang/cfortran"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ x11-misc/makedepend
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}"
+
+src_prepare() {
+ mv ../debian . || die
+ epatch "${FILESDIR}"/${P}-nogfortran.patch
+ # set some default paths
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ -e "s:prefix)/lib:prefix)/$(get_libdir):" \
+ -e "s:\$(prefix)/etc:${EROOT}/etc:" \
+ -e 's:$(prefix)/man:$(prefix)/share/man:' \
+ debian/add-ons/cernlib.mk || die "sed failed"
+
+ # use system blas and lapack set by gentoo framework
+ sed -i \
+ -e "s:\$DEPS -lm:$($(tc-getPKG_CONFIG) --libs blas):" \
+ -e "s:\$DEPS -llapack -lm:$($(tc-getPKG_CONFIG) --libs lapack):" \
+ -e 's:`depend $d $a blas`::' \
+ -e 's:X11R6:X11:g' \
+ debian/add-ons/bin/cernlib.in || die "sed failed"
+
+ cp debian/add-ons/Makefile .
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+
+ epatch "${FILESDIR}"/${P}-fgets.patch
+ epatch "${FILESDIR}"/${P}-ypatchy-short-name.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+
+ # respect users flags
+ sed -i \
+ -e 's/-O3/-O2/g' \
+ -e "s/-O2/${CFLAGS}/g" \
+ -e "s|\(CcCmd[[:space:]]*\)gcc|\1$(tc-getCC)|g" \
+ -e "s|\(CplusplusCmd[[:space:]]*\)g++|\1$(tc-getCXX)|g" \
+ -e "s|\(FortranCmd[[:space:]]*\)gfortran|\1$(tc-getFC)|g" \
+ src/config/linux.cf \
+ || die "sed linux.cf failed"
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+
+ sed -i \
+ -e 's/\$(FCLINK)/\$(FCLINK) $(LDFLAGS)/' \
+ -e 's/\$(CCLINK)/\$(CCLINK) $(LDFLAGS)/' \
+ src/config/{biglib,fortran,Imake}.rules \
+ src/patchy/Imakefile \
+ || die "sed for ldflags propagation failed"
+
+ # add missing headers for implicit
+ sed -i \
+ -e '0,/^#include/i#include <stdlib.h>' \
+ src/kernlib/kerngen/ccgen*/*.c || die
+}
+
+src_compile() {
+ # parallel make breaks and complex patched imake system, hard to debug
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}"/shlib emake -j1 cernlib-test
+}
+
+src_install() {
+ default
+ cd debian
+ dodoc changelog README.* deadpool.txt NEWS copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/cernlib/cernlib-2006-r6.ebuild b/sci-physics/cernlib/cernlib-2006-r6.ebuild
new file mode 100644
index 000000000000..abdee8792276
--- /dev/null
+++ b/sci-physics/cernlib/cernlib-2006-r6.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DEB_PN=cernlib
+DEB_PV=20061220+dfsg3
+DEB_PR=4.1
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="CERN program library for High Energy Physics"
+HOMEPAGE="https://cernlib.web.cern.ch/cernlib/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ x11-libs/motif:0
+ virtual/lapack
+ dev-lang/cfortran"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ x11-misc/makedepend
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}"
+
+src_prepare() {
+ mv ../debian . || die
+ epatch "${FILESDIR}"/${P}-nogfortran.patch
+ # set some default paths
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ -e "s:prefix)/lib/\$(DEB_HOST_MULTIARCH):prefix)/$(get_libdir):" \
+ -e "s:\$(prefix)/etc:${EROOT}/etc:" \
+ -e 's:$(prefix)/man:$(prefix)/share/man:' \
+ debian/add-ons/cernlib.mk || die "sed failed"
+
+ # use system blas and lapack set by gentoo framework
+ sed -i \
+ -e "s:\$DEPS -lm:$($(tc-getPKG_CONFIG) --libs blas):" \
+ -e "s:\$DEPS -llapack -lm:$($(tc-getPKG_CONFIG) --libs lapack):" \
+ -e 's:`depend $d $a blas`::' \
+ -e 's:X11R6:X11:g' \
+ -e 's: /[^ ]*`dpkg-arch.*`::' \
+ debian/add-ons/bin/cernlib.in || die "sed failed"
+
+ cp debian/add-ons/Makefile .
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+
+ epatch "${FILESDIR}"/${P}-fgets.patch
+ epatch "${FILESDIR}"/${P}-ypatchy-short-name.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+
+ # respect users flags
+ sed -i \
+ -e 's/-O3/-O2/g' \
+ -e "s/-O2/${CFLAGS}/g" \
+ -e "s|\(CcCmd[[:space:]]*\)gcc|\1$(tc-getCC)|g" \
+ -e "s|\(CplusplusCmd[[:space:]]*\)g++|\1$(tc-getCXX)|g" \
+ -e "s|\(FortranCmd[[:space:]]*\)gfortran|\1$(tc-getFC)|g" \
+ src/config/linux.cf \
+ || die "sed linux.cf failed"
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+
+ sed -i \
+ -e 's/\$(FCLINK)/\$(FCLINK) $(LDFLAGS)/' \
+ -e 's/\$(CCLINK)/\$(CCLINK) $(LDFLAGS)/' \
+ src/config/{biglib,fortran,Imake}.rules \
+ src/patchy/Imakefile \
+ || die "sed for ldflags propagation failed"
+
+ # add missing headers for implicit
+ sed -i \
+ -e '0,/^#include/i#include <stdlib.h>' \
+ src/kernlib/kerngen/ccgen*/*.c || die
+}
+
+src_compile() {
+ # parallel make breaks and complex patched imake system, hard to debug
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}"/shlib emake -j1 cernlib-test
+}
+
+src_install() {
+ default
+ cd debian
+ dodoc changelog README.* deadpool.txt NEWS copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/cernlib/files/cernlib-2006-fgets.patch b/sci-physics/cernlib/files/cernlib-2006-fgets.patch
new file mode 100644
index 000000000000..e42eaf833b35
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-fgets.patch
@@ -0,0 +1,20 @@
+--- src/packlib/cspack/tcpaw/tcpaw.c.old 2011-01-30 21:18:35.326089059 +0000
++++ src/packlib/cspack/tcpaw/tcpaw.c 2011-01-30 21:18:01.876081979 +0000
+@@ -984,7 +984,7 @@
+ int s, addrlen;
+ int sx, nn = 0; /* REXEC */
+ #ifndef IBM
+- char get[50], *getp = get; /* REXEC */
++ char get[80], *getp = get; /* REXEC */
+ #endif /*^IBM */
+ char sys[30];
+ register int i, j, k;
+@@ -1036,7 +1036,7 @@
+ char buff[100];
+ char *get;
+ char *getp;
+- char getbuf[50]; /* REXEC */
++ char getbuf[80]; /* REXEC */
+ getp = getbuf; /* REXEC */
+ get = getbuf; /* REXEC */
+ /* j = 80; */ /* (crude kludge) length of srvc in Fortran */
diff --git a/sci-physics/cernlib/files/cernlib-2006-nogfortran.patch b/sci-physics/cernlib/files/cernlib-2006-nogfortran.patch
new file mode 100644
index 000000000000..63883274403f
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-nogfortran.patch
@@ -0,0 +1,56 @@
+--- debian/add-ons/Makefile.orig 2008-03-15 16:46:46.000000000 +0000
++++ debian/add-ons/Makefile 2008-03-15 16:47:51.000000000 +0000
+@@ -28,6 +28,9 @@
+ ifneq (,$(findstring ifort,$(DEB_BUILD_OPTIONS)))
+ sed -i -e 's/-lgfortran/-limf/' $(CERN_BINDIR)/cernlib
+ endif
++ifneq (,$(findstring g77,$(DEB_BUILD_OPTIONS)))
++ sed -i -e 's/-lgfortran/-lg2c/' $(CERN_BINDIR)/cernlib
++endif
+ chmod a+x $(CERN_BINDIR)/cernlib
+
+ # target to install include files for development packages
+--- debian/add-ons/cernlib.mk.orig 2008-03-15 16:48:05.000000000 +0000
++++ debian/add-ons/cernlib.mk 2008-03-15 17:09:14.000000000 +0000
+@@ -35,6 +35,10 @@
+ export TOOL_SONAME = _gfortran
+ export TOOL_NAME = _gfortran
+ endif
++ifeq (,$(findstring g77,$(DEB_BUILD_OPTIONS)))
++ export TOOL_SONAME = _gfortran
++ export TOOL_NAME = _gfortran
++endif
+ export PATH := $(CERN_BINDIR):$(ADDONDIR)/bin:$(datadir)/cernlib:${PATH}
+ export INSTALL_OPTS ?= -s
+ export CC ?= gcc
+@@ -118,6 +122,8 @@
+ endif
+ ifneq (,$(findstring ifort,$(DEB_BUILD_OPTIONS)))
+ echo '#define HasIntelifc YES' >> $(CVSCOSRC)/config/host.def
++else ifneq (,$(findstring g77,$(DEB_BUILD_OPTIONS)))
++ echo >> $(CVSCOSRC)/config/host.def
+ else
+ echo '#define Hasgfortran YES' >> $(CVSCOSRC)/config/host.def
+ endif
+--- debian/patches/320-support-ifort.dpatch.orig 2008-03-15 17:31:34.000000000 +0000
++++ debian/patches/320-support-ifort.dpatch 2008-03-15 17:31:56.000000000 +0000
+@@ -27,7 +27,7 @@
+ #if defined(CERNLIB_UNIX)
+ CLIBS= -G Motif kernlib
+ +# if defined(CERNLIB_INTELIFC)
+-+CLIBS= $(CLIBS) -nofor_main
+++CLIBS:= $(CLIBS) -nofor_main
+ +# endif
+ #endif
+
+--- debian/patches/803-link-binaries-dynamically.dpatch.orig 2008-03-15 17:48:38.000000000 +0000
++++ debian/patches/803-link-binaries-dynamically.dpatch 2008-03-15 17:49:17.000000000 +0000
+@@ -64,7 +64,7 @@
+ -CLIBS= -G Motif kernlib
+ +CLIBS= -G Motif -u Xm
+ # if defined(CERNLIB_INTELIFC)
+- CLIBS= $(CLIBS) -nofor_main
++ CLIBS:= $(CLIBS) -nofor_main
+ # endif
+ #endif
+
diff --git a/sci-physics/cernlib/files/cernlib-2006-ypatchy-short-name.patch b/sci-physics/cernlib/files/cernlib-2006-ypatchy-short-name.patch
new file mode 100644
index 000000000000..706ab3671672
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-ypatchy-short-name.patch
@@ -0,0 +1,11 @@
+--- src/patchy/Imakefile.orig 2013-01-16 13:45:07.161828513 -0800
++++ src/patchy/Imakefile 2013-01-16 13:45:34.768966597 -0800
+@@ -77,7 +77,7 @@
+ @ ln -s $< $@
+
+ %.f: $(LDIR)%.cra $(LDIR)patchy.car
+- ypatchy - :$@ :$< TTY .go
++ ypatchy - :$@ :$(shell basename $<) TTY .go
+
+ .f.o:
+ $(FC) -c $(FORTRANOPTIONS) $(FDEBUGFLAGS) $<
diff --git a/sci-physics/cernlib/metadata.xml b/sci-physics/cernlib/metadata.xml
new file mode 100644
index 000000000000..018891e93643
--- /dev/null
+++ b/sci-physics/cernlib/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The CERN Program Library is a large collection of general purpose
+ libraries and modules maintained and offered in both source and
+ object code form on the CERN central computers. Most of these
+ programs were developed at CERN and are therefore oriented towards
+ the needs of a physics research laboratory that is general
+ mathematics, data analysis, detectors simulation, data-handling
+ etc... applicable to a wide range of problems.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/clhep/Manifest b/sci-physics/clhep/Manifest
new file mode 100644
index 000000000000..3f7d07e4adb1
--- /dev/null
+++ b/sci-physics/clhep/Manifest
@@ -0,0 +1,15 @@
+DIST clhep-2.1.4.1.tgz 1866250 SHA256 adeb7ad87b810f772b609e77eacc60fd3e1f949e694a434705e6759cdac41fe4 SHA512 ff5eb76ddf740635c17f01c62679ae7c22c152f96684315f059744ab67e420e51ba9c1ae0ac745b2890d1ddb6a678999b61d44c36e358c1d95c6b57362f3fae0 WHIRLPOOL da4fd1087b0c92f5a6f8bec060b4e6eee0091327defb9e2d71721c09b8c1f773d3ed377567a378dbb48156426ecfdb638049e10122fc5b2bcf2a7fe560e1ebd0
+DIST clhep-2.1.4.2.tgz 1838675 SHA256 ffd72997fb921fa7ef770c40c6bb12f603aa4761e642dc577160d1ee2aa695f0 SHA512 8caa6fdbf1d7dbfe217cc5aef384e21b99ae386a76771f17b3dc583c0c55e21164ad3778005798f1a4d151b79782b96a3495d88f1cf7bd46da4c6550ebd69f7c WHIRLPOOL 33ed24301927680c858561e6c6105fddbe72e725bdae26bdefaa24fc2ac9ee93db7a48fcb5e2b773a03acc9a41a2d294e1071ab7ad45bb4c1cec4180cd4da699
+DIST clhep-2.2.0.1.tgz 1844675 SHA256 1006284b195e569276ba9d6e3e2b0b2d002e098c10ac09157b26ec076987d7d7 SHA512 930577d18f1c4a9dc94b259589653ebecf7b85ec78da7e1dc7b49d282dbae210bcf257831254f875840a3fd6bf5fc4ad7c4e46825e31674c55c746ef7c2939f2 WHIRLPOOL ad9e765c2adb47de9688abc5c8f7f6e481160df66c811e381d136fcf7d1e7726402367ad2a3f757cefc754c8fe6dc225bdee0f15f763cecc91a3413b63cbc54c
+DIST clhep-2.2.0.5.tgz 1847046 SHA256 92e8b5d32ae96154edd27d0c641ba048ad33cb69dd4f1cfb72fc578770a34818 SHA512 07d9359604196344fe3b13cc103727693fd70818c22849e54507530221812843a943cb8ed66eea421e498edcc9c0f584826823ea7939cbf53b90b17d412aed1a WHIRLPOOL 4d5b7429e4b0498393c8f664045df4ba27a073a7e926ee9a5f9e196e5d0d3dd4da2cb4bf77e8eb37e6651c3e1f3f9742167414010ae5606e02f307ab6efe82c4
+DIST clhep-2.3.1.0.tgz 1538945 SHA256 66272ae3100d3aec096b1298e1e24ec25b80e4dac28332b45ec3284023592963 SHA512 786ad6289ab064c3c428ba2a8f534fcadd09f1f00a9c725dc987ea46c55d1f4ec7beab25221c978992dd195b02a65388a35aa6d7f471b6742c9ff6cdb7a8b7a4 WHIRLPOOL 44f77d13c0c7b0f74c7d66c1196214d47f5ec71411365746769d7d2f1dbe53b8d4e18fbefffd6a677a3329ba16e5333277d5e6c6e8f880c24cca7d1e7c88224b
+DIST clhep-2.3.3.1.tgz 1565701 SHA256 cd74bfae4773620dd0c7cc9c1696a08386931d7e47a3906aa632cc5cb44ed6bd SHA512 b13e336f9c4dd741291768a4c59075e88467ad54dc41a07eeb519712055e1a26c2369bffb6aeeeac4199066ce1bc863e9d90647094dd2fced7069d82a4cd1317 WHIRLPOOL 03cea53429711d1c076c1d5ccf61e3f072109608fd79219ae8dfd0540b86da18c13eae1f317d3eddad080860f8e0da25b41fe9f0a3b0ae448ec7ae22a2d16749
+EBUILD clhep-2.1.4.1.ebuild 1341 SHA256 aaa5ee15992346e82b2cc2ac17cdaa35aaaf5c75aef3a36ff1ebab4b1097bc52 SHA512 ed488e18fb000d46197ffbf108c26e1b36b92993fc345b45d5d71fa83cae4f6876727d6b2e00a5be6a1e8d647e9cc16aa61b19b6db0c1eaf407848258ae305ca WHIRLPOOL 2a398c43518674ce3aa72197e4766086b3143bba2a4c98c4a3f7612ee205466e0fc1d426dbce25ba0d8f57f8e001e65ff030b1114bd9851f426b0b4d18e04210
+EBUILD clhep-2.1.4.2.ebuild 1352 SHA256 dd7c5dbb81da13fccf0fe5dd29d06096e0e8d2cf012b95b2b99f0c0683470d2d SHA512 16a0b0f6bf4363d479f2d8ee9974098b3d315ea5109fda983533b596d9ae1a3e66ddfccdd066654c6deffac4d05c1f76e85deab7eda32ce0d88c2c71e28d24d9 WHIRLPOOL ed269d73983b10db996d7add14dd0498f4b23d12847d2d6e94140781183e9b267f1cef91f8a74a7efa14d9a2ad6e96940aedec1b203bb08b291b186dbb0740c6
+EBUILD clhep-2.2.0.1.ebuild 1352 SHA256 dd7c5dbb81da13fccf0fe5dd29d06096e0e8d2cf012b95b2b99f0c0683470d2d SHA512 16a0b0f6bf4363d479f2d8ee9974098b3d315ea5109fda983533b596d9ae1a3e66ddfccdd066654c6deffac4d05c1f76e85deab7eda32ce0d88c2c71e28d24d9 WHIRLPOOL ed269d73983b10db996d7add14dd0498f4b23d12847d2d6e94140781183e9b267f1cef91f8a74a7efa14d9a2ad6e96940aedec1b203bb08b291b186dbb0740c6
+EBUILD clhep-2.2.0.5.ebuild 1348 SHA256 63ae99715a5afb3fbe94cdac8fe7dc983ae0563e110414012eb1b7bf25419a32 SHA512 ca0e8931cdf473f2be975e7a01f77176f50a9a6e576ab1a9ab36bb1dd2fbe40fb3486c2a53176d9570842560f534555cd0401d84a7e74bf0995d879fd885ebed WHIRLPOOL 506f5ad98b2af8c1bf67ae67533bb4b9732b6d913e7e90d90879ebfb4c03df5e649862a8ed72a464d360783f035c0acd5c45abf0c0a878b29dd2bfd06f4a24e7
+EBUILD clhep-2.3.1.0.ebuild 1352 SHA256 dd7c5dbb81da13fccf0fe5dd29d06096e0e8d2cf012b95b2b99f0c0683470d2d SHA512 16a0b0f6bf4363d479f2d8ee9974098b3d315ea5109fda983533b596d9ae1a3e66ddfccdd066654c6deffac4d05c1f76e85deab7eda32ce0d88c2c71e28d24d9 WHIRLPOOL ed269d73983b10db996d7add14dd0498f4b23d12847d2d6e94140781183e9b267f1cef91f8a74a7efa14d9a2ad6e96940aedec1b203bb08b291b186dbb0740c6
+EBUILD clhep-2.3.3.1.ebuild 1248 SHA256 c8b915c6ec7dce785948935137d868707a2c848f9e1250fe3226e88dcb19d23d SHA512 56182096a809c4da490bd2aad8de45c094d6c6c1621c47563693328a017f34e32f50df3bd41617009f6d5baa1b76dc5e90a301f560e3fbc4bfb3093c5ece56f3 WHIRLPOOL 2c640615426fed958581ce6cdbd0daedb8ce57fd03659d83577e140083c4e19082878493cfb9599909ff82a5b4c2ded3f452917553dbaa1ed84d945454e37a4f
+MISC ChangeLog 4442 SHA256 eea1c1df9b604ad32734e1f5b8a25e619aedc95694ec9fdf421b49016c214c6b SHA512 65aebb110c5c980b9391f336b63ffa3dbd8703b92a3189be2bfcc9507ccea4a49530909fc63ad309f904fa0fa2630f97dbb7c00b3dae2027e9f2a6a231a47a22 WHIRLPOOL dd67349fb2eb0e932c1e0a6b308a2e074ed97d4e49cb3af74bd9dc44f40199479ef91b75df9546ed6beed55bd50a2bb042cb33b4fbdaeb4a70da3621e2c53541
+MISC ChangeLog-2015 6665 SHA256 c38824759bb3ac9651e79cfbdff8b49fc0bdd2041cb28496fc6c3528e607d9e9 SHA512 4eb65b83d4f0fc5c0f4db114b7d5c1fa0329966717baf8c32a0872463356bbf4309bbeb655bab67b6fe6a1ab0e610251354ac81dcd1ee3ab8f01fa737bf6f8e8 WHIRLPOOL d6bf4723f82b974b2b4b50d804614f4b5b357624a2c91790b9c762e670a0fbc41ac976a497bafc1b253c5d264c7d8e8124693fa11273e1b15e6dce030ef8e9d7
+MISC metadata.xml 496 SHA256 435dcec4bb9a8ecbbb48fbbf92094e2f4e4a0e12b13a9fa76ae6c750d492d1f1 SHA512 768aeefc23a2ea89eb63b0eb6fd084c253243b6d67b822702dffc8f49a7170d30e55ebc08875ff238e618639882f93fe6e1390e3d8456f3850d75d5a98bf3b96 WHIRLPOOL 08a5f3b8eb063531f070f3a47173bb68d477f21e4787cc0791fe8ae5b798de734f5ba98ba2f4a2407cc93a772b076c1e4db9480f79aa4f9e56b33c209c040cbd
diff --git a/sci-physics/clhep/clhep-2.1.4.1.ebuild b/sci-physics/clhep/clhep-2.1.4.1.ebuild
new file mode 100644
index 000000000000..b790902eb456
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.1.4.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://www.cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # no batch mode to allow parallel building (bug #437482)
+ sed -i \
+ -e 's:-interaction=batchmode::g' \
+ cmake/Modules/ClhepBuildTex.cmake || die
+ # gentoo doc directory
+ sed -i \
+ -e "/DESTINATION/s:doc:share/doc/${PF}:" \
+ cmake/Modules/ClhepBuildTex.cmake */doc/CMakeLists.txt || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+ use doc && MAKEOPTS+=" -j1"
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/clhep-2.1.4.2.ebuild b/sci-physics/clhep/clhep-2.1.4.2.ebuild
new file mode 100644
index 000000000000..39b91169a162
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.1.4.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://www.cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # no batch mode to allow parallel building (bug #437482)
+ sed -i \
+ -e 's:-interaction=batchmode::g' \
+ cmake/Modules/ClhepBuildTex.cmake || die
+ # gentoo doc directory
+ sed -i \
+ -e "/DESTINATION/s:doc:share/doc/${PF}:" \
+ cmake/Modules/ClhepBuildTex.cmake */doc/CMakeLists.txt || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+ use doc && MAKEOPTS+=" -j1"
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/clhep-2.2.0.1.ebuild b/sci-physics/clhep/clhep-2.2.0.1.ebuild
new file mode 100644
index 000000000000..39b91169a162
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.2.0.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://www.cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # no batch mode to allow parallel building (bug #437482)
+ sed -i \
+ -e 's:-interaction=batchmode::g' \
+ cmake/Modules/ClhepBuildTex.cmake || die
+ # gentoo doc directory
+ sed -i \
+ -e "/DESTINATION/s:doc:share/doc/${PF}:" \
+ cmake/Modules/ClhepBuildTex.cmake */doc/CMakeLists.txt || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+ use doc && MAKEOPTS+=" -j1"
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/clhep-2.2.0.5.ebuild b/sci-physics/clhep/clhep-2.2.0.5.ebuild
new file mode 100644
index 000000000000..f21569474620
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.2.0.5.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://www.cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="amd64 hppa ppc x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # no batch mode to allow parallel building (bug #437482)
+ sed -i \
+ -e 's:-interaction=batchmode::g' \
+ cmake/Modules/ClhepBuildTex.cmake || die
+ # gentoo doc directory
+ sed -i \
+ -e "/DESTINATION/s:doc:share/doc/${PF}:" \
+ cmake/Modules/ClhepBuildTex.cmake */doc/CMakeLists.txt || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+ use doc && MAKEOPTS+=" -j1"
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/clhep-2.3.1.0.ebuild b/sci-physics/clhep/clhep-2.3.1.0.ebuild
new file mode 100644
index 000000000000..39b91169a162
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.3.1.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://www.cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # no batch mode to allow parallel building (bug #437482)
+ sed -i \
+ -e 's:-interaction=batchmode::g' \
+ cmake/Modules/ClhepBuildTex.cmake || die
+ # gentoo doc directory
+ sed -i \
+ -e "/DESTINATION/s:doc:share/doc/${PF}:" \
+ cmake/Modules/ClhepBuildTex.cmake */doc/CMakeLists.txt || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+ use doc && MAKEOPTS+=" -j1"
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/clhep-2.3.3.1.ebuild b/sci-physics/clhep/clhep-2.3.3.1.ebuild
new file mode 100644
index 000000000000..5238ed7061c7
--- /dev/null
+++ b/sci-physics/clhep/clhep-2.3.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="High Energy Physics C++ library"
+HOMEPAGE="http://cern.ch/clhep"
+SRC_URI="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/${P}.tgz"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2/${PV}"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+IUSE="doc static-libs test"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[latex] )"
+
+S="${WORKDIR}/${PV}/CLHEP"
+
+src_prepare() {
+ # respect flags
+ sed -i -e 's:-O::g' cmake/Modules/ClhepVariables.cmake || die
+ # dont build test if not asked
+ if ! use test; then
+ sed -i \
+ -e '/add_subdirectory(test)/d' \
+ */CMakeLists.txt || die
+ fi
+ # gentoo doc directory
+ if use doc; then
+ grep -rl 'share/doc/CLHEP' |
+ xargs sed -i \
+ -e "s:share/doc/CLHEP:share/doc/${PF}:" \
+ {.,*}/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ append-cxxflags $(test-flags-CXX -std=c++11)
+ local mycmakeargs=(
+ $(cmake-utils_use test ENABLE_TESTING)
+ $(cmake-utils_use doc CLHEP_BUILD_DOCS)
+ )
+ DESTDIR="${ED}" cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a
+}
diff --git a/sci-physics/clhep/metadata.xml b/sci-physics/clhep/metadata.xml
new file mode 100644
index 000000000000..abaa89137b51
--- /dev/null
+++ b/sci-physics/clhep/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ A Class Library for High Energy Physics is intended to be a set of
+ HEP-specific foundation and utility classes such as random
+ generators, physics vectors, geometry and linear algebra.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/espresso++/Manifest b/sci-physics/espresso++/Manifest
new file mode 100644
index 000000000000..f97140b51f6d
--- /dev/null
+++ b/sci-physics/espresso++/Manifest
@@ -0,0 +1,6 @@
+DIST espresso++-1.9.4.tar.gz 23954404 SHA256 dc08381259394a4bd076bfe9b4bd53d687911025258e3a17a473ada12e2e5e68 SHA512 0b5c8ad81c1d6b742909533c58cd791f1702270778f6f140e84108f0da8313418f7fa39d83de2e24f8308e887a1c41d2fcdd0a33ef505d08244a235f95fe611d WHIRLPOOL c56e1055f8edc46b3c80f1d511dc925e9821376033330998fa6ecc0bb8aedf90cd701241f12ab3420afa2198b5b6584458b829dc01fd3c68a5223faeb07e833d
+EBUILD espresso++-1.9.4.ebuild 1264 SHA256 4cebd91efe20f7e0a84668d6e47301b3e4f1fbf1bc12b07374459b9d741c9afd SHA512 8b43f473fb2120c85441f721df7a52d82a924ed88d51e8e97672e608edcfb37bb357807e49336a409c28363b9de86fe5f9fde5d909addc8eb7a23b847b5380e5 WHIRLPOOL 00e6ff741c094992983e773e1a6c295720272b20ac8cb1af050426acf0f3d32459eb70f938b0c940649c910191d2575027d04762850b82f499e7ac97b9e1f194
+EBUILD espresso++-9999.ebuild 1229 SHA256 554285eb3f13bbb99f9dcd080613ac8ab5f75b2bd83b1df735a8953191676bac SHA512 eb71b59603ddbf3c830b8b0ad1034b613a9a97552ad0d31e0cb67380f2b10b833d150054af363ebeb5474f4fff366af3a787c2f95fa25dc15b9173839a51302e WHIRLPOOL d940c996cdde66342c8b1c9979b188987f819e2a5bfa2db45d875c66b0830726c33bd46d1a104eb94dd55fea1897da31ba1a0914fb491baead570d4d22057cd8
+MISC ChangeLog 3961 SHA256 f248569576a2136b0ae3b225213c29f8e04754fe5db093e0befe10e36ab603be SHA512 cf9d30841a86e8a723280af53c754e298def9f06ade989d02532e6079e3bbcc670788e2d5e2c50863c7b5f34fc6baa618be9e819557c3ea02882008424d74818 WHIRLPOOL ab523e806e56c096d5914c890b1991ea60d8179d102f0df0a3553e419a83b15121f5878dcbf1c8b94d8a0e83fd8c49d0b454cb7926fd3c7743e80080ebfcc895
+MISC ChangeLog-2015 2106 SHA256 2bd78fdb806ec290676715a1f04a8705185d2106da089038bf4394f4239672e4 SHA512 f2777baca67fed7da85b694a83fc4145b370e18008c1ddf36aa117e5175024145abc0dea7ddc61815ae886c021732aa37a8f0b10e37c6b570c1ba5080b15d830 WHIRLPOOL 11f20e6fe915874e7efade77d74c93817b85d8f3075e2529e7cc4845c84b3d733b6ad3953350be197ebeea5afc3a19ef9b9d2ebfebdd1919538e70c2b9dba47f
+MISC metadata.xml 525 SHA256 c10fa9a9588b27d9206a237a8c2894ffd15efbd2793f7f0739174c099f6d5618 SHA512 62fa70b4fb5b56734c3ba8d47fa3940f3b3856a2f51941f2804daee53949142bbfd4cab9036ed10e0901284bd9bd15a03541d6927c1d4d89eb701f2efeb636ed WHIRLPOOL 3c7a4aadfec74d67d92a3b763693d3355321b72125b391e6f13f7bb88fbf35fcfa13d3326a205c740c3c3debc99a0e966bbc70e4d53517b53922963e879b9f1b
diff --git a/sci-physics/espresso++/espresso++-1.9.4.ebuild b/sci-physics/espresso++/espresso++-1.9.4.ebuild
new file mode 100644
index 000000000000..0a19919baf75
--- /dev/null
+++ b/sci-physics/espresso++/espresso++-1.9.4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils python-r1
+
+DESCRIPTION="A Modern Multiscale Simulation Package for Soft Matter Systems"
+HOMEPAGE="https://www.espresso-pp.de"
+
+MY_PN="${PN//+/p}"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ virtual/mpi
+ dev-libs/boost:=[python,mpi,${PYTHON_USEDEP}]
+ sci-libs/fftw:3.0
+ >=dev-python/mpi4py-2[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_configure() {
+ src_configure_internal() {
+ local mycmakeargs=(
+ -DEXTERNAL_BOOST=ON
+ -DEXTERNAL_MPI4PY=ON
+ -DWITH_RC_FILES=OFF
+ )
+ cmake-utils_src_configure
+ }
+ python_foreach_impl src_configure_internal
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}
diff --git a/sci-physics/espresso++/espresso++-9999.ebuild b/sci-physics/espresso++/espresso++-9999.ebuild
new file mode 100644
index 000000000000..2f9ecca51ed3
--- /dev/null
+++ b/sci-physics/espresso++/espresso++-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils python-r1
+
+DESCRIPTION="A Modern Multiscale Simulation Package for Soft Matter Systems"
+HOMEPAGE="https://www.espresso-pp.de"
+
+MY_PN="${PN//+/p}"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ virtual/mpi
+ dev-libs/boost:=[python,mpi,${PYTHON_USEDEP}]
+ sci-libs/fftw:3.0
+ dev-python/mpi4py[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ src_configure_internal() {
+ local mycmakeargs=(
+ -DEXTERNAL_BOOST=ON
+ -DEXTERNAL_MPI4PY=ON
+ -DWITH_RC_FILES=OFF
+ )
+ cmake-utils_src_configure
+ }
+ python_foreach_impl src_configure_internal
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}
diff --git a/sci-physics/espresso++/metadata.xml b/sci-physics/espresso++/metadata.xml
new file mode 100644
index 000000000000..1587252e7be8
--- /dev/null
+++ b/sci-physics/espresso++/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>junghans@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="bitbucket">espressopp/espressopp</remote-id>
+ <remote-id type="github">espressopp/espressopp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/espresso/Manifest b/sci-physics/espresso/Manifest
new file mode 100644
index 000000000000..99ebd343ae24
--- /dev/null
+++ b/sci-physics/espresso/Manifest
@@ -0,0 +1,7 @@
+AUX 1056.patch 8628 SHA256 6071e5fe0d9de38a29096d33d60e42dd6aa64d578406ef5f2ec20b51d562b531 SHA512 7ecdb067e10cdb7c7c8568cdda5d9520844eeff44e8914beafc03a2f0cf90f178c872f0c126264952e6b9d8c62b79d0ddb38c1a5121b8beea5bc23da5dad16f2 WHIRLPOOL 857a9159507db09eabf73081fcad7c4e57a407413751d85323b6851bd1eb23b50f0e604c63c01992ffb46a41dc9333ff903c189a1b32811813d17a11fe56bcea
+DIST espresso-4.0_pre20170228.tar.gz 23621395 SHA256 01e6770949db7bfad9dba3776a644dd0c0758e3781edf23363d7d2671ee14b01 SHA512 7d35648d447af3282a76d9d68cfe681734ec18794a38b09e0ae9233f63b62450c643643bcec999ea9c7d4ba070d4fc6f8dc64db8145f536ae017a67ff2d0e0e2 WHIRLPOOL 02ef0d937726a1abe3f8df4f19ed62008b69494304cf4d569d74936d834bcb20e4a0bd5d6edff009c74c8e16f6b14f9c794ff209c8e39e6d8eed785e5356d6d6
+EBUILD espresso-4.0_pre20170228.ebuild 2846 SHA256 7bd804306bd809b588c2626e739d15773583a1f04b29d7fc2b46daa87cd827c5 SHA512 0ee1f0c33564279084b8c86754252e8e1c1f319ddc3626f1a7fc8b18d77f0856da273c0047a28adabe9fd9f3118fe6635d3beabf2b24d5639be26d2bde0bd268 WHIRLPOOL 4792ef9f503b5d3660aea6b24ce2cba1d0ac6a916344ac46796c9d9be31385692e2f2c38f87e13a51acbc77b2f3c10ca595d6bc23e5839b2151c0363731ed253
+EBUILD espresso-9999.ebuild 3078 SHA256 55d78219202331da67de3f2ca03cb2dd7ab97f68ce31a778228f63f94b6ba650 SHA512 9ddc487b93d53cbd2c8f023023188cd7b8ab4707bcaf6db2072924a9a71140bd551e2799d6014b14dfc9d6d386d1fc4c760342f50241a207ec40c660e9e90bee WHIRLPOOL f78e1be4d5dad944bf3366a3676db75480a05bf147466c933dfb3c538018e7e082070b4984f969e9dd34b01e5a74deb5d059a072ddaea63b822d830579fe81a9
+MISC ChangeLog 3637 SHA256 6d274545de03efbd7e4a3359d7874f152b770223dceb7284642463bccd1fd178 SHA512 0a036149ff35a50efbd8f04679b5064e24b01da13553a27a2023fa6ae6465456059b5f456d14b965083fe4996dd62f8034a203238360787c556d21a1e25cbb27 WHIRLPOOL 8d92d018fc3e3f97d97b7cb90f0cf1591b302ee14ba4cab85243d8efb1ff5e6b0a6078ea66151778409457cf69e21812399d052c1af88b2ee12172585e03e208
+MISC ChangeLog-2015 3073 SHA256 85d2dbb4be6b1c43773018bf1b46d15b5c8e1853c239d565a6726e4645acb286 SHA512 79b253f94cfd62d3b28ba0065d7c075e36982fd2c0bce2ca0fa0d68c44fed6041fc236b4bb670710d77a15afc2db9bb69938457fb5fea1a82ce741214f4cff67 WHIRLPOOL aabd86033077a6f7b3ee4eb10920a4b637e663033b6efd1a095dea378e61f9b479930985ec62fa09be60747480b80a2f6aaba3063a526dc6a1eb96363ec69215
+MISC metadata.xml 660 SHA256 59f3c83d1ed106fbfe11b3260a9241ed826b5d1beb0b3091c0eb321aef89ffa0 SHA512 b5b17b0a3e228506ec545599e321c4ec12de4794653a750cfdab189c949abb0d9dde3fce3f35f7ac8e42050e4071764533eaf3254b0492bde4149c8b6f8192c8 WHIRLPOOL 8acaf93d734099a1b7808f99a5902de2c1b7e45fb63e21a7216d4fd25d57d4612ddd9f56c9095d09abd39a94b65f5dbff18a022f598a3bd4a5b6cd12f37ce3be
diff --git a/sci-physics/espresso/espresso-4.0_pre20170228.ebuild b/sci-physics/espresso/espresso-4.0_pre20170228.ebuild
new file mode 100644
index 000000000000..6177a3fe03f0
--- /dev/null
+++ b/sci-physics/espresso/espresso-4.0_pre20170228.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils python-single-r1 savedconfig
+
+DESCRIPTION="Extensible Simulation Package for Research on Soft matter"
+HOMEPAGE="http://espressomd.org"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/${PN}md/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ KEYWORDS=""
+else
+ inherit vcs-snapshot
+ COMMIT="8a021f5e8b1d508f356f4419d360bd9dfb7fec2c"
+ SRC_URI="https://github.com/${PN}md/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="cuda doc examples +fftw +hdf5 test"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >dev-python/cython-0.22[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
+ fftw? ( sci-libs/fftw:3.0 )
+ dev-libs/boost:=[mpi]
+ hdf5? ( sci-libs/hdf5:=[cxx] )"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen[dot]
+ dev-texlive/texlive-latexextra
+ virtual/latex-base )"
+
+DOCS=( AUTHORS NEWS README ChangeLog )
+
+PATCHES=( "${FILESDIR}"/1056.patch )
+
+src_prepare() {
+ use cuda && cuda_src_prepare
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DWITH_CUDA=$(usex cuda)
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DWITH_TESTS=$(usex test)
+ -DWITH_SCAFACOS=ON
+ -DINSTALL_PYPRESSO=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=$(usex !fftw)
+ -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=$(usex !hdf5)
+ -DCMAKE_SKIP_RPATH=YES
+ -DLIBDIR=$(get_libdir)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_make doxygen
+ [[ ${PV} = 9999 ]] && use doc && cmake-utils_src_make ug dg tutorials
+}
+
+src_install() {
+ local i docdir="${S}"
+
+ cmake-utils_src_install
+
+ insinto /usr/share/${PN}/
+ doins ${CMAKE_BUILD_DIR}/myconfig-sample.hpp
+
+ save_config ${CMAKE_BUILD_DIR}/src/core/myconfig-final.hpp
+
+ if use doc; then
+ [[ ${PV} = 9999 ]] && docdir="${CMAKE_BUILD_DIR}"
+ newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf
+ newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf
+ for i in "${docdir}/doc/tutorials/python"/*/[0-9]*.pdf; do
+ newdoc "${i}" "tutorial_${i##*/}"
+ done
+ dodoc -r ${CMAKE_BUILD_DIR}/doc/doxygen/html
+ fi
+
+ if use examples; then
+ insinto "/usr/share/${PN}/examples/"
+ doins -r samples/python/.
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "Please read and cite:"
+ elog "ESPResSo, Comput. Phys. Commun. 174(9) ,704, 2006."
+ elog "https://dx.doi.org/10.1016/j.cpc.2005.10.005"
+ echo
+ elog "If you need more features, change"
+ elog "/etc/portage/savedconfig/${CATEGORY}/${PF}"
+ elog "and reemerge with USE=savedconfig"
+ echo
+ elog "For a full feature list see:"
+ elog "/usr/share/${PN}/myconfig-sample.hpp"
+ echo
+}
diff --git a/sci-physics/espresso/espresso-9999.ebuild b/sci-physics/espresso/espresso-9999.ebuild
new file mode 100644
index 000000000000..b841b4d4bc56
--- /dev/null
+++ b/sci-physics/espresso/espresso-9999.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils python-single-r1 savedconfig
+
+DESCRIPTION="Extensible Simulation Package for Research on Soft matter"
+HOMEPAGE="http://espressomd.org"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/${PN}md/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="mirror://nongnu/${PN}md/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="cuda doc examples +fftw +hdf5 packages +python tcl test"
+
+REQUIRED_USE="
+ packages? ( tcl )
+ || ( python tcl )
+ ${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >dev-python/cython-0.22[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ tcl? ( dev-lang/tcl:0= )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
+ fftw? ( sci-libs/fftw:3.0 )
+ dev-libs/boost:=[mpi]
+ hdf5? ( sci-libs/hdf5:= )
+ packages? ( dev-tcltk/tcllib )"
+
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen[dot]
+ dev-texlive/texlive-latexextra
+ virtual/latex-base )"
+
+DOCS=( AUTHORS NEWS README ChangeLog )
+
+src_prepare() {
+ use cuda && cuda_src_prepare
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DWITH_CUDA=$(usex cuda)
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DWITH_PYTHON=$(usex python)
+ -DWITH_TCL=$(usex tcl)
+ -DWITH_TESTS=$(usex test)
+ -DWITH_SCAFACOS=ON
+ -DINSTALL_PYPRESSO=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=$(usex !fftw)
+ -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=$(usex !hdf5)
+ -DCMAKE_SKIP_RPATH=YES
+ -DLIBDIR=$(get_libdir)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_make doxygen
+ [[ ${PV} = 9999 ]] && use doc && cmake-utils_src_make ug dg tutorials
+}
+
+src_install() {
+ local i docdir="${S}"
+
+ cmake-utils_src_install
+
+ insinto /usr/share/${PN}/
+ doins ${CMAKE_BUILD_DIR}/myconfig-sample.hpp
+
+ save_config ${CMAKE_BUILD_DIR}/src/core/myconfig-final.hpp
+
+ if use doc; then
+ [[ ${PV} = 9999 ]] && docdir="${CMAKE_BUILD_DIR}"
+ newdoc "${docdir}"/doc/dg/dg.pdf developer_guide.pdf
+ newdoc "${docdir}"/doc/ug/ug.pdf user_guide.pdf
+ for j in $(usev python) $(usev tcl); do
+ for i in "${docdir}/doc/tutorials/${j}"/*/[0-9]*.pdf; do
+ newdoc "${i}" "${j}_tutorial_${i##*/}"
+ done
+ done
+ dodoc -r ${CMAKE_BUILD_DIR}/doc/doxygen/html
+ fi
+
+ if use examples; then
+ for i in $(usev python) $(usev tcl); do
+ insinto "/usr/share/${PN}/examples/${i}"
+ doins -r samples/${i}/.
+ done
+ fi
+
+ if use packages; then
+ insinto /usr/share/${PN}/packages
+ doins -r packages/*
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "Please read and cite:"
+ elog "ESPResSo, Comput. Phys. Commun. 174(9) ,704, 2006."
+ elog "https://dx.doi.org/10.1016/j.cpc.2005.10.005"
+ echo
+ elog "If you need more features, change"
+ elog "/etc/portage/savedconfig/${CATEGORY}/${PF}"
+ elog "and reemerge with USE=savedconfig"
+ echo
+ elog "For a full feature list see:"
+ elog "/usr/share/${PN}/myconfig-sample.hpp"
+ echo
+}
diff --git a/sci-physics/espresso/files/1056.patch b/sci-physics/espresso/files/1056.patch
new file mode 100644
index 000000000000..18a478e446b1
--- /dev/null
+++ b/sci-physics/espresso/files/1056.patch
@@ -0,0 +1,190 @@
+From d075cbaa80ce0b484c8422be27c5b5680f6abee4 Mon Sep 17 00:00:00 2001
+From: Christoph Junghans <junghans@votca.org>
+Date: Fri, 3 Mar 2017 16:05:45 -0700
+Subject: [PATCH] cmake: install all shared libs in back in libdir
+
+some libraries weren't installed and the python module path
+isn't in the LD_LIBRARY_PATH and hence partly revert
+80ad49e954f4a6590707fd86e4fd586682ad626d
+---
+ CMakeLists.txt | 4 ++++
+ src/core/CMakeLists.txt | 4 ++--
+ src/core/actor/CMakeLists.txt | 4 ++--
+ src/core/constraints/CMakeLists.txt | 1 +
+ src/core/correlators/CMakeLists.txt | 1 +
+ src/core/immersed_boundary/CMakeLists.txt | 4 ++--
+ src/core/object-in-fluid/CMakeLists.txt | 2 +-
+ src/core/observables/CMakeLists.txt | 1 +
+ src/core/scafacos/CMakeLists.txt | 2 +-
+ src/core/shapes/CMakeLists.txt | 1 +
+ src/core/utils/CMakeLists.txt | 1 +
+ src/script_interface/CMakeLists.txt | 1 +
+ 12 files changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cf49c40..7a8bc15 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -238,6 +238,10 @@ if (NOT DEFINED DATA)
+ set(DATA "share/espresso")
+ endif(NOT DEFINED DATA)
+
++if (NOT DEFINED LIBDIR)
++ set(LIBDIR "lib")
++endif(NOT DEFINED LIBDIR)
++
+ if (NOT DEFINED BINDIR)
+ set(BINDIR "bin")
+ endif(NOT DEFINED BINDIR)
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 9982a54..13bb052 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -23,7 +23,7 @@ add_custom_target(EspressoConfig DEPENDS config-features.hpp config-features.cpp
+ add_dependencies(EspressoConfig myconfig)
+
+ add_library(EspressoCore SHARED ${EspressoCore_SRC} config-features.cpp config-version.cpp)
+-install(TARGETS EspressoCore LIBRARY DESTINATION ${PYTHON_INSTDIR})
++install(TARGETS EspressoCore LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(EspressoCore EspressoConfig)
+
+ target_link_libraries(EspressoCore ${LIBRARIES} Actor ObjectInFluid ImmersedBoundary Shapes Constraints EspressoUtils Correlators Observables)
+@@ -43,7 +43,7 @@ if(CUDA)
+ cuda_include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+ cuda_add_library(EspressoCuda SHARED ${EspressoCuda_SRC})
+- install(TARGETS EspressoCuda DESTINATION ${PYTHON_INSTDIR})
++ install(TARGETS EspressoCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
+ add_dependencies(EspressoCuda EspressoConfig)
+
+ set_target_properties(EspressoCuda PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/actor/CMakeLists.txt b/src/core/actor/CMakeLists.txt
+index 0421243..1b5eafe 100644
+--- a/src/core/actor/CMakeLists.txt
++++ b/src/core/actor/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ file(GLOB Actor_SRC *.cpp)
+
+ add_library(Actor SHARED ${Actor_SRC})
+-install(TARGETS Actor LIBRARY DESTINATION ${PYTHON_INSTDIR} ARCHIVE DESTINATION ${PYTHON_INSTDIR})
++install(TARGETS Actor LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
+ add_dependencies(Actor EspressoConfig)
+
+ set_target_properties(Actor PROPERTIES MACOSX_RPATH TRUE)
+@@ -9,7 +9,7 @@ set_target_properties(Actor PROPERTIES MACOSX_RPATH TRUE)
+ if(CUDA)
+ file(GLOB ActorCuda_SRC *.cu)
+ cuda_add_library(ActorCuda SHARED ${ActorCuda_SRC})
+- install(TARGETS ActorCuda DESTINATION ${PYTHON_INSTDIR})
++ install(TARGETS ActorCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
+ add_dependencies(ActorCuda EspressoConfig)
+
+ add_dependencies(Actor ActorCuda)
+diff --git a/src/core/constraints/CMakeLists.txt b/src/core/constraints/CMakeLists.txt
+index 0f5c043..d07ad77 100644
+--- a/src/core/constraints/CMakeLists.txt
++++ b/src/core/constraints/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ file(GLOB Constraints_SRC Constraint.cpp)
+ add_library(Constraints SHARED ${Constraints_SRC})
++install(TARGETS Constraints LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(Constraints EspressoConfig)
+ set_target_properties(Constraints PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/correlators/CMakeLists.txt b/src/core/correlators/CMakeLists.txt
+index c5ff02f..fcc3611 100644
+--- a/src/core/correlators/CMakeLists.txt
++++ b/src/core/correlators/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ file(GLOB Correlators_SRC *.?pp)
+ add_library(Correlators SHARED ${Correlators_SRC})
++install(TARGETS Correlators LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(Correlators EspressoConfig)
+ set_target_properties(Correlators PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/immersed_boundary/CMakeLists.txt b/src/core/immersed_boundary/CMakeLists.txt
+index ec7fb85..8e7285f 100644
+--- a/src/core/immersed_boundary/CMakeLists.txt
++++ b/src/core/immersed_boundary/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ file(GLOB ImmersedBoundary_SRC *.cpp)
+ add_library(ImmersedBoundary SHARED ${ImmersedBoundary_SRC})
+ set_target_properties(ImmersedBoundary PROPERTIES MACOSX_RPATH TRUE)
+-install(TARGETS ImmersedBoundary LIBRARY DESTINATION ${PYTHON_INSTDIR} ARCHIVE DESTINATION ${PYTHON_INSTDIR})
++install(TARGETS ImmersedBoundary LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
+ add_dependencies(ImmersedBoundary EspressoConfig)
+
+ if(CUDA)
+ file(GLOB ImmersedBoundaryCuda_SRC *.cu)
+ cuda_add_library(ImmersedBoundaryCuda SHARED ${ImmersedBoundaryCuda_SRC})
+- install(TARGETS ImmersedBoundaryCuda DESTINATION ${PYTHON_INSTDIR})
++ install(TARGETS ImmersedBoundaryCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
+ add_dependencies(ImmersedBoundaryCuda EspressoConfig)
+
+ set_target_properties(ImmersedBoundaryCuda PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/object-in-fluid/CMakeLists.txt b/src/core/object-in-fluid/CMakeLists.txt
+index 7154486..c25228a 100644
+--- a/src/core/object-in-fluid/CMakeLists.txt
++++ b/src/core/object-in-fluid/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ file(GLOB ObjectInFluid_SRC *.cpp)
+ add_library(ObjectInFluid SHARED ${ObjectInFluid_SRC})
+-install(TARGETS ObjectInFluid LIBRARY DESTINATION ${PYTHON_INSTDIR} ARCHIVE DESTINATION ${PYTHON_INSTDIR})
++install(TARGETS ObjectInFluid LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
+ add_dependencies(ObjectInFluid EspressoConfig)
+ set_target_properties(ObjectInFluid PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/observables/CMakeLists.txt b/src/core/observables/CMakeLists.txt
+index 9813d86..51ab79d 100644
+--- a/src/core/observables/CMakeLists.txt
++++ b/src/core/observables/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ file(GLOB Observables_SRC *.?pp)
+ add_library(Observables SHARED ${Observables_SRC})
++install(TARGETS Observables LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(Observables EspressoConfig)
+ set_target_properties(Observables PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/scafacos/CMakeLists.txt b/src/core/scafacos/CMakeLists.txt
+index 1479683..3028ca0 100644
+--- a/src/core/scafacos/CMakeLists.txt
++++ b/src/core/scafacos/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_directories(${SCAFACOS_INCLUDE_DIRS})
+
+ file(GLOB Scafacos_SRC *.cpp)
+ add_library(Scafacos SHARED ${Scafacos_SRC})
+-install(TARGETS Scafacos DESTINATION ${PYTHON_INSTDIR})
++install(TARGETS Scafacos DESTINATION ${PYTHON_INSTDIR}/espressomd)
+ add_dependencies(Scafacos EspressoConfig)
+
+ target_link_libraries(Scafacos ${SCAFACOS_LDFLAGS})
+diff --git a/src/core/shapes/CMakeLists.txt b/src/core/shapes/CMakeLists.txt
+index 0e5ecaa..5be3a9d 100644
+--- a/src/core/shapes/CMakeLists.txt
++++ b/src/core/shapes/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ file(GLOB Shapes_SRC *.cpp)
+ add_library(Shapes SHARED ${Shapes_SRC})
++install(TARGETS Shapes LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(Shapes EspressoConfig)
+ set_target_properties(Shapes PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/core/utils/CMakeLists.txt b/src/core/utils/CMakeLists.txt
+index ec0f6f7..4cd8ada 100644
+--- a/src/core/utils/CMakeLists.txt
++++ b/src/core/utils/CMakeLists.txt
+@@ -1,3 +1,4 @@
+ file(GLOB EspressoUtils_SRC *.cpp)
+ add_library(EspressoUtils SHARED ${EspressoUtils_SRC})
++install(TARGETS EspressoUtils LIBRARY DESTINATION ${LIBDIR})
+ set_target_properties(EspressoUtils PROPERTIES MACOSX_RPATH TRUE)
+diff --git a/src/script_interface/CMakeLists.txt b/src/script_interface/CMakeLists.txt
+index 8aff034..59c1c9d 100644
+--- a/src/script_interface/CMakeLists.txt
++++ b/src/script_interface/CMakeLists.txt
+@@ -28,6 +28,7 @@ if(H5MD)
+ )
+ endif(H5MD)
+ add_library(EspressoScriptInterface SHARED ${EspressoScriptInterface_SRC})
++install(TARGETS EspressoScriptInterface LIBRARY DESTINATION ${LIBDIR})
+ add_dependencies(EspressoScriptInterface EspressoConfig EspressoConfig)
+ set_target_properties(EspressoScriptInterface PROPERTIES MACOSX_RPATH TRUE)
+ target_link_libraries(EspressoScriptInterface EspressoCore)
+--
+2.10.2
+
diff --git a/sci-physics/espresso/metadata.xml b/sci-physics/espresso/metadata.xml
new file mode 100644
index 000000000000..f162adc22dc1
--- /dev/null
+++ b/sci-physics/espresso/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>junghans@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <use>
+ <flag name="cuda">Enable cuda support</flag>
+ <flag name="examples">Installs the examples</flag>
+ <flag name="packages">Installs extra TCL subpackages</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">espressomd/espresso</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/fastjet/Manifest b/sci-physics/fastjet/Manifest
new file mode 100644
index 000000000000..b1c9bdfd04ff
--- /dev/null
+++ b/sci-physics/fastjet/Manifest
@@ -0,0 +1,9 @@
+AUX fastjet-3.0.3-system-siscone.patch 4191 SHA256 57d1bc7d85d2dbc0fe4d8b38727562db8a8758c6b33bc3cc2d4363d263f63a5d SHA512 34ba5e61364f9fe090389edbeda4370b2707e89fab2a00e941cabe496f8e7cdd65fb1fccdb48f000247b0e6bb3abc79bb995931fd4a9709584eed8eaab42957c WHIRLPOOL 217436144a424196b96f5d123ea00c9be8a5a4c44011e6605208198e64430ecbd737e8dfe4ba327b58c234551fa9308220e7fac5d71b9d36bb58b727a0e34d21
+AUX fastjet-3.0.6-system-siscone.patch 3726 SHA256 10f150979e7f1f06c71d57b22d6161332ebddbef20e0ce1caa7787e512e72125 SHA512 7522e3fd0fe789bc5b3172c2c26566136004b828a46a81fb0ec39bb6bedbf358efc0b51acab8cb19a40dd5b4138190f87655ddd2679cc91c819f5c7c9e9f4c57 WHIRLPOOL 3a45e02c436eba0314ca5a6e6a589afd042f083ffbbeb13f3c2317b540333c33b1a8d021adaab7e68aee8f3c7d1f5bf1313bcc24aaa6f51c06e5ddec04f5d0f7
+DIST fastjet-3.0.3.tar.gz 2240610 SHA256 6a3e5869cf43b325c7222a925e195b2bd624db922958a926cb4211c00882a50d SHA512 1fcdd0998d222ae089f10676ae1048fdce3e90f6aef3cd51463719b7ab26f8bcdd599d9521c6f9ef18e3989dbffd7f06da717ce845ab7e486a99433129b56f41 WHIRLPOOL b43091b978bde5189ed009ad424934d45607717bfc81e4d0b49c1ce634650bbf9e51019c7bfb0f6ce6298a697e6c8be296feaae1ac31bd2184e44b53a538ba48
+DIST fastjet-3.0.6.tar.gz 2216501 SHA256 9718f1d014afe4433bc0612a67a050d720c486fcfa7ad9c9b96bf087b0f3da0b SHA512 1f01b7ed0e07bd94c88faa123f72c2e3bcd81ad32ab4d03dc0a18dd18635f3b18ba8d339176b0ef1d6e58cecd9f37aaea30b4ad909d2782ce5be7c11e205c3a5 WHIRLPOOL 8c1aeab2724940e41ca6eed093582d6d9a5424b7f2b86af00bd7e1fedd3df0157538c6d97ff08147a4e3a5300d035d683df31b4a7a9d36bc9c14eca9375ae1e1
+EBUILD fastjet-3.0.3-r1.ebuild 1236 SHA256 1625bdf20e2085ba255130295b61232770ac7bf9fc51d5113a98a42786ee748e SHA512 525a1a10764428f12d3fc6a0f89251f9d5396e5a1cd3252c15373d80466e605c59faedb8a20a0d280a4f2bc11e3d53cc58ebc11b7667089263efefd8e52c64b1 WHIRLPOOL bd7e8470f6cb521c9465225680100e37342f701ed0d5a5d41e8e179d4f79d3bc432a52e56b591d1528dd1e9a96116c16517ff28704e4574f7d04dafe8e7faadf
+EBUILD fastjet-3.0.6-r1.ebuild 1240 SHA256 eafa5722af123c090884a980257ceeded52acb3f07ca287e01435358ecb7ffb8 SHA512 36b884732b7fcc2467cb383decdc285b8cc23802da1a000f6e7942a5faad5c32e36f9886847e4baabbc39c540042ebcdb7dbdc4fa916af9a68dd670974e7b33a WHIRLPOOL 9c2a72b98e98c487c07d9104e2db981bb3aeb5d01da6b0b09942672ddf5ca590ae596a7a4a33f4c414c59df8d30dccaaa7f91f4cf323c60dd8acc381e9c73c79
+MISC ChangeLog 2582 SHA256 c84541147fe75c8c6efaf3e918e01fddee3d4825057ba682ec71cee752f342f3 SHA512 42d49bd78b9562f66e8e036432414bfb651c94df7e4ca80edfbeb58e0398b00d60e3df5e11403a0c13b42d690ddf700e0d72f6d375906d069caa16622b63545b WHIRLPOOL bde93b60fdfef21595ff1d4fc2456c907b5ba0be9fda7eb801b9a5257329977eb5f920b7444af89800e2fd70533d09e25e414d92be3a36268db1dde58a576273
+MISC ChangeLog-2015 2175 SHA256 64bb1e7d93c42de38d896c41046a5d0be2caac69f26cd454288e044df5244c9e SHA512 106962af37f72ee1cdc092edb62a0873dbb7a454bd1dfe8b11f973e8a52d6b8e2d2ac7c3003e087d1cbc60fbe9737d7c2c717f2168e470258b8b19e79b1df9c1 WHIRLPOOL 47bd675e4f27cba65c815e2fd66631cdf80427fc98fdc35c40ab1f0f9693c0440e18ee44c3494c59a4b4df29d083c31c9c3421300009b636f7059e5005cd75af
+MISC metadata.xml 846 SHA256 20a5d280b3f1fa7d3d9eadeed95a9abc19f2c513a0b4f7616e8ac24fef7acee2 SHA512 7a785ebae9232cef55c62ada47e4ec87507b6e4c7115f928fa3260474e67f56db336f7698833fe995d4f046b7013c88f62faf71758a881a86c982fe60a92c40a WHIRLPOOL 22a351a0976b9abc2fac3dced2c312021c0c6b65f3a2218e43c8e4c5ee8ca9c89e5b27016d80c5ad1a434079828b14d93f3bb26d61eebbdcf5fb7861ddc3a03c
diff --git a/sci-physics/fastjet/fastjet-3.0.3-r1.ebuild b/sci-physics/fastjet/fastjet-3.0.3-r1.ebuild
new file mode 100644
index 000000000000..a17324679e4d
--- /dev/null
+++ b/sci-physics/fastjet/fastjet-3.0.3-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+
+FORTRAN_NEEDED=plugins
+
+inherit autotools-utils fortran-2 flag-o-matic
+
+DESCRIPTION="Fast implementation of several recombination jet algorithms"
+HOMEPAGE="http://www.fastjet.fr/"
+SRC_URI="${HOMEPAGE}/repo/${P}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cgal doc examples +plugins static-libs"
+
+RDEPEND="cgal? ( sci-mathematics/cgal )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )
+ plugins? ( sci-physics/siscone )"
+
+PATCHES=( "${FILESDIR}"/${P}-system-siscone.patch )
+
+src_configure() {
+ use cgal && has_version sci-mathematics/cgal[gmp] && append-ldflags -lgmp
+ local myeconfargs=(
+ $(use_enable cgal)
+ $(use_enable plugins allplugins)
+ $(use_enable plugins allcxxplugins)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use doc; then
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml -r html/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ find example \
+ -name Makefile -or Makefile.in -or Makefile.am -delete
+ doins -r example/*
+ fi
+}
diff --git a/sci-physics/fastjet/fastjet-3.0.6-r1.ebuild b/sci-physics/fastjet/fastjet-3.0.6-r1.ebuild
new file mode 100644
index 000000000000..43aa5d3d01d9
--- /dev/null
+++ b/sci-physics/fastjet/fastjet-3.0.6-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+FORTRAN_NEEDED=plugins
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils fortran-2 flag-o-matic
+
+DESCRIPTION="Fast implementation of several recombination jet algorithms"
+HOMEPAGE="http://www.fastjet.fr/"
+SRC_URI="${HOMEPAGE}/repo/${P}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cgal doc examples +plugins static-libs"
+
+RDEPEND="cgal? ( sci-mathematics/cgal )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )
+ plugins? ( sci-physics/siscone:0= )"
+
+PATCHES=( "${FILESDIR}"/${P}-system-siscone.patch )
+
+src_configure() {
+ use cgal && \
+ has_version sci-mathematics/cgal[gmp] && append-ldflags -lgmp
+ local myeconfargs=(
+ $(use_enable cgal)
+ $(use_enable plugins allplugins)
+ $(use_enable plugins allcxxplugins)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use doc; then
+ doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml -r html/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ find example \
+ -name Makefile -or Makefile.in -or Makefile.am -delete
+ doins -r example/*
+ fi
+}
diff --git a/sci-physics/fastjet/files/fastjet-3.0.3-system-siscone.patch b/sci-physics/fastjet/files/fastjet-3.0.3-system-siscone.patch
new file mode 100644
index 000000000000..b74b8e4e9033
--- /dev/null
+++ b/sci-physics/fastjet/files/fastjet-3.0.3-system-siscone.patch
@@ -0,0 +1,83 @@
+diff -Nur fastjet-3.0.3.orig/configure.ac fastjet-3.0.3/configure.ac
+--- fastjet-3.0.3.orig/configure.ac 2012-06-25 15:15:32.000000000 +0100
++++ fastjet-3.0.3/configure.ac 2012-07-24 18:39:11.000000000 +0100
+@@ -14,7 +14,7 @@
+ dnl - the first macro needs to place the files in the correct
+ dnl dir in order to have the correct -I options for the remote build
+ dnl - see Makefile.am for distcleaning AX_PREFIX_CONFIG_H leftovers
+-AM_CONFIG_HEADER(include/fastjet/config_raw.h:config.h.in)
++AC_CONFIG_HEADERS(include/fastjet/config_raw.h:config.h.in)
+ AX_PREFIX_CONFIG_H(include/fastjet/config_auto.h,FASTJET,include/fastjet/config_raw.h)
+
+ dnl check autoconf version
+@@ -252,6 +252,12 @@
+ fi
+
+ dnl SISCone
++AC_ARG_WITH(bundle-siscone,
++ [ --with-bundle-siscone Build the bundled SISCone library [default=no]],
++ [bundle_siscone=$withval],
++ [bundle_siscone=no])
++AM_CONDITIONAL(BUNDLE_SISCONE, test x$bundle_siscone != xno)
++
+ ACX_CHECK_PLUGIN(SISCone, siscone, SISCONE, yes,
+ [CONFIG_LIBS_PLUGINS=${CONFIG_LIBS_PLUGINS}" -lsiscone_spherical -lsiscone"
+ CONFIG_LIBS_PLUGINS_STATIC=${CONFIG_LIBS_PLUGINS_STATIC}" \${installationdir}/lib/libsiscone.a \${installationdir}/lib/libsiscone_spherical.a"])
+diff -Nur fastjet-3.0.3.orig/example/Makefile.am fastjet-3.0.3/example/Makefile.am
+--- fastjet-3.0.3.orig/example/Makefile.am 2012-06-13 15:14:58.000000000 +0100
++++ fastjet-3.0.3/example/Makefile.am 2012-07-24 18:26:15.000000000 +0100
+@@ -43,7 +43,7 @@
+ 03_plugin_CXXFLAGS = $(AM_CXXFLAGS) $(CGAL_CPPFLAGS) -I$(srcdir)/../include
+ 03_plugin_LDADD = ../src/libfastjet.la $(CGAL_LIBS)
+ 03_plugin_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-03_plugin_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++03_plugin_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ else
+ EXTRA_DIST += 03-plugin.cc
+ endif
+@@ -125,7 +125,7 @@
+ fastjet_areas_LDADD = ../src/libfastjet.la $(CGAL_LIBS)
+ if BUILD_PLUGIN_SISCONE
+ fastjet_areas_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-fastjet_areas_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++fastjet_areas_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ endif
+
+ fastjet_timing_plugins_SOURCES = fastjet_timing_plugins.cc CmdLine.cc
+@@ -135,7 +135,7 @@
+ fastjet_timing_plugins_LDADD += ../tools/libfastjettools.la
+ if BUILD_PLUGIN_SISCONE
+ fastjet_timing_plugins_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-fastjet_timing_plugins_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++fastjet_timing_plugins_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ endif
+ if BUILD_PLUGIN_CDFCONES
+ fastjet_timing_plugins_CXXFLAGS += -I$(srcdir)/../plugins/CDFCones
+diff -Nur fastjet-3.0.3.orig/plugins/SISCone/Makefile.am fastjet-3.0.3/plugins/SISCone/Makefile.am
+--- fastjet-3.0.3.orig/plugins/SISCone/Makefile.am 2012-06-13 15:14:51.000000000 +0100
++++ fastjet-3.0.3/plugins/SISCone/Makefile.am 2012-07-24 18:36:56.000000000 +0100
+@@ -1,11 +1,22 @@
+-SUBDIRS = siscone fastjet .
++SUBDIRS = fastjet .
+
+ if MONOLITHIC_PLUGINS
+ noinst_LTLIBRARIES = libSISConePlugin.la
+ else
+ lib_LTLIBRARIES = libSISConePlugin.la
+ endif
+-libSISConePlugin_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir) -I$(srcdir)/siscone -I$(srcdir)/../../include
++libSISConePlugin_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir) -I$(srcdir)/../../include
++
++if BUNDLE_SISCONE
++SUBDIRS += siscone
++libSISConePlugin_la_CXXFLAGS += -I$(srcdir)/siscone
++libSISConePlugin_la_LIBADD = \
++ $(top_builddir)/plugins/SISCone/siscone/siscone/libsiscone.la \
++ $(top_builddir)/plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++else
++libSISConePlugin_la_LIBADD = -lsiscone -lsiscone_spherical
++endif
++
+ libSISConePlugin_la_SOURCES = SISConePlugin.cc SISConeSphericalPlugin.cc
+
+ EXTRA_DIST = makefile.static
diff --git a/sci-physics/fastjet/files/fastjet-3.0.6-system-siscone.patch b/sci-physics/fastjet/files/fastjet-3.0.6-system-siscone.patch
new file mode 100644
index 000000000000..d3995473fe54
--- /dev/null
+++ b/sci-physics/fastjet/files/fastjet-3.0.6-system-siscone.patch
@@ -0,0 +1,74 @@
+diff -Nur fastjet-3.0.6.orig/configure.ac fastjet-3.0.6/configure.ac
+--- fastjet-3.0.6.orig/configure.ac 2014-05-06 10:29:55.240632504 -0700
++++ fastjet-3.0.6/configure.ac 2014-05-06 10:36:20.156246416 -0700
+@@ -261,6 +261,12 @@
+ fi
+
+ dnl SISCone
++AC_ARG_WITH(bundle-siscone,
++ [ --with-bundle-siscone Build the bundled SISCone library [default=no]],
++ [bundle_siscone=$withval],
++ [bundle_siscone=no])
++AM_CONDITIONAL(BUNDLE_SISCONE, test x$bundle_siscone != xno)
++
+ ACX_CHECK_PLUGIN(SISCone, siscone, SISCONE, yes,
+ [CONFIG_LIBS_PLUGINS=${CONFIG_LIBS_PLUGINS}" -lsiscone_spherical -lsiscone"
+ CONFIG_LIBS_PLUGINS_STATIC=${CONFIG_LIBS_PLUGINS_STATIC}" \${installationdir}/lib/libsiscone.a \${installationdir}/lib/libsiscone_spherical.a"])
+diff -Nur fastjet-3.0.6.orig/example/Makefile.am fastjet-3.0.6/example/Makefile.am
+--- fastjet-3.0.6.orig/example/Makefile.am 2014-05-06 10:29:55.239632499 -0700
++++ fastjet-3.0.6/example/Makefile.am 2014-05-06 10:36:20.156246416 -0700
+@@ -43,7 +43,7 @@
+ 03_plugin_CXXFLAGS = $(AM_CXXFLAGS) $(CGAL_CPPFLAGS) -I$(srcdir)/../include
+ 03_plugin_LDADD = ../src/libfastjet.la $(CGAL_LIBS)
+ 03_plugin_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-03_plugin_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++03_plugin_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ else
+ EXTRA_DIST += 03-plugin.cc
+ endif
+@@ -125,7 +125,7 @@
+ fastjet_areas_LDADD = ../src/libfastjet.la $(CGAL_LIBS)
+ if BUILD_PLUGIN_SISCONE
+ fastjet_areas_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-fastjet_areas_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++fastjet_areas_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ endif
+
+ fastjet_timing_plugins_SOURCES = fastjet_timing_plugins.cc CmdLine.cc
+@@ -135,7 +135,7 @@
+ fastjet_timing_plugins_LDADD += ../tools/libfastjettools.la
+ if BUILD_PLUGIN_SISCONE
+ fastjet_timing_plugins_CXXFLAGS += -I$(srcdir)/../plugins/SISCone -I$(srcdir)/../plugins/SISCone/siscone
+-fastjet_timing_plugins_LDADD += ../plugins/SISCone/libSISConePlugin.la ../plugins/SISCone/siscone/siscone/libsiscone.la ../plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++fastjet_timing_plugins_LDADD += ../plugins/SISCone/libSISConePlugin.la
+ endif
+ if BUILD_PLUGIN_CDFCONES
+ fastjet_timing_plugins_CXXFLAGS += -I$(srcdir)/../plugins/CDFCones
+diff -Nur fastjet-3.0.6.orig/plugins/SISCone/Makefile.am fastjet-3.0.6/plugins/SISCone/Makefile.am
+--- fastjet-3.0.6.orig/plugins/SISCone/Makefile.am 2014-05-06 10:29:55.250632584 -0700
++++ fastjet-3.0.6/plugins/SISCone/Makefile.am 2014-05-06 10:36:20.156246416 -0700
+@@ -1,11 +1,22 @@
+-SUBDIRS = siscone fastjet .
++SUBDIRS = fastjet .
+
+ if MONOLITHIC_PLUGINS
+ noinst_LTLIBRARIES = libSISConePlugin.la
+ else
+ lib_LTLIBRARIES = libSISConePlugin.la
+ endif
+-libSISConePlugin_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir) -I$(srcdir)/siscone -I$(srcdir)/../../include
++libSISConePlugin_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir) -I$(srcdir)/../../include
++
++if BUNDLE_SISCONE
++SUBDIRS += siscone
++libSISConePlugin_la_CXXFLAGS += -I$(srcdir)/siscone
++libSISConePlugin_la_LIBADD = \
++ $(top_builddir)/plugins/SISCone/siscone/siscone/libsiscone.la \
++ $(top_builddir)/plugins/SISCone/siscone/siscone/spherical/libsiscone_spherical.la
++else
++libSISConePlugin_la_LIBADD = -lsiscone -lsiscone_spherical
++endif
++
+ libSISConePlugin_la_SOURCES = SISConePlugin.cc SISConeSphericalPlugin.cc
+
+ EXTRA_DIST = makefile.static
diff --git a/sci-physics/fastjet/metadata.xml b/sci-physics/fastjet/metadata.xml
new file mode 100644
index 000000000000..d4c5f71dd1d3
--- /dev/null
+++ b/sci-physics/fastjet/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ The FastJet package provides a fast implementation of the
+ longitudinally invariant kt longitudinally invariant inclusive
+ Cambridge/Aachen and anti-kt jet finders and a uniform interface
+ to external jet finders (notably SISCone) via a plugin
+ mechanism. It also includes tools for calculating jet areas and
+ performing background (pileup/UE) subtraction.
+</longdescription>
+<use>
+ <flag name="plugins"> Build all standard and C++ plugins </flag>
+ <flag name="cgal"> Use <pkg>sci-mathematics/cgal</pkg> instead of
+ bundled algorithms</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-physics/geant-data/Manifest b/sci-physics/geant-data/Manifest
new file mode 100644
index 000000000000..5b35784c4d5d
--- /dev/null
+++ b/sci-physics/geant-data/Manifest
@@ -0,0 +1,38 @@
+DIST G4ABLA.3.0.tar.gz 54909 SHA256 ff0b77be6b36204eeeba71099f6b7530edd80b79eb015994535bc4334bc821eb SHA512 905a56c142793de005dc5771509cdd8c4f98e596b95223a1a058cbf614cf48805478839eeec3a29594daf3d89c6b4d72cb33b016a596cdadc4247e452afbd526 WHIRLPOOL daa65dd65160cfa62b1a7b747702cc6cf41230f95b406e2e5e18a743524647842639e8c76906334671d00860b88139f4812c811307803bdc4260468b4c6703cb
+DIST G4EMLOW.6.32.tar.gz 17724068 SHA256 bdb3c00af89b18c21553d79fd823110429fdcf1e83c029aa450185d9caf4a7cf SHA512 c1abc0f5e69cd29f5d3885e672937cfe4ff7ec1a37847e6def6e3dd80ba120bb10cfdd80ccfeadc9ed2c37423a87a185ef2b70f78716c8b40a48277a5c0e65fb WHIRLPOOL 5bcb17be16eddd474a3c96f305a968422ca11075683065c3bc3442289fde6b386f04552dbba4d2635ecabd86a79e558b559f0e7aab20960b1774c24291247231
+DIST G4EMLOW.6.35.tar.gz 19092577 SHA256 1564045a0acad344c8d432cd48c2c3bb2e051a81ab3099a84e0f56ba0fe82cec SHA512 106bd9de3a3b729629341f6e3b18bce3ee61239fe7bcf543da5d456a4db9a835a781b64b3b56d1a43e449e41f2d9447f17d3fbbd6006772333237d7f7b7012ab WHIRLPOOL 1cbabfe8195d3e0f477309a1a2579151bb2b39e1b145a0052fcfcff7099fd59e23a588c677f501a181b84aa35ef34a8620076b60124e8167bb68fd824efbbf9e
+DIST G4EMLOW.6.41.tar.gz 19955388 SHA256 6d878b18bf5e748e9d0ea35ef67eebab16df80cc912402986a03a5e1935f4af2 SHA512 4e146ec71efeca63569bc5522f885ba77e3a3b472b2ca7c1a7bcfb6247838b42d6937eccf7f94c899fafa52ffc8cf233fb924684b3fa7c6a3f11ddbca0a03a6b WHIRLPOOL 6ba8d59067da74b5d6a8c286cf7e3cb9f8dfd700356dfa7fedffcc3500eefef0f5c68dac293e2450d63a8946d7a10a6c39a3d343018ea4feacc75a902c84e28b
+DIST G4EMLOW.6.48.tar.gz 25371256 SHA256 9815be88cbbcc4e8855b20244d586552a8b1819b8bf4e538c342b27c17dff1c7 SHA512 2671c3d19a5e6ce2aca087a481ccf2f0e6aa20fe629f254a9db82c549d0f4aa84a6396a8ee23f860466713e39f9c4922afeb79e96b90659b5ab775e3db900cf1 WHIRLPOOL 801ab96152d3ba315e703612f125e9808efb5879a5ede7885f8929ad4871dfedce9427ef03681e4f236eec03b0a7b93c03e05e424e86933c0feba4340a18e76d
+DIST G4EMLOW.6.50.tar.gz 28334495 SHA256 c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236 SHA512 587b6103b44ade27d5715eb804bfc172989cef63ca9a01e7454ff07140db85bb10083c036441905b6bbd5f04d373f51a73dc4bf7f7712c0314da1155406d8588 WHIRLPOOL 56018797b55ca8121aa14863f596a9a0c43b5ace8f81d03977266042bfcb02f2cec809fe0bc4c02e24b43ca8f1c765dc2df0f0af7293b41a2734561486806bc6
+DIST G4ENSDFSTATE.1.0.tar.gz 234612 SHA256 4562e7476aa2df7204a1a77263e9d2331e9ffcdb591d11814dcc2d6b605021dd SHA512 ac3f4c4206976e4bbae93f81faca6bd2ce3d86fc10470abe3a06de2b5df58cdb110f4ab4988bfa16d1671759804874977b4feb4cc5bb0930e03c0db1b4c0a112 WHIRLPOOL 0ef5c0355f3f01faaa8ab1ce5e0dcba4cae7218817441cf7831517f419860584f6fc9d60daf74d5cb09b27e0abdf4a0ad2263cef0bb2b9d35ef34d9c0d1d7a36
+DIST G4ENSDFSTATE.1.2.tar.gz 261296 SHA256 8944283285a66080d02bab5e1ad998711b584f4658e989dd3cf2726cd91a9015 SHA512 f50574f9c15720d175b67408baca75179c519ca48877820e8f4c443df0c1fe5c835b61992e9521e9b0dfad5342040d45396c63c31bb07c932a71e9bfa7865ac4 WHIRLPOOL abe2149b8490edecd24531924af9b804b407db72a2b29753781b02cc729876f3b50e1dba58010c7e0a6829e8c3762f4345e6bd68f34946a56e84dada1f390fc4
+DIST G4ENSDFSTATE.2.1.tar.gz 290690 SHA256 933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9 SHA512 8e56a00bd5e3956de10931f8b702c614e84471e0f2fa65fe81d44a6a28719ed65d9b61e5ebd6216f35a044ad6c6f430c761a52703f72eab0c1fe99e794a8e284 WHIRLPOOL 672ed204945652574a8300c8f1aa8c36e80ee3c8e53d66181f12fdc10ee3cdb63bb2e7fdf56a7227c18d9fa363ccfceb3095f93f4290c022bf8b3afdece4bdb8
+DIST G4NDL.4.2.tar.gz 303309551 SHA256 173f60a506b9176d7ff531d6a5f6195dcec74df30ffafc09644f47f979bd641b SHA512 64397c38afbca4365dfed6898220a6946f00f86c5f52ad23b3d10d0ce79504b74ac653ea398f21e1724e4370573f23a62c016490cfed26cc70745a82d9beb7c0 WHIRLPOOL 1c50cd2cf258aeb8a5d029d945eb5dcdb84399012fd693c44fcb98e2d7f4381717138e6a31919235eea268fcf54072c973858040e7e6968764d3036c84090fe7
+DIST G4NDL.4.4.tar.gz 421555304 SHA256 e9fe8800566a83ccaf9b5229a1fa1d2cd24530bbd2e9fcb96eb6b5b117233071 SHA512 25a26411bf6430e90ec5b8098d12259a60bf688728ef9b97afda66002d8f479dadf9ce8c16c4cfd8068da173d492f7667748802690eb29787e9388c1773c8ade WHIRLPOOL 0575033751e881d8ba8ae04ba06d1c788b89ee3c294b8543da817096e1782e82cff9a5b794096694eaa743411bc695d94353ad0ee3f5f1781a1bd2d3753b4557
+DIST G4NDL.4.5.tar.gz 421710294 SHA256 cba928a520a788f2bc8229c7ef57f83d0934bb0c6a18c31ef05ef4865edcdf8e SHA512 166d0189693f14c08fa9c48e4212c1cb275a848fdf0be3dfc4240bd01d1d4816f3ec3c85149995192e7055b58fd56c7e078e9d6819e01fdeafc13457bfa90470 WHIRLPOOL 0eaed7d62b513cc3381c811d282619aebb01e4777c922d89208d58f7b6ec666a398359d983f9cbbd8b6ede53399f7d24b2d7ebac3f1973fc1d1a07d04b4e52cb
+DIST G4NDL4.2.TS.tar.gz 128939542 SHA256 641972c6001fc8f7d4d55e428cf9237e9ae0e44ab0c4940dfbb05e657a8b9851 SHA512 8466b3bb9a604460ba713847dc59bae7cbc5af8204754eb8d46f83bc40e9bb6afff17433bb96fb76f17b4633c6dab6af88e49d30916a1b0bca18f705c18c6779 WHIRLPOOL 3074ad131888eec9e0dfd4fa018d9504437129e0a5b59df09e161970a69b6af9121ba2ac25aca1203d99b8faf831cb60dd90e217c320efd203032639d4e2fa10
+DIST G4NEUTRONXS.1.2.tar.gz 2221211 SHA256 9ce488505b4c3623e2d98209f708a30e3f213a1371a9110d289257a02b2d7d5c SHA512 94a71e7865c0dd4eab7b477d2cd115b3a90fd3528e7807e5ef85651e1add82b1478753c3382437b22b0ec2e774a12d2af942dffaca6c944229553b240a1594bb WHIRLPOOL 2250323bd915963b5efd92c02a946025d367d3530750b5240cbe1338b253f1dea3467b8c8cd16a9a20b70c9654005ae239863d5cfbd78dd6700b5ff17da209fc
+DIST G4NEUTRONXS.1.4.tar.gz 2249001 SHA256 57b38868d7eb060ddd65b26283402d4f161db76ed2169437c266105cca73a8fd SHA512 f0de306e35d0cacc77fcea4d233077247afa172413a69ef1255e47fd250e36460c38c47265dbc81499dd47c0aca7266c5299cb5c0cabef04684b796ba890f944 WHIRLPOOL 17426f0e690768f789fe9409c01c2b23689745f9a6bef85e825ec25de4b0e166bb93729c174c4162ca5aa5871ba3c367a6b6fd6dfa25c2dfab2e1cd7db67b859
+DIST G4PII.1.3.tar.gz 4293607 SHA256 6225ad902675f4381c98c6ba25fc5a06ce87549aa979634d3d03491d6616e926 SHA512 dc458f5845948f54315477886d28fd51ea2d45f3675f45d42e8352cc5961705d920d200097dc9b55ad826ff426a655258b970ddd5a96867f706eb14e9ebbfd1a WHIRLPOOL 97c0aa7055ee6aaae30223a59f71edc11126560187cf038cd47fbe69c62b610e01f33d7b8d856aaa3f145c08d2bb4fc31047849634e57a6516dd197d6f53be79
+DIST G4PhotonEvaporation.2.3.tar.gz 7508401 SHA256 60449df933794aa0ad3938886c8c023e3093ff59ad6c752923390d5c550f34cb SHA512 1db97368f6579565447083a912ead17cd0fa1021d13aada4ed514e1b3245ff03509c963a064a97a1c7d5f5530ac036427c6c9e29be198976daebe8623c41e664 WHIRLPOOL a1651adbaf38132f89419b9821a1af4e741c3a058016f4946d815b5d48cd096ea057632f91142ac6d87cb38b24b1f26c664601f5838e92a03189c5227daa16c7
+DIST G4PhotonEvaporation.3.0.tar.gz 8864188 SHA256 c76a843672eca21110e97a274a6b5cd9a58b66f35235301c8e1b162926e0e7cb SHA512 a185e034e5d53a5f0aa00a0a701e40c47a667bafe78a41153d2846b102ce578f2a0bda6f95cd5102a8abb752070c91597ca6f940ca0d9ebe7b2eb67529dca552 WHIRLPOOL 0420b01dcc276f8e3561899f15a010d5169cb236280f0b5a988c849f15f5face3b513e9aa75442ccff610cfbd9f7e747c44c9a2633a1167b60984224cdcba31b
+DIST G4PhotonEvaporation.3.1.tar.gz 8406135 SHA256 276ac5f7b45ce96ae0927c7a3fff0942b7007cfe9339540fc22554fea433142e SHA512 415cd4ed7f080ad0003fa106c214d564a6f8a6693e3ddab16fff0ae7ce97aea233c672e0624dac54ce0c8daaddb4f5678c0daad446d2dd3da41df2ef055de419 WHIRLPOOL e681ae24716b5832f02b977762a30a253019540c892c50969930dfef311e3d36e5f930107e0fda22f5988bd53cdd0ba682fb7d8c04cadb72548fcb136b9b0aa7
+DIST G4PhotonEvaporation.3.2.tar.gz 9300395 SHA256 35ed450a47aa610ce83c9095e17e43006e0da9557bf4433ac96ce19c730492d4 SHA512 7e32428b9e124b282dfb8f4d400958af7f131bc4a677c19597a7700c52df5b172fbe424aa9622029a9d428a4c37cf90bb8cfd9691fef81d5882f1b59e401d3a1 WHIRLPOOL dc7995d762f2553c0e0f02c7e0a4d648d8cb44b77416602de191fa87f00ff97cb63ef0c39a15e4f2b47a8205e9d4d973f5c8126dd29cf466a7f4b4cab8ea812f
+DIST G4PhotonEvaporation.4.3.tar.gz 19394277 SHA256 1a8d0b4ee60dfbbca38fb313e70508dde3a2ec0f34af59baedd37cb9ae68427e SHA512 7c9333d0c2644316acbbea61b60d5b7f981ec7cad06e630332572c598133bab4b4568fbe8c10b84a54a0fee5d95dc8f05232626d70244c2d36fcb5c4d077ad9c WHIRLPOOL b47516cd0e73efcd0128dbf538f24f99f1acd7ac06310ed0768b05d5c5e78e47a073afeb04ba09eaef6c98e7ece107077d6484eee176a1397ab8c931934ad659
+DIST G4RadioactiveDecay.3.6.tar.gz 736879 SHA256 3502ed4be04d694115a3acf59d7a3593725a2d79f3adad0ffa135ff653f89d1d SHA512 30502587d5f1cd5e365c6803e286bcb469999642fdc56bb8f162736b31334f09aae9f96bd71ac1a664fca7a303127c10c5ffe5b460e846756977e97a5f958d51 WHIRLPOOL c991d159c952a6d59e355cd0a691a5a9a8de07bb8985cdc4797853a56c38b3f6320928a3dc1fa19d21a35be9dddc7d6901116f10bb347b2a5bcef70dbe71c06e
+DIST G4RadioactiveDecay.4.0.tar.gz 985509 SHA256 ed2053bddee507920a29a27db4364fbef255b951597686b0410d5458e9b38cb5 SHA512 5caa7b69643acb3071003a81950177061d8221c2b64e9babc46f8aebfe97cea2875ff664183b441a37f0b2c0fb7b3624998ac3f012a2e0308c5fd1ab4b7b8f8d WHIRLPOOL ece7aa1f4734b69af8cceaab6dc7c573ea962efd332e1e778ec1e0b7abf15c7acdaddfd518e6e357633214a58621b076b6ec88836fc7ba945b191cc56b79e325
+DIST G4RadioactiveDecay.4.2.tar.gz 997307 SHA256 cf1946d9e2c222ec1311e7ed94a54a6646cf519b71299e2297a6be3c85ba3c82 SHA512 4d2f2283e8355f2c3f7dee2dabed5123ebe52c4ee255e41841edc64a94a8a85255b4c0ed382a99af67ff605a624ed87d6230c2deb4b6b4df2d16f82079dfea3d WHIRLPOOL 03ad64db8e993d7609e007e3656d0cec6a1e8cb9c3fecf343eab6d53c11688ef647c713a569a3bfb8702a75b4898d1b1a7e60e84c6c622d730c50c6fc26720ea
+DIST G4RadioactiveDecay.4.3.tar.gz 1050639 SHA256 0b1cb30bc339eccf7fee3cc2d7df73457b31187a5d473914d1183dd50f6611f0 SHA512 272c0ec26a7f7be39f44c2e557cc7e167c6b1aec276382c8f5563feadc7fd4bbe4b193c7e6640b4ef2bc388ffcf229e2c6fe7aa7a69f13bd528b6125fe96734b WHIRLPOOL 3f1fc5859b67d87729c81e26c22aa8d4e163247d5b12fb100c2741a4d313a158922e2a3377a9b8517f4b2a35034137a7b4f58d1645861ffacd7039516bd8fb53
+DIST G4RadioactiveDecay.5.1.tar.gz 1057159 SHA256 f30ed6efcde0d8554559a30a23cf17881565d50fdb2c30d2c36983434b1bfcc6 SHA512 d9b7a18fb2259374982037db619d18d474bc6a64ebd21546f6b30146b77a2f5c4e5460b02258f9eaa13a5bfde772ce674f5269f84210bbc58face08cea51a797 WHIRLPOOL e3a8e14ab30488b9547e6107002c007427ffa9d5949f9295bff4f9f67fe12a9685695d7ab8d68d3be0e1aeb7ede27e20ce3b22de698651a2026eec19b6fe9ba5
+DIST G4SAIDDATA.1.1.tar.gz 25800 SHA256 a38cd9a83db62311922850fe609ecd250d36adf264a88e88c82ba82b7da0ed7f SHA512 191627972dbf859e40e07ec4a63c5e7300571da6792c2588a6ad997e246c3fc41e890679aced918ba2496586da643c23884c4d9754329387e3579e52c87b6202 WHIRLPOOL d47075356db9e5589f12c03563143d1fd816e78d165785d5f37a415a8f1504be8e471064b81311f27a54cf108259dec07b0ef22fbc30374afaa4d46d7e7b648a
+DIST G4TENDL.1.0.tar.gz 611197954 SHA256 81ab22cb51f804f5c57a528e3ac3d15f0230a48b53c4443f0ddea833a4c4eb1d SHA512 6a49cf6558ea3a8e9b2cb78abd0bf0076ffeba40a151927748aa60bb804eaa49dcafecd99ba3c0405ff1f2e742bf8dfe6b25b82041328b89360d80ad61b1cc9d WHIRLPOOL d9df21eb0ae66f53c1c991f7b9556f8dab8bbd15a28aab4ffa287d5b922001c741f5c0390316405401cae434d7dda123e5dd72d034d406334d93833b0f0d8f98
+DIST G4TENDL.1.3.tar.gz 587566993 SHA256 52ad77515033a5d6f995c699809b464725a0e62099b5e55bf07c8bdd02cd3bce SHA512 09ca25c3e8d188fc14f1619ba000a87d6d5b3d5d25057cbb07d6c9b464fb425eeb99d0f521e594c30eaaa625f5100772461ac53bb280bf9813c821370c847b22 WHIRLPOOL d9eee65ad867417daefd833067385eb98320d3f16d8af1a243916e07da0eef94ff528dfe61406143b04955b45f29ee2499bc275a77bd2af0d3e46d73356c2f10
+DIST RealSurface.1.0.tar.gz 1257863 SHA256 3e2d2506600d2780ed903f1f2681962e208039329347c58ba1916740679020b1 SHA512 6457e1931fe1989f822493dbcb3193d97fdb37ecdc8341e953af1fb66816aa589e9d5abaa8a937e4599924c005fc32c763dd0db9af567c4c94aa07fae292be76 WHIRLPOOL 7b36a782278a663866b5676fda2ed5425c61219804aaa3fb6042455f6815e0e16a0f82445947d6e1a9585b9c09fb88fb70230bfd692f3bf10aa4ac8c43c37cae
+EBUILD geant-data-4.10.00.ebuild 1175 SHA256 1259a17e3363a76c17ea1f50c867241b0ab6d200c415833fce8d066e72cbc80d SHA512 b82cd8b513f253d279442a47727ff28f50e41e837edcc7e68f1011d4e72d6df4936226fb78bd3392e6f0d0921a87de955a67fb46250071555fcd9341814334d3 WHIRLPOOL b4f1c1683b06e4246267a690b06ecb09a75fa5e722c7671b62184168e38fd043a39b4a4e08d1f576c13d71aa366dafc3dba6a725585cf43c8dafa48de35515af
+EBUILD geant-data-4.10.01.ebuild 1175 SHA256 51c2b5a7c2f1e241e7da5188e8fdead73e01e942e121a48c9f36b6210b3e19d1 SHA512 7080472791a94a15bf45ce98c29d0715a7acc6398cfdfe35165dfe0dbe235577b3e741b329b2dc78abc049517e97b9ee7dd7ef8cee09f47df34120664fd771c0 WHIRLPOOL 96f229bd32a9042b32c25c6b7776e36075cd38e59995ba1ac381c15de3643a8671c7583d4d028e892ac684565f233904ecd7520f76a0240f9ac2c10c651ef5e7
+EBUILD geant-data-4.10.02.ebuild 1103 SHA256 604ebe63ed3f4df67af21a7fbe4e320a12d95ba318b32d017101b4289592bc31 SHA512 00cf0f669082990063d49beaa5350ee291ed039a22eb50f4c659ea524481dbbda1a6e96de87bf4b0ad0a148ca191e6ecf3f6c701ca3f192a21c09d886188eca7 WHIRLPOOL f3afe615f20d07e97a67606fd926f073b6fb8745f6467078ee7052461be6c09911e906632beba6ead0734b83f57205330ac74302b823dad2bdc5445a39eccc49
+EBUILD geant-data-4.10.03.ebuild 1132 SHA256 b4b56ad9e887d863ae5e44c50a66f9de89764c2ff150b669443aacbcc8da4574 SHA512 f0e41679c23ea666ce731b45033f15fed3b1ee9ca1ccf7f36b9be25df4554b1ee0378d91742a2a7ffdce92cc95f71a2f584b4901a9dfca0b9495968fdaf2d2c1 WHIRLPOOL c3ad81ba10bba010b2fed3902f92198693cb1d88d5054821c5de4fae279bd8543cb3b1697f32c0ccc1be564ae0d65f1c610a12cf401af29fb0a24de2700dc446
+EBUILD geant-data-4.9.6_p02.ebuild 1216 SHA256 03c16d18aa22bc4e62a4c2e7dc2f1cdadb7d35813d2953d5c64d6a2c0d2f10df SHA512 04043239b7ef72654c8486bb077c9ef8b4293e5723472537ae44239ab425a73d66fbd295cb93a15aa46c8f46f9074ebc74d5db9c766059e0781414bd628d69db WHIRLPOOL d4be70934965405b1ee9f562a309d0bc09a1fb57b49e52ab1e247f4c82fc51a1083b2628f90253a02b26141a5fc5b7df24861c593583242604774ee499a6eb78
+MISC ChangeLog 2752 SHA256 6172f2cc985b3aed41bbcb069a760e31198d52bb1723ac3ce49c3e7a765ddd07 SHA512 2df9c47711d7646aa3fff92186e319426c6636c0d20708f10968ecaaae8123fc5583017c400904c2033086ea4dac73d4cdcdb9e9986c8789150d62237442c97b WHIRLPOOL 06feb4e238616f5045ccd6a6ca21fb15463548943a041c536fe8e8037bc49f4a7549b86d42cf9a327661d5f4dbfadd4e46b5e5ccf6f46489752b965676449998
+MISC ChangeLog-2015 1128 SHA256 7d62912adce448634e2ee410cec0a1c05d65d49c1f9c083dae1ad7ce583715fa SHA512 db0f907ab8311eecdf2d23b7ef32e0d2d0dfa493b384fe7f544152fea739d3930c7d4df633243d9e262c4f594edaebde19bdcd68d4a7f20b9a67984476990a2e WHIRLPOOL 66c57e76d6f1ce1e13c756864f5ecf8285e2d0a08a4c533996b3c76ebf3147687de859093c508b4579f02980111e20e42cef1e5da1d794a65bb5b3f2fb713d55
+MISC metadata.xml 418 SHA256 b14e29087bcbad72e779289e56b121471f045e38504a7cc76b86701d66915bbd SHA512 863db541083480d61d59523207460417622fd9635ef36502e2298e8c37bf3730f24fa816e466f8d4d8f9efc343f596513cdafa816e530aacd67c7a9b27199d79 WHIRLPOOL 25e54256f956a06b3601fe47d49b9b107d11258cdc8bcb2cf5499758b5e90d294ddb1eadce0f63c171562ddb34ff08d5ca8fda3a1681cf2a99fb94a6b63e46be
diff --git a/sci-physics/geant-data/geant-data-4.10.00.ebuild b/sci-physics/geant-data/geant-data-4.10.00.ebuild
new file mode 100644
index 000000000000..d0ee1e2f8441
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.10.00.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="http://geant4.cern.ch/"
+
+GEANT4_DATA="
+ G4NDL.4.4
+ G4EMLOW.6.35
+ G4RadioactiveDecay.4.0
+ G4SAIDDATA.1.1
+ G4NEUTRONXS.1.4
+ G4PII.1.3
+ G4PhotonEvaporation.3.0
+ G4ABLA.3.0
+ RealSurface.1.0
+ G4ENSDFSTATE.1.0"
+
+SRC_COM="http://geant4.cern.ch/support/source"
+for d in ${GEANT4_DATA}; do
+ SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
+done
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sci-physics/geant-${PV}:4"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+prout() {
+ for d in ${GEANT4_DATA}; do
+ local p=${d/.}
+ doins -r *${p/G4}
+ done
+}
+
+src_install() {
+ sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EROOT%/}/usr\2,p" \
+ "${EROOT}/usr/bin/geant4.sh" > 99geant-data
+ doenvd 99geant-data
+ local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EROOT}/usr/bin/geant4.sh" | tail -n 1)
+ dodir ${g4dir}
+ cd "${ED}${g4dir}"
+ unpack ${A}
+}
diff --git a/sci-physics/geant-data/geant-data-4.10.01.ebuild b/sci-physics/geant-data/geant-data-4.10.01.ebuild
new file mode 100644
index 000000000000..c3112e7be473
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.10.01.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="http://geant4.cern.ch/"
+
+GEANT4_DATA="
+ G4NDL.4.5
+ G4EMLOW.6.41
+ G4RadioactiveDecay.4.2
+ G4SAIDDATA.1.1
+ G4NEUTRONXS.1.4
+ G4PII.1.3
+ G4PhotonEvaporation.3.1
+ G4ABLA.3.0
+ RealSurface.1.0
+ G4ENSDFSTATE.1.0"
+
+SRC_COM="http://geant4.cern.ch/support/source"
+for d in ${GEANT4_DATA}; do
+ SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
+done
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sci-physics/geant-${PV}:4"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+prout() {
+ for d in ${GEANT4_DATA}; do
+ local p=${d/.}
+ doins -r *${p/G4}
+ done
+}
+
+src_install() {
+ sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EROOT%/}/usr\2,p" \
+ "${EROOT}/usr/bin/geant4.sh" > 99geant-data
+ doenvd 99geant-data
+ local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EROOT}/usr/bin/geant4.sh" | tail -n 1)
+ dodir ${g4dir}
+ cd "${ED}${g4dir}"
+ unpack ${A}
+}
diff --git a/sci-physics/geant-data/geant-data-4.10.02.ebuild b/sci-physics/geant-data/geant-data-4.10.02.ebuild
new file mode 100644
index 000000000000..c3adb65924a5
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.10.02.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="http://geant4.cern.ch/"
+
+GEANT4_DATA="
+ G4NDL.4.5
+ G4EMLOW.6.48
+ G4PhotonEvaporation.3.2
+ G4RadioactiveDecay.4.3
+ G4SAIDDATA.1.1
+ G4NEUTRONXS.1.4
+ G4ABLA.3.0
+ G4PII.1.3
+ RealSurface.1.0
+ G4ENSDFSTATE.1.2
+ G4TENDL.1.0"
+
+SRC_COM="http://geant4.cern.ch/support/source"
+for d in ${GEANT4_DATA}; do
+ SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
+done
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sci-physics/geant-${PV}:4"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+src_install() {
+ sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EROOT%/}/usr\2,p" \
+ "${EROOT}/usr/bin/geant4.sh" > 99geant-data
+ doenvd 99geant-data
+ local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EROOT}/usr/bin/geant4.sh" | tail -n 1)
+ dodir ${g4dir}
+ cd "${ED}${g4dir}"
+ unpack ${A}
+}
diff --git a/sci-physics/geant-data/geant-data-4.10.03.ebuild b/sci-physics/geant-data/geant-data-4.10.03.ebuild
new file mode 100644
index 000000000000..821922f9dfa4
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.10.03.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="http://geant4.cern.ch/"
+
+GEANT4_DATA="
+ G4NDL.4.5
+ G4EMLOW.6.50
+ G4PhotonEvaporation.4.3
+ G4RadioactiveDecay.5.1
+ G4SAIDDATA.1.1
+ G4NEUTRONXS.1.4
+ G4ABLA.3.0
+ G4PII.1.3
+ RealSurface.1.0
+ G4ENSDFSTATE.2.1
+ G4TENDL.1.3"
+
+SRC_COM="http://geant4.cern.ch/support/source"
+for d in ${GEANT4_DATA}; do
+ SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
+done
+unset d
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sci-physics/geant-${PV}:4"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+src_install() {
+ sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EPREFIX}/usr\2,p" \
+ "${EPREFIX}/usr/bin/geant4.sh" > 99geant-data || die
+ doenvd 99geant-data
+ local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EPREFIX}/usr/bin/geant4.sh" | tail -n 1)
+ dodir ${g4dir}
+ cd "${ED%/}/${g4dir}" || die
+ unpack ${A}
+}
diff --git a/sci-physics/geant-data/geant-data-4.9.6_p02.ebuild b/sci-physics/geant-data/geant-data-4.9.6_p02.ebuild
new file mode 100644
index 000000000000..2451cf3bd6c5
--- /dev/null
+++ b/sci-physics/geant-data/geant-data-4.9.6_p02.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Data files for Geant4 physical processes"
+HOMEPAGE="http://geant4.cern.ch/"
+
+NDLPV=4.2
+GEANT4_DATA="
+ G4NDL.${NDLPV}
+ G4EMLOW.6.32
+ G4RadioactiveDecay.3.6
+ G4SAIDDATA.1.1
+ G4NEUTRONXS.1.2
+ G4PII.1.3
+ G4PhotonEvaporation.2.3
+ G4ABLA.3.0
+ RealSurface.1.0"
+
+SRC_COM="http://geant4.cern.ch/support/source"
+SRC_URI="${SRC_COM}/G4NDL${NDLPV}.TS.tar.gz"
+for d in ${GEANT4_DATA}; do
+ SRC_URI="${SRC_URI} ${SRC_COM}/${d}.tar.gz"
+done
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="~sci-physics/geant-${PV}:4"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # unpack in destination only to avoid copy
+ return
+}
+
+prout() {
+ for d in ${GEANT4_DATA}; do
+ local p=${d/.}
+ doins -r *${p/G4}
+ done
+}
+
+src_install() {
+ sed -n "s,export \(G4.\+DATA=\"\).*\(/share/Geant.\+/data/.\+\) > /dev/null ; pwd\`,\1${EROOT%/}/usr\2,p" \
+ "${EROOT}/usr/bin/geant4.sh" > 99geant-data
+ doenvd 99geant-data
+ local g4dir=/usr/$(sed -n 's|.*/\(share/Geant4.*/data\).*|\1|p' "${EROOT}/usr/bin/geant4.sh" | tail -n 1)
+ dodir ${g4dir}
+ cd "${ED}${g4dir}"
+ unpack ${A}
+}
diff --git a/sci-physics/geant-data/metadata.xml b/sci-physics/geant-data/metadata.xml
new file mode 100644
index 000000000000..5a993a4035bd
--- /dev/null
+++ b/sci-physics/geant-data/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ For specific, optional physics processes, Geant4 uses extra data
+ which are being installed with this package.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/geant-python/Manifest b/sci-physics/geant-python/Manifest
new file mode 100644
index 000000000000..b248438fd5c3
--- /dev/null
+++ b/sci-physics/geant-python/Manifest
@@ -0,0 +1,10 @@
+AUX geant-python-4.10.0-config.patch 879 SHA256 472fdaabbc9bfc55e53e103c8c607f46ec254cb6cdb5d94f96fa0ec9a357eaa1 SHA512 409951aeaf6cb33d8ab0d70c94ab04901f449554c8e1e14706a40144e132d4f33543e85740d7f99ca32bfd28fac1e12ddd6deeee6d0b101c42283fdf74da5ea7 WHIRLPOOL 8e804ca3e0ad6d70fb9c1bf5201086108d6fceb1ac6035ebe498d05e77c9cab6156f775ff3d10eaae8a72fc83b33212aef87cdd512961ddb0fe22a8da79fcd0f
+AUX geant-python-4.10.0-polycone.patch 609 SHA256 8a32107400595505079f119fe90d16e5399b41a00761e24d927c4d88d7e0710f SHA512 d65395f12928ca500452545c19bcdefd0b3740fb27c2ff2ccd01748d70347e1d3e8935d94e9b1ae142037c0930551e58bc6dd93dd944c3d712255555a639d5c5 WHIRLPOOL 0ca9675689078c901de99094d15ae6467d7ebcd3f6f49a3068d9ab00e6c2b42e0cccf51019c93d097a9d7fcb74572288b03da3f59cd81404a0d92ec1dd85b1ef
+AUX geant-python-4.9.5-visverbose.patch 557 SHA256 0955cd39ce1f8e842e2804370359a4e367b14f4791a40fd653918c32884bed8a SHA512 6780065ef2ba4efa79bdd835e500f25309baf6b3d8bf2418b83f2cbb984a8b6a48d27e10a1327cd42e6e236663557fedb5bb2f9f34ee0d1631fc316868959fb0 WHIRLPOOL f3a982c6d8781bf04094f85cd6d0187d984dfb45eff1676d7e459b4d7614847890e40ec63b56a52e0c8bcc5e273d4d333795e14fac3056c22b0c960a9d3ba556
+DIST geant4.10.00.tar.gz 30780131 SHA256 ffec1714b03748b6d691eb0b91906f4c74422c1ad1f8afa918e03be421af8a17 SHA512 c9288b26df8b858622e728158b687cd7bc257c49f26a21b93d1b9fa4619c22dfea2a7604689118ac493b407888690db42d1ec9c8048aa1f45bf8beeb6a657e87 WHIRLPOOL 20eb2002e867a0fe3dab683820ebeeb5de2140c5cd7c4c57c07b5da2a62900d4ee2bf1f6372e034781ed536001e40a5a79d5654729e45a16995415febfefb26d
+DIST geant4.9.6.p02.tar.gz 25480383 SHA256 cf5df83b7e2c99e6729449b32d3ecb0727b4692317426b66fc7fd41951c7351f SHA512 dab5f31568074869adecbbfb8855be0c0a2e92e5ba3119dbeb9cd414878721df3052198a05e5e3c19d0e2942a22602c6618dc0628b05134d3403a50c2bc2032c WHIRLPOOL 8c66d8aa1605a42e6b6f054c32eb49df0bb2afcdf54360ff630908ce7cfc8a7a37b62cdb2a1612af05f1f70a5575c6516aad1f6737a67692449b01e1137b2865
+EBUILD geant-python-4.10.00.ebuild 3588 SHA256 3f513bb26d0bb13756e2604e84a00fbbfd0491f7dffd79d424b31ad02154b3b7 SHA512 12958db78cddbcf273d01f5dc77638fdcfbc6cdd0e17db47a715c465700ef53699e8049dc24c8319184de216accd29b626ced19fbb69d20a83faf3e2ebebd422 WHIRLPOOL c18df269057bad095aa2e98e4b4f843e485ede320e3fd4d8ff5771d571d452a7771d49b2bcf146b5899295db896eed250aa1f8b563dccebb984c7eee207d483b
+EBUILD geant-python-4.9.6_p02.ebuild 3490 SHA256 4f05255892c90850b15e86f6b41b9d367474dfba957505f85e5f639457218661 SHA512 6d119b9fc63e3d4e3556404f8e1d27af4f8b1f81f4ba13f95be171e3b03d7cb2ed51a138881e750212b96c6a32fe13cd250057607a72ad8452dca9198d442574 WHIRLPOOL a88f97e18d44cdada1678b01be861e1bab1221d9f9788fdf79a8f13059d7c4187f0d4e05fdbf4d404aee4813a83c20a885c568227586c24f7c9a23374a6677fa
+MISC ChangeLog 2821 SHA256 9cd529521956344a8abdc626342454662d5793de2fa7b99213629dbeec7a0ae0 SHA512 c954c0ed9aa3d8615f4fe4e5e1ba14ef24e96172a16d901b2aca409faaf12502af3688d07b179958cc04cbd703a43bb99a5da910cd7e1debb1812963bfb116a0 WHIRLPOOL 0e567c0e4ce21998c631c1453411d6333e8b4455fc8c49a09278c50642aa0966e343ce18856a6e5ad323d0e9d0912361a5b5d65fbcac09f500040bf297274acc
+MISC ChangeLog-2015 2344 SHA256 df12b674db14f4e8d144799ca4ac77c75e372e2125b322c28336b52433d2a63b SHA512 3964bdbf9af86e84c7239401b2ae71319560e8cf405fe0f7dc32f9f2b3da553de445cc07e699c8aee74707efb19646d47d0fdbe85f73730c41d7625f5998cab8 WHIRLPOOL 54b8feab52aa9f938eae05f4c3966aad61e5a78cd010dad0ce4153b2fce49fe259ba4dd99300baf2e78176a721bcd3d20409cfc2ee84d0795650f1e03bf51f05
+MISC metadata.xml 333 SHA256 0a8d137678edd11292fc65f6c113609c842fd895fb6d28449be9cfc71d955381 SHA512 3c56efce8e638e6f6ad80b982b464ee14fff38b07e02631eee8836a0e955e073cc5ca8cf0fad639eceec414c34de7d1b669511991c45ca89b15e9f10d6d61c66 WHIRLPOOL 487cbc93ca3b40f753226b35edbf465c5d5288dc2ab44c383dbdae0f5453228796f2052e7e272072b36d2111370d32882fa343f74b030b92b60c1f2f06bcabfd
diff --git a/sci-physics/geant-python/files/geant-python-4.10.0-config.patch b/sci-physics/geant-python/files/geant-python-4.10.0-config.patch
new file mode 100644
index 000000000000..50f4dabb43c3
--- /dev/null
+++ b/sci-physics/geant-python/files/geant-python-4.10.0-config.patch
@@ -0,0 +1,27 @@
+do not hard code PATH; QGSP.hh is renamed to G4QGSParticipants.hh in geant-4.10
+
+http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1545
+http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1546
+Index: g4py/configure
+===================================================================
+--- g4py.orig/configure
++++ g4py/configure
+@@ -4,9 +4,6 @@
+ # ======================================================================
+ export LANG=C
+
+-PATH=/bin:/usr/bin
+-export PATH
+-
+ # ======================================================================
+ # testing the echo features
+ # ======================================================================
+@@ -377,7 +374,7 @@ fi
+
+ # ---
+ echo $ac_n "Checking for physics list support ...$ac_c"
+-if [ -f "$g4_incdir"/QGSP.hh ]; then
++if [ -f "$g4_incdir"/G4QGSParticipants.hh ]; then
+ enable_physicslist=1
+ fi
+ if [ $enable_physicslist = 0 ]; then
diff --git a/sci-physics/geant-python/files/geant-python-4.10.0-polycone.patch b/sci-physics/geant-python/files/geant-python-4.10.0-polycone.patch
new file mode 100644
index 000000000000..492e4700ac4f
--- /dev/null
+++ b/sci-physics/geant-python/files/geant-python-4.10.0-polycone.patch
@@ -0,0 +1,15 @@
+polycone API has been changed.
+
+http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1544
+Index: g4py/source/geometry/pyG4Polycone.cc
+===================================================================
+--- g4py.orig/source/geometry/pyG4Polycone.cc
++++ g4py/source/geometry/pyG4Polycone.cc
+@@ -96,7 +96,6 @@ void export_G4Polycone()
+ .def("GetStartPhi", &G4Polycone::GetStartPhi)
+ .def("GetEndPhi", &G4Polycone::GetEndPhi)
+ .def("IsOpen", &G4Polycone::IsOpen)
+- .def("IsGeneric", &G4Polycone::IsGeneric)
+ .def("GetNumRZCorner", &G4Polycone::GetNumRZCorner)
+
+ // operators
diff --git a/sci-physics/geant-python/files/geant-python-4.9.5-visverbose.patch b/sci-physics/geant-python/files/geant-python-4.9.5-visverbose.patch
new file mode 100644
index 000000000000..0508f28b6fa6
--- /dev/null
+++ b/sci-physics/geant-python/files/geant-python-4.9.5-visverbose.patch
@@ -0,0 +1,13 @@
+diff --git a/source/visualization/pyG4VisManager.cc b/source/visualization/pyG4VisManager.cc
+index 33bb0d4..00f86a5 100644
+--- a/source/visualization/pyG4VisManager.cc
++++ b/source/visualization/pyG4VisManager.cc
+@@ -41,7 +41,7 @@ using namespace boost::python;
+ // ====================================================================
+ class PyG4VisManager : public G4VisManager {
+ public:
+- PyG4VisManager() { SetVerboseLevel(quiet); }
++ PyG4VisManager() { SetVerboseLevel(all); }
+ ~PyG4VisManager() { }
+
+ virtual void RegisterGraphicsSystems() { }
diff --git a/sci-physics/geant-python/geant-python-4.10.00.ebuild b/sci-physics/geant-python/geant-python-4.10.00.ebuild
new file mode 100644
index 000000000000..160244ef9e49
--- /dev/null
+++ b/sci-physics/geant-python/geant-python-4.10.00.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 versionator multilib eutils
+
+MYP="geant$(replace_version_separator 3 .)"
+
+DESCRIPTION="Python bindings for Geant4"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+LICENSE="geant4"
+SLOT="0"
+IUSE="examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c
+ =sci-physics/geant-${PV}*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYP}/environments/g4py"
+
+pkg_setup() {
+ if use amd64; then
+ ARG=linux64
+ elif use x86; then
+ ARG=linux
+ else
+ die "platform unknown"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.9.5-visverbose.patch
+ epatch "${FILESDIR}"/${PN}-4.10.0-config.patch
+ epatch "${FILESDIR}"/${PN}-4.10.0-polycone.patch
+ sed -i -e "s/lib64/$(get_libdir)/g" configure || die
+ sed -i -e 's/-lG4clhep/-lCLHEP/g' config/g4py.gmk || die
+ # respect user toolchain and flags
+ sed -i \
+ -e '/^CXX.*:=/d' \
+ -e '/CXXFLAGS/s/-f\(template-depth-255\|inline-functions\|permissive\)//g' \
+ -e "/CXXFLAGS/s/-O2/${CXXFLAGS}/g" \
+ -e '/^rpathflag/s|:\($(rpath.)\)| -Wl,-rpath,\1 |g' \
+ -e "s/\$(rpathflag)/\$(LDFLAGS) \$(rpathflag)/g" \
+ config/sys/linux* || die
+ python_copy_sources
+
+ run_sed() {
+ sed -i -e "s/\(python_exe=\)python/\1${EPYTHON}/" configure || die
+ [[ ${EPYTHON} == python3* ]] && sed -i -e "s/with_python3=0/with_python3=1/" configure
+ # let Geant4 module installed into python sitedir instead of default
+ sed -i \
+ -e "/G4PY_LIBDIR :=/cG4PY_LIBDIR := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ config/install.gmk || die "sed failed on config/install.gmk"
+
+ local mfile
+ for mfile in source/python{3,}/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ "${mfile}" || die "sed failed on ${mfile}"
+ done
+
+ # let g4py module installed into python sitedir instead of default
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ config/site-install.gmk || die "sed failed on config/site-install.gmk"
+ for mfile in {processes/emcalculator,utils/MCScore}/{python3/,}GNUmakefile python/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ "site-modules/${mfile}" || die "sed failed on site-modules/${mfile}"
+ done
+
+ }
+ python_foreach_impl run_in_build_dir run_sed
+}
+
+src_configure() {
+ run_configure() {
+ # not the autotools configure
+ ./configure ${ARG} \
+ --prefix="${EPREFIX}/usr" \
+ --with-g4install-dir="${EPREFIX}/usr" \
+ --with-python-incdir="$(python_get_includedir)" \
+ --with-python-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-incdir="${EPREFIX}/usr/include" \
+ --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-python-lib="boost_python-${EPYTHON#python}" \
+ --with-xercesc-incdir="${EPREFIX}/usr/include" \
+ --with-xercesc-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ || die "configure failed"
+ }
+ python_foreach_impl run_in_build_dir run_configure
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir emake CPPVERBOSE=1
+}
+
+src_test() {
+ run_test() {
+ emake -C tests
+ }
+ python_foreach_impl run_in_build_dir run_test
+}
+
+src_install() {
+ python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+ dodoc README.md History
+ insinto /usr/share/doc/${PF}
+ use examples && doins -r examples
+}
diff --git a/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild b/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild
new file mode 100644
index 000000000000..f590877fadab
--- /dev/null
+++ b/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 versionator multilib eutils
+
+MYP="geant$(replace_version_separator 3 .)"
+
+DESCRIPTION="Python bindings for Geant4"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+LICENSE="geant4"
+SLOT="0"
+IUSE="examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/boost:=[python,${PYTHON_USEDEP}]
+ dev-libs/xerces-c
+ =sci-physics/geant-${PV}*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYP}/environments/g4py"
+
+pkg_setup() {
+ if use amd64; then
+ ARG=linux64
+ elif use x86; then
+ ARG=linux
+ else
+ die "platform unknown"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.9.5-visverbose.patch
+ sed -i -e "s/lib64/$(get_libdir)/g" configure || die
+ sed -i -e 's/-lG4clhep/-lCLHEP/g' config/g4py.gmk || die
+ # respect user toolchain and flags
+ sed -i \
+ -e '/^CXX.*:=/d' \
+ -e '/CXXFLAGS/s/-f\(template-depth-255\|inline-functions\|permissive\)//g' \
+ -e "/CXXFLAGS/s/-O2/${CXXFLAGS}/g" \
+ -e '/^rpathflag/s|:\($(rpath.)\)| -Wl,-rpath,\1 |g' \
+ -e "s/\$(rpathflag)/\$(LDFLAGS) \$(rpathflag)/g" \
+ config/sys/linux* || die
+ python_copy_sources
+
+ run_sed() {
+ sed -i -e "s/\(python_exe=\)python/\1${EPYTHON}/" configure || die
+ [[ ${EPYTHON} == python3* ]] && sed -i -e "s/with_python3=0/with_python3=1/" configure
+ # let Geant4 module installed into python sitedir instead of default
+ sed -i \
+ -e "/G4PY_LIBDIR :=/cG4PY_LIBDIR := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ config/install.gmk || die "sed failed on config/install.gmk"
+
+ local mfile
+ for mfile in source/python{3,}/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ "${mfile}" || die "sed failed on ${mfile}"
+ done
+
+ # let g4py module installed into python sitedir instead of default
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ config/site-install.gmk || die "sed failed on config/site-install.gmk"
+ for mfile in {processes/emcalculator,utils/MCScore}/{python3/,}GNUmakefile python/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ "site-modules/${mfile}" || die "sed failed on site-modules/${mfile}"
+ done
+
+ }
+ python_foreach_impl run_in_build_dir run_sed
+}
+
+src_configure() {
+ run_configure() {
+ # not the autotools configure
+ ./configure ${ARG} \
+ --prefix="${EPREFIX}/usr" \
+ --with-g4install-dir="${EPREFIX}/usr" \
+ --with-python-incdir="$(python_get_includedir)" \
+ --with-python-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-incdir="${EPREFIX}/usr/include" \
+ --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-python-lib="boost_python-${EPYTHON#python}" \
+ --with-xercesc-incdir="${EPREFIX}/usr/include" \
+ --with-xercesc-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ || die "configure failed"
+ }
+ python_foreach_impl run_in_build_dir run_configure
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir emake CPPVERBOSE=1
+}
+
+src_test() {
+ run_test() {
+ emake -C tests
+ }
+ python_foreach_impl run_in_build_dir run_test
+}
+
+src_install() {
+ python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+ dodoc README.md History
+ insinto /usr/share/doc/${PF}
+ use examples && doins -r examples
+}
diff --git a/sci-physics/geant-python/metadata.xml b/sci-physics/geant-python/metadata.xml
new file mode 100644
index 000000000000..b6b36d34b7c5
--- /dev/null
+++ b/sci-physics/geant-python/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ Python binding to Geant 4.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/geant/Manifest b/sci-physics/geant/Manifest
new file mode 100644
index 000000000000..115d36671a2a
--- /dev/null
+++ b/sci-physics/geant/Manifest
@@ -0,0 +1,25 @@
+AUX geant-4.10.0-TrackingNavigator.patch 2684 SHA256 dfcc663be808072f9b1a141d7f20f8979aa53d4249dd657db42f83e54b2bd34f SHA512 cc7f9ccc17ae83bec9aba945f01e2f6243264a19a6dd2226cc03bb09856a40521b6d1ded3acf2732f5fa3ca7f9822522ed695dbcbd157aadb29e7f6701f84146 WHIRLPOOL 1fe99eb065506f0bbe12c81213efef33b5a6140a638b054432647a3ec74eca917968ccecd08c16467702aaf90f934f07b3622462797c57f5f92c732d9a943650
+AUX geant-4.10.0-no-examples.patch 692 SHA256 3f2151ae9df66ee7b7bb36e0f519da1ea796de9bc6e6b31bf5047cb925164ed3 SHA512 852f2bba645a3a223efabef184bbcc37cf75dc1e2c301bfde634b479503c39d7df0b938156a09e151fb8a287f7bd26bc87816014ca3b56c59ee72937f8ac063c WHIRLPOOL 7794d2363486382ed59f5ede2702df02c3922b0a028a948919587c68786ed61ed6542aaccda737ba61679250858b74f9316107999ef927acf9658b54536675de
+AUX geant-4.10.02-std-isnan.patch 617 SHA256 e062f8b9474014aa387dfc1870067894fc7cccaabfc37df6ed91dc346d2abe87 SHA512 1be40e710580d294e74bab4bc33806942597e4da86c0e54df6a317073ed6b127df0670730fb44c74f41ea57ba1139e2c4a254138c3ceeecc37ff3f39bfe5c216 WHIRLPOOL e965d461aa6f4188e2c88a1eb0483a90c07fb095a0c5d8547612e6e7daf6292de0846c8ec9a03010e422ac267933fa7f0db39d51b64cf451ded52e1d49b80d76
+AUX geant-4.10.2-no-examples.patch 608 SHA256 952ddf5489a9a6012f0ad28c4652b7548858793852fdfaf59c2aa066c5065c3e SHA512 194bdc415008e9a251b0c5f7ac4ed6a8c6b03d1d4026750131abf307ab5d8c4117a5f3550aed00ebe5338cf35638af6981e389804a234e1f9b29780465640ac6 WHIRLPOOL bed2fb61c6da5f0ab0331af9e5826c7b88a74db34dea0b579a6e76c84d91f11afa7cfe39b37cfcb3c6ebe284da4955d8782ba181dc1305eec926b67c634917b1
+AUX geant-4.9.4-zlib.patch 1014 SHA256 fa7d09b2a481b9183f6f1518e2490458b616c41a90824e6d6a37ca08bddc06b5 SHA512 d345e73f5413492df3b7aa2505e651ee073bfea824c6673c7d284eef39070368bf3d17fed72544f0427977b707ad26f6374a4a8b06170a4394d53f1e638a94eb WHIRLPOOL 510a768553893604a8cbb4a2a172fe61ad60ea767d02eb39ae56b844431ff8434f8e5b03a5c46a110768ef65714808e3181de09bfc42283f13ed51a72bb6a7b8
+DIST geant321_3.21.14.dfsg-11.debian.tar.gz 52237 SHA256 62d95386cfe0d83e7d26b5b38be2d249276002441e57c67452930e18a9d177d8 SHA512 a3b6dea7b0df1ecb89bfb974339d3b5aed6815874f453040b37377ab9e9217d6970429d7a346c62f2b289bb8911aafa3569edc7499c13b7b2d3fac23e2a773c9 WHIRLPOOL 7fa57b667f880c877e12e828ca9db5f845d8fbdbfd070da6e30d9450192ce935e339eaf83ffaf3c7426d89bf4608a71e06a518ef9ae95059a2b4a288d7107c96
+DIST geant321_3.21.14.dfsg.orig.tar.gz 10922928 SHA256 186fe98a08ad1de39f68698a09a46e7c2f14c37b22f8f990257b0bd66215c5b4 SHA512 733a77e529ecfe17c35d1e0bf44cf9062dbd9f2e3880e12cbfabf7372e6c60ea9690df010574094b44aef6fe306dfd85dfd4f42641b8f03efda3938a50313734 WHIRLPOOL fc2b230e1bf2ae1157cf9c92f474ff72fc1f3158e5db5a8f1a7d4f7c983fae9b886dc1aeb148019cb961bc602abc629d75a1aa728d66b10887daa45de040def6
+DIST geant4.10.00.p01.tar.gz 29701289 SHA256 09c431ff3ef81034282c46501cea01046d4a20438c2ea2a7339576e1ecf26ba0 SHA512 d7be39580a8dafa55b1a52b498e4a24312499a33d41954d8684385ce57c903430b2c56386728ad9a70d21af6634fbb8d6b55b2ef9c56b6c9272671e66bf9119d WHIRLPOOL d85a84be7166e949a72d6200f6a00a86bb9611a215270e2021cf5f214e78a9b05095816bb5bb135235bdcccd8949b4460a624fce68764485bbbcd06b5a974889
+DIST geant4.10.00.tar.gz 30780131 SHA256 ffec1714b03748b6d691eb0b91906f4c74422c1ad1f8afa918e03be421af8a17 SHA512 c9288b26df8b858622e728158b687cd7bc257c49f26a21b93d1b9fa4619c22dfea2a7604689118ac493b407888690db42d1ec9c8048aa1f45bf8beeb6a657e87 WHIRLPOOL 20eb2002e867a0fe3dab683820ebeeb5de2140c5cd7c4c57c07b5da2a62900d4ee2bf1f6372e034781ed536001e40a5a79d5654729e45a16995415febfefb26d
+DIST geant4.10.01.p02.tar.gz 33708464 SHA256 ee7917f6a4fe4c714cc9c68abaa3a2c32628d328186d8514d7cdecd7c639143f SHA512 056ffca00b6e0496748aa1ca34a0a349eea607505b093f7148557a4e2a704cdb6949731f5313508eff311a3075b53841c4f332f057604c0826b76db0089fc082 WHIRLPOOL 52cdea3f5fc97744cf0547fa374279d5e77e05acb4f44e629970d4c856c52a541c41ebbcb6f4cdcdb4759a0855172ac9825f7bd2a254795ec2f737a3b9dc4a42
+DIST geant4.10.01.tar.gz 43759041 SHA256 d37400e96423fedfbf8dbe1f49e2ef0367317c3893ad99f28eed06bf97e1feb7 SHA512 6b9f154f705e7ca4918dea3e2a9ccc0e6fa8806fd4466b4b947f9beec35968640dbe32d383c2a138f15e40b10085c717256cc1604f4d8407e7cb28e5772b52e6 WHIRLPOOL 24316ae5a05026d7e2eff8fad2d628b2198f810d8a82bb934c6c9481961b6b8b3d68393aed785aa8664ea57074e006211df1d9391fbaed154578fe03f3fb6339
+DIST geant4.10.02.tar.gz 32312192 SHA256 633ca2df88b03ba818c7eb09ba21d0667a94e342f7d6d6ff3c695d83583b8aa3 SHA512 f10fd1205b986f0ad069727ac867f1cd13e2a9da088462e70ba1eb58dee84276c0e5a5f764eee44e3ca832ed0ac4591b29645cd3dcc6b0e57e5fb1bc0c0dc6ea WHIRLPOOL 54835776b40d3fe45d13ea6505a0b7fda126e3a9859ba134225e5bbc2f53f0f66bf363c2cf4ef0f0572ce19004d52f83cef91d27e61c17a2761fc0c82bd3a81a
+DIST geant4.10.03.tar.gz 33143770 SHA256 7da84f3d7ddea31db2130c4769a474a7bd387839cc9c04d3081408a7004cb73b SHA512 61d67e57f1576ab10562f2309995897008b4be1aa60f7e471b4f5efc2d852788d5faf60e64ea7024a4af4035d98c04c0be23df8593a4ed3a510af6b476013c56 WHIRLPOOL af33aff011420c5c96d0227dd5b4e9c183cb977ac80013feb0391992f3815c89e06e850bbb3dca9e93ecca911583f4195331f2a70edfbd6e0585056c14f49d59
+DIST geant4.9.6.p02.tar.gz 25480383 SHA256 cf5df83b7e2c99e6729449b32d3ecb0727b4692317426b66fc7fd41951c7351f SHA512 dab5f31568074869adecbbfb8855be0c0a2e92e5ba3119dbeb9cd414878721df3052198a05e5e3c19d0e2942a22602c6618dc0628b05134d3403a50c2bc2032c WHIRLPOOL 8c66d8aa1605a42e6b6f054c32eb49df0bb2afcdf54360ff630908ce7cfc8a7a37b62cdb2a1612af05f1f70a5575c6516aad1f6737a67692449b01e1137b2865
+EBUILD geant-3.21.14-r4.ebuild 1579 SHA256 82b6ac0e3b02e6fb2133ef54017dc49cc048d9f01bc209c0b7c6f92864c6d330 SHA512 52181ad9f5c05503b46fdd070603b6fa1364573189e623eefa15dbf709358f131fa6869da0072b13175455e58f6466c07da1e109edd994c8a1e0f08183716ae1 WHIRLPOOL 5a82d3ce1d11eecbcb79cb5d27ec2124a571b5ab61f6357a1637f4e5c6b8664d60dff0317454981bed70f694391eb0479b2201d857a317ed08aca6e12f709a56
+EBUILD geant-4.10.00.ebuild 2799 SHA256 156f54a0b4ca3e8c993342ecf8fd9d11841387e6820f78bf5ad0f0c8348b65cf SHA512 fca30c7dea388e7e987c59fd30ae5d7e47b396fefb66eca0294e411cbfb0ec6c7f2311951ca4c92d32867b3deed954830f9881d7ad6cbfd9b8ffac82340b8ba4 WHIRLPOOL 0758e3b17a9cdf15ebc03938c0b9d4ba0037d45ba9cc21ac1ac41f6c33941add27d4d7856271b93ec512cbbfe5167cf25fa0d1f0dfddef2d50e13f3e30f9945b
+EBUILD geant-4.10.00_p01.ebuild 2741 SHA256 c1861187b06f67f706210fa93305524843cf3cd9bc7a37dd1a83768635c601fc SHA512 4461568726403e47518cb19350b394cf22ed6179e6a473007de3e62f88ee28dab8efa0b8c5b1b20ae56d93dffb1ccb33088055fda70d1594cc8e725f8771a2d7 WHIRLPOOL 450fd2ead4771a4107824878fc5e34cc58d1f9102fe42b78514dce92d51270a6634b74c72864cfcf1efa93e2a17fd967cbe648699fdde93e49a14ca5c07e0953
+EBUILD geant-4.10.01.ebuild 2761 SHA256 4fbb2ca349fd5d6567ae79f4cde936cf720f8fe6ad428388ff0dc9e0fc8f8f10 SHA512 a47442d4e58abe3912333a387462dcdd60a052fe6e1ff40e33f54c566e9d9686ec4c47af63be232dc932e0f154f3db8d798ba2e9fd0138ec4d04de3a4e7e3f4f WHIRLPOOL 7c97b4e93af09c4e984cc9056c38404f67b28da34720f9e1aaadf5f638228a13b68ae3ac67f79572177499ff6584472d1686480110894eaa7b43ddf5c135c28d
+EBUILD geant-4.10.01_p02.ebuild 2805 SHA256 d3fcae294e63486eea7340be731d1c0999ea4eec95797168cce2208b5d519588 SHA512 797ff56d6e9c2e75d623fccf5d3251553bfea98903878abe2186a3115f6eb967ace7945fabcc7bca2043771aaca5a270e3a312bd1d69f6639ee29abd2ca5b77a WHIRLPOOL cb15ca85437602bc69f6c0f2480d760256adf53572ddef1d15f3274c513751cf2764000c955dfb5fc794aebfaa75e64213fa5849394655121b30594803b02575
+EBUILD geant-4.10.02.ebuild 2843 SHA256 576102f18fddf56592f54a0eb8ef3f62497754b4f0ed056733c2bfa4f834dcb2 SHA512 2d9314d48905317bc75743fea700da178d1e7dcbd46b403c82450a8a72513448de7037416ce91c3989dd0f2260716bb181bdfaef91b9099083d26a51bbd05de1 WHIRLPOOL aba9b32869bcc8c5d415555b60f9ebdfd245a5885bf7fb772e902f6e834228391ad16b67f1f7a6a892dbc55cad87414b632f76480735bc3e920214bcbfc31985
+EBUILD geant-4.10.03.ebuild 2630 SHA256 41364c22313d96d897fe08387b114335e856c018f4e6a13ed7f9ea43c324f33c SHA512 ab74655c8f0aa08d45db0ad996bd1bee0af7ee8cbdb60d684823b39ae0ab6f5cc583486bf2512ee0183951cd34a73ce434de76868f21be40c2eabb1873b7b3ca WHIRLPOOL 567f06572e5aa9e88a1b2520470e704b37f57d8b0039fa301bd89f79975a5e1dbc736b1dd73f84e038037f217a7e7f5b388e27d69b4fb7a6a9fb88a12ca926bb
+EBUILD geant-4.9.6_p02-r1.ebuild 2695 SHA256 810c25466eb4f358c71b6b8367ae3a82d0a16de65d1134bfa34ab245c714ed0f SHA512 101ab0205ce6a18357774a9d70e694e38371436716a53bd196a925ddc95a8ed87e4a0eec5ba657b02f5e405a737865557e4551e37178360018361809abf674f6 WHIRLPOOL 360bdb1de8ce65b39acc9586b6feeac6cd25d0cefdc8fcaa72e587d3df23f29c4326c1317a2d601302820b59156872bc376c1da2521854deb8bf2c72b4d31b64
+MISC ChangeLog 4753 SHA256 0a518f0d727e57a43fa043aea6c47f6b9a9a31f9fd9ffeeff81d73daa263d6f1 SHA512 f7b973a32d732d8c94d8338934abc7bb54edc79182dc824ab818bb4ed082a2bb305e5c9097cff36d4a8c6cb43fc14f002b130326db74988978e2217d318de77e WHIRLPOOL 4c64171f7255c57d31c51f9d8d87c64087665c462b32b1d64984ae802fb7ceb78eb57adc0bea08276a643c9a469000bd2538c83568d99aa4e76b11de6fdc0e5c
+MISC ChangeLog-2015 16574 SHA256 3fcffa4136df27a927874102023233f286b6203aee5194d350a771db3c45afc4 SHA512 a560210745930c4bc289502fb4ff27531b610276c6854a48404cc3a67cd802a145307c8764683923290427a63d2076c30a8cb5a585cbfb31ccbdda91714e2c94 WHIRLPOOL e3adcf1815435659f537abfed29730985308329a418cf8e2a21abfc050671f8358da76193db1ba2e95299b37804bd42c164eb544a25763f7199a6b2e736f0159
+MISC metadata.xml 1306 SHA256 2cd3a025132cdedacfb9bf871ab013ab3c6d59465b7486f0f3ed64b1a09ad383 SHA512 8c84f9185232134dd9da7937244bc07b5ac1fd6f7f3732491e759b000be357b51b9434c861d81ec8c5956431ae44947e475af0b86fd8368e0ad9c68b10979ae1 WHIRLPOOL 12ca5484fdfa246d2b153f09def9a10a1ed888754b16e5a55249a9c2f090b5889477b3404a58f8aefc8645b18c96809a02f72303f09bd723d90ad669e077f2b6
diff --git a/sci-physics/geant/files/geant-4.10.0-TrackingNavigator.patch b/sci-physics/geant/files/geant-4.10.0-TrackingNavigator.patch
new file mode 100644
index 000000000000..e3cc8d6594a5
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.10.0-TrackingNavigator.patch
@@ -0,0 +1,60 @@
+accepted upstream. to be removed in the next minor release.
+
+https://bugs.gentoo.org/show_bug.cgi?id=496678
+http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1537
+
+diff -Naur geant4.10.00/source/geometry/navigation/include/G4TransportationManager.hh geant4.10.00-mod/source/geometry/navigation/include/G4TransportationManager.hh
+--- geant4.10.00/source/geometry/navigation/include/G4TransportationManager.hh 2013-12-05 10:28:54.000000000 +0100
++++ geant4.10.00-mod/source/geometry/navigation/include/G4TransportationManager.hh 2013-12-12 01:40:12.341428809 +0100
+@@ -68,7 +68,7 @@
+ // Accessors for field handling
+
+ inline G4Navigator* GetNavigatorForTracking() const;
+- inline void SetNavigatorForTracking( G4Navigator* newNavigator );
++ void SetNavigatorForTracking( G4Navigator* newNavigator );
+ // Accessors for the navigator for tracking
+
+ inline void SetWorldForTracking(G4VPhysicalVolume* theWorld);
+diff -Naur geant4.10.00/source/geometry/navigation/include/G4TransportationManager.icc geant4.10.00-mod/source/geometry/navigation/include/G4TransportationManager.icc
+--- geant4.10.00/source/geometry/navigation/include/G4TransportationManager.icc 2013-12-05 10:28:54.000000000 +0100
++++ geant4.10.00-mod/source/geometry/navigation/include/G4TransportationManager.icc 2013-12-12 01:40:12.341428809 +0100
+@@ -59,6 +59,7 @@
+ fNavigators[0]->SetWorldVolume(theWorld);
+ }
+
++/*
+ // ----------------------------------------------------------------------------
+ // SetNavigatorForTracking()
+ //
+@@ -70,6 +71,7 @@
+ {
+ fNavigators[0] = newNavigator;
+ }
++*/
+
+ // ----------------------------------------------------------------------------
+ // GetPropagatorInField()
+diff -Naur geant4.10.00/source/geometry/navigation/src/G4TransportationManager.cc geant4.10.00-mod/source/geometry/navigation/src/G4TransportationManager.cc
+--- geant4.10.00/source/geometry/navigation/src/G4TransportationManager.cc 2013-12-05 10:28:56.000000000 +0100
++++ geant4.10.00-mod/source/geometry/navigation/src/G4TransportationManager.cc 2013-12-12 01:40:12.345428679 +0100
+@@ -124,6 +124,20 @@
+ }
+ }
+
++
++// ----------------------------------------------------------------------------
++// SetNavigatorForTracking()
++//
++// Set the active navigator for tracking, always
++// the first in the collection of registered navigators.
++//
++void G4TransportationManager::SetNavigatorForTracking(G4Navigator* newNavigator)
++{
++ fNavigators[0] = newNavigator;
++ fActiveNavigators[0] = newNavigator;
++ fPropagatorInField->SetNavigatorForPropagating(newNavigator);
++}
++
+ // ----------------------------------------------------------------------------
+ // ClearNavigators()
+ //
diff --git a/sci-physics/geant/files/geant-4.10.0-no-examples.patch b/sci-physics/geant/files/geant-4.10.0-no-examples.patch
new file mode 100644
index 000000000000..99aaca546f49
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.10.0-no-examples.patch
@@ -0,0 +1,22 @@
+do not install examples automatically, we do this explictly with dodoc.
+
+Index: geant4.10.00/CMakeLists.txt
+===================================================================
+--- geant4.10.00.orig/CMakeLists.txt
++++ geant4.10.00/CMakeLists.txt
+@@ -136,15 +136,6 @@ if(GEANT4_BUILD_EXAMPLES)
+ add_subdirectory(examples)
+ endif()
+
+-# - Install example code to datarootdir
+-install(DIRECTORY examples
+- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
+- COMPONENT Examples
+- PATTERN "CVS" EXCLUDE
+- PATTERN ".svn" EXCLUDE
+- )
+-
+-
+ #-----------------------------------------------------------------------------
+ # Provide packaging with CPack.
+ include(Geant4CPackBase)
diff --git a/sci-physics/geant/files/geant-4.10.02-std-isnan.patch b/sci-physics/geant/files/geant-4.10.02-std-isnan.patch
new file mode 100644
index 000000000000..6d26a6c2c0d0
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.10.02-std-isnan.patch
@@ -0,0 +1,17 @@
+Fully qualify isnan:
+* /var/tmp/portage/sci-physics/geant-4.10.02/work/geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc:61:22: error: ‘isnan’ was not declared in this scope
+* return( isnan( d ) );
+See also:
+https://bugs.gentoo.org/show_bug.cgi?id=581322
+
+--- geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc
++++ geant4.10.02/source/processes/hadronic/models/lend/src/nf_utilities.cc
+@@ -58,7 +58,7 @@
+ */
+ int nfu_isNAN( double d ) {
+
+- return( isnan( d ) );
++ return( std::isnan( d ) );
+ }
+ /*
+ ************************************************************
diff --git a/sci-physics/geant/files/geant-4.10.2-no-examples.patch b/sci-physics/geant/files/geant-4.10.2-no-examples.patch
new file mode 100644
index 000000000000..767547896c99
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.10.2-no-examples.patch
@@ -0,0 +1,18 @@
+diff -ur geant4.10.02.orig/CMakeLists.txt geant4.10.02/CMakeLists.txt
+--- geant4.10.02.orig/CMakeLists.txt 2016-01-13 15:00:07.009259839 -0200
++++ geant4.10.02/CMakeLists.txt 2016-01-13 15:01:00.369257669 -0200
+@@ -134,14 +134,6 @@
+ add_subdirectory(examples)
+ endif()
+
+-# - Install example code to datarootdir
+-install(DIRECTORY examples
+- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Geant4-${Geant4_VERSION}
+- COMPONENT Examples
+- PATTERN "CVS" EXCLUDE
+- PATTERN ".svn" EXCLUDE
+- )
+-
+ #-----------------------------------------------------------------------
+ # - CPack-aging
+ include(Geant4CPackBase)
diff --git a/sci-physics/geant/files/geant-4.9.4-zlib.patch b/sci-physics/geant/files/geant-4.9.4-zlib.patch
new file mode 100644
index 000000000000..f0429695ce38
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.9.4-zlib.patch
@@ -0,0 +1,35 @@
+force use of system zlib instead of bundled G4zlib
+--- source/visualization/HepRep/sources.cmake.orig 2011-12-02 15:07:49.000000000 +0000
++++ source/visualization/HepRep/sources.cmake 2011-12-18 06:21:22.000000000 +0000
+@@ -91,7 +91,7 @@
+ G4specsolids
+ G4tracking
+ G4vis_management
+- G4zlib
++ ${ZLIB_LIBRARIES}
+ GLOBAL_DEPENDENCIES
+ G4digits_hits
+ G4geometry
+@@ -102,7 +102,7 @@
+ G4modeling
+ G4tracking
+ G4vis_management
+- G4zlib
++ ${ZLIB_LIBRARIES}
+ LINK_LIBRARIES
+ )
+
+--- source/visualization/externals/gl2ps/sources.cmake.orig 2011-12-02 16:07:56.000000000 +0100
++++ source/visualization/externals/gl2ps/sources.cmake 2012-03-09 14:09:26.965148002 +0100
+@@ -49,9 +49,9 @@
+ G4OpenGL2PSAction.cc
+ gl2ps.cc
+ GRANULAR_DEPENDENCIES
+- G4zlib
++ ${ZLIB_LIBRARIES}
+ GLOBAL_DEPENDENCIES
+- G4zlib
++ ${ZLIB_LIBRARIES}
+ LINK_LIBRARIES
+ ${OPENGL_LIBRARIES}
+ )
diff --git a/sci-physics/geant/geant-3.21.14-r4.ebuild b/sci-physics/geant/geant-3.21.14-r4.ebuild
new file mode 100644
index 000000000000..ab132d31212e
--- /dev/null
+++ b/sci-physics/geant/geant-3.21.14-r4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2
+
+DEB_PN=geant321
+DEB_PV=${PV}.dfsg
+DEB_PR=11
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="CERN's detector description and simulation Tool"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="3"
+LICENSE="GPL-2 LGPL-2 BSD"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ x11-libs/motif:0
+ dev-lang/cfortran
+ sci-physics/cernlib
+ sci-physics/paw"
+DEPEND="${RDEPEND}
+ virtual/latex-base
+ x11-misc/imake
+ x11-misc/makedepend"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}.orig"
+
+src_prepare() {
+ mv ../debian . || die
+ sed -i -e 's:/tmp/dp.*/cern:cern:g' debian/patches/* || die
+ cp debian/add-ons/Makefile . || die
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+ sed -i \
+ -e 's:/usr/local:${EROOT}usr:g' \
+ Makefile || die "sed'ing the Makefile failed"
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+
+ # since we depend on cfortran, do not use the one from cernlib
+ rm -f src/include/cfortran/cfortran.h
+}
+
+src_compile() {
+ # create local LaTeX cache directory
+ VARTEXFONTS="${T}"/fonts
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_test_() {
+ LD_LIBRARY_PATH="${S}"/shlib emake -j1 cernlib-test
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ cd debian
+ dodoc changelog README.* deadpool.txt NEWS copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/geant/geant-4.10.00.ebuild b/sci-physics/geant/geant-4.10.00.ebuild
new file mode 100644
index 000000000000..f80eaa1049ae
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.00.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils fortran-2 versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+SPV3=$(printf %1d ${PV3})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.1.3:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV} )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${SPV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.10.0-no-examples.patch
+ "${FILESDIR}"/${PN}-4.10.0-TrackingNavigator.patch # 496678
+ )
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DCMAKE_INSTALL_LIBDIR="${EROOT}usr/$(get_libdir)"
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ local mypv="${PV1}.${PV2}.${SPV3}"
+ doins ReleaseNotes/ReleaseNotes${mypv}.html
+ [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${mypv}-*.txt
+ use examples && doins -r examples
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${SPV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.10.00_p01.ebuild b/sci-physics/geant/geant-4.10.00_p01.ebuild
new file mode 100644
index 000000000000..be593508de40
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.00_p01.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils fortran-2 versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+SPV3=$(printf %1d ${PV3})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib threads"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.1.3:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+PDEPEND="
+ data? ( >=sci-physics/geant-data-4.10 )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${SPV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DCMAKE_INSTALL_LIBDIR="${EROOT}usr/$(get_libdir)"
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use threads GEANT4_BUILD_MULTITHREADED)
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ local mypv="${PV1}.${PV2}.${SPV3}"
+ doins ReleaseNotes/ReleaseNotes${mypv}.html
+ [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${mypv}-*.txt
+ use examples && doins -r examples
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${SPV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.10.01.ebuild b/sci-physics/geant/geant-4.10.01.ebuild
new file mode 100644
index 000000000000..0c4ecd2f55cd
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.01.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils fortran-2 versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+SPV3=$(printf %1d ${PV3})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib threads"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.1.3:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND} prefix? ( app-shells/tcsh )"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV} )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${SPV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ use examples || epatch "${FILESDIR}"/${PN}-4.10.0-no-examples.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use threads GEANT4_BUILD_MULTITHREADED)
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ doins ReleaseNotes/ReleaseNotes${PV1}.${PV2}.${SPV3}.html
+ [[ -f ReleaseNotes/Patch${PV1}.${PV2}.${SPV3}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${mypv}-*.txt
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${SPV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.10.01_p02.ebuild b/sci-physics/geant/geant-4.10.01_p02.ebuild
new file mode 100644
index 000000000000..8ca4095cf7de
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.01_p02.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+SPV3=$(printf %1d ${PV3})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib threads"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.2:2=
+ <sci-physics/clhep-2.3:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND} prefix? ( app-shells/tcsh )"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV1}.${PV2}.${PV3} )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${SPV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ use examples || epatch "${FILESDIR}"/${PN}-4.10.0-no-examples.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use threads GEANT4_BUILD_MULTITHREADED)
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ doins ReleaseNotes/ReleaseNotes${PV1}.${PV2}.${SPV3}.html
+ [[ -f ReleaseNotes/Patch${PV1}.${PV2}.${SPV3}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${PV1}.${PV2}.${SPV3}-*.txt
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${SPV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.10.02.ebuild b/sci-physics/geant/geant-4.10.02.ebuild
new file mode 100644
index 000000000000..540e9bbab354
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.02.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+SPV3=$(printf %1d ${PV3})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib threads"
+
+RDEPEND="
+ dev-libs/expat
+ =sci-physics/clhep-2.3.1.0:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND} prefix? ( app-shells/tcsh )"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV1}.${PV2}.${PV3} )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${SPV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch -p1 "${FILESDIR}/${P}-std-isnan.patch"
+ use examples || epatch "${FILESDIR}"/${PN}-${PV1}.${PV2}.${SPV3}-no-examples.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use threads GEANT4_BUILD_MULTITHREADED)
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ doins ReleaseNotes/ReleaseNotes${PV1}.${PV2}.${SPV3}.html
+ [[ -f ReleaseNotes/Patch${PV1}.${PV2}.${SPV3}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${PV1}.${PV2}.${SPV3}-*.txt
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${SPV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.10.03.ebuild b/sci-physics/geant/geant-4.10.03.ebuild
new file mode 100644
index 000000000000..ad7340f6f643
--- /dev/null
+++ b/sci-physics/geant/geant-4.10.03.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils versionator
+
+MY_P=${PN}${PV}
+SPV="$(get_version_component_range 1 ${PV}).$(get_version_component_range 2 ${PV}).$(printf %1d $(get_version_component_range 3 ${PV}))"
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MY_P}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib threads"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.3.3.0:2=
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? (
+ dev-qt/qtgui:4
+ opengl? ( dev-qt/qtopengl:4 )
+ )
+ raytracerx? (
+ x11-libs/libX11
+ x11-libs/libXmu
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND} prefix? ( app-shells/tcsh )"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV} )
+ doc? ( ~app-doc/geant-docs-${PV} )"
+
+HTML_DOCS=( ReleaseNotes/ReleaseNotes${SPV}.html )
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ if ! use examples; then
+ sed -i '/install(DIRECTORY examples/,/)/d' CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DGEANT4_INSTALL_DATA=OFF
+ -DUSE_GEANT4_BUILD_MULTITHREADED=$(usex threads)
+ -DUSE_GEANT4_USE_NETWORKDAWN=$(usex dawn)
+ -DUSE_GEANT4_USE_GDML=$(usex gdml)
+ -DUSE_GEANT4_USE_G3TOG4=$(usex geant3)
+ -DUSE_GEANT4_USE_XM=$(usex motif)
+ -DUSE_GEANT4_USE_OPENGL_X11=$(usex opengl)
+ -DUSE_GEANT4_USE_INVENTOR=$(usex inventor)
+ -DUSE_GEANT4_USE_QT=$(usex qt4)
+ -DUSE_GEANT4_USE_RAYTRACER_X11=$(usex raytracerx)
+ -DUSE_GEANT4_USE_NETWORKVRML=$(usex vrml)
+ -DUSE_GEANT4_USE_SYSTEM_ZLIB=$(usex zlib)
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ [[ -f ReleaseNotes/Patch${SPV}-1.txt ]] && DOCS+=( ReleaseNotes/Patch${SPV}-*.txt )
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/${PN^}${SPV}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/geant-4.9.6_p02-r1.ebuild b/sci-physics/geant/geant-4.9.6_p02-r1.ebuild
new file mode 100644
index 000000000000..97b4abbe397c
--- /dev/null
+++ b/sci-physics/geant/geant-4.9.6_p02-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils eutils fortran-2 versionator multilib
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+MYP=${PN}$(replace_version_separator 3 .)
+
+DESCRIPTION="Toolkit for simulation of passage of particles through matter"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+
+LICENSE="geant4"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+data dawn doc examples gdml geant3 inventor motif opengl
+ raytracerx qt4 static-libs vrml zlib"
+
+RDEPEND="
+ dev-libs/expat
+ >=sci-physics/clhep-2.1.3
+ dawn? ( media-gfx/dawn )
+ gdml? ( dev-libs/xerces-c )
+ motif? ( x11-libs/motif:0 )
+ opengl? ( virtual/opengl )
+ inventor? ( media-libs/SoXt )
+ qt4? ( dev-qt/qtgui:4 opengl? ( dev-qt/qtopengl:4 ) )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+PDEPEND="
+ data? ( ~sci-physics/geant-data-${PV} )
+ doc? ( ~app-doc/geant-docs-${PV1}.${PV2}.${PV3} )"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.9.4-zlib.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEANT4_USE_SYSTEM_CLHEP=ON
+ -DCMAKE_INSTALL_LIBDIR="${EROOT}usr/$(get_libdir)"
+ -DGEANT4_INSTALL_DATA=OFF
+ $(cmake-utils_use dawn GEANT4_USE_NETWORKDAWN)
+ $(cmake-utils_use gdml GEANT4_USE_GDML)
+ $(cmake-utils_use geant3 GEANT4_USE_G3TOG4)
+ $(cmake-utils_use motif GEANT4_USE_XM)
+ $(cmake-utils_use opengl GEANT4_USE_OPENGL_X11)
+ $(cmake-utils_use inventor GEANT4_USE_INVENTOR)
+ $(cmake-utils_use qt4 GEANT4_USE_QT)
+ $(cmake-utils_use raytracerx GEANT4_USE_RAYTRACER_X11)
+ $(cmake-utils_use vrml GEANT4_USE_NETWORKVRML)
+ $(cmake-utils_use zlib GEANT4_USE_SYSTEM_ZLIB)
+ $(cmake-utils_use_build static-libs STATIC_LIBS)
+ )
+ if use inventor; then
+ mycmakeargs+=(
+ -DINVENTOR_INCLUDE_DIR="$(coin-config --includedir)"
+ -DINVENTOR_SOXT_INCLUDE_DIR="$(coin-config --includedir)"
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ # adjust clhep linking flags for system clhep
+ # binmake.gmk is only useful for legacy build systems
+ sed -i -e 's/-lG4clhep/-lCLHEP/' config/binmake.gmk || die
+ cmake-utils_src_install
+ insinto /usr/share/doc/${PF}
+ local mypv="${PV1}.${PV2}.${PV3}"
+ doins ReleaseNotes/ReleaseNotes${mypv}.html
+ [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${mypv}-*.txt
+ use examples && doins -r examples
+}
+
+pkg_postinst() {
+ elog "The following scripts are provided for backward compatibility:"
+ elog "$(ls -1 ${EROOT%/}/usr/share/Geant4-${PV2}.${PV3}.*/geant4make/*sh)"
+}
diff --git a/sci-physics/geant/metadata.xml b/sci-physics/geant/metadata.xml
new file mode 100644
index 000000000000..603011551974
--- /dev/null
+++ b/sci-physics/geant/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors. Geant 3 simulations are performed by
+ linking Fortran code supplied by the user with the Geant libraries,
+ then running the resulting executable. This package includes gxint,
+ the script used to perform this linking step.
+ Geant 4 is a complete rewrite in C++ with addition of other modern
+ features and detectors.
+</longdescription>
+ <use>
+ <flag name="data">Add a lot of standard physics data files for geant4</flag>
+ <flag name="dawn">Add support for <pkg>media-gfx/dawn</pkg> (3D postscript
+ rendering)</flag>
+ <flag name="gdml">Enable geometry markup language for xml</flag>
+ <flag name="geant3">Add compatibility for geant321 to geant4</flag>
+ <flag name="inventor">Add support for Open Inventor SGI toolkit via Coin3D</flag>
+ <flag name="raytracerx">Enable raytracing for physics events</flag>
+ <flag name="vrml">Enable output of geant4 in vrml formats</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/h2o-gtk/Manifest b/sci-physics/h2o-gtk/Manifest
new file mode 100644
index 000000000000..74f127d62d54
--- /dev/null
+++ b/sci-physics/h2o-gtk/Manifest
@@ -0,0 +1,6 @@
+DIST h2o-gtk-0.1.tar.bz2 69851 SHA256 ad62d02b37aac565f6cc854e6dc3ed2e31ddc52ed458b4cd9b9c7b276546bb01 SHA512 58f376f53fc108be620d5a792227ee65e7464581c45b68e94d7bb19b90862f3b008b172d3a2f2376fee5f30fd19f6bb0f5ec74cb49f1224245f8c6ae68cc9b04 WHIRLPOOL 3fef2e32c8a622f1688b7cd4d4be5591117dff536c69d0201f40106c9c27ed9174e43931b0373787e93ab2ff220f0c31f4af09dca63a58c9415252c33c14b4f4
+EBUILD h2o-gtk-0.1.ebuild 558 SHA256 9264c1e04df0cb20c7ea471e9eb0b9dc6ca2f98b9424bc8d0034e2d74d3fd37b SHA512 c37b502b50ecf1e136ebcabed9ab1046892d771c664283301a5478eacf45cfd8b1a5f19a8e88a08a39d99443ee83142d179ba80951d9f419aa787c875f1f9194 WHIRLPOOL 757e4ab703b4cbc7f19035e548d8cac5af2a0186c3b6ff86b8085e9426a95910be1cf22b0219c806643083fcd58d701bb9d473431735fb3d96b679b391d25bba
+EBUILD h2o-gtk-9999.ebuild 619 SHA256 5e1b3f228bad5d20e5f0b316b6e496292d46838029a06179c44dd6c85bc3c8e3 SHA512 bfc7e4ce0e5da1b86c5476a4ab410fa5bd0f02dddc142f6166c4141f4ed591aa41047ad4269ae78dc682e0b466d0ece5b0095ab7d69279fca9aee1d366b6bfda WHIRLPOOL 2c16cee1d34e602fdbc5e15ca2d9c5929102110ecb07df0fd4888b3e7be154d727097ba8deacc36a3b297666e590c28dc3769c2a6a36d6b39d22558af3b45fef
+MISC ChangeLog 2640 SHA256 1e6b1c2f82da1eb8d82875b6a8026aa9d7422f15d83d130e2cbc44632d7d2c6b SHA512 b2ad659bdbc23b9e8f3f002f882ae45ecf2f43104435b6f545bd0854f1d9f51c7e976c4eedfd2b94d8825422772d3b80dbd493b3226a53102a8f950ab4815466 WHIRLPOOL 09a10583a29d95276a90664aa7ce141f918121e7002f7a50dd53d337e0dd2d78b97f7769805e949b6d25f0a21702b88ed289385c8bf3745ec91560c1ab0e9810
+MISC ChangeLog-2015 808 SHA256 8ccc1be68e988f041632b9485315e8760aaf7b61f5a7d44899eb76b587c1bef3 SHA512 19fa165dfdab4de8f450bde5175e2a715d116b01eb6e8d2f67dc98cbc979cb478c0151bf28f5b2c0685d1aaee8f61965ef7edb1540ac59e287cb3c50d87484a6 WHIRLPOOL 045312221a2b2c40239738745dd31a6798dc6aff9be733bfe75b3e431c544c8fb1a7e0d24a992ddd6fc405ef7fc8fe4771b64cf06bcd8b4b1b2085c08ba34bb8
+MISC metadata.xml 509 SHA256 393d36909a0df60112ad515e7e10dce77daafd953d951edaf2e65e95bfb6691b SHA512 0787cd0836cbaca79582c6a5277c9766913a1d1c783cc8194ca1fa5e2cabb4f40f4e1c590dc48451031ef2fab4b64a1aff8cf2906ada063b0cde1a05c6b719b0 WHIRLPOOL c5868ad64c412548e1fd59aca5e2373ace19cda2fcba26685aa00b36a15d51107007eee7a6ce79f349fb0faf6860fc4752d5ae1d53655cfe4d07ad86f81f3ca1
diff --git a/sci-physics/h2o-gtk/h2o-gtk-0.1.ebuild b/sci-physics/h2o-gtk/h2o-gtk-0.1.ebuild
new file mode 100644
index 000000000000..58ab0a0cab1f
--- /dev/null
+++ b/sci-physics/h2o-gtk/h2o-gtk-0.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools-utils flag-o-matic
+
+DESCRIPTION="GTK+ UI for libh2o -- water & steam properties"
+HOMEPAGE="https://bitbucket.org/mgorny/h2o-gtk/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-cpp/gtkmm:2.4=
+ >=sci-libs/libh2oxx-0.2
+ sci-libs/plotmm"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ autotools-utils_src_prepare
+ append-cxxflags -std=c++11
+}
diff --git a/sci-physics/h2o-gtk/h2o-gtk-9999.ebuild b/sci-physics/h2o-gtk/h2o-gtk-9999.ebuild
new file mode 100644
index 000000000000..6276dd849cb2
--- /dev/null
+++ b/sci-physics/h2o-gtk/h2o-gtk-9999.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="https://bitbucket.org/mgorny/${PN}.git"
+
+inherit git-r3
+#endif
+
+inherit autotools-utils
+
+DESCRIPTION="GTK+ UI for libh2o -- water & steam properties"
+HOMEPAGE="https://bitbucket.org/mgorny/h2o-gtk/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-cpp/gtkmm:2.4=
+ sci-libs/libh2oxx:0=
+ sci-libs/plotmm:0="
+DEPEND="${RDEPEND}"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+#endif
diff --git a/sci-physics/h2o-gtk/metadata.xml b/sci-physics/h2o-gtk/metadata.xml
new file mode 100644
index 000000000000..00eb8a518fdf
--- /dev/null
+++ b/sci-physics/h2o-gtk/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://bitbucket.org/mgorny/h2o-gtk/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/h2o-gtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/harminv/Manifest b/sci-physics/harminv/Manifest
new file mode 100644
index 000000000000..84f3154ff3a4
--- /dev/null
+++ b/sci-physics/harminv/Manifest
@@ -0,0 +1,6 @@
+AUX harminv-1.3.1-configure.ac.patch 965 SHA256 a0bd665d97afb2e6d7d21bb55062cf25b89b0e2c65472f811957529ce14927a8 SHA512 c177dae71d23df73f09d1754edfcbb464970b6bb987c46f880d3eee288ab69a293b885b85414b519a32323e8c5f83f853d68339eaed2b8d4c5734c5e55a96691 WHIRLPOOL f86e6d0c90324d76bcf305c62ed368b4ee26ce7686886d9602655ecd05d211eb815abfa0d57453f4f72c2efb24daeea8e1d0db43d4b733b5808a8ede31c60021
+DIST harminv-1.3.1.tar.gz 327832 SHA256 245778c16390c22850de3fb716c3db19514d40415ee3693293bfe59c66536583 SHA512 7dc1c2f658d9722cd64558a702f04409d10b87cb4ff7247c2fbd7f8d9a24387fef1b8ba4b7b183727bef21891c32d27d83aaa3607d063f8ad60702be4bfe5c3c WHIRLPOOL 31e3e0c6a5a01431a2d6daf4fdab362576f2f72617e5d89ccb0f04cde147c59185697bfc40c35ca09168bc4a2281468e41b978b091f2445f6eea203cf8aa7a12
+EBUILD harminv-1.3.1-r1.ebuild 753 SHA256 a2e9de43dae5eb8c57822256f489667c4213f1cf96be9ae1248ed92ac8d714a1 SHA512 4eafc9b442d5463971bafcd57003073544117fa04510e42ed0e8d62032b072fee1e5d6d42c802596aed67371b66cc4647a7f814e2cde8c9334f0647e09d37729 WHIRLPOOL 9b6064d15b94821ba49daeb2012d92d40a05806ba0c8f379b79234bfebe3cadcf3c2da8cdea1e70f46b1e41d2261ecb68e22bcacc7516830b52f12f5aa21d676
+MISC ChangeLog 3028 SHA256 488ebf5671e0051d96ecc3d8f23004274cffb566d2e3bce961d113c5634a704e SHA512 dd7689767fe6cb2009fe072171558d81834465fc8f66e748c3ce30948f14755bb93d08dd1ef9e29d5e74b46eb6c24adafcae4f169c54ec136a9fb55162311e04 WHIRLPOOL d0331b6afa170444f69d62abe0db5d44b35cbf326b492b1554e7e1333e12d3e8b3520829fdbd0fa69320a2327295511cda4ef932a1f0fb67a612ff872c418dd6
+MISC ChangeLog-2015 1083 SHA256 bdbb6ffe83c66f2bd184a1a2279460702c7cbb31b5eed762e94d2ced544793db SHA512 4e982669866b8f4f17000fefeca99dc57c1c70e04e1da90e8a0ba7993ab6664f9ded2460653450027091c8412e6ba09a5df56bfcb2bf035bdca3a397f5298613 WHIRLPOOL df713dc8c34c65ad0eb306dbef33d69015cd6c8bd478b5fdcbf71b796e8e73a69d0c0589825a3edb0e573c616c513889f1d2c765f9d6f49bb6ec266071e19089
+MISC metadata.xml 632 SHA256 f20a4e89568ff29e1e341bd1b644429111659a4f0797a1b4e771c317987ea5c7 SHA512 ec47048cde692010d9b562d430992630d9107e65d401a7f429a2e0658c8edaab2f200b2d84c233fe6481330c0ded1ff6672fd3b7b9f75a5130129e3037b9da9d WHIRLPOOL fb3856384ae476629ccda644d0fc804169e32fe7ca06238c8c089a1ad47c612cd997a085dd3e994232d3adae4f2d770459a71549b41225fca587046363ba392d
diff --git a/sci-physics/harminv/files/harminv-1.3.1-configure.ac.patch b/sci-physics/harminv/files/harminv-1.3.1-configure.ac.patch
new file mode 100644
index 000000000000..508a8c177902
--- /dev/null
+++ b/sci-physics/harminv/files/harminv-1.3.1-configure.ac.patch
@@ -0,0 +1,31 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,7 +9,7 @@
+ # *not* the same as the "public" version number. CURRENT:REVISION:AGE
+ SHARED_VERSION_INFO="2:4:0"
+ AC_SUBST(SHARED_VERSION_INFO)
+-AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default
++AM_ENABLE_SHARED(yes) dnl shared libs cause too many headaches to be default
+
+ ##############################################################################
+
+@@ -123,9 +123,16 @@
+ ###########################################################################
+
+ # Checks for BLAS/LAPACK libraries:
+-
+-ACX_BLAS([], [AC_MSG_ERROR([BLAS library not found])])
+-ACX_LAPACK([], [AC_MSG_ERROR([LAPACK library not found])])
++sinclude(acx_blas.m4)
++ACX_BLAS
++if test x"$BLAS_LIBS" = x ; then
++ AC_MSG_ERROR([BLAS library not found])
++fi
++sinclude(acx_lapack.m4)
++ACX_LAPACK
++if test x"$LAPACK_LIBS" = x ; then
++ AC_MSG_ERROR([LAPACK library not found])
++fi
+
+ LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
+
diff --git a/sci-physics/harminv/harminv-1.3.1-r1.ebuild b/sci-physics/harminv/harminv-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..396cc6fe8440
--- /dev/null
+++ b/sci-physics/harminv/harminv-1.3.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Extraction of complex frequencies and amplitudes from time series"
+HOMEPAGE="http://ab-initio.mit.edu/harminv/"
+SRC_URI="http://ab-initio.mit.edu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-configure.ac.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+}
diff --git a/sci-physics/harminv/metadata.xml b/sci-physics/harminv/metadata.xml
new file mode 100644
index 000000000000..5ddaae490a92
--- /dev/null
+++ b/sci-physics/harminv/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Harminv is a program to solve the problem of harmonic inversion,
+ given a discrete-time, finite-length signal that consists of a sum of
+ finitely-many sinusoids (possibly exponentially decaying) in a given
+ bandwidth, it determines the frequencies, decay constants, amplitudes,
+ and phases of those sinusoids.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/hepmc/Manifest b/sci-physics/hepmc/Manifest
new file mode 100644
index 000000000000..ac5c1ad95ed9
--- /dev/null
+++ b/sci-physics/hepmc/Manifest
@@ -0,0 +1,5 @@
+DIST HepMC-2.06.09.tar.gz 4612637 SHA256 c60724ca9740230825e06c0c36fb2ffe17ff1b1465e8656268a61dffe1611a08 SHA512 1030f31ad9d19d8ae184145a693c4a3092131f485e2ed89598b7172992a825ad9aa46fb44a9199a00c4a6bd7e163daead9452e9bc4fe32cb3b97351cf22906c4 WHIRLPOOL 62b91da92ec30bbc1f5619a87e6172fd563751fe29453ed5bdf31ecae6c5964b59a601b4a52f5c3249cfc20664041ee27bb7114d006dabdf05c5926194890370
+EBUILD hepmc-2.06.09-r1.ebuild 2008 SHA256 ab8e3996e4927e3b7b6ac7d2c4fc55d394519c51833cf184bbdf89db7ad9446f SHA512 45ae43d27f3a46c79feaed8f9071f45b9a63d6d22dc8f93c0f329f412eda80eb722db0cce12a441f6a94356bf69131c8508a72c9d90b8fc7bcc1abb37ff52b0a WHIRLPOOL 276f66ccb72364d52167fdf186f1d8a2eab3404650dc7ae5c1c9c53817a78216a88fb7e8d49c8f2b1dc8b1d93cb8547faf64f447710eb743794144f5b50dd482
+MISC ChangeLog 3586 SHA256 1c634047c1bde1e526fb7ba5f9a2a87bcf3567dea5bc66afb442a47f3003c862 SHA512 7c8e331067647437ecc9f278c1d1d63e0538fd70b80f360c9cdfc97c1687e7b393d85440814aaed9f322c5071e3f1e3f2cbcb8ed67c805bcd136a35f4cf77045 WHIRLPOOL b5fe5f2ce632efb3b96e5aafd67545370edf2bfe48d3a798ca9f907cdd412338f4b8d71fbe373f25d7bea014b1cacc734287ea105a205dc7e075bfa8a81fe949
+MISC ChangeLog-2015 5053 SHA256 1fb557bf408eee5a73f39185d63736db7e3b298e4ac6c3fd3415d90179b4b600 SHA512 c5d7567e359699d58ad9c4a62f7ebd27dd1369d4d6f565b6045a4c199932a6b820ad8a882915637f31364cf86fc6841bbbc9b84d49e41c86e29f265b1e57825d WHIRLPOOL 420a066d467a9c17111c0254620000a3d8d0c53440c8a4842f97858471c5040ab955c3a4e4f327fd5a3620f997e59bac3288f7668142ca7413cd7f27d89ffdcb
+MISC metadata.xml 1386 SHA256 6d4ce6cb438474cffb889b1314febc176012fdd85ea1de72957e7596f2f8e0e1 SHA512 b0ef90b6404b04d1d393e9e8bb04ff08a51f72938362f4ae1e2806bfe29c99d50089f15ddacb59b94d6d554d0ec8842ba7b89777434e0bab08c51627ab8bd9ce WHIRLPOOL 3eefd0c08807619b539c4935dd2ca7fc6c3c894939b16547a954a44fea904dd0ff57508b960cd9e610874b5a77aca2eab74b985f7037d1feb582da077efa8c54
diff --git a/sci-physics/hepmc/hepmc-2.06.09-r1.ebuild b/sci-physics/hepmc/hepmc-2.06.09-r1.ebuild
new file mode 100644
index 000000000000..20b3409bd416
--- /dev/null
+++ b/sci-physics/hepmc/hepmc-2.06.09-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils
+
+MYP=HepMC-${PV}
+
+DESCRIPTION="Event Record for Monte Carlo Generators"
+HOMEPAGE="http://lcgapp.cern.ch/project/simu/HepMC/"
+SRC_URI="http://lcgapp.cern.ch/project/simu/HepMC/download/${MYP}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="cm doc examples gev static-libs test"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ || (
+ dev-texlive/texlive-latex
+ dev-tex/floatflt
+ )
+ )"
+
+S="${WORKDIR}/${MYP}"
+
+DOCS=( ChangeLog AUTHORS )
+
+src_prepare() {
+ sed -i -e '/add_subdirectory(doc)/d' CMakeLists.txt
+ # CMake doc building broken
+ # gentoo doc directory
+ #sed -i \
+ # -e "s:share/HepMC/doc:share/doc/${PF}:" \
+ # doc/CMakeLists.txt || die
+
+ # gentoo examples directory
+ sed -i \
+ -e "s:share/HepMC:share/doc/${PF}:" \
+ $(find examples -name CMakeLists.txt) || die
+
+ # respect user's flags
+ sed -i \
+ -e "s/-O -ansi -pedantic -Wall//g" \
+ cmake/Modules/HepMCVariables.cmake || die
+
+ # gentoo libdir love
+ sed -i \
+ -e '/DESTINATION/s/lib/lib${LIB_SUFFIX}/g' \
+ {src,fio}/CMakeLists.txt || die
+
+ # remove targets if use flags not set
+ use examples || sed -i -e '/add_subdirectory(examples)/d' CMakeLists.txt
+ use test || sed -i -e '/add_subdirectory(test)/d' CMakeLists.txt
+ if ! use static-libs; then
+ sed -i \
+ -e '/(HepMC\(fio\|\)S/d' \
+ -e '/TARGETS/s/HepMC\(fio\|\)S//' \
+ {src,fio}/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ # use MeV over GeV and mm over cm
+ local length_conf="MM"
+ use cm && length_conf="CM"
+ local momentum_conf="MEV"
+ use gev && momentum_conf="GEV"
+ mycmakeargs+=(
+ -Dlength=${length_conf}
+ -Dmomentum=${momentum_conf}
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ cd doc
+ ./buildDoc.sh || die
+ ./buildDoxygen.sh || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc doc/*.pdf && dohtml -r doc/html/*
+}
diff --git a/sci-physics/hepmc/metadata.xml b/sci-physics/hepmc/metadata.xml
new file mode 100644
index 000000000000..b89c291af1b6
--- /dev/null
+++ b/sci-physics/hepmc/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ The HepMC package is an object oriented event record written in C++
+ for High Energy Physics Monte Carlo Generators. Many extensions from
+ HEPEVT, the Fortran HEP standard, are supported: the number of entries
+ is unlimited, spin density matrices can be stored with each vertex,
+ flow patterns (such as color) can be stored and traced, integers
+ representing random number generator states can be stored, and an
+ arbitrary number of event weights can be included. Particles and
+ vertices are kept separate in a graph structure, physically similar to
+ a physics event. The added information supports the modularisation of
+ event generators. The package has been kept as simple as possible with
+ minimal internal/external dependencies. Event information is accessed
+ by means of iterators supplied with the package.
+
+ Reference: M. Dobbs and J.B. Hansen, Comput. Phys. Commun. 134 (2001)41.
+</longdescription>
+<use>
+ <flag name="gev">Build with GeV instead of default MeV for momentum units</flag>
+ <flag name="cm">Build with cm instead of default mm for length units</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-physics/heppdt/Manifest b/sci-physics/heppdt/Manifest
new file mode 100644
index 000000000000..90a94549cec0
--- /dev/null
+++ b/sci-physics/heppdt/Manifest
@@ -0,0 +1,5 @@
+DIST HepPDT-3.04.01.tar.gz 1851879 SHA256 2c1c39eb91295d3ded69e0d3f1a38b1cb55bc3f0cde37b725ffd5d722f63c0f6 SHA512 33a93b7d18c0cc64ab13923eb5edca89ed753a7f888a31c1d6a5f84f735e4042e2eaaf04e221d487976603a40fbd84cede4b4dd2bcd2e7479d97cc637dda637b WHIRLPOOL 211e9e8839e508f9929d9f69d9d1d67e633067f5957e5f59f44db6a261d3b515b7d0d9aaf49a9648ee38106ba9b9ea91abdc24820798e678eb79c640456c92ba
+EBUILD heppdt-3.04.01-r1.ebuild 1177 SHA256 7ebca96006ba628a52b2b52608f4a793c2300426bfe58736a4eb1e2f8b9f83ca SHA512 f273e3e200b4f44711947ef943c91badc1da00662c19bf7e55adafe1e1648c934c9a80547179fbd0da8c8f2fb925c9782614ddcd4f1a58ca3c2dc85ca2d9269b WHIRLPOOL 332cdff5a0825f415217f846d705dfe30d3a7e5ee907d8a51cd88ec7bbd8dc3abbc0951b5d0882c88c3357a489e8288209b1d438e3f25bfd3d43ba3e7dd5c19e
+MISC ChangeLog 2951 SHA256 3348f5e1192cbb16a6a35c1c01732161ae67b62ee2cc3123ddc9115786531951 SHA512 3a2821e8de9443ce8b0c74123367bef0f22a16e14b0601f9ed47fb068a8d83603bf26a7c08f120f66fd847fd33bcf82ea8d3bff3b0e31ea415fd1c4fd0556f2e WHIRLPOOL 4a61a1878ade8383ecd349ba3ea6471c9edbdf7d7300f2c6097ff71355116e8217cb34943dec2063c20a06a3109d541b8850e0ec924732f90088193fc16edad2
+MISC ChangeLog-2015 741 SHA256 89bb86418a732729e732f2a0d452e788732a671ba350790dbdb31a16f86a8006 SHA512 a80774ad9f02350201a8ade6a5c27ea75ffc7c991de4b119f5163f1e591933e12da1b6165aa6113860733407732d65c40b226afde2eb1581819ac145077c0193 WHIRLPOOL f3113a2d4eba38260f876f8b1cc0173e4f179980f7626e9a2ae5d6b237b02b1d3ff8c204d0f559f25cdfe5c1d7e0a6a66a7246ca3e2ea2f7f1290570677d4c9a
+MISC metadata.xml 723 SHA256 5b5af3fc7925e5f1c97ddf55ec2162405f5e6d75f40e9eb2ee3114a71aee1dad SHA512 3dc66e18e8d7df29f7b298e4e9e2e3f3944194cd48062f15250fd174c08cc8a812c9656bcfec02435a6d78056da6b6522527f1f5a951fd41a12c5a2f701919d5 WHIRLPOOL 29824b04875e33a408415fb339ea3e602082aac66beac90ae7960848ce8a476326bc35fbf4f7ba994887c7ff27a8bbbc92ab8eea63b7e0977be3aa35665f2103
diff --git a/sci-physics/heppdt/heppdt-3.04.01-r1.ebuild b/sci-physics/heppdt/heppdt-3.04.01-r1.ebuild
new file mode 100644
index 000000000000..e5ec556641c7
--- /dev/null
+++ b/sci-physics/heppdt/heppdt-3.04.01-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+MY_P=HepPDT-${PV}
+
+DESCRIPTION="Data about each particle from the Review of Particle Properties"
+HOMEPAGE="http://lcgapp.cern.ch/project/simu/HepPDT/"
+SRC_URI="${HOMEPAGE}/download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ # respect user flags
+ sed -i \
+ -e '/AC_SUBST(AM_CXXFLAGS)/d' \
+ configure.ac || die
+ # directories
+ sed -i \
+ -e 's:$(prefix)/data:$(datadir)/${PN}:g' \
+ data/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/src/HepPDT:${S}/src/HepPID" \
+ emake check MY_LD=-L SHEXT=so
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ mv "${ED%/}"/usr/doc/* "${ED%/}"/usr/share/doc/${PF}/ || die
+ fi
+ if use examples; then
+ mv "${ED%/}"/usr/examples "${ED%/}"/usr/share/doc/${PF}/ || die
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ rm -rf "${ED%/}"/usr/{doc,examples} || die
+}
diff --git a/sci-physics/heppdt/metadata.xml b/sci-physics/heppdt/metadata.xml
new file mode 100644
index 000000000000..f34cc770d951
--- /dev/null
+++ b/sci-physics/heppdt/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ HepPDT contains the fixed data about each particle type. In other
+ words, it contains the data that can be found in the Review of
+ Particle Properties.
+ This data is conceptually split into particle information (e.g. mass)
+ and decay information. HepPDT provides a simple set of particle data
+ classes. Particle ID translation methods are in a separate HepPID
+ library, which is distributed as part of HepPDT.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/herwig++/Manifest b/sci-physics/herwig++/Manifest
new file mode 100644
index 000000000000..173717796766
--- /dev/null
+++ b/sci-physics/herwig++/Manifest
@@ -0,0 +1,5 @@
+AUX herwig++-2.6.3-looptools.patch 3187 SHA256 349a59a11546027d2924d6bb28340d7d5b5c74823dc69507fa3a7fe3cff12444 SHA512 22a39b340a12fc7060bbd26700be836b1a9833a9b43f93ddfef6659ee0517fc6804e455dd39cd26b8d3ff41c125acca34ea0e72bfa45958885c347e38078aaab WHIRLPOOL 36fabf7d6291e7bc6efd62e88fd0a696c2811f41c3551bef562ab6c3d6e7de0813f451cf715f9caf52c413c2dc9374e10e239cb146a3bacd5cd33dc2772d2657
+DIST Herwig++-2.7.1.tar.bz2 3388956 SHA256 80a189376bb65f5ec4e64f42e76c00ea9102d8224010563a424fc11e619a6ad6 SHA512 643f389f13f22b30d0adb4ca601a11c2686f6db4746af51136601954af2ec20eb0af7b45981e764d8b71cb7206bfe310beea1fee069972868955b1f024b8d5e3 WHIRLPOOL 5336136e90c4f90e4e08a24a4d753ab61d1c4b033a23228ebb5bc039175987f4d70d7162a2319b635644a3fbaf24c9bbc1b901e92abb4bcaad27884e429d472a
+EBUILD herwig++-2.7.1-r1.ebuild 1607 SHA256 77418241aa0af048c65974efd841e25e6f9f4ad32378cf909b0fd027ee68aca1 SHA512 ba002990f6071e6d98ca4120d1db8e2ecee380dc2b181ce3a3eff14e06d6337ce2ed1e6451dc736c9e506896dbc22d7fc09945bfa149004190b5b647dfd9a0cd WHIRLPOOL 2b60e0787d9e0510ff879ec32fd6e4b9dcb2c4ef1d04bc5ab3bb4e1aa02151cbc6fbf18fb029972f3b9c8ee182eb62c91b45efb5e30460d784549d2168878352
+MISC ChangeLog 1537 SHA256 be6b78e296ec8cd319912000555a5f04ea7be569b92aff19db035efec3d7d61b SHA512 1db9ce36031b664cac1e6a7317ce74e760ef9598b6d283ac07a8375c98a3e62adfefa7256b4f193352cecb855e32fd7139d7e8549c5cd6db0f41fbaaf0c229f8 WHIRLPOOL bc72a5f33a3e565423f9986e1aeb78ab099bd77a236f4057100405479d62244a6419368df07c2ebba7e8d595362ed83dc824ee119c1bea135d2c9295e362bf58
+MISC metadata.xml 844 SHA256 a86f6a205fcf2bcb8f652dc47a348f7315fb69460353283f8d90e6906e4b11fd SHA512 72d27384af741c0508a9fa5df44c76c0bc34f0affbcbdd76e5b46b84ecb08db80bf6c8735d45df180728a13d68cef8cc97aa22e6b12b9bb946cec5036c30afc4 WHIRLPOOL 3845d4e3b126531d65b7c3f5ca90858877b24ce91b225d043524f8b0bf9287c77da5bccec2b48f1ba9028cfa0c99df2e6b7f34c88d922273c3ee72d9601ccfa1
diff --git a/sci-physics/herwig++/files/herwig++-2.6.3-looptools.patch b/sci-physics/herwig++/files/herwig++-2.6.3-looptools.patch
new file mode 100644
index 000000000000..0c802977db6a
--- /dev/null
+++ b/sci-physics/herwig++/files/herwig++-2.6.3-looptools.patch
@@ -0,0 +1,64 @@
+--- Looptools/Makefile.am
++++ Looptools/Makefile.am
+@@ -1,58 +1,12 @@
+-noinst_LTLIBRARIES = libHwLooptoolsXFC.la libHwLooptoolsCFC.la
+-noinst_LTLIBRARIES += libHwLooptools.la
+-
+-EXTRA_DIST = include/lt.h include/ftypes.h include/ff.h include/ffwarn.h \
+- include/fferr.h include/defs.h include/looptools.h include/ffperm5.h \
+- include/clooptools.h include/cexternals.h include/externals.h \
+- util/solve-LU.F util/solve-LU.h util/solve-Eigen.F
+-
+-theXFCSOURCES = \
+-A/A0.F A/A00.F A/ffxa0.F A/ffca0.F B/Bget.F \
+-B/Bcoeff.F B/BcoeffC.F B/Bcoeffa.F B/Bcoeffb.F B/ffxb0.F \
+-B/ffcb0.F B/ffxb1.F B/ffcb1.F B/ffxb2p.F B/ffcb2p.F \
+-B/ffxdb0.F B/ffcdb0.F B/ffxdb1.F B/ffdel2.F B/ffcel2.F \
+-C/C0.F C/C0C.F C/Cget.F C/ffxc0.F C/ffcc0.F \
+-C/ffxc0i.F C/ffxc0p.F C/ffxc0p0.F C/ffcc0p.F C/ffdxc0.F \
+-C/ffdel3.F C/ffcel3.F D/D0.F D/D0C.F D/Dget.F \
+-D/ffxd0.F D/ffxd0h.F D/ffxd0i.F D/ffxd0p.F D/ffxd0m0.F \
+-D/ffxd0tra.F D/ffxdbd.F D/ffdcc0.F D/ffdel4.F D/ffd0c.F \
+-D/ffTn.F D/ffT13.F D/ffS2.F D/ffS3n.F D/ffRn.F \
+-E/E0.F E/Eget.F E/Ecoeffa.F E/Ecoeffb.F E/ffxe0.F \
+-E/ffdel5.F util/ini.F util/auxCD.F util/solve.F util/Dump.F \
+-util/Li2.F util/ffinit.F util/ffxli2.F util/ffcli2.F util/ffxxyz.F \
+-util/ffcxyz.F util/ffcrr.F util/ffcxr.F util/fftran.F util/ffabcd.F \
+-util/ff2dl2.F util/ffcxs3.F util/ffcxs4.F util/ffdcxs.F util/ffbndc.F
+-
+-## the following need -DCOMPLEXPARA
+-theCFCSOURCES = \
+-A/A0.F A/A00.F B/Bget.F B/Bcoeffa.F C/Cget.F D/Dget.F E/E0.F \
+-E/Eget.F E/Ecoeffa.F E/Ecoeffb.F util/solve.F util/Dump.F util/Li2.F
++noinst_LTLIBRARIES = libHwLooptools.la
+
+ commonCPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include
+
+-libHwLooptoolsXFC_la_SOURCES = $(theXFCSOURCES)
+-libHwLooptoolsXFC_la_CPPFLAGS = $(commonCPPFLAGS)
+-libHwLooptoolsXFC_la_FCFLAGS = $(AM_FCFLAGS) -ffixed-line-length-none
+-libHwLooptoolsXFC_la_FFLAGS = $(AM_FFLAGS) -ffixed-line-length-none
+-
+-libHwLooptoolsCFC_la_SOURCES = $(theCFCSOURCES)
+-libHwLooptoolsCFC_la_CPPFLAGS = $(commonCPPFLAGS) -DCOMPLEXPARA
+-libHwLooptoolsCFC_la_FCFLAGS = $(AM_FCFLAGS) -ffixed-line-length-none
+-libHwLooptoolsCFC_la_FFLAGS = $(AM_FFLAGS) -ffixed-line-length-none
+-
+-## installed already from "include/Makefile.am"
+-## noinst_HEADERS = include/clooptools.h
+-
+-##if NEED_APPLE_FIXES
+-##libHwLooptoolsXFC_la_LDFLAGS = -Wl,-single_module
+-##libHwLooptoolsCFC_la_LDFLAGS = -Wl,-single_module
+-##endif
+-
+-libHwLooptools_la_SOURCES = util/cache.c clooptools.cc
++libHwLooptools_la_SOURCES = clooptools.cc
+ libHwLooptools_la_CXXFLAGS = $(AM_CXXFLAGS) -Wno-strict-aliasing
+ libHwLooptools_la_CPPFLAGS = $(commonCPPFLAGS)
+ libHwLooptools_la_CFLAGS = $(AM_CFLAGS) -std=c99
+-libHwLooptools_la_LIBADD = libHwLooptoolsXFC.la libHwLooptoolsCFC.la
++libHwLooptools_la_LIBADD = -looptools
+
+
+ ## libHwLooptoolsHelper2_la_SOURCES = clooptools.cc
diff --git a/sci-physics/herwig++/herwig++-2.7.1-r1.ebuild b/sci-physics/herwig++/herwig++-2.7.1-r1.ebuild
new file mode 100644
index 000000000000..cb49eebe72f9
--- /dev/null
+++ b/sci-physics/herwig++/herwig++-2.7.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils eutils flag-o-matic multilib
+
+MYP=Herwig++-${PV}
+
+DESCRIPTION="High-Energy Physics event generator"
+HOMEPAGE="http://herwig.hepforge.org/"
+SRC_URI="http://www.hepforge.org/archive/herwig/${MYP}.tar.bz2"
+
+SLOT="0/15"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 fastjet static-libs"
+
+# >sci-physics/looptools-2.8 leads to misoperation
+# and failing tests (it lacks some symbols)
+RDEPEND="
+ dev-libs/boost:0=
+ sci-libs/gsl:0=
+ <=sci-physics/looptools-2.8:0=
+ ~sci-physics/thepeg-1.9.2:0=
+ fastjet? ( sci-physics/fastjet:0= )"
+DEPEND="${RDEPEND}
+ >=sys-devel/boost-m4-0.4_p20160328"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.3-looptools.patch
+ # fixes bug 570458, which is due to an outdated bundled boost.m4
+ rm m4/boost.m4 || die
+ find -name 'Makefile.am' -exec \
+ sed -i -e '1ipkgdatadir=$(datadir)/herwig++' {} \; || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ use prefix && \
+ append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/ThePEG
+ local myeconfargs=(
+ --with-boost="${EPREFIX}"/usr
+ --with-thepeg="${EPREFIX}"/usr
+ $(use_enable c++11 stdcxx11)
+ $(use_with fastjet fastjet "${EPREFIX}"/usr)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/defaults/PDF.in || die
+ sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/HerwigDefaults.rpo || die
+}
diff --git a/sci-physics/herwig++/metadata.xml b/sci-physics/herwig++/metadata.xml
new file mode 100644
index 000000000000..23f7c30990f2
--- /dev/null
+++ b/sci-physics/herwig++/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription>
+ Herwig++ is a completely new event generator, written in C++.
+ It is built on the experience gained with the well-known
+ event generator HERWIG. The aim is to provide a multi purpose
+ event generator with similar or improved capabilities (like angular
+ ordered parton evolution and the cluster hadronization model).
+</longdescription>
+ <use>
+ <flag name="c++11">Build Herwig++ using the C++11 standard.
+ Experimental feature, not for production use.</flag>
+ <flag name="fastjet">Adds support for <pkg>sci-physics/fastjet</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/herwig/Manifest b/sci-physics/herwig/Manifest
new file mode 100644
index 000000000000..81f4b14bfdbd
--- /dev/null
+++ b/sci-physics/herwig/Manifest
@@ -0,0 +1,8 @@
+DIST HERWIG65.INC 32 SHA256 637f8e4c1bd76ec0fd96acc61120d2a41b6b8ca53884a1db30e7f1e35cf52fa4 SHA512 fe63b262458a0e2e9aa5bb76efa2980714e8af96fbd9e226fa33dfda3111e45e6ec033a4c9d21ca339e2336dea3e0f723aa3cff29c4fbbc871a30a9a5690c888 WHIRLPOOL c7459023e7e21a46b7e4bc846f1b6ec3f1358f2efded20411b08c714a98e338c5ad0f2d90b00f4e53967b07a65397d51a562d8334f943efb698d6114469be706
+DIST herwig6521.f 2513511 SHA256 6e47079ee19e5cdc538aa7eae6cd6102ce783bfa501f6356eb34349af33954c0 SHA512 c13bc74132ddb86ca0fea61bc2da21dc6908b96d14a33c378c0f37be0dce201012fdd11681e11fcfb715b345ccd72fb4d166017eaf4e0cd19762acbe6687809a WHIRLPOOL 8baf5931614424d8ce873c31d5d494523fa1e8a783fbbc23ea99035cf5ac5f8be7026436991e078ae8b7334e55a9716da86c10aefce8995f6ea34a03c795b715
+DIST herwig6521.inc 15224 SHA256 f75e4cef481a97f73aa0710789fb3e2bd9b8b4ee26850bf7ecdc8ca6e058476c SHA512 8254dc7a99445a7f4a61760fd8bd4ede5f8b7613e25a9c51155ae614c9cb888c7a66043b3b2ec96b8f515351dab0f697dc14738bcde58fdb345f3aebdac6f1fa WHIRLPOOL a5c45472e2350a2fd3459156c7fc77498624e29807d0008b0393eff3a6c027ff4bdc7d1df1cfc3ccf9c70a8a710e94e208638da10ec8a320470581f5ce67a695
+DIST hw65_manual.pdf 934022 SHA256 a857263bc5ee6ead2c7414ffd9a64d04ab40b6c846399c23001ac8b5211b1ac6 SHA512 68c4407e27abe2d34e239455bd94324d919b712cc8b031faa4635caf4e3eb6ff30d35b4e7f8dc9146c8f54886ff77cc690b296b15805dcd9302ef93e707915ff WHIRLPOOL f51dcb8c7d84d872110ba4e9e698284ab36f8a17f3c2de1578b0ecb3127c3f2481d2c005e623267cdea6785a4f78d4a4dbba938fabbaedea2fc94139da155687
+EBUILD herwig-6.5.21-r1.ebuild 1481 SHA256 4df3ec6a1fa95b3aebbfb8a4d0bf1ee97853eb5116b0a1a82648e812f6e86a68 SHA512 97660efb382fb935bf69ce57618450fc21f2f91a789ed63c0a99e284728a9f2144b0a43e23dc4959416a965a7f39eae0052bea9a18fbb5744a541b3d22ba8fed WHIRLPOOL eb7cf7fd2b9b61946ba23abcf55814b07859e91f44f27722d213bae102bbd7aa9635fdf5b5ca3eba82155c13e0f68bbad64af2190474f7f1d4d5a7de52e0198e
+MISC ChangeLog 3098 SHA256 584cbcc26971e1557ef83040189b34dd4b8b90df0c9953e1fd81f198455dc2f5 SHA512 b65de6cad61371a9410546cb300a23418d25f977a4d4ff47b2f24e767e205f7c495e5de08e77af1d0138d6cbfe2d3512e1873f950a8e934ce90fdb4075a8fc07 WHIRLPOOL 9dab6262c2951b88d0bc06001b62705b9e55385694c0ac36fec45ab79d83d9d91630a3728e462b7fcb0127f6323f03cea7c5df991001ce3ecab67e50dd0d7cb1
+MISC ChangeLog-2015 1519 SHA256 204aaf44892911ea2b034bcd320ffb007e4d83a99ee41a95d4b9b293b061aacd SHA512 8bb850a6ad608b407481a41cc905fb8dfbf0cec86407a7072947dc2056d2e2721d2075ab7822446008fba4e8e673999506ae0cf1b7cccd5a3fa0384b77980d2c WHIRLPOOL 0538012650a1c2047cd12b27b618bcbeebf805bbe87211133e9843f9a040da38a826c82fc5e2e99a17df2cf20bf1090d9e6c276d9c1f35ac95303ed0989e7583
+MISC metadata.xml 418 SHA256 a1f0ad6b5560900abf3e938c294a6abfd9a08c3ca103c436402461baa89c3c06 SHA512 c2b4efe94ff3a63d31898075af8404727ac739aa29e511bbd527ed416e2cad165c765acaab48d8e777c57a5dbbeb9d98cb5a3fb8ba2c86e342089ade0aa62b48 WHIRLPOOL 001e7d6ad0255172ca2369f68c7fdb123a9029554acf97f2ff7f16f41a38a1de5c03af6763488ba9ff5134826995b8b38dd29e269719ace86407d5c880e1f244
diff --git a/sci-physics/herwig/herwig-6.5.21-r1.ebuild b/sci-physics/herwig/herwig-6.5.21-r1.ebuild
new file mode 100644
index 000000000000..61e03705a4cc
--- /dev/null
+++ b/sci-physics/herwig/herwig-6.5.21-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils fortran-2 versionator
+
+PV1=$(get_version_component_range 1 ${PV})
+PV2=$(get_version_component_range 2 ${PV})
+PV3=$(get_version_component_range 3 ${PV})
+MY_P=${PN}${PV1}${PV2}${PV3}
+MY_PINC="${PN^^}${PV1}${PV2}.INC"
+
+DESCRIPTION="High Energy Physics Event Generator"
+HOMEPAGE="http://www.hep.phy.cam.ac.uk/theory/webber/Herwig/"
+SRC_URI="
+ ${HOMEPAGE}/${MY_P}.f
+ ${HOMEPAGE}/${MY_P}.inc
+ ${HOMEPAGE}/${MY_PINC}
+ doc? ( ${HOMEPAGE}/hw65_manual.pdf )"
+
+LICENSE="all-rights-reserved"
+RESTRICT="mirror bindist"
+
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND="!sci-physics/cernlib-montecarlo[herwig]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}"/{"${MY_P}".f,"${MY_P}".inc,"${MY_PINC}"} "${S}" || die
+}
+
+src_prepare() {
+ sed -i \
+ -e "s/${PN}.*.inc/${MY_P}.inc/" \
+ ${MY_PINC} || die
+ cat > configure.ac <<-EOF || die
+ AC_INIT(${PN},${PV})
+ AM_INIT_AUTOMAKE
+ AC_PROG_F77
+ AC_PROG_LIBTOOL
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ cat > Makefile.am <<-EOF || die
+ lib_LTLIBRARIES = lib${PN}.la
+ lib${PN}_la_SOURCES = ${MY_P}.f
+ include_HEADERS = \
+ ${MY_PINC} \
+ ${MY_P}.inc
+
+ EOF
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+ use doc && dodoc "${DISTDIR}"/hw65_manual.pdf
+}
diff --git a/sci-physics/herwig/metadata.xml b/sci-physics/herwig/metadata.xml
new file mode 100644
index 000000000000..b750bf0bcc39
--- /dev/null
+++ b/sci-physics/herwig/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ HERWIG is a Monte Carlo package for simulating Hadron Emission
+ Reactions With Interfering Gluons.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/hoomd-blue/Manifest b/sci-physics/hoomd-blue/Manifest
new file mode 100644
index 000000000000..7f9c3eb24752
--- /dev/null
+++ b/sci-physics/hoomd-blue/Manifest
@@ -0,0 +1,7 @@
+DIST hoomd-blue-2.0.2.tar.bz2 2942198 SHA256 6ed0b7c28d4490a00081630fe9afd831a862cb895636679b89e2fb0a11637861 SHA512 6480639bc1b8d0534c220c7512f742a6f9eba76ad25991153735cc7f4ff88345332be4c215abd94de85249e79e85a6970be1a74a96350d4693a2c1291fbbf689 WHIRLPOOL e0a9e23a1a5aa8348496400140e4e288a3b79c5bd7f3c09675d592aebd02a781d4ef6cc9e5fe7ac9f671e1ff791ea75d70d3fa25189ade78d9229dfae6e9a21a
+DIST libgetar-0.5.0.tar.bz2 217067 SHA256 8b03a352f63dcf8d14e88af758f65f71e5e4f92ed01c1566c3333da90164ab42 SHA512 a27de8f7c976e5578142319684de15afca47c24953f590b34cad4ef88c3778aa47aa5eb9a1f83b1473aa49f4394e45dfaa4a8b5107264fa93101dea78ec5fa6b WHIRLPOOL d5dbb0bc51bdc7241ba4c51461da0a54eb57b0e9f76e1f0a7127010ccbd375146b4aae0bfd98a431f96595459913168097502edc9d7fe60f3180ca56fb44e91a
+EBUILD hoomd-blue-2.0.2.ebuild 1678 SHA256 328463b5c154437750b44f44206f49e978b9d0ad9daf2a190c2fa6adcf87835d SHA512 3661ed6fb5c847ce42471540cc6052f2703df6b560313c8b40882ed3a25f460d64edb279ae191c23004fa1fba479f1b8d95ef7c96e86e85c891d19dc32587079 WHIRLPOOL 7f1cbc3df827339af362a9f8319999049fa0b279cb7caa39a2bddafc7970ab65780c0f58f146ce4a306dbb99ee681256d8f183627d90879c133c6feff1419ea3
+EBUILD hoomd-blue-9999.ebuild 1678 SHA256 328463b5c154437750b44f44206f49e978b9d0ad9daf2a190c2fa6adcf87835d SHA512 3661ed6fb5c847ce42471540cc6052f2703df6b560313c8b40882ed3a25f460d64edb279ae191c23004fa1fba479f1b8d95ef7c96e86e85c891d19dc32587079 WHIRLPOOL 7f1cbc3df827339af362a9f8319999049fa0b279cb7caa39a2bddafc7970ab65780c0f58f146ce4a306dbb99ee681256d8f183627d90879c133c6feff1419ea3
+MISC ChangeLog 4519 SHA256 2bc26c0a4890c4cc74d9387e406e7a0a62bcc6683e368745d666641eec7da55c SHA512 115a23e18be3c753509d0f855edde2f3cd0d96c031785cc26e820f3fcd0241fd3be0658ca9796f8c6eab64a3a420ad99a51ab0687016e87d847872ab3b3103eb WHIRLPOOL 0aae697211ac3a8c64cdbf65799e5e34b6c2251570dd3f48c9faef0b2fbd111b137722810615d85fe597c59c103607865c18459e7905d00d87a40071b44080c0
+MISC ChangeLog-2015 364 SHA256 0d4218b64abe236703393d57798a608c807c9e1c26d020bc1d44d27c16663931 SHA512 a42e693f09d9c5dd058d445fda0acf0d06cf5b60ae60ee2031f95a76116702ebac5fab92520ea4672b66b7eca919b64a412848920d2257ef7f8f7ce2fcb20af3 WHIRLPOOL 43045f90ac93d6d3b74914bdbcb9a170f6f0820b6156b93dacedcddcc63383ecaa354ee6367277b1660cd1d4f39e4a7a31dfb8d2fe14bb050ab71bdbd708adcd
+MISC metadata.xml 558 SHA256 b1599c6e269d7982c878931bb51e7871edd85db46c6080df477f67e785bd1ff9 SHA512 48dfc3b18f1ab9d5c3ecd82e2eb30ec907a65c38b2cb28d6253c1a41990f9dd05ca86c7696c6f218b14149e115e9c1ad257f43ae3c7d37854c416e02855abf07 WHIRLPOOL ffc9c0fbd081e6cf87d0e49a6c330fcb381b5710b76c1f0037f2f7a6958ce5e98626fb6cbe98d59aec924b2501f833f407cca60af66439e57e7c70a78325ab83
diff --git a/sci-physics/hoomd-blue/hoomd-blue-2.0.2.ebuild b/sci-physics/hoomd-blue/hoomd-blue-2.0.2.ebuild
new file mode 100644
index 000000000000..4eeb2d729682
--- /dev/null
+++ b/sci-physics/hoomd-blue/hoomd-blue-2.0.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils cuda python-r1
+
+DESCRIPTION="a general-purpose particle simulation toolkit"
+HOMEPAGE="http://codeblue.umich.edu/hoomd-blue/"
+EGIT_REPO_URI="https://bitbucket.org/glotzer/${PN}.git"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://bitbucket.org/glotzer/${PN}.git"
+ inherit git-r3
+else
+ inherit vcs-snapshot
+ GETTAR_VER=0.5.0
+ SRC_URI="https://bitbucket.org/glotzer/${PN}/get/v${PV}.tar.bz2 -> ${P}.tar.bz2
+ https://bitbucket.org/glotzer/libgetar/get/v${GETTAR_VER}.tar.bz2 -> libgetar-${GETTAR_VER}.tar.bz2"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="hoomd-blue"
+SLOT="0"
+IUSE="cuda test mpi"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ mpi? ( virtual/mpi )
+ cuda? ( dev-util/nvidia-cuda-sdk )
+ dev-libs/boost:=[threads,python,mpi,${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ [[ ${PV} = 9999 ]] || mv ../libgetar-${GETTAR_VER}/* hoomd/extern/libgetar || die
+ use cuda && cuda_src_prepare
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ src_configure_internal() {
+ local mycmakeargs=(
+ -DENABLE_MPI=$(usex mpi)
+ -DENABLE_CUDA=$(usex cuda)
+ -DBUILD_TESTING=$(usex test)
+ -DUPDATE_SUBMODULES=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DCMAKE_INSTALL_PREFIX=$(python_get_sitedir)
+ )
+ cmake-utils_src_configure
+ }
+ python_foreach_impl src_configure_internal
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}
diff --git a/sci-physics/hoomd-blue/hoomd-blue-9999.ebuild b/sci-physics/hoomd-blue/hoomd-blue-9999.ebuild
new file mode 100644
index 000000000000..4eeb2d729682
--- /dev/null
+++ b/sci-physics/hoomd-blue/hoomd-blue-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils cuda python-r1
+
+DESCRIPTION="a general-purpose particle simulation toolkit"
+HOMEPAGE="http://codeblue.umich.edu/hoomd-blue/"
+EGIT_REPO_URI="https://bitbucket.org/glotzer/${PN}.git"
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://bitbucket.org/glotzer/${PN}.git"
+ inherit git-r3
+else
+ inherit vcs-snapshot
+ GETTAR_VER=0.5.0
+ SRC_URI="https://bitbucket.org/glotzer/${PN}/get/v${PV}.tar.bz2 -> ${P}.tar.bz2
+ https://bitbucket.org/glotzer/libgetar/get/v${GETTAR_VER}.tar.bz2 -> libgetar-${GETTAR_VER}.tar.bz2"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="hoomd-blue"
+SLOT="0"
+IUSE="cuda test mpi"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ mpi? ( virtual/mpi )
+ cuda? ( dev-util/nvidia-cuda-sdk )
+ dev-libs/boost:=[threads,python,mpi,${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ [[ ${PV} = 9999 ]] || mv ../libgetar-${GETTAR_VER}/* hoomd/extern/libgetar || die
+ use cuda && cuda_src_prepare
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ src_configure_internal() {
+ local mycmakeargs=(
+ -DENABLE_MPI=$(usex mpi)
+ -DENABLE_CUDA=$(usex cuda)
+ -DBUILD_TESTING=$(usex test)
+ -DUPDATE_SUBMODULES=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DCMAKE_INSTALL_PREFIX=$(python_get_sitedir)
+ )
+ cmake-utils_src_configure
+ }
+ python_foreach_impl src_configure_internal
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test
+}
+
+src_install() {
+ python_foreach_impl cmake-utils_src_install
+}
diff --git a/sci-physics/hoomd-blue/metadata.xml b/sci-physics/hoomd-blue/metadata.xml
new file mode 100644
index 000000000000..1b92a0a45128
--- /dev/null
+++ b/sci-physics/hoomd-blue/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>junghans@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <use>
+ <flag name="cuda">Enable cuda non-bonded kernels</flag>
+ </use>
+ <upstream>
+ <remote-id type="bitbucket">glotzer/hoomd-blue</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/jaxodraw/Manifest b/sci-physics/jaxodraw/Manifest
new file mode 100644
index 000000000000..38a9689594f8
--- /dev/null
+++ b/sci-physics/jaxodraw/Manifest
@@ -0,0 +1,6 @@
+DIST axodraw4j_2008_11_19.tar.gz 20930 SHA256 60353a25563cb4e987304a7d030bbc7e85c688c881f804cd08e8ba76a370af61 SHA512 81bfcbd1b121104e0058654ac5520d0f570f9a915e9f6dfb8c52c11e9cf92f1e01c800182c2dc34e503a6eceafdff462b4f57dfa5bb5db979101a106c10d88c8 WHIRLPOOL 4614a82192fdcc8606be1d634c3a3634107d268a3246043f68ca8bb9d4d3c07955c04e89b7886a7debdec67896ac286647e6208615cad73d57c8d66b0c6c19fc
+DIST jaxodraw-2.0-1_src.tar.gz 3740719 SHA256 e3f456214b9a11dbef030d56a1c6495ea627b0464820792e1998cae9c55554a1 SHA512 ec5866ba03b6f3ecb01ce92f95aa90959153b92eb571f10764d4d10f2fb7a7a0d02a325eb221600526c94faadd53466cf894e4dcba7201e3494555a6330dba02 WHIRLPOOL a146213c3a31fcf64bf0b626dd1ce2996842990196c9708592b461fb33e019f735396153a400d878971bd459ee056462bbb6ab47974f97efcdcee8520455a1f1
+EBUILD jaxodraw-2.0.1-r1.ebuild 1428 SHA256 91b3c0b2812b639a81fa1583198bbe24f5ad2eeeb2cffa7c1ad3744b8687cbbe SHA512 32ad452613bbace601422df3836a52c27aa36e405ec659ebf61b0aa20a7d2ebd847817e263994b71199d6f9f2abd5630e3a6f9140523159a247d2ed1dc6fb6a8 WHIRLPOOL c70a41e1e352c274b37d0db451eb1af2a3a4eba5aacfdb4face7cd6146ee68de75460039325763d2dc29a2b514cdfdfde2134f8b30f95802655a0a93b7e5fc21
+MISC ChangeLog 2439 SHA256 9ddd1a2163084c1f0d44b2e51f8c45d205583f356538b30a1c9905af6c941cd2 SHA512 df0a17f8e80823b88671b7eb07889f78195c97a1babbad9c24adaaf0128c1bebde77121d055da79865da2f0ae802c317612b1847a98514035e36dfccddfbd1c9 WHIRLPOOL 79f7f1c690abe33a38660e4a3aff27dd19c38492ea0cf8ff2a58b5703512a9eb73609f5232f5a83f16537f962cc402bf17c19c1261f72d99c815c054722ecab9
+MISC ChangeLog-2015 1971 SHA256 0dfef1f9657a5321b5876f5602a651ee07b6fdd44ec21e3fa130b88498122fb9 SHA512 0026f254d3d8dda99d90608727a307b533bd9cb920c0d7685976d9405db27135a565834da65d69390af6e1a38164b6f073319188b67a046a46fc3e83e2936a25 WHIRLPOOL 1f99dee7811f09bc9145808effe18e01f77d819d6c842f0261f967568dc70ddc9c8678677a256639bb36fdc8b59c97a57a715c42640913cf64b9ad642630187b
+MISC metadata.xml 314 SHA256 b557ed060f948812da2a0a2608ed6a2ef185dcec3f4abccb42355c6e30c9d0c9 SHA512 1f40f324bf0a347ef9bcd3345a6ae23890a29b7b436fc8508d0bfeb4df8bddfa3754807e63fa40f8978cd7109755ae5b056462beae202ba577ca588d29a30f8c WHIRLPOOL 74721bf8f6868f97d619f20ffc0482e489d94e5afc1c6cf34579be84d1d2f2d83160fcae81325b2e41f10140feb85a9a5235831e4dbaba9349218360fd17820e
diff --git a/sci-physics/jaxodraw/jaxodraw-2.0.1-r1.ebuild b/sci-physics/jaxodraw/jaxodraw-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..3f22a51a7df5
--- /dev/null
+++ b/sci-physics/jaxodraw/jaxodraw-2.0.1-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+WANT_ANT_TASKS="ant-trax"
+
+inherit java-pkg-2 java-ant-2 versionator eutils
+
+MY_PV="$(replace_version_separator 2 -)"
+
+DESCRIPTION="Java program for drawing Feynman diagrams"
+HOMEPAGE="http://jaxodraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}_src.tar.gz
+ http://downloads.sourceforge.net/jaxodraw/axodraw4j_2008_11_19.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="latex"
+
+DEPEND=">=virtual/jdk-1.4
+ latex? ( dev-texlive/texlive-pstricks:0 )"
+
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}/JaxoDraw-${MY_PV}"
+
+src_install() {
+ java-pkg_newjar build/${PN}-${MY_PV}.jar ${PN}.jar
+
+ newicon src/site/xdocs/images/favicon.ico jaxodraw.ico
+ make_desktop_entry jaxodraw JaxoDraw jaxodraw.ico
+
+ use source && java-pkg_dosrc src/main/java/net
+
+ dodoc src/doc/BUGS src/doc/CHANGELOG src/doc/README src/doc/TODO || die
+ use doc && java-pkg_dojavadoc build/javadoc
+
+ java-pkg_dolauncher "${PN}"
+
+ if use latex; then
+ dodir /usr/share/texmf/tex/latex/misc/
+ insinto /usr/share/texmf/tex/latex/misc/
+ doins "${S}/../axodraw4j.sty"
+ fi
+}
+
+tex_regen() {
+ if use latex; then
+ einfo "Regenerating TeX database..."
+ /usr/bin/mktexlsr /usr/share/texmf /var/spool/texmf > /dev/null
+ eend $?
+ fi
+}
+
+pkg_postinst() {
+ tex_regen
+}
+
+pkg_postrm() {
+ tex_regen
+}
diff --git a/sci-physics/jaxodraw/metadata.xml b/sci-physics/jaxodraw/metadata.xml
new file mode 100644
index 000000000000..5a55b59119c9
--- /dev/null
+++ b/sci-physics/jaxodraw/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">jaxodraw</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/lammps/Manifest b/sci-physics/lammps/Manifest
new file mode 100644
index 000000000000..1a67d736b790
--- /dev/null
+++ b/sci-physics/lammps/Manifest
@@ -0,0 +1,52 @@
+AUX fm_exp.patch 347 SHA256 27485c1aac28dafa0ae8584ecf319004e79d321007a52741ec2ce75010c89c62 SHA512 d0c8303bfe623fe766a545e1614f7576709381597e56f7c7634e90768376bccb9fbe37d4c0eeb6491c9b45d911a913a37386e0280ec3f05a90388aad7bb23c3e WHIRLPOOL 36b40a941eac602f99bce4cdd354829b8e032108a82c1b1dd60ead65cb82f03ec8f94c76edccb47a8e0ba577e565fdf488dec9acebb8b829bfc8b3f21b376fc9
+AUX gcc-6.patch 397 SHA256 703462d81a7c852e8df1003a34fc8466179c6f07ce8421819611b169ba28855f SHA512 eebb9041347dbe260be6028d9462183188ce95f3114873b2a776990aa77c71dd4b0ba37d2fe3fbf0b8bff64f85dfafaec93ad7234502791a1048ab6bfd1d06ed WHIRLPOOL d6b09ac41e5494e4d1dabe9dade20b0f4a398a35ffbe887a34eede2b8ea3bdb3813280213fc07a701a10e1fa39777fbdd715dc765534c7c98b8ecb105c2a7d2c
+AUX lammps-python3-r1.patch 544 SHA256 32619c3481a35b7994e2d3f3fc6cca90da88a33eec981f97670df444e7f2fa63 SHA512 833ec755ba4dadf072ced646220a7a68147023548da9eeebdd1d4a6c198ee48fed1e60a7fc26de7093b5d9b77a906e162a7ef4f5f929918196943564f69037d5 WHIRLPOOL 6775aa29fa49c9f1c98b68550979a935e47f364cf655bace64c259cf29bb0a7a3cbd1a3406df976f79a61562480ec0085f8532076bafc644ce424245a16922f9
+AUX lammps-python3-r2.patch 459 SHA256 6b0020f68f90e036910efc74fa3daaad3115df3079376c309f8b87429b641034 SHA512 87e12b5089ca6d75e9ec02b773964fbde0170a56876ae990648362757ff110a817d7a968e9496cd6475faec22a8a6c9d71d3367f564b34bba297b8e8eb0940c7 WHIRLPOOL e3724e1f7c07528929c46ec4b79a152b0c801ab13750a32aef59c0da3f7300ae1a2186bd1c5b8cf8e925db68257bb502377bca1526ebc317c29a38044c587a37
+AUX lammps-python3.patch 509 SHA256 85ab3e1d1cc123af8d63400ec1b83f52f50325aa6990ae9f2f032d6753f8553f SHA512 e88b7e036c3ea86c032a7e8dde771073c08ed96c0a3da240a824fd7f424553ef4d5db2ba6c4fcfcb9f0ec4550a073e7370a163165352911ee4f1d64f91094056 WHIRLPOOL bb73c0b001b39266d4586ff7c409789599b8e64785609037b96e6bbcb89ac100fa4171230fc8e6b28017d898b591c8c0188aace223caaaa728477865a2e97699
+AUX python-shebang.patch 393 SHA256 77ffe7208de583b53f0ec4e688d647218135fa0cafbe374b56c6f4ceec3229e1 SHA512 fd4663ac2ce6949e59509ab03a7eda4471e38350440fe6c64c9fe5321941a5951074578148d0da335292a4e19c6c0b13d3e97c174123eb1d9662bbd63247b5e7 WHIRLPOOL bd792c3cfe7bb85b436ba11e2574c6bfd21364566236c89ca7330206f781d474117daa9cf44c9a4ba902349c673aaefeffb84e45b2afc2553359dcf270370370
+DIST lammps-10Aug15.tar.gz 87890369 SHA256 450a765f94b70a6f38637854f1d7496dca98d359414c527f8de99bed1fdd94d2 SHA512 fc395cf7e59de7e71bad64e2500224d33ff0f76bb79530fdcde5ec9879b91c332d1421a25e5d5bb9cc47a55745e760d01b2ac8ad29f9e71c8a90a0ace9212618 WHIRLPOOL 3f50513137283f4deb9b6a2c13a7ba63814b0ddd59d33e428fba9d3f94f61baa1b3b9d9d080982453a7828d2a98e619cded4d27716fd165db595832a157c9f6b
+DIST lammps-10Feb15.tar.gz 62912048 SHA256 59373e9b5592f7b697a144bbce1fb742726e03536b7bb355dac7a9e013ddf9b8 SHA512 a7804377a23f03f338bdaf443439dffcdc52293b4c45e6369b340a1107510fed0b8a198e3b5afcff2e04e109985b52ee62e7b28276697bae37ac6f783d1ab9f2 WHIRLPOOL 09f29cadf8b072d388abe45ec219341d2a14a6c9cc9e4010a0f7945e930e9984738f7837748d117ab95ca76ce0c8d9160fe88dcec17e8d21b81f385dec8f7005
+DIST lammps-10Mar16.tar.gz 88637744 SHA256 b40d79d4a8490a549dc46f259ce65095d75e78059b002083eb899825e802c1ac SHA512 b850c9f9826cd7f4db2d922c9ee1bc8302ea5cf92200f56e5aa834850f690ee8e17dca6e431651ccfded34bd79e2b8e50cfb2e7de3bd93359279f06bb8704424 WHIRLPOOL 283e74dd90454a79119ac9d69bc61ba44d0a23fd18455286faea5867f018e69d9ce593d06c6940e7e7f9f89cdaee7c83ff592a7a8816fdcab703c25a9c65f28b
+DIST lammps-11Dec15.tar.gz 82386057 SHA256 f95cce2efa5f9d5649de22c19c96281f3af7b0f65a1f051a268131fe526542d9 SHA512 dce3c29811ee25b8404774b69d7e9746535bed5c4ae9a1c21aaf6979e411bb4b777ca95a4f788d16f6093785e074dbc5275c2d99b1c1d6a28aa0706069855a77 WHIRLPOOL a0b7fcf202745d22511ced803c8bc55b0487a8cdb2c32a0c9a121569a7e5641b072ccbcc70ef7a1529da736d6166d6d2afd80769fc84fc4f07af25b023710a57
+DIST lammps-14Mar16.tar.gz 88642225 SHA256 79b7f3e75d553a86c7bf3ffbb8305fd0fe92f6a57d634b983b6a31816a72dabb SHA512 5ba774165ea4957fc3f33c91b96ff7b5e2ab498b6979d7887d5e7dfd464e3c830edffcc341e93fc8dcdb89f3eadd683c0893d4a8d2664ad469aa79ddc39c21b7 WHIRLPOOL ecafe88e06839ce506dba86a30a8548fd6b5771155e4d4c9b42932573ad932854fdecff80299c62ab529d2cfd97147ed3bcdf7ffe034e266914b078ac8708510
+DIST lammps-15Jan16.tar.gz 85956338 SHA256 e90816bf20622200f5037415e5c45a0f950f7407886121708b794b1e75b93c3a SHA512 7dc2043afba78ec8d61b5880b6123952b42e5076fe7e3c3855186215054bc28710b89fd5b015d495fcfe38d5970efd43f3e6e834e80f39b6305b551d39f5eeab WHIRLPOOL 13bd3f41047492035c24e11d47b36ec8565d226738be492159ba498827c79eab4a7ec7402e037820b635b0d8d4c56fbdedea482f2f93e370275d717c93bc281c
+DIST lammps-15May15.tar.gz 63835027 SHA256 0233ea98c7d77d31bd0a538bb674c0ee8f000f1d0ee1b8c049072873192aa228 SHA512 a23c16b98117590b15ca7662b878fb2f76ec41399c329c98deb48e28a0ffce293443269513a96c2503389894b598787b19dadc210d4b4dbc6a7432caf633e7d1 WHIRLPOOL 4c4edfd772bbf534e42fc43e1feaf3b8f76e74c58ec1e985e3c29ee0d8e64aa8c501b8e45e078643409c320a1d834b0d5eb699e7d1ec29df06be0126d12492f1
+DIST lammps-16Feb16.tar.gz 87776530 SHA256 058459f3053cca0b8c0fdd05cca7acab6ac00934c6da8c9008aa0f55fb5ceefb SHA512 f9fdfd4d3b70c864b4dcb7e58315f6fc81e3647a6bc2956d6b3e2760b3edbd8f933a406eb9b32697cabd0d7f8fbb897d873a399c855cb29f3635d6dc797212b8 WHIRLPOOL 84aed0bed369e13bc418b920cf2ef66a72cf956898a4a81c2008394bbdef80bb875caf8d61c80ae48d7844a7abdf351240d48c56365848b0d52e9159d952b1bb
+DIST lammps-1Mar16.tar.gz 87945422 SHA256 af2bd7ab2a28aa14b8afa3d8703cbaf27d924400e237bf44e9e2da091c0b91eb SHA512 25b59f840187053a9f47bc41f5d0b29a69ac507e05528fb3e84c2bb8facd90fff95e99cbd8707c8d087371355a2e1c5af1eb3e4115b788444af5d129e754fe9d WHIRLPOOL b45f4ca459a88770c6d194f609f55694bdb50b7a54cf57a34995e4d3f6f0b432f99fdd9c7187c8e614a98b31387bfcc259baa9218f2c3bb5e146991c3a113207
+DIST lammps-20Nov15.tar.gz 90227651 SHA256 7c392c848e73335226b2fef6bb8034b1152f91862d955a3bae00502bf9d8e8fe SHA512 4bff70e45fb30be10a33b4c6c60b73cceddf8d42588b0630b4802f1e61dea3c237c01c3667585ad210ef2cdb811491b1b8495718a90bb57853c58245e29d1fe4 WHIRLPOOL a01f54911a5edb666ef5af5302cf60d61d58d20f2112578e4d7bd16787b2bf59da09e9fe7ffa021fb6a97db40b23301ed77010f48a05e5471742c0e71413b7e1
+DIST lammps-21Mar16.tar.gz 88654277 SHA256 c2f627db22f332995d90521f0e8d8e9865b85b49cde0ed4bcf727bf4b9b12767 SHA512 27e4a3a0c2c17fb9c85716b499ca2b3de8b0a699891afd32c8409117a0fbe27f1bd84ef16288cc5abda87ee8a7b1059960d8caed5aa339f54290aabeff0fdd4d WHIRLPOOL 370f79af4a8e55851aa0c071d02baddaade991a3208fe504f8b92796bbdb9b17b85af898a71177bbc67d885ffdef9280621c9b7f4bc22cdb14808332cb2eccb8
+DIST lammps-22Jan16.tar.gz 85952234 SHA256 46425bf0ae73f716195a29dc9823c2c5989504f85b49a316bc304caaf6e6a674 SHA512 3ceeeaf76621bbc11ea25d5fb321b602b34ffb3893898a704b02e5cd428a36b2017006fdc1f7b1c5f957c33f26ca103a2939538ae7937555e0b25b5852cd48f3 WHIRLPOOL 7f61ea1924eceb190b7cf56ed32db75f6a45c99dbf1522862124f59acd1f79b1a46310d5e31a988011461a55c319677eaec2bf713e9a5cda0411b5d2280aa784
+DIST lammps-30Jul16.tar.gz 94454127 SHA256 41104065bfb433e9c69a88bf4c0d760a02186cbf81ec481332665b28f8503c1f SHA512 2ebcf30502810f8d6be107760bef0b9b4591142511ae410e7b44573fe9988bbbba5e8d5bfd16f74a3875bb1c41dbc6216a1c7e8a9b1d316fdf19a901ac4479d5 WHIRLPOOL e081b9eaed5a439be1c80c844629030af02b4cff6ed57cac3db209981b9d4e7381315c82de5f76fff7f8ead5b6250a1a4207d3f18c97c59e3ece2a716697175e
+DIST lammps-6Jul17.tar.gz 119855769 SHA256 0bccf939745309075dc9ad76f5b24e8dc2a9d17165f22f1d11ee7dbc11a5f16e SHA512 6351020311e63be126bf74adaf5667fdf232de48e74f269248d565fa0b6038c81bb16d6b5d01a7de0fdcd195aed41e9b4b69c339c6ff6da585babd458a55f04d WHIRLPOOL 8e4170982f135e82251dd21fa3fdf5d0880f3255a7f838f74c153059fc17fd7aa1159f5425151c5f655a2f7c4cc485451e19c1bf82210a7fd9034316f3d89c77
+DIST lammps-6Nov15.tar.gz 90177074 SHA256 b908d87106e89aa813c3d1a2e89f297ab42471ee463ef950f87f284d62aa24ac SHA512 91f8e33a00b3605dbb78f622a19886c11ca8ef3f4babe74e8d8f90bb176d5689e75d619155f58e6754a2756d20c05b74389e34f024167cba1841b8aade171daf WHIRLPOOL 4541537ea73292648764d6c8a7560f3127b8f911f4dcff0a97735c8e75868dc3aec7c2b32a2928ea446e8cfec87c81c9f86a635d29f3a65f42fd27661725911e
+DIST lammps-7Apr16.tar.gz 88791123 SHA256 f87c11cbbdbbb64a337e0608ae0fde11f77d9b32d081a8095376db9bbecc6d5f SHA512 1045f0337b37a19760718a2b3b48d31608248069a8fb2dc43daf555e44e720db770ff53e2a2db09c3e1f2703bb98894516229382c810ce45cca3647f353a21cd WHIRLPOOL 4ed6e93efff84888f982aec4c55adff6eda94fec5608e473fe821f77ea7a867fa7de23cf54fe28007b61304e41c9d7e42f4994e455bfb67cfadf79dbfc019e0b
+DIST lammps-7Dec15.tar.gz 82168656 SHA256 7fa1bb1089437c0f38f8c6920286e2f8424e6449956b4d570da2954f507af1e7 SHA512 13078e7614402efc310a178506134409b40fb2768c4d7ee1cfa6992b247ef25169288ec99d4314b1a98125037d7c1c954bd114abc6ac41c58f60506358d150e2 WHIRLPOOL f9ba52c0c93ea6950b2ee7e0f5e15ebef6ea50f647d23cb2f9a1caf523d3dfb8d52adbdf8f8840eebd7f79fc59ab294310b7bf7109b27c6b7e9d6e7d2f18b7ee
+DIST lammps-8Dec15.tar.gz 90700099 SHA256 1782a856dcba1696e6e921d891f259e525de750d7cf39ce9457a1992ee4db91f SHA512 0382683a363975bd27cc1722932cd5b8eda9933bc9c676af135d7e4d784acd93cf60b2b47a19dbb9e4a05e5cf2fbf6ccc2c2a914c39e92e87009e23ead2eb497 WHIRLPOOL dca88d8d55e96c20702856b2074d631ef8f6a0f6209672e612778209ad188c800a673e09605033851349b400241b1f7c8e5e05bad49519838abfe5fe44467c43
+DIST lammps-9Dec15.tar.gz 82374079 SHA256 36f918174826a80f54e65779ec939e185e81c71f747cb1524e43c58b1869491a SHA512 a35ef5b3ee99162b96ce1a6d6cc3b0dc18bab7f693b824fc7ad52a7477234ed45c3081c399155725f1ebc3bd1bed312176f08d3fc807e7099d4b41b8f75fd11c WHIRLPOOL 045d817e6a2c74fa2f4a5eb337328d6d9183fcedca44a1e608c59bd83fd4086763ff4d6ebed3715ba23cbde04f1233ef3e4a8e3e964ff3af3744c70580b51d0b
+DIST lammps-9Jan17.tar.gz 109694893 SHA256 bd3695886e43c5670293efc08ce02c5cd2332d6feb57b4023a6e7b7371a90395 SHA512 ea7c61bc9607ff0e4c0af5c1a668d400841dfc11c6d6aacc6131a48a5a0d11cb6857303626b583d5119e5257b5b338853c5afafcc3870bb30d5743ff5648348c WHIRLPOOL 4678b60f0966102dfb988e289493a94aa2639ad7a1725c981fdb3be15dc7a0c22a81d6d3fe4371188cb82fab25fb4aa4ac7f8c0e9ed1eb2f8983b27f6349fa37
+DIST lammps-patch_1Sep2017.tar.gz 88751184 SHA256 bb05b59c57609be5efb1d70ba3d04c337e92c75fc7eff767921611c5df14bf0e SHA512 01b56484d6e9d03c0cdc2f8100f571d6e0a354b08bda7f22176744f2724e566443514e7d8abb0571d4207709155441644d4c6dbcf17ee2a8dc4f10cb6c3e8ac1 WHIRLPOOL b4ccae0152c56850dbe50492f4fd545b15ab0418856a3d3c34cf500055463b696952dc38cd3aef194257cbd7166c2c52493bedccc6627d1bd715d8a4b2700910
+EBUILD lammps-20150210.ebuild 4832 SHA256 1861439cd0623061a386640666c88a4bcdbe5a4fbad3ef77817421d0af99f6ee SHA512 fbbfd6768d9ee99f49aea6abb030486a7f80c4aad95412407031499681a2a36997c31cb4873e0ab867425678b952a44284129accde9abe60c1bfb891c38d2dfa WHIRLPOOL ed0ced67810ca9c0669f11660b7cb2c72b15f444a7d553097579864de712d84a7438014f94efd6a2d133cce61883851acdf1d0093fa453f5964c7ef9effb6998
+EBUILD lammps-20150515-r1.ebuild 6708 SHA256 3795e257072f6a74f244316c5942750ddc469e7611f9e363ea922ad6f70a5a47 SHA512 72c53dcd1cade6756010065353742f75eae95a4178e133509dae09233007491c52c3c5bfa3f98243a8d32066c0320c1726d99e1bf06c6e2e1ff16fbe2592d75b WHIRLPOOL e0ef43529559a4d17616ecede83013c8ceae7f38f663c371e752e6e1c2bc7e1fad481b543293b5fe026a447e78e3b3a3c0e85827a1b3184b41b570157a232de2
+EBUILD lammps-20150515.ebuild 6703 SHA256 2a57617d3bc6c2924873c6f5a024da3626d2cf4b27adfb324710842a72d2ae63 SHA512 cfc3f0c55d93194db134dabf9153739904c5afb036ad9917930086c3d5cbcef9ccbf8afc6f682ecd22b2b73daee7dc2cd6fcc4f5da0f931b2e1b7561084a2464 WHIRLPOOL 3804371c96bbfab0af2244720d7a7e5cdbf8cf3850df178ce6168579e6d698e49169eec219993dd637c763dcf282a4ee6c81bf1d365769e6642a5f9ec18defa4
+EBUILD lammps-20150810.ebuild 6706 SHA256 642ce09c41f4ccfe021265b15755dfddc456b155185bd0f6352cab47ef83619d SHA512 05e4196ce5dabf5f5bf6fcf8c42003a618d5e1103665eb7473941f13a58946a53e9fc87a194bbcd60b0946856cb4f7b2dffa9f4ac19781fbe82ca9f93af9dffc WHIRLPOOL 35f3fcce2db7b5a3bfa6fd64484c05356ea785e05987a69575f75e03c2ed3ca999b3d6d851920c3f1f106b005fe2a6e173b6061e8e13fb06fa14ab6d37be9963
+EBUILD lammps-20151106.ebuild 5878 SHA256 48eb951012aaf3c2a8de02c06e3b528b9fd116719232e1e185e2eec02078ffc9 SHA512 6b078dd762c0397b418c8d4cbc69f9834578b0de21ef8f6bd6a66ac8a60b08b776057a386bd01cf9d9761e4b8f4599c458cd6ea46726164edfd58f1d32a446d1 WHIRLPOOL b5bc2b1fdc0dc2ed946be01e32f2c3cf248a1a2303fc46521e8b49f6cfa21a83e2493b07ea0c21c0e897f4a85fb9b63faf14c72269157c1dae4c8cd79ee7b946
+EBUILD lammps-20151120.ebuild 5878 SHA256 48eb951012aaf3c2a8de02c06e3b528b9fd116719232e1e185e2eec02078ffc9 SHA512 6b078dd762c0397b418c8d4cbc69f9834578b0de21ef8f6bd6a66ac8a60b08b776057a386bd01cf9d9761e4b8f4599c458cd6ea46726164edfd58f1d32a446d1 WHIRLPOOL b5bc2b1fdc0dc2ed946be01e32f2c3cf248a1a2303fc46521e8b49f6cfa21a83e2493b07ea0c21c0e897f4a85fb9b63faf14c72269157c1dae4c8cd79ee7b946
+EBUILD lammps-20151207.ebuild 6014 SHA256 7961b4b0c7137827223cc35d9d3bd654a28d52fc00cd6040da52e1758bacfb57 SHA512 856d2c80e7facc7b029fe3eb4afc83ab6a51ee7aa50233af1165260b2e5306485cf682977ad30b6f22a131eb1ee74d525c2c5aca76c19dddc5188d0cf81d6a97 WHIRLPOOL 7ad489d97305e7358a9bb1ce0500ec45fc8ea34b4b1cdb585a2662d052a1ae662ca2c099596b783b56edcf449eb3fdfcc217d45c05785fd898eb3aa26f25be6b
+EBUILD lammps-20151208.ebuild 6016 SHA256 235eefcd45cea07d2548aa8cc20e0e6afd73ca0b87107a7fe43d207241d451e0 SHA512 a7ef308b8f7cc52908fcfa09e6456f1e41d6ecb79f83e82b2e9e7865b35a7540fd4609e6b572ca103a74e262cdd9455ac069e9ea7bf8373dd8c1a0e91b8ae14d WHIRLPOOL 421d1cfd2e9e959bcae66340dc7d62d57729e02e9bd2a2794a9a55b55a5ab10c5c06df6502f5a2215a0e29b1a5d33e32651e7a28ab8d1a2bc203d55af0721ee4
+EBUILD lammps-20151209.ebuild 6016 SHA256 235eefcd45cea07d2548aa8cc20e0e6afd73ca0b87107a7fe43d207241d451e0 SHA512 a7ef308b8f7cc52908fcfa09e6456f1e41d6ecb79f83e82b2e9e7865b35a7540fd4609e6b572ca103a74e262cdd9455ac069e9ea7bf8373dd8c1a0e91b8ae14d WHIRLPOOL 421d1cfd2e9e959bcae66340dc7d62d57729e02e9bd2a2794a9a55b55a5ab10c5c06df6502f5a2215a0e29b1a5d33e32651e7a28ab8d1a2bc203d55af0721ee4
+EBUILD lammps-20151211.ebuild 6016 SHA256 235eefcd45cea07d2548aa8cc20e0e6afd73ca0b87107a7fe43d207241d451e0 SHA512 a7ef308b8f7cc52908fcfa09e6456f1e41d6ecb79f83e82b2e9e7865b35a7540fd4609e6b572ca103a74e262cdd9455ac069e9ea7bf8373dd8c1a0e91b8ae14d WHIRLPOOL 421d1cfd2e9e959bcae66340dc7d62d57729e02e9bd2a2794a9a55b55a5ab10c5c06df6502f5a2215a0e29b1a5d33e32651e7a28ab8d1a2bc203d55af0721ee4
+EBUILD lammps-20160115.ebuild 6089 SHA256 d9f7c926dc6ec45ca7ecd1df9082611ae21bd239b9c68ae443a9b277a543b888 SHA512 c81a79a1dc147f1c5d66ec865248d8d60417b358a33a0bcddce00611f6c8114d9d81542a65624e9defc48435a2b69aca6f66e20388256f9b6cb1cf7399ff6c69 WHIRLPOOL 7d6316d9ca7737112aca12536df80f5af1a46c321feb3f72cf109bd231ae635752e60f7a39566aa432d00e1355d4a8ae57b414f05ba715de498a0eb6b829c80a
+EBUILD lammps-20160122.ebuild 6089 SHA256 d9f7c926dc6ec45ca7ecd1df9082611ae21bd239b9c68ae443a9b277a543b888 SHA512 c81a79a1dc147f1c5d66ec865248d8d60417b358a33a0bcddce00611f6c8114d9d81542a65624e9defc48435a2b69aca6f66e20388256f9b6cb1cf7399ff6c69 WHIRLPOOL 7d6316d9ca7737112aca12536df80f5af1a46c321feb3f72cf109bd231ae635752e60f7a39566aa432d00e1355d4a8ae57b414f05ba715de498a0eb6b829c80a
+EBUILD lammps-20160216.ebuild 6089 SHA256 165930871e6b4b845d13dd2d39d098494f47cfaece913ff1d2b2c0c183bac3db SHA512 e77f846c4116f83eb40c4cad95fa3cd0d32d164c58edddd27af5e501743775169c77d3642d7ad15568cd10fc8ba0d30602652e4b2e98486eae8a6080f3873105 WHIRLPOOL 808f39ac243de512cf65f0fb5d5d7744eacaf98ffc8a2289efeec86e4cf815c843b30163cb900f88176407ec75026dbae662e56c2d2fe6de12742b41382b5ef5
+EBUILD lammps-20160301.ebuild 6089 SHA256 165930871e6b4b845d13dd2d39d098494f47cfaece913ff1d2b2c0c183bac3db SHA512 e77f846c4116f83eb40c4cad95fa3cd0d32d164c58edddd27af5e501743775169c77d3642d7ad15568cd10fc8ba0d30602652e4b2e98486eae8a6080f3873105 WHIRLPOOL 808f39ac243de512cf65f0fb5d5d7744eacaf98ffc8a2289efeec86e4cf815c843b30163cb900f88176407ec75026dbae662e56c2d2fe6de12742b41382b5ef5
+EBUILD lammps-20160310.ebuild 6089 SHA256 165930871e6b4b845d13dd2d39d098494f47cfaece913ff1d2b2c0c183bac3db SHA512 e77f846c4116f83eb40c4cad95fa3cd0d32d164c58edddd27af5e501743775169c77d3642d7ad15568cd10fc8ba0d30602652e4b2e98486eae8a6080f3873105 WHIRLPOOL 808f39ac243de512cf65f0fb5d5d7744eacaf98ffc8a2289efeec86e4cf815c843b30163cb900f88176407ec75026dbae662e56c2d2fe6de12742b41382b5ef5
+EBUILD lammps-20160314.ebuild 6089 SHA256 165930871e6b4b845d13dd2d39d098494f47cfaece913ff1d2b2c0c183bac3db SHA512 e77f846c4116f83eb40c4cad95fa3cd0d32d164c58edddd27af5e501743775169c77d3642d7ad15568cd10fc8ba0d30602652e4b2e98486eae8a6080f3873105 WHIRLPOOL 808f39ac243de512cf65f0fb5d5d7744eacaf98ffc8a2289efeec86e4cf815c843b30163cb900f88176407ec75026dbae662e56c2d2fe6de12742b41382b5ef5
+EBUILD lammps-20160321.ebuild 6089 SHA256 165930871e6b4b845d13dd2d39d098494f47cfaece913ff1d2b2c0c183bac3db SHA512 e77f846c4116f83eb40c4cad95fa3cd0d32d164c58edddd27af5e501743775169c77d3642d7ad15568cd10fc8ba0d30602652e4b2e98486eae8a6080f3873105 WHIRLPOOL 808f39ac243de512cf65f0fb5d5d7744eacaf98ffc8a2289efeec86e4cf815c843b30163cb900f88176407ec75026dbae662e56c2d2fe6de12742b41382b5ef5
+EBUILD lammps-20160407.ebuild 6121 SHA256 32f4f2f393736d48c77615483b424a40519b77b62dcabb42b9f8c4920d35017a SHA512 57734f68cc75b0c7eb3946a17c8bccb85cd8655da6d8b4a768b373e573fc3b89d6895889b6a2fcafa2996a49085cd197de81b470889aac961bfb6fa207d65be3 WHIRLPOOL c08f07044bf9739943ee3ec2f20c5275c322cfbf2578c5f2da6f5f3355e19fa694954c07a20c112d312f62558a9982d8d348af63eff643b5ce6c6ac58f759572
+EBUILD lammps-20160730.ebuild 6059 SHA256 1c192f1359dd0787503c6c53663fff46536db64ff9c79b5f646cf5b6840b6718 SHA512 8fa9070d11b0fae9b164b61981b1fa932d94e2b057e5fd8f528f46eb43d583b6194028f6d2d151211cfc8703c70d5d159a318479ed67111265065dceafd4d420 WHIRLPOOL a0a0f27b530dadfe8e7b30273a49cba3e37602491c4cae5165a7a3b67d5fbaca90dd0f3789312999a9e9f0d5a0d0a4d01dd6170cb95662594530d10146d1b178
+EBUILD lammps-20170109.ebuild 6065 SHA256 eb3fae5034409a59d3759c443d513726dd95146fad53b85ec85133fd1f5aa00c SHA512 378c5492381ee3cd2b13fb1f916cf29998177a375aa53e882730e9e1bbd356b8b61eef016a5d8bb6aecdf6f67fd3a037a9e10c0bca19d91667365088a79412f9 WHIRLPOOL d9ba9f27163e2b17b850bad46d07bc7dad2a23aef6db7d63712de92890a4d2a5d0f778eb4ed4b10dfde5d06c1466bdd09dd8109c360949d12c77f45f81a83323
+EBUILD lammps-20170706.ebuild 6029 SHA256 0484ac0c7c7dcf419bc115945d0ae79204dfeaec3597344af44e6b36e02e75bc SHA512 1d2ec7049133298285399a61a7be362bd76f003dbe237a7c60e634b8a88ddd38829c05fef1f8da9bd38278051d807c72239317cffd36c87fa7e1d39845132049 WHIRLPOOL 3e7a77c4c3811f0e7092689e51b46ae2a12465a802e84e4934ea1ca3fd47b2f25cd9df5997f997d8a9d3d36282b4a8b417cec35afaf8edee4f179167f5aadd1f
+EBUILD lammps-20170901.ebuild 3008 SHA256 5a1fa3a904952c9ea3df1a50839bd3119f3127a542d3f13273a7c4df538a75ec SHA512 766c140ce1e0889ec3b88c65047cec54668058ca53f0e3dc61312cedb716beeb402328632dcab4c32aaaeca8af7f733d03cec60fe9a0f342d1f0ae0eb50d6ad4 WHIRLPOOL 0c61c6b8d690ca07c8e3e3be28f445b60f6eb898457f6b125f6c0f8e219e20503fa4292b376ac66334ab8ae7ce52eb276304538a29f6f3202e117c19aa625030
+MISC ChangeLog 10890 SHA256 a7c40f457801d7f49ed871c9f788c61609336b8b8332d07d7af3ae0afbce500b SHA512 5882f8d6252dae73677c60894cb5fa8a7d71b7b68d8f74685f05c7cd0c3a08755e40dd737205a2b5c6cc04dcada0b0d4f12ad1b51cff2c99436a96addcca757c WHIRLPOOL 2508f16e69c822416f2d6da50d7007afc1ac886b17e87b2b911cf62cf33f479f968039350886179fe1696eca99bacab60e67c7715c8c874e0ae8a035eb248695
+MISC ChangeLog-2015 18496 SHA256 3972551988414b88dc8b0f8d2f9a38de0be0157504a688d1a69db16a50718196 SHA512 5ac2572a5f2dfbd848b9bea1d9655bad90800303be727099a613b8d7e225b96b60978a6239fe8690cceb6a1d14ae0b98618a14dde6c4f376aa50a5c7eae0bc53 WHIRLPOOL fc384f1c84da3c6902b29d5124abfe21fcd6a78995cde23e57f03d98a1d79f5d1c2605aff7734b4b0b559be9bcfde0e8d70b76d9d91184df927a489e59f6b337
+MISC metadata.xml 1352 SHA256 d88051d70cfb8158d61450ea82ffff02abb4dbb5f956c6ae21a215dad2eaf203 SHA512 c2f705fdad943e42dcfea29d19866e8257929d47eaa3adf906e94b2420bcc2e454a166a0e39ccbcef9f9963970785e522f552944c09395086e8f92d30c12e739 WHIRLPOOL 18ed7d84e758e3ccbe770bc79ae8a7778f3ad5dfe820e387fe751499b1d9875bca105204ed828b8730a6a2356d8b9f130a0d6abdae4d2b81b77faa9662066837
diff --git a/sci-physics/lammps/files/fm_exp.patch b/sci-physics/lammps/files/fm_exp.patch
new file mode 100644
index 000000000000..3b6bd24028d6
--- /dev/null
+++ b/sci-physics/lammps/files/fm_exp.patch
@@ -0,0 +1,11 @@
+--- lammps-30Jul16-original/lib/meam/fm_exp.c 2016-04-18 14:00:58.000000000 +0000
++++ lammps-30Jul16/lib/meam/fm_exp.c 2016-10-06 03:15:55.631053526 +0000
+@@ -112,7 +112,7 @@
+ return epart.f*x;
+ }
+
+-double fm_exp_(double *x)
++extern "C" double fm_exp_(double *x)
+ {
+ #if defined(__BYTE_ORDER__)
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
diff --git a/sci-physics/lammps/files/gcc-6.patch b/sci-physics/lammps/files/gcc-6.patch
new file mode 100644
index 000000000000..ca2bcceeedfa
--- /dev/null
+++ b/sci-physics/lammps/files/gcc-6.patch
@@ -0,0 +1,11 @@
+--- lammps-7Apr16-orig/lib/atc/Vector.h 2014-11-20 11:59:03.000000000 -0700
++++ lammps-7Apr16/lib/atc/Vector.h 2016-10-13 06:04:44.328977960 -0600
+@@ -119,7 +119,7 @@
+ {
+ DenseVector<T> r(v);
+ r*=(1.0/s); // for integer types this may be worthless
+- return ;
++ return r;
+ }
+ ///////////////////////////////////////////////////////////////////////////////
+ //* Operator for Vector-Vector sum
diff --git a/sci-physics/lammps/files/lammps-python3-r1.patch b/sci-physics/lammps/files/lammps-python3-r1.patch
new file mode 100644
index 000000000000..2dc2bd744fa9
--- /dev/null
+++ b/sci-physics/lammps/files/lammps-python3-r1.patch
@@ -0,0 +1,11 @@
+--- lammps-4Sep15-orig/python/lammps.py 2015-09-02 14:41:38.000000000 -0600
++++ lammps-4Sep15/python/lammps.py 2015-09-08 05:59:16.000000000 -0600
+@@ -33,7 +33,7 @@
+ except:
+ type,value,tb = sys.exc_info()
+ traceback.print_exception(type,value,tb)
+- raise OSError,"Could not load LAMMPS dynamic library from %s" % modpath
++ raise OSError("Could not load LAMMPS dynamic library from %s" % modpath)
+
+ # if no ptr provided, create an instance of LAMMPS
+ # don't know how to pass an MPI communicator from PyPar
diff --git a/sci-physics/lammps/files/lammps-python3-r2.patch b/sci-physics/lammps/files/lammps-python3-r2.patch
new file mode 100644
index 000000000000..a447c4b3a303
--- /dev/null
+++ b/sci-physics/lammps/files/lammps-python3-r2.patch
@@ -0,0 +1,11 @@
+--- lammps-23Mar16/python/lammps.py (original)
++++ lammps-23Mar16/python/lammps.py (refactored)
+@@ -208,7 +208,7 @@
+ result = (c_double*nlocal)()
+ self.lib.lammps_extract_variable.restype = POINTER(c_double)
+ ptr = self.lib.lammps_extract_variable(self.lmp,name,group)
+- for i in xrange(nlocal): result[i] = ptr[i]
++ for i in range(nlocal): result[i] = ptr[i]
+ self.lib.lammps_free(ptr)
+ return result
+ return None
diff --git a/sci-physics/lammps/files/lammps-python3.patch b/sci-physics/lammps/files/lammps-python3.patch
new file mode 100644
index 000000000000..1937881c9339
--- /dev/null
+++ b/sci-physics/lammps/files/lammps-python3.patch
@@ -0,0 +1,11 @@
+--- lammps-11Apr15/python/lammps.py 2015-03-13 16:06:20.000000000 -0600
++++ lammps-11Apr15-new/python/lammps.py 2015-04-13 09:40:43.000000000 -0600
+@@ -28,7 +28,7 @@
+ except:
+ type,value,tb = sys.exc_info()
+ traceback.print_exception(type,value,tb)
+- raise OSError,"Could not load LAMMPS dynamic library"
++ raise OSError("Could not load LAMMPS dynamic library")
+
+ # if no ptr provided, create an instance of LAMMPS
+ # don't know how to pass an MPI communicator from PyPar
diff --git a/sci-physics/lammps/files/python-shebang.patch b/sci-physics/lammps/files/python-shebang.patch
new file mode 100644
index 000000000000..7dd45797d4ad
--- /dev/null
+++ b/sci-physics/lammps/files/python-shebang.patch
@@ -0,0 +1,7 @@
+--- lammps-25Mar15/python/lammps.py 2015-03-13 16:06:20.000000000 -0600
++++ lammps-25Mar15-new/python/lammps.py 2015-04-10 15:31:14.000000000 -0600
+@@ -1,3 +1,4 @@
++#!/usr/bin/env python
+ # ----------------------------------------------------------------------
+ # LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
+ # http://lammps.sandia.gov, Sandia National Laboratories
diff --git a/sci-physics/lammps/lammps-20150210.ebuild b/sci-physics/lammps/lammps-20150210.ebuild
new file mode 100644
index 000000000000..f38c9d86e0fb
--- /dev/null
+++ b/sci-physics/lammps/lammps-20150210.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic fortran-2 multilib
+
+convert_month() {
+ case $1 in
+ 01) echo Jan
+ ;;
+ 02) echo Feb
+ ;;
+ 03) echo Mar
+ ;;
+ 04) echo Apr
+ ;;
+ 05) echo May
+ ;;
+ 06) echo Jun
+ ;;
+ 07) echo Jul
+ ;;
+ 08) echo Aug
+ ;;
+ 09) echo Sep
+ ;;
+ 10) echo Oct
+ ;;
+ 11) echo Nov
+ ;;
+ 12) echo Dec
+ ;;
+ *) echo unknown
+ ;;
+ esac
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples gzip lammps-memalign mpi static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE=$(tc-getAR) \
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC=$(usex mpi '' "-I../STUBS") \
+ MPI_PATH=$(usex mpi '' '-L../STUBS') \
+ MPI_LIB=$(usex mpi '' '-lmpi_stubs') \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+}
+
+src_compile() {
+ # Prepare compiler flags.
+ append-cxxflags -fPIC -I../../src
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src stubs
+
+ # Build packages
+ emake -C src yes-asphere
+ emake -C src yes-body
+ emake -C src yes-class2
+ emake -C src yes-colloid
+ emake -C src yes-dipole
+ emake -C src yes-fld
+ #emake -C src yes-gpu
+ emake -C src yes-granular
+ # Need OpenKIM external dependency.
+ #emake -C src yes-kim
+ # Need Kokkos external dependency.
+ #emake -C src yes-kokkos
+ emake -C src yes-kspace
+ emake -C src yes-manybody
+ emake -C src yes-mc
+ lmp_emake -C src yes-meam
+ lmp_emake -j1 -C lib/meam -f Makefile.gfortran
+ emake -C src yes-misc
+ emake -C src yes-molecule
+ #emake -C src yes-mpiio
+ emake -C src yes-opt
+ emake -C src yes-peri
+ emake -C src yes-poems
+ lmp_emake -C lib/poems -f Makefile.g++
+ emake -C src yes-reax
+ lmp_emake -j1 -C lib/reax -f Makefile.gfortran
+ emake -C src yes-replica
+ emake -C src yes-rigid
+ emake -C src yes-shock
+ emake -C src yes-snap
+ emake -C src yes-srd
+ emake -C src yes-voronoi
+ emake -C src yes-xtc
+
+ emake -C src yes-user-eff
+ emake -C src yes-user-fep
+ use mpi && emake -C src yes-user-lb
+ emake -C src yes-user-phonon
+ emake -C src yes-user-sph
+
+ if use mpi; then
+ emake -C src yes-user-atc
+ lmp_emake -C lib/atc -f Makefile.g++
+ fi
+
+ if use static-libs; then
+ # Build static library.
+ lmp_emake -C src makelib
+ lmp_emake -C src -f Makefile.lib serial
+ fi
+
+ # Build shared library.
+ lmp_emake -C src makeshlib
+ lmp_emake -C src -f Makefile.shlib serial
+
+ # Compile main executable.
+ lmp_emake -C src serial
+
+ # Compile tools.
+ emake -C tools binary2txt chain micelle2d data2xmovie
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20150515-r1.ebuild b/sci-physics/lammps/lammps-20150515-r1.ebuild
new file mode 100644
index 000000000000..a44974b9a665
--- /dev/null
+++ b/sci-physics/lammps/lammps-20150515-r1.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ case $1 in
+ 01) echo Jan
+ ;;
+ 02) echo Feb
+ ;;
+ 03) echo Mar
+ ;;
+ 04) echo Apr
+ ;;
+ 05) echo May
+ ;;
+ 06) echo Jun
+ ;;
+ 07) echo Jul
+ ;;
+ 08) echo Aug
+ ;;
+ 09) echo Sep
+ ;;
+ 10) echo Oct
+ ;;
+ 11) echo Nov
+ ;;
+ 12) echo Dec
+ ;;
+ *) echo unknown
+ ;;
+ esac
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE=$(tc-getAR) \
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC=$(usex mpi "" "-I../STUBS") \
+ MPI_PATH=$(usex mpi "" "-L../STUBS") \
+ MPI_LIB=$(usex mpi "" "-lmpi_stubs") \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ lmp_emake -C src yes-asphere
+ lmp_emake -C src yes-body
+ lmp_emake -C src yes-class2
+ lmp_emake -C src yes-colloid
+ lmp_emake -C src yes-coreshell
+ lmp_emake -C src yes-dipole
+ lmp_emake -C src yes-fld
+ #lmp_emake -C src yes-gpu
+ lmp_emake -C src yes-granular
+ # Need OpenKIM external dependency.
+ #lmp_emake -C src yes-kim
+ # Need Kokkos external dependency.
+ #lmp_emake -C src yes-kokkos
+ lmp_emake -C src yes-kspace
+ lmp_emake -C src yes-manybody
+ lmp_emake -C src yes-mc
+ lmp_emake -C src yes-meam
+ lmp_emake -C src yes-misc
+ lmp_emake -C src yes-molecule
+ #lmp_emake -C src yes-mpiio
+ lmp_emake -C src yes-opt
+ lmp_emake -C src yes-peri
+ lmp_emake -C src yes-poems
+ lmp_emake -C src yes-qeq
+ lmp_emake -C src yes-reax
+ lmp_emake -C src yes-replica
+ lmp_emake -C src yes-rigid
+ lmp_emake -C src yes-shock
+ lmp_emake -C src yes-snap
+ lmp_emake -C src yes-srd
+ lmp_emake -C src yes-voronoi
+ lmp_emake -C src yes-xtc
+
+ if use mpi; then
+ lmp_emake -C src yes-user-atc
+ fi
+ lmp_emake -C src yes-user-eff
+ lmp_emake -C src yes-user-fep
+ use mpi && lmp_emake -C src yes-user-lb
+ lmp_emake -C src yes-user-phonon
+ lmp_emake -C src yes-user-sph
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20150515.ebuild b/sci-physics/lammps/lammps-20150515.ebuild
new file mode 100644
index 000000000000..0814be15b54b
--- /dev/null
+++ b/sci-physics/lammps/lammps-20150515.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ case $1 in
+ 01) echo Jan
+ ;;
+ 02) echo Feb
+ ;;
+ 03) echo Mar
+ ;;
+ 04) echo Apr
+ ;;
+ 05) echo May
+ ;;
+ 06) echo Jun
+ ;;
+ 07) echo Jul
+ ;;
+ 08) echo Aug
+ ;;
+ 09) echo Sep
+ ;;
+ 10) echo Oct
+ ;;
+ 11) echo Nov
+ ;;
+ 12) echo Dec
+ ;;
+ *) echo unknown
+ ;;
+ esac
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE=$(tc-getAR) \
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC=$(usex mpi "" "-I../STUBS") \
+ MPI_PATH=$(usex mpi "" "-L../STUBS") \
+ MPI_LIB=$(usex mpi "" "-lmpi_stubs") \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ lmp_emake -C src yes-asphere
+ lmp_emake -C src yes-body
+ lmp_emake -C src yes-class2
+ lmp_emake -C src yes-colloid
+ lmp_emake -C src yes-coreshell
+ lmp_emake -C src yes-dipole
+ lmp_emake -C src yes-fld
+ #lmp_emake -C src yes-gpu
+ lmp_emake -C src yes-granular
+ # Need OpenKIM external dependency.
+ #lmp_emake -C src yes-kim
+ # Need Kokkos external dependency.
+ #lmp_emake -C src yes-kokkos
+ lmp_emake -C src yes-kspace
+ lmp_emake -C src yes-manybody
+ lmp_emake -C src yes-mc
+ lmp_emake -C src yes-meam
+ lmp_emake -C src yes-misc
+ lmp_emake -C src yes-molecule
+ #lmp_emake -C src yes-mpiio
+ lmp_emake -C src yes-opt
+ lmp_emake -C src yes-peri
+ lmp_emake -C src yes-poems
+ lmp_emake -C src yes-qeq
+ lmp_emake -C src yes-reax
+ lmp_emake -C src yes-replica
+ lmp_emake -C src yes-rigid
+ lmp_emake -C src yes-shock
+ lmp_emake -C src yes-snap
+ lmp_emake -C src yes-srd
+ lmp_emake -C src yes-voronoi
+ lmp_emake -C src yes-xtc
+
+ if use mpi; then
+ lmp_emake -C src yes-user-atc
+ fi
+ lmp_emake -C src yes-user-eff
+ lmp_emake -C src yes-user-fep
+ use mpi && lmp_emake -C src yes-user-lb
+ lmp_emake -C src yes-user-phonon
+ lmp_emake -C src yes-user-sph
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20150810.ebuild b/sci-physics/lammps/lammps-20150810.ebuild
new file mode 100644
index 000000000000..313a8bd28a33
--- /dev/null
+++ b/sci-physics/lammps/lammps-20150810.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ case $1 in
+ 01) echo Jan
+ ;;
+ 02) echo Feb
+ ;;
+ 03) echo Mar
+ ;;
+ 04) echo Apr
+ ;;
+ 05) echo May
+ ;;
+ 06) echo Jun
+ ;;
+ 07) echo Jul
+ ;;
+ 08) echo Aug
+ ;;
+ 09) echo Sep
+ ;;
+ 10) echo Oct
+ ;;
+ 11) echo Nov
+ ;;
+ 12) echo Dec
+ ;;
+ *) echo unknown
+ ;;
+ esac
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE=$(tc-getAR) \
+ CC=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ F90=$(usex mpi "mpif90" "$(tc-getFC)") \
+ LINK=$(usex mpi "mpic++" "$(tc-getCXX)") \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC=$(usex mpi "" "-I../STUBS") \
+ MPI_PATH=$(usex mpi "" "-L../STUBS") \
+ MPI_LIB=$(usex mpi "" "-lmpi_stubs") \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ lmp_emake -C src yes-asphere
+ lmp_emake -C src yes-body
+ lmp_emake -C src yes-class2
+ lmp_emake -C src yes-colloid
+ lmp_emake -C src yes-coreshell
+ lmp_emake -C src yes-dipole
+ lmp_emake -C src yes-fld
+ #lmp_emake -C src yes-gpu
+ lmp_emake -C src yes-granular
+ # Need OpenKIM external dependency.
+ #lmp_emake -C src yes-kim
+ # Need Kokkos external dependency.
+ #lmp_emake -C src yes-kokkos
+ lmp_emake -C src yes-kspace
+ lmp_emake -C src yes-manybody
+ lmp_emake -C src yes-mc
+ lmp_emake -C src yes-meam
+ lmp_emake -C src yes-misc
+ lmp_emake -C src yes-molecule
+ #lmp_emake -C src yes-mpiio
+ lmp_emake -C src yes-opt
+ lmp_emake -C src yes-peri
+ lmp_emake -C src yes-poems
+ lmp_emake -C src yes-qeq
+ lmp_emake -C src yes-reax
+ lmp_emake -C src yes-replica
+ lmp_emake -C src yes-rigid
+ lmp_emake -C src yes-shock
+ lmp_emake -C src yes-snap
+ lmp_emake -C src yes-srd
+ lmp_emake -C src yes-voronoi
+ lmp_emake -C src yes-xtc
+
+ if use mpi; then
+ lmp_emake -C src yes-user-atc
+ fi
+ lmp_emake -C src yes-user-eff
+ lmp_emake -C src yes-user-fep
+ use mpi && lmp_emake -C src yes-user-lb
+ lmp_emake -C src yes-user-phonon
+ lmp_emake -C src yes-user-sph
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151106.ebuild b/sci-physics/lammps/lammps-20151106.ebuild
new file mode 100644
index 000000000000..02f545428fa3
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151106.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151120.ebuild b/sci-physics/lammps/lammps-20151120.ebuild
new file mode 100644
index 000000000000..02f545428fa3
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151120.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151207.ebuild b/sci-physics/lammps/lammps-20151207.ebuild
new file mode 100644
index 000000000000..da77877d865d
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151207.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151208.ebuild b/sci-physics/lammps/lammps-20151208.ebuild
new file mode 100644
index 000000000000..231546ced558
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151208.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151209.ebuild b/sci-physics/lammps/lammps-20151209.ebuild
new file mode 100644
index 000000000000..231546ced558
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151209.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20151211.ebuild b/sci-physics/lammps/lammps-20151211.ebuild
new file mode 100644
index 000000000000..231546ced558
--- /dev/null
+++ b/sci-physics/lammps/lammps-20151211.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+DEPEND="
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ gzip? ( app-arch/gzip )
+ sci-libs/voro++
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160115.ebuild b/sci-physics/lammps/lammps-20160115.ebuild
new file mode 100644
index 000000000000..13530ea5d3dc
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160115.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160122.ebuild b/sci-physics/lammps/lammps-20160122.ebuild
new file mode 100644
index 000000000000..13530ea5d3dc
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160122.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r1.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160216.ebuild b/sci-physics/lammps/lammps-20160216.ebuild
new file mode 100644
index 000000000000..f7063b8b2bdf
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160216.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160301.ebuild b/sci-physics/lammps/lammps-20160301.ebuild
new file mode 100644
index 000000000000..f7063b8b2bdf
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160301.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160310.ebuild b/sci-physics/lammps/lammps-20160310.ebuild
new file mode 100644
index 000000000000..f7063b8b2bdf
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160310.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160314.ebuild b/sci-physics/lammps/lammps-20160314.ebuild
new file mode 100644
index 000000000000..f7063b8b2bdf
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160314.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160321.ebuild b/sci-physics/lammps/lammps-20160321.ebuild
new file mode 100644
index 000000000000..f7063b8b2bdf
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160321.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/blas
+ virtual/lapack
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160407.ebuild b/sci-physics/lammps/lammps-20160407.ebuild
new file mode 100644
index 000000000000..4acd225c5e4e
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160407.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ # Patch python.
+ epatch "${FILESDIR}/lammps-python3-r2.patch"
+ epatch "${FILESDIR}/python-shebang.patch"
+ epatch "${FILESDIR}/gcc-6.patch"
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20160730.ebuild b/sci-physics/lammps/lammps-20160730.ebuild
new file mode 100644
index 000000000000..57af769d1ae1
--- /dev/null
+++ b/sci-physics/lammps/lammps-20160730.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/fm_exp.patch"
+)
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ eapply "${PATCHES[@]}"
+ eapply_user
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20170109.ebuild b/sci-physics/lammps/lammps-20170109.ebuild
new file mode 100644
index 000000000000..9daef6aa6809
--- /dev/null
+++ b/sci-physics/lammps/lammps-20170109.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/fm_exp.patch"
+)
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ eapply "${PATCHES[@]}"
+ eapply_user
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain data2xmovie micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/data2xmovie
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dohtml -r doc/*
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20170706.ebuild b/sci-physics/lammps/lammps-20170706.ebuild
new file mode 100644
index 000000000000..46587b5d81cb
--- /dev/null
+++ b/sci-physics/lammps/lammps-20170706.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit eutils flag-o-matic fortran-2 multilib python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="http://lammps.sandia.gov/tars/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gzip lammps-memalign mpi python static-libs"
+
+# blas/lapack is needed by the ATC package which is only built with MPI.
+DEPEND="
+ gzip? ( app-arch/gzip )
+ mpi? (
+ virtual/mpi
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/fm_exp.patch"
+)
+
+lmp_emake() {
+ local LAMMPS_INCLUDEFLAGS
+ LAMMPS_INCLUDEFLAGS="$(usex gzip '-DLAMMPS_GZIP' '')"
+ LAMMPS_INCLUDEFLAGS+="$(usex lammps-memalign ' -DLAMMPS_MEMALIGN=64' '')"
+
+ # The lammps makefile uses CC to indicate the C++ compiler.
+ emake \
+ ARCHIVE="$(tc-getAR)" \
+ CC="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ F90="$(usex mpi "mpif90" "$(tc-getFC)")" \
+ LINK="$(usex mpi "mpic++" "$(tc-getCXX)")" \
+ CCFLAGS="${CXXFLAGS}" \
+ F90FLAGS="${FCFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ LMP_INC="${LAMMPS_INCLUDEFLAGS}" \
+ MPI_INC="$(usex mpi "" "-I../STUBS")" \
+ MPI_PATH="$(usex mpi "" "-L../STUBS")" \
+ MPI_LIB="$(usex mpi "" "-lmpi_stubs")" \
+ user-atc_SYSLIB="$(usex mpi "$($(tc-getPKG_CONFIG) --libs blas) $($(tc-getPKG_CONFIG) --libs lapack)" '')"\
+ "$@"
+}
+
+lmp_activate_packages() {
+ # Build packages
+ local packages=( yes-asphere yes-body yes-class2 yes-colloid \
+ yes-coreshell yes-dipole yes-fld yes-granular yes-kspace \
+ yes-manybody yes-mc yes-meam yes-misc \
+ $(usex mpi "yes-user-atc" "") \
+ yes-molecule yes-opt yes-peri yes-poems yes-qeq yes-reax \
+ yes-replica yes-rigid yes-shock yes-snap yes-srd \
+ yes-user-eff yes-user-fep \
+ $(usex mpi "yes-user-lb" "") \
+ yes-user-phonon yes-user-sph yes-voronoi yes-xtc )
+
+ for p in ${packages[@]}; do
+ lmp_emake -C src ${p}
+ done
+}
+
+lmp_build_packages() {
+ lmp_emake -C lib/meam -j1 -f Makefile.gfortran
+ lmp_emake -C lib/poems -f Makefile.g++
+ lmp_emake -C lib/reax -j1 -f Makefile.gfortran
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++
+}
+
+lmp_clean_packages() {
+ lmp_emake -C lib/meam -f Makefile.gfortran clean
+ lmp_emake -C lib/poems -f Makefile.g++ clean
+ lmp_emake -C lib/reax -f Makefile.gfortran clean
+ use mpi && lmp_emake -C lib/atc -f Makefile.g++ clean
+}
+
+src_prepare() {
+ # Fix inconsistent use of SHFLAGS.
+ sed -i \
+ -e 's:voronoi_SYSINC\s\+=.*$:voronoi_SYSINC = -I/usr/include/voro++:' \
+ -e 's:voronoi_SYSPATH\s\+=.*$:voronoi_SYSPATH =:' \
+ lib/voronoi/Makefile.lammps || die
+
+ # Fix missing .so name.
+ sed -i \
+ -e 's:SHLIBFLAGS\s\+=\s\+:SHLIBFLAGS = -Wl,-soname,liblammps.so.0 :' \
+ src/MAKE/Makefile.serial || die
+
+ # Fix makefile in tools.
+ sed -i \
+ -e 's:g++:$(CXX) $(CXXFLAGS):' \
+ -e 's:gcc:$(CC) $(CCFLAGS):' \
+ -e 's:ifort:$(FC) $(FCFLAGS):' \
+ tools/Makefile || die
+
+ eapply "${PATCHES[@]}"
+ eapply_user
+}
+
+src_compile() {
+ # Fix atc...
+ append-cxxflags -I../../src
+
+ # Acticate packages.
+ elog "Activating lammps packages..."
+ lmp_activate_packages
+
+ # STUBS/mpi.c is using '#include <mpi.h>' now instead of '#include
+ # "mpi.h"' which requires an additional '-I.'.
+ append-cxxflags -I.
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ if use static-libs; then
+ # Build static library.
+ elog "Building static library..."
+ lmp_emake -C src mode=lib serial
+ fi
+
+ # Clean out packages (that's not done by the build system with the clean
+ # target), so we can rebuild the packages with -fPIC.
+ elog "Cleaning packages..."
+ lmp_clean_packages
+
+ # The build system does not rebuild the packages with -fPIC, adding flag
+ # manually.
+ append-cxxflags -fPIC
+ append-fflags -fPIC
+
+ # Compile stubs for serial version.
+ use mpi || lmp_emake -C src mpi-stubs
+
+ elog "Building packages..."
+ lmp_build_packages
+
+ # Build shared library.
+ elog "Building shared library..."
+ lmp_emake -C src mode=shlib serial
+
+ # Compile main executable. The shared library is always built, and
+ # mode=shexe is simply a way to re-use the object files built in the
+ # "shlib" step when linking the executable. The executable is not actually
+ # using the shared library. If we have built the static library, then we
+ # link that into the executable.
+ elog "Linking executable..."
+ if use static-libs; then
+ lmp_emake -C src mode=exe serial
+ else
+ lmp_emake -C src mode=shexe serial
+ fi
+
+ # Compile tools.
+ elog "Building tools..."
+ lmp_emake -C tools binary2txt chain micelle2d
+}
+
+src_install() {
+ use static-libs && newlib.a src/liblammps_serial.a liblammps.a
+ newlib.so src/liblammps_serial.so liblammps.so.0.0.0
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so
+ dosym liblammps.so.0.0.0 /usr/$(get_libdir)/liblammps.so.0
+ newbin src/lmp_serial lmp
+ dobin tools/binary2txt
+ dobin tools/chain
+ dobin tools/micelle2d
+ # Don't forget to add header files of optional packages as they are added
+ # to this ebuild. There may also be .mod files from Fortran based
+ # packages.
+ insinto "/usr/include/${PN}"
+ doins -r src/*.h lib/meam/*.mod
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r examples/*
+ fi
+
+ dodoc README
+ if use doc; then
+ dodoc doc/Manual.pdf
+ dodoc -r doc/.
+ fi
+}
diff --git a/sci-physics/lammps/lammps-20170901.ebuild b/sci-physics/lammps/lammps-20170901.ebuild
new file mode 100644
index 000000000000..06b90c07a4b7
--- /dev/null
+++ b/sci-physics/lammps/lammps-20170901.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit cmake-utils fortran-2 python-r1
+
+convert_month() {
+ local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec )
+ echo ${months[${1#0}]}
+}
+
+MY_PV="patch_$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:0:4}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Large-scale Atomic/Molecular Massively Parallel Simulator"
+HOMEPAGE="http://lammps.sandia.gov/"
+SRC_URI="https://github.com/lammps/lammps/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cuda examples gzip lammps-memalign mpi netcdf python test"
+
+DEPEND="
+ app-arch/gzip
+ media-libs/libpng:0
+ sys-libs/zlib
+ mpi? (
+ virtual/mpi
+ sci-libs/hdf5[mpi]
+ )
+ python? ( ${PYTHON_DEPS} )
+ sci-libs/voro++
+ virtual/blas
+ virtual/lapack
+ sci-libs/fftw:3.0
+ netcdf? ( sci-libs/netcdf )
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 )
+ dev-cpp/eigen:3
+ "
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}/cmake"
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+ -DENABLE_MPI=$(usex mpi)
+ -DENABLE_GPU=$(usex cuda)
+ -DENABLE_TESTING=$(usex test)
+ -DENABLE_ASPHERE=ON
+ -DENABLE_BODY=ON
+ -DENABLE_CLASS2=ON
+ -DENABLE_COLLOID=ON
+ -DENABLE_COMPRESS=ON
+ -DENABLE_CORESHELL=ON
+ -DENABLE_DIPOLE=ON
+ -DENABLE_GRANULAR=ON
+ -DENABLE_KSPACE=ON
+ -DFFT=FFTW3
+ -DENABLE_MANYBODY=ON
+ -DENABLE_MC=ON
+ -DENABLE_MEAM=ON
+ -DENABLE_MISC=ON
+ -DLAMMPS_XDR=ON #630444
+ -DENABLE_MOLECULE=ON
+ -DENABLE_PERI=ON
+ -DENABLE_QEQ=ON
+ -DENABLE_REAX=ON
+ -DENABLE_REPLICA=ON
+ -DENABLE_RIGID=ON
+ -DENABLE_SHOCK=ON
+ -DENABLE_SNAP=ON
+ -DENABLE_SRD=ON
+ -DENABLE_PYTHON=ON
+ -DENABLE_MPIIO=$(usex mpi)
+ -DENABLE_VORONOI=ON
+ -DENABLE_USER-ATC=ON
+ -DENABLE_USER-AWPMD=ON
+ -DENABLE_USER-CGDNA=ON
+ -DENABLE_USER-CGSDK=ON
+ -DENABLE_USER-COLVARS=ON
+ -DENABLE_USER-DIFFRACTION=ON
+ -DENABLE_USER-DPD=ON
+ -DENABLE_USER-DRUDE=ON
+ -DENABLE_USER-EFF=ON
+ -DENABLE_USER-FEP=ON
+ -DENABLE_USER-H5MD=$(usex mpi)
+ -DENABLE_USER-LB=$(usex mpi)
+ -DENABLE_USER-MANIFOLD=ON
+ -DENABLE_USER-MEAMC=ON
+ -DENABLE_USER-MGPT=ON
+ -DENABLE_USER-MISC=ON
+ -DENABLE_USER-MOLFILE=ON
+ -DENABLE_USER-NETCDF=$(usex netcdf)
+ -DENABLE_USER-PHONON=ON
+ -DENABLE_USER-QTB=ON
+ -DENABLE_USER-REAXC=ON
+ -DENABLE_USER-SMD=ON
+ -DENABLE_USER-SMTBQ=ON
+ -DENABLE_USER-SPH=ON
+ -DENABLE_USER-TALLY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ local LAMMPS_POTENTIALS="usr/share/${PN}/potentials"
+ insinto "/${LAMMPS_POTENTIALS}"
+ doins "${S}"/../potentials/*
+ echo "LAMMPS_POTENTIALS=${EROOT}${LAMMPS_POTENTIALS}" > 99lammps
+ doenvd 99lammps
+
+ # Install python script.
+ use python && python_foreach_impl python_domodule "${S}"/../python/lammps.py
+
+ if use examples; then
+ local LAMMPS_EXAMPLES="/usr/share/${PN}/examples"
+ insinto "${LAMMPS_EXAMPLES}"
+ doins -r "${S}"/../examples/*
+ fi
+}
diff --git a/sci-physics/lammps/metadata.xml b/sci-physics/lammps/metadata.xml
new file mode 100644
index 000000000000..8f2d53d1312a
--- /dev/null
+++ b/sci-physics/lammps/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ LAMMPS is a classical molecular dynamics code, and an acronym for
+ Large-scale Atomic/Molecular Massively Parallel Simulator.
+
+ LAMMPS has potentials for soft materials (biomolecules, polymers) and
+ solid-state materials (metals, semiconductors) and coarse-grained or
+ mesoscopic systems. It can be used to model atoms or, more generically,
+ as a parallel particle simulator at the atomic, meso, or continuum
+ scale.
+
+ LAMMPS runs on single processors or in parallel using message-passing
+ techniques and a spatial-decomposition of the simulation domain. The
+ code is designed to be easy to modify or extend with new functionality.
+ </longdescription>
+ <use>
+ <flag name="lammps-memalign">Enables the use of the posix_memalign()
+ call instead of malloc() when large chunks or memory are allocated
+ by LAMMPS. Aliengnment is on 16 byte boundaries.</flag>
+ <flag name="cuda">Enable cuda non-bonded kernels</flag>
+ </use>
+ <maintainer type="person">
+ <email>nicolasbock@gentoo.org</email>
+ <name>Nicolas Bock</name>
+ </maintainer>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-physics/lhapdf/Manifest b/sci-physics/lhapdf/Manifest
new file mode 100644
index 000000000000..1ddbf94fe987
--- /dev/null
+++ b/sci-physics/lhapdf/Manifest
@@ -0,0 +1,12 @@
+DIST CT10.LHgrid 21081519 SHA256 e858cec1f80420698ef3ae1249d5414977ff79ce512fba00af91513f2b7e05a2 SHA512 4196b0899dc7f5803608d9328872b942393d5f5103e8d50a53b35af6f8bac509adbbe83c363ab33a5fbfab3c33156e8ae46131939ad5a8642c558ff209630820 WHIRLPOOL 7939478bdef6aa0e369738a85891188774e92b9e5b4ad5c7ad5089ce824fdeec73ddd726cf3e00ff732edfc3664ac9a263d2758f9f3dc2637de329d837028332
+DIST LHAPDF-6.1.6.tar.gz 696608 SHA256 c28138232e3219bf89cf626c0e414c6291c6b0777c3a931af18e51867657ebe9 SHA512 371a4062d3f1a4d611d8c09950a1ba7b747df29f04502a1ab9c420c300799143a53eebdecd04293d38b2c481b525c2414ac0fb8e2f8846de65e07992dea18656 WHIRLPOOL cff128bd0ceb0e5c4a0dc8bfb7432102c47035f431d1e39ed8e16b604dde5690f0458ec2a7a1da24ccfa6b524b3eeef512bc7d4b1070d32b1d7e19ac3ef0dd9d
+DIST MRST2004nlo.LHgrid 288040 SHA256 bc1aa4f26ebcf4a6a1bd6e3ec5fbd5fa3ff378c116247fa27ccd5e76324368ce SHA512 b554454fa494c86a3ae56168c3d74c5e3c3bd80f10b393153c0adfbb39a3f3837ae2db80534d288784409154034187c9c5212dfc9c21ed1bf32ef89b9266e262 WHIRLPOOL b7f1e6115015cf19c092cf367798fe1d4459d0c9fac84e022034c14fd81d27023a35f30e7e727a35e2d8af409f448508744be76f04b441b22466ebd92c600bdf
+DIST cteq5l.LHgrid 134797 SHA256 83c92bc90fd6e12be9cd76bc032eca26dcedbe90f0c11aef843bbf54734d5bba SHA512 1ba41fd773104a933af6f37745dcb6f8422e1aece74ba2b1e15a5fb69fdaf694336c0ec1dc6fbc964d2cf3fe363d17ca0c01a6c2ba6def0afa4389cb4083f34b WHIRLPOOL 8a86877fcbae2b45576e3fae08dfd4771c668257893ba2f813c578641dce9800f42bfd57d0d8ac2abc6bf7cd40921020478f1912014a36cfb722ed408ca1430f
+DIST cteq61.LHgrid 8946864 SHA256 5df10c695504f02c2c9cc1eda9ca77fa8c276554cf2cda5fbdba764bf8f47691 SHA512 ab35c058f1ece8b428d8664ba2e14068541279328b5eb9e13b020642cc804c21f7412414dd74bb3621a5136bfa7d9a60832604c944d1e3519c5a94d3dce2a063 WHIRLPOOL a3a5ef45ea92e45a5764cbb484523b2eff671ad2c04f25b0b03efd631d367f3bf9784b19eacf927d909301c73a85505f9f87a3fd3f242fcf48d6e611fe510478
+DIST cteq61.LHpdf 11860 SHA256 0dacfd4d5518b2273ba80ae381af7d46eab4784e84312585f5f149f8fce759f0 SHA512 2769bcaed94aa4b47144cd2c3ce76e0b6ab4fa8af278db5cb3b612f2286200352e829eec3971c8da0b78144483f00bbbf1ae2aae8d1e75045d239fab40289bc0 WHIRLPOOL e24427537b81c438552de53d1ef4ca34c425a241e318ffbeff3f5b632793a2cb6ec4d41bde895e56537c9ace520e012008a5370890c6199b1c29bc4ebc0925ae
+DIST lhapdf-5.9.1.tar.gz 1236188 SHA256 86b9b046d7f25627ce2aab6847ef1c5534972f4bae18de98225080cf5086919c SHA512 8e0eafa202d7c486264c06ddac31a2d1fc17c71223cf5b75cd9dae7e434792e8b8f4002bc8a0d00491c0c3fc58513095cbf693dc883c3bf968473a4e6232586a WHIRLPOOL 100c89d69150b84ba812f5ea719b9532980afd84f2f9f75ffc0c64f70766def11eb2d2bf6604be65855cac3419b5e08057bc4be73eb9e77ca4c9bbf68c4f0174
+EBUILD lhapdf-5.9.1.ebuild 2388 SHA256 baaa4a028ae003690f1b31bb5bfadb71dcec508b525ef34e783a218fa07b061d SHA512 45633d35020103ce7ba129d083ca1d29b34586ca3b533fb559f8e744612a7358cad66cf587d948e4275a8af1b77ca83175280d1a3928091a20e0d6f31fc8e3b5 WHIRLPOOL 7a4b7f3be935e85ddab12e59da7b4daddfa8594f8d4bca65b0cb8f00c96ad094715279f0e3a1153fbefbd41da305ebaa0e6225fe5a431b989743afb29e4ab6b8
+EBUILD lhapdf-6.1.6.ebuild 1607 SHA256 2a65c70243a9905a5f50e5c8f7d3a722897d5284b1a282890c2ab0c7d9fa96dd SHA512 2dfa8771f00d29f76650f7cfdfee559fb2891a5a750014bb43fba91df3980e350136e5e306490f4b2890002c2e821526a5fef89fdc3a3b01e3e73f3dd0810732 WHIRLPOOL a9de74c648e51c5b25b82e1bc7de735d13d159435d80481f834e697baff1f3965df72c0283c3143066b35ac2ae147cbed7d187bd89de8c4ed609472e2f0b2899
+MISC ChangeLog 3923 SHA256 452fcf948c303552931c3a880190114a1359fb4d6ee89cf9a6d3ed2d975d8e0c SHA512 09dc7ac96d986eaeef03bf854b0e931a5eb1e7b993cacd11c5d58859fa40f4ae6a5110ba489d21669fad09185cf170e921df6d7ee02b0e590164e9adebab2b8c WHIRLPOOL cef461d57299e0e009eaa09545e0282cc5465e42571ad1b93572d164329679689420878e610146aab8a50f92527ad9ed083c7a21b76302fb6d79ff227c78188a
+MISC ChangeLog-2015 5486 SHA256 9421aa5bb208b4e3a67b5a7f7d8ba88152c1ec342c5e9d8225d32d77ae8bc30b SHA512 43e47be6d150595d09e3759fff3ec99eeca7856d523e8cc2c27810fa27126b21b0ce81878a4e497a870e629527a1ca48358da0cde4379fccaaca6dac7ba7eb12 WHIRLPOOL 8e7d5eb97320aea5142a395978d859310f28322c898483d8f8e3f563e96483a1daf51152c73c2feaf37171ebf8f1e22a3f77ffbf4ed97e713d1d2ea15a17cf22
+MISC metadata.xml 1090 SHA256 c398bab25fcfe52e8158e7c39cfa24197708a406c6118ee51b749c487ee189b4 SHA512 fe04ac08f3f0b7ed98369d16b2cdf053d980211f3d4bb9a17d3e3feb3cc3dc6e2999fd16cc533ba7250e47b258aa10bed90d7f62007faac064112c5f9b79fe4e WHIRLPOOL eec114acad95a2925d5eb6eed590de651501bcff9e6f273ba13ccc76f0922c7593303fa9090956d75d82575ca0cea73aa36d9759176425a20184acc7890a6ed0
diff --git a/sci-physics/lhapdf/lhapdf-5.9.1.ebuild b/sci-physics/lhapdf/lhapdf-5.9.1.ebuild
new file mode 100644
index 000000000000..2c46b3230d45
--- /dev/null
+++ b/sci-physics/lhapdf/lhapdf-5.9.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator
+
+MY_PV=$(get_version_component_range 1-3 ${PV})
+MY_PF=${PN}-${MY_PV}
+
+DESCRIPTION="Les Houches Parton Density Function unified library"
+HOMEPAGE="http://projects.hepforge.org/lhapdf/"
+SRC_URI="http://www.hepforge.org/archive/lhapdf/${MY_PF}.tar.gz
+ test? (
+ http://lhapdf.hepforge.org/svn/pdfsets/5/CT10.LHgrid
+ http://lhapdf.hepforge.org/svn/pdfsets/5/cteq61.LHgrid
+ http://lhapdf.hepforge.org/svn/pdfsets/5/MRST2004nlo.LHgrid
+ http://lhapdf.hepforge.org/svn/pdfsets/5/cteq61.LHpdf
+ octave? ( http://lhapdf.hepforge.org/svn/pdfsets/5/cteq5l.LHgrid ) )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cxx doc examples octave python test"
+
+RDEPEND="octave? ( sci-mathematics/octave )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[latex] )
+ python? ( dev-lang/swig )"
+
+S="${WORKDIR}/${MY_PF}"
+
+src_prepare() {
+ # do not create extra latex docs
+ sed -i \
+ -e 's/GENERATE_LATEX.*=YES/GENERATE_LATEX = NO/g' \
+ ccwrap/Doxyfile || die
+}
+
+src_configure() {
+ local myconf="--enable-ccwrap"
+ ! use octave && ! use cxx && myconf="--disable-ccwrap"
+ econf \
+ $(use_enable cxx old-ccwrap ) \
+ $(use_enable octave) \
+ $(use_enable python pyext) \
+ $(use_enable doc doxygen) \
+ ${myconf}
+}
+
+src_test() {
+ # need to make a bogus link for octave test
+ if use octave; then
+ # remove line that tries to read non-existent help file
+ sed -i -e '/help/d' octave/lhapdf-octave-example1.m \
+ || die 'sed octave example failed'
+ fi
+ ln -s "${DISTDIR}" PDFsets
+ LHAPATH="${PWD}/PDFsets" \
+ LD_LIBRARY_PATH="${PWD}/lib/.libs:${LD_LIBRARY_PATH}" \
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO AUTHORS ChangeLog
+
+ # leftover
+ rm -rf "${D}"/usr/share/${PN}/doc || die
+ if use doc && use cxx; then
+ # default doc install buggy
+ insinto /usr/share/doc/${PF}
+ doins -r ccwrap/doxy/html
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.{f,cc}
+ fi
+}
+
+pkg_postinst() {
+ elog "To install data files, you have to run as root:"
+ elog "${ROOT}usr/bin/lhapdf-getdata --dest=${ROOT}usr/share/lhapdf/PDFsets --all"
+}
+
+pkg_postrm() {
+ if [ -d "${ROOT}usr/share/lhapdf" ]; then
+ ewarn "The data directory has not been removed, probably because"
+ ewarn "you still have installed data files."
+ fi
+}
diff --git a/sci-physics/lhapdf/lhapdf-6.1.6.ebuild b/sci-physics/lhapdf/lhapdf-6.1.6.ebuild
new file mode 100644
index 000000000000..d5d30b308cd0
--- /dev/null
+++ b/sci-physics/lhapdf/lhapdf-6.1.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=yes
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit versionator autotools-utils distutils-r1
+
+MY_PV=$(get_version_component_range 1-3 ${PV})
+MY_PF=LHAPDF-${MY_PV}
+
+DESCRIPTION="Les Houches Parton Density Function unified library"
+HOMEPAGE="http://lhapdf.hepforge.org/"
+SRC_URI="http://www.hepforge.org/archive/lhapdf/${MY_PF}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="doc examples python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/boost:0=
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[latex] )"
+
+S="${WORKDIR}/${MY_PF}"
+
+src_configure() {
+ autotools-utils_src_configure $(use_enable python)
+ if use python; then
+ cd "${S}/wrappers/python" && distutils-r1_src_prepare
+ fi
+}
+
+src_compile() {
+ autotools-utils_src_compile all $(use doc && echo doxy)
+ if use python; then
+ cd "${S}/wrappers/python" && distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ autotools-utils_src_compile -C tests
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml -r doc/doxygen/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.cc
+ fi
+ if use python; then
+ cd "${S}/wrappers/python" && distutils-r1_src_install
+ fi
+}
+
+pkg_postinst() {
+ elog "Download data files from:"
+ elog "http://www.hepforge.org/archive/${PN}/pdfsets/$(get_version_component_range 1-2 ${PV})"
+ elog "and untar them into ${EROOT%/}/usr/share/LHAPDF"
+}
diff --git a/sci-physics/lhapdf/metadata.xml b/sci-physics/lhapdf/metadata.xml
new file mode 100644
index 000000000000..e1748d9c6923
--- /dev/null
+++ b/sci-physics/lhapdf/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ Les Houches Parton Density Function (LHAPDF)
+ provides a unified and easy to use interface to modern PDF
+ sets. It is designed to work not only with individual PDF sets but
+ also with the more recent multiple "error" sets. It can be viewed as
+ the successor to PDFLIB, incorporating many of the older sets found in
+ the latter, including pion and photon PDFs. In LHAPDF the computer
+ code and input parameters/grids are separated thus allowing more easy
+ updating and no limit to the expansion possibilities. The code and
+ data sets can be downloaded together or individually as desired. From
+ version 4.1 onwards a configuration script facilitates the
+ installation of LHAPDF.
+</longdescription>
+<use>
+ <flag name="octave">Add bindings for <pkg>sci-mathematics/octave</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-physics/lightspeed/Manifest b/sci-physics/lightspeed/Manifest
new file mode 100644
index 000000000000..82f1656b309c
--- /dev/null
+++ b/sci-physics/lightspeed/Manifest
@@ -0,0 +1,10 @@
+AUX lightspeed-1.2a-autoconf.patch 592 SHA256 035dba75084fcc884146fe7e60e226d6f5daa2b63e3a1ece9d6ee79f45ca4e69 SHA512 e0bf6da5617ddc59159ad07ef82f6464f495d7e3377ecdfcd1fb4144a501c8d2e6857da239e159f04b27790d921a356bf46a5322088a3bcf786a19e32a4f8e81 WHIRLPOOL 2ce966abfb156d98470c79fabad7d523be64d81d3abd4b49d6f63552e1f28138c4381a681406674c339c7fdd73861af9e8c8d35b12862ad3ba7cf062c291928a
+AUX lightspeed-1.2a-libpng15.patch 579 SHA256 29f01eb148358857208152a4a648833ef9091c5fc349017ccf4f53ac363b3f70 SHA512 ca876b167e538f014176143e0b42001b90a96a3e560a5b641ef10c2080a5f86b0d786b53e975a52dee8044bce24401e5f2a2d7e6bf08946938b4dfb379cac319 WHIRLPOOL 9e473ea906045cdb5b256b0bfec9c400ef5f76fc7d19a6896155368222924a02c62eaff39a3e72f2d3924ec44266acf75b76846cb07b9e2a2adef7e3b0e6c660
+DIST lightspeed-1.2a.tar.gz 163764 SHA256 a8752acce625436b699b4d3c1ab479bd4116673784f17e527a3e37374abc4f4b SHA512 d936e54fcf3f5a59b9d4f0ce7777755d8262a71634f9fca0f5f312a2fbf9f5b65d3fe6628d1547cf88ac8a02243712e838e7d84c5e61a6a318484545896b46ef WHIRLPOOL 0dd6142a32b8c16508bb0fe333683ed8c82c1f461d92f1959e466c3098b56b9f4fa07f285ea754a97b149b60736cb84ff4dde61dd375318f6aa8ec2d0cf17b20
+DIST lightspeed_1.2a-7.diff.gz 379281 SHA256 1cbc562d1ad10afb9598510537cd64fdbbb1f9bd12ac27c5180a668bbc548a58 SHA512 f0a9999750470d45f9b7b6f3339fff5d75b461f8f937e16e784905e85a29fc5587b6b203f151f0a8075ea39b255f6d48c4ca78c48703f4ab3cd2d18af7a4df50 WHIRLPOOL 3cc70f8b1f27229fd510e58b3780f4904d521f192dd9cda7f27ab7feaf70aea0684661d1addcd1482ac36a20fd697f8ce55d81cf1f1d199552a657e35a09046f
+DIST objects-1.tar.gz 767805 SHA256 dd82324796b9f114c652220d069b131321a129ea41ef99cc0b8cbdf8c666bf5b SHA512 cb8c2d5c323b92b87dfe2bfa8f7f37c46b381c4611d5ca2f645a16943339b90850615647f6edc21ae28a28792b0f071e8cac9779dbfdbf6bf928498cdd451231 WHIRLPOOL 07853e37aa761beb5a94fbdce11baeb78ef9c652dbf32c85129cf75af5fe4dae8608fc51f2ccdf0ae612e904c36713ad9a304234234a8e274ae43d09fe068884
+EBUILD lightspeed-1.2a-r1.ebuild 1594 SHA256 bd848bfefff779d22fcbc009a031c9b2d0de08d28861e54efcdb25737a9e3536 SHA512 830bc2d5c1dbdba5b3371a27dd378190a5dcc3c353432c8345d53888d9371860648746acb1131ea0518251b54cd4e3ac3a817f3d592aef4569136712af3cf855 WHIRLPOOL 427712212decfa4e41de703b32cbba2f53dfa296f2d507b8187ac97522c22966a907a08cae60f0b401ace24d4b675bff8ac6a75533683b603f9b7f524a65c736
+EBUILD lightspeed-1.2a-r2.ebuild 1524 SHA256 414d8866f2eb2bc0523af67c5b92e09e613f78167231fae1b50cd8d497869589 SHA512 7e69381fa323b8e0689b749f0f77e720d3034d6de81b91178e543d83cd0e92dd1bdbf13b7272546a4a557fb6673f7ab4e01c8d19f82da58b86dc15fe78e6f909 WHIRLPOOL 9390c72ea6e77a216c5d7bed6359524691ee77f65930a711c05e2292f183e5d625c0a435692ffd137f83a77eb33247aeb51fe7c086a3485f665dc4e1ea3dc241
+MISC ChangeLog 2832 SHA256 ea8140b976f855a60cdd1b0d40303a20dffcc77db1504b74f98f1e4fbd64868e SHA512 42443d083a5a47da87528a0d1dfa52bb95cdbe8ff9fd07a2d3cad85165dbf40cc4428ad3e6e3f5e28c7a141acb7fe68c2e2d2b9438363e8e88d4c72e4ce43ec5 WHIRLPOOL b0d08ce4233e0feb862fd4419be0040c7cea9896a7146bec88aa61657da46ef700a297149626fac0218c9f340e31d152be77dd9eb154a6e8a174a9afd28510c3
+MISC ChangeLog-2015 3730 SHA256 400beec964bc4527ca1b37190d73e2f14b8f2b46b191a753f4812be454869d34 SHA512 24092489e610d7bcee8b51a8c17126978a925c243b89d8835eb2a566e4f3b04070a4fab7f043599e3ee0e98c094ba1bc6cc25d169bd0431bc8f2018a4b6d9796 WHIRLPOOL ae4137a5c6c5fa8abc8d12337d8dceb356bf7e8d2c46c9e7d1fe66c0194da9ea6aaa167b1b83fd7b8c2093f70c64341b7171f5cef58218f069a525b2c4786eba
+MISC metadata.xml 763 SHA256 c96eda595305a44153d750c19a2c5fc6fdef6ad7b94471fa7a62ea3c959a1636 SHA512 d33c67d677850f7eaf12b4086c66a49940259b5553470a9f3c9ca56279f06a99eec12384e75815e32e7953ac3275ce01e03582d35a9fa3de21e5b3380d02d08f WHIRLPOOL cfd178fd81c49f2d59cfba6ef1c23321aa8f73a68adf40e52f5bebeb656d24a0b2e9dc7617dedb356283b225269d8faefe5e6d5376ba819899febfde23fbb0cd
diff --git a/sci-physics/lightspeed/files/lightspeed-1.2a-autoconf.patch b/sci-physics/lightspeed/files/lightspeed-1.2a-autoconf.patch
new file mode 100644
index 000000000000..c6b2f9fda711
--- /dev/null
+++ b/sci-physics/lightspeed/files/lightspeed-1.2a-autoconf.patch
@@ -0,0 +1,16 @@
+diff --git a/configure.in b/configure.in
+index 1cfbcba..5363c05 100644
+--- a/configure.in
++++ b/configure.in
+@@ -54,9 +54,8 @@ if test "x$with_gtk" != "x1" -a "$gtkmorph_gtk" = "" ; then
+ AC_MSG_NOTICE([ Testing for GTK 2 skipped])
+ fi
+ if test "x$with_gtk" != "x2" -a "$version_of_gtk" = "" ; then
+- AM_PATH_GTK(1.0.1, , [AC_MSG_ERROR([Cannot find proper GTK+ version])])
+- version_of_gtk=gtk1
+- AC_DEFINE(HAVE_GTK1,1,"compiled with GTK 1 and GtkGLArea ")
++ AC_MSG_ERROR([Cannot find proper GTK+ version])
++ exit 1
+ fi
+
+ AM_CONDITIONAL(COND_GTK1, test "$version_of_gtk" = "gtk1" )
diff --git a/sci-physics/lightspeed/files/lightspeed-1.2a-libpng15.patch b/sci-physics/lightspeed/files/lightspeed-1.2a-libpng15.patch
new file mode 100644
index 000000000000..db0d0faa1123
--- /dev/null
+++ b/sci-physics/lightspeed/files/lightspeed-1.2a-libpng15.patch
@@ -0,0 +1,19 @@
+--- a/src/snapshot.c
++++ b/src/snapshot.c
+@@ -26,6 +26,7 @@
+ #include "lightspeed.h"
+
+ #ifdef HAVE_LIBPNG
++#include <zlib.h>
+ #include <png.h>
+ static int write_png( int message, const void *data );
+ #endif
+@@ -305,7 +306,7 @@
+ return -1;
+ png_write_s = png_create_write_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
+ png_info_s = png_create_info_struct( png_write_s );
+- if (setjmp( png_write_s->jmpbuf )) {
++ if (setjmp( png_jmpbuf( png_write_s ) )) {
+ /* Error writing file */
+ png_destroy_write_struct( &png_write_s, &png_info_s );
+ fclose( png_fp );
diff --git a/sci-physics/lightspeed/lightspeed-1.2a-r1.ebuild b/sci-physics/lightspeed/lightspeed-1.2a-r1.ebuild
new file mode 100644
index 000000000000..947d85f9cfd7
--- /dev/null
+++ b/sci-physics/lightspeed/lightspeed-1.2a-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools eutils
+
+DEB_PATCH="${PN}_${PV}-7"
+DESCRIPTION="OpenGL interactive relativistic simulator"
+HOMEPAGE="http://lightspeed.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://sourceforge/${PN}/objects-1.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_PATCH}.diff.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls truetype"
+LANGS="es"
+for i in ${LANGS}; do
+ IUSE="${IUSE} linguas_${i}"
+done
+
+RDEPEND="
+ media-libs/libpng
+ media-libs/tiff
+ virtual/opengl
+ x11-libs/gtkglext
+ x11-libs/gtkglarea:2
+ x11-libs/gtk+:2
+ x11-libs/libXmu
+ truetype? ( media-libs/ftgl )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S2="${WORKDIR}/objects"
+
+src_prepare() {
+ epatch "${WORKDIR}/${DEB_PATCH}.diff"
+ epatch \
+ "${FILESDIR}"/${P}-autoconf.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-gtk=2 \
+ $(use_enable nls) \
+ $(use_with truetype ftgl)
+}
+
+src_compile() {
+ emake
+ local i
+ for i in ${LANGS}; do
+ use linguas_${i} && emake ${i}.gmo
+ done
+}
+
+src_install() {
+ default
+ newicon src/icon.xpm lightspeed.xpm
+ make_desktop_entry ${PN} "Light Speed! Relativistic Simulator"
+ newdoc debian/changelog ChangeLog.Debian
+ cd ${S2}
+ newdoc README objects-README
+ insinto /usr/share/${PN}
+ doins *.3ds *.lwo
+}
+
+pkg_postinst() {
+ elog
+ elog "Some 3d models have been placed in /usr/share/${PN}"
+ elog "You can load them in Light Speed! from the File menu."
+ elog
+}
diff --git a/sci-physics/lightspeed/lightspeed-1.2a-r2.ebuild b/sci-physics/lightspeed/lightspeed-1.2a-r2.ebuild
new file mode 100644
index 000000000000..f9e752e9767e
--- /dev/null
+++ b/sci-physics/lightspeed/lightspeed-1.2a-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils
+
+DEB_PATCH="${PN}_${PV}-7"
+DESCRIPTION="OpenGL interactive relativistic simulator"
+HOMEPAGE="http://lightspeed.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://sourceforge/${PN}/objects-1.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_PATCH}.diff.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls truetype l10n_es"
+
+RDEPEND="
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ virtual/opengl
+ x11-libs/gtkglext
+ x11-libs/gtkglarea:2
+ x11-libs/gtk+:2
+ x11-libs/libXmu
+ truetype? ( media-libs/ftgl )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${WORKDIR}/${DEB_PATCH}.diff"
+ "${FILESDIR}"/${P}-autoconf.patch
+ "${FILESDIR}"/${P}-libpng15.patch
+)
+
+src_prepare() {
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-gtk=2 \
+ $(use_enable nls) \
+ $(use_with truetype ftgl)
+}
+
+src_compile() {
+ emake
+ use l10n_es && emake es.gmo
+}
+
+src_install() {
+ default
+ newicon src/icon.xpm lightspeed.xpm
+ make_desktop_entry ${PN} "Light Speed! Relativistic Simulator"
+ newdoc debian/changelog ChangeLog.Debian
+ cd "${WORKDIR}/objects" || die
+ newdoc README objects-README
+ insinto /usr/share/${PN}
+ doins *.3ds *.lwo
+}
+
+pkg_postinst() {
+ elog
+ elog "Some 3d models have been placed in /usr/share/${PN}"
+ elog "You can load them in Light Speed! from the File menu."
+ elog
+}
diff --git a/sci-physics/lightspeed/metadata.xml b/sci-physics/lightspeed/metadata.xml
new file mode 100644
index 000000000000..49af49355b38
--- /dev/null
+++ b/sci-physics/lightspeed/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Light Speed! is an OpenGL-based program developed to illustrate the
+ effects of special relativity on the appearance of moving
+ objects. The moving object is, by default, a geometric lattice. 3D
+ Studio and LightWave 3D objects may be imported as well. Best of
+ all, the simulator is completely interactive, rendering the exotic
+ distortions in real-time.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lightspeed</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/looptools/Manifest b/sci-physics/looptools/Manifest
new file mode 100644
index 000000000000..231d88f7070d
--- /dev/null
+++ b/sci-physics/looptools/Manifest
@@ -0,0 +1,10 @@
+AUX looptools-2.10-makefile.patch 2441 SHA256 7d30eab6263251a27ff069f7888fe1c4b4fed60809f2ff0ba10d4bbcb3cb93f9 SHA512 2fefd3ccce9568481871166befffd0cfe08e9dcb5c9498eb6acdcfcf35d94148832ec23f33e258279a8e3a152e0a7c265be8ef3e3f349259ef2e7e2640381280 WHIRLPOOL 63c83d9118125bba31bed3b5480ee9903e40468ef4a5ed7474a4dad4c456467712e8568a9be9840e8f86f2bdbb8fe09850373a74eed4de5f605e275b341dc1f7
+AUX looptools-2.8-makefile.patch 2375 SHA256 4233d14f16609972b75df4aafdd0974254a4db6e82236435aaa27a0f4990ed28 SHA512 e0f0f4fce94468f9b07deececb89c6e64250692b343ee1a8f29d85da724cf2cc443e6363414e5eb0af88f0135b9a7e2311e14d7d1001c9bd57e127c7ba808ae0 WHIRLPOOL e526400922e9ed770a08f840c5babf3be32327c0719360f0305912fdb96cf4dcb887391f906cdb5f82ab7c6f9853c2220c6aa982794f8123cef6df3e7a55ac20
+DIST LoopTools-2.12.tar.gz 545153 SHA256 df04d944de15ec73665edaf76f655d1db797cbc02b54baa7664ac761ecfa2f70 SHA512 70726493bd138fb80b85a46955fbe28b7f1432d9b67a100fe3ff74c2fa22232a07e461a6742745b0ead81793bb64b81cc4265d09b91fa048e7bdd32cf6956b27 WHIRLPOOL af3abaf31a4a868e0f65bdb0b21405c413c470063e4c8130e31b2a9e05a4f0e65e9999323e3cdf0b4277e48e84d767288852e984d486468abab3aaa664f66879
+DIST LoopTools-2.13.tar.gz 549005 SHA256 b609720e8ab68d4f4e0c01c19abffff5915fe593362ddbcdd68260c780ef475e SHA512 eadde36d8bf340061f5b50c9928bce055ef098d0cee11abe9a834c158a7758b09f4290dddbba922a41b0281fbdaecc80ba877cb6968b0448f3487324e220ec62 WHIRLPOOL 360aedd396f7a888253ca6375b34bac26faf711998a8e881e9cab9b617a3126ee1a7ce6ee2168d947cf69bd2850a387276f503a7ae0271217e66d71c3f2e5d42
+DIST LoopTools-2.8.tar.gz 546810 SHA256 2395518d0eac9b0883a2c249b9a5ba80df443929c520c45e60f5a4284166eb42 SHA512 32211669fd092d2d5bb38e26a6471a95df0647d9e7ea0cc4e99ff4fd7c3e3fee107f6432ed9075e3102224f0041fac6f7075b1f0a91f7744ec3890b4b36d276e WHIRLPOOL c8dff8030d7ea1bfc6b65bef3370c5acfec69fa73f223a63b7424163b81a3bdf788eb3ffecd07e9bf61a31a63138b1fd126b6442a298c8fad1f4b04b69663a47
+EBUILD looptools-2.12.ebuild 885 SHA256 b831702e1c28ea297540f3ac5513502394b64cc6cd3a548db4238b47a32431c8 SHA512 9839812ae955f6d7c4709e43c03f689f222d6caec4a65ad4ad13fde85c8bba9a6915f026ff6dd5136499839e0505db754f006f9e0275390f62e4fd7c91c2bae4 WHIRLPOOL 99dac16b3025d6ed3ae0a4d98b9d42a48e4aa6d8bd896b2fdf7f8d872ce1d9d0aafada69c6eeab7a06d28418c9dd87b3946cdcc7c457c3c25078565e03beafb5
+EBUILD looptools-2.13.ebuild 892 SHA256 ef9969f6f44581e7f853db01b0bc2c3fbe35a353639771ab3490dfccf02c75fa SHA512 63425495632f67b951c945756a3d443f47ba12ae1e01592106e5baa49a32cf2c1ac5326ad18ece334e653c79a0d45190e7b513e039e6b4fb4ab042befb658267 WHIRLPOOL f3e8007a299c5133b866d86f29af75b77f1efcd64fbe2c0ed083d595865cefae1c7d01a90d21186db0f0f27accfdd77f9950512ac08e5b1d235f4a77a3d5ee5f
+EBUILD looptools-2.8.ebuild 879 SHA256 61869bec98084afb4d318e50c7d8f42b983b461c287999fb1d22ba74055eabb5 SHA512 b4a21692121bdf97aa35d27245e19cdbaec755e392d27c8fbce122bc3c3e5733345d451afb1250461608a9cf4a00f5675ce72c558bf5bf4fe7c74ef36d663d7e WHIRLPOOL 048fb8eb5206e94b5cd4559d338944f01abfe15842d39f9405fc74b2e125754a0eff370fd9570e4b7c3baf9d85fa0a36a5c980bb16d724677fd6f5765fa3474c
+MISC ChangeLog 2058 SHA256 90eb36cf9a0cff2c84c6e6cd471650d1bd653973e9c62cb5335bb074d3e74721 SHA512 fcf89f9890e3f9f7dd7a38885d291e57749e2fff4d2a4ad864451cac98adf43a212ff66ea23f30e03c0d3d0e30919353d1981850067c9b3138116d4b45578b69 WHIRLPOOL 090f4fcd53b9ff94a1cc350ffbab441f5e2e2384786768381a18843d0d5f0d616d90de41919fa772df6ad3acc67c7354d4dd4295ece06bcbf2ba2b80c1bfd7ed
+MISC metadata.xml 610 SHA256 c22c1f623736d9ce3ddf8a7b76f1147bf79c5610d8f8bcf50fa2bdf3a952bf9c SHA512 2bd676b8205e286fcc590184ac94b4d460eb5aafc754410b26afcea4bd4825af6ba795e2974b2fb8fec5a921b5379418541fba045e987253e679f74e4b86b990 WHIRLPOOL 522949586933e54ef90375536d46e3f51738a92f1f9b59a0f6a86733b5cd4ff01504a36b4dd3ce7ad02b092ff20883972d7171e55eccd4cf2867eae13e7f6985
diff --git a/sci-physics/looptools/files/looptools-2.10-makefile.patch b/sci-physics/looptools/files/looptools-2.10-makefile.patch
new file mode 100644
index 000000000000..bf0df2e03bb5
--- /dev/null
+++ b/sci-physics/looptools/files/looptools-2.10-makefile.patch
@@ -0,0 +1,98 @@
+--- a/makefile.in
++++ b/makefile.in
+@@ -1,14 +1,17 @@
+ BLD = build$(QUADSUFFIX)
+
+-LIBDIR = $(PREFIX)/lib$(LIBDIRSUFFIX)
+-INCLUDEDIR = $(PREFIX)/include
+-BINDIR = $(PREFIX)/bin
++LIBDIR = $(DESTDIR)/$(PREFIX)/lib$(LIBDIRSUFFIX)
++INCLUDEDIR = $(DESTDIR)/$(PREFIX)/include
++BINDIR = $(DESTDIR)/$(PREFIX)/bin
+
+ LIB = libooptools$(QUADSUFFIX).a
+ FE = lt$(QUADSUFFIX)$(EXE)
+ MFE = LoopTools$(QUADSUFFIX)$(EXE)
+ INCLUDE = $(BLD)/looptools.h $(BLD)/clooptools.h
+
++LIBRARY=libooptools.so
++REALNAME=$(LIBRARY).$(VER)
++
+ ARGS = $(PARALLEL) \
+ LIB="$(LIB)" \
+ FE="$(FE)" \
+@@ -16,12 +19,12 @@
+ EXE="$(EXE)" \
+ DEF="$(DEF)" \
+ NOUNDERSCORE="$(NOUNDERSCORE)" \
+- XFC="$(FC$(QUADSUFFIX)) $(FFLAGS) $(FFLAGS-quad) -I." \
++ XFC="$(FC$(QUADSUFFIX)) $(FFLAGS) $(FFLAGS-quad) -I. -fPIC" \
+ F90="$(F90)" \
+ CC="$(CC)" \
+- CFLAGS="$(CFLAGS) $(CFLAGS-quad)" \
++ CFLAGS="$(CFLAGS) $(CFLAGS-quad) -fPIC" \
+ CXX="$(CXX)" \
+- CXXFLAGS="$(CXXFLAGS)" \
++ CXXFLAGS="$(CXXFLAGS) -fPIC" \
+ ML="$(ML)" \
+ MCC="$(MCC)" \
+ MCFLAGS="$(MCFLAGS)" \
+@@ -32,22 +35,24 @@
+ DLLTOOL="$(DLLTOOL)" \
+ LDFLAGS="$(LDFLAGS)" \
+ LIBPATH="$(LIBPATH)" \
+- OBJS-quad="$(OBJS-quad)"
++ OBJS-quad="$(OBJS-quad)" \
++ REALNAME="$(REALNAME)"
+
+
+-default all lib frontend mma: force
++default all lib solib frontend mma: force
+ cd $(BLD) && $(MAKE) $(ARGS) $@
+
+-install: lib frontend
+- -mkdir $(PREFIX)
++install: lib solib frontend
++ -mkdir $(DESTDIR)$(PREFIX)
+ -mkdir $(LIBDIR) $(BINDIR) $(INCLUDEDIR)
+ cp -p $(BLD)/$(LIB) $(LIBDIR)
+ cp -p $(INCLUDE$(QUADSUFFIX)) $(INCLUDEDIR)
+- strip $(BLD)/$(FE)
+ cp -p $(BLD)/fcc $(BLD)/$(FE) $(BINDIR)
+ rm -f $(BINDIR)/f++
+ ln -s fcc $(BINDIR)/f++
+- test ! -f $(BLD)/$(MFE) || { strip $(BLD)/$(MFE) ; cp -p $(BLD)/$(MFE) $(BINDIR); }
++ test ! -f $(BLD)/$(MFE) || { cp -p $(BLD)/$(MFE) $(BINDIR); }
++ cp -p $(BLD)/$(REALNAME) $(LIBDIR)
++ cd $(LIBDIR) && ln -s $(REALNAME) $(LIBRARY)
+
+ force: $(BLD)/timestamp
+
+--- a/src/makefile
++++ b/src/makefile
+@@ -1,6 +1,6 @@
+-default: frontend mma$(ML)
++default: frontend mma$(ML) solib
+
+-all: frontend mma1
++all: frontend mma1 solib
+
+ frontend: lib $(FE)
+
+@@ -8,6 +8,7 @@
+
+ mma0 lib: $(LIB) clooptools.h fcc
+
++solib: $(REALNAME) fcc
+
+ .SUFFIXES:
+
+@@ -243,6 +244,8 @@
+ $(AR) cru $(LIB) $?
+ -$(RANLIB) $(LIB)
+
++$(REALNAME): $(OBJS)
++ $(XFC) $(LDFLAGS) -shared -Wl,--soname,$(REALNAME) -o $@ $?
+
+ $(FE): lt.F $(LTINC) $(LIB)
+ $(XFC) -o $(FE) lt.F $(LIB) -lpthread
diff --git a/sci-physics/looptools/files/looptools-2.8-makefile.patch b/sci-physics/looptools/files/looptools-2.8-makefile.patch
new file mode 100644
index 000000000000..5252c1de60c0
--- /dev/null
+++ b/sci-physics/looptools/files/looptools-2.8-makefile.patch
@@ -0,0 +1,96 @@
+--- makefile.in
++++ makefile.in
+@@ -1,14 +1,17 @@
+ BLD = build$(QUADSUFFIX)
+
+-LIBDIR = $(PREFIX)/lib$(LIBDIRSUFFIX)
+-INCLUDEDIR = $(PREFIX)/include
+-BINDIR = $(PREFIX)/bin
++LIBDIR = $(DESTDIR)/$(PREFIX)/lib$(LIBDIRSUFFIX)
++INCLUDEDIR = $(DESTDIR)/$(PREFIX)/include
++BINDIR = $(DESTDIR)/$(PREFIX)/bin
+
+ LIB = libooptools$(QUADSUFFIX).a
+ FE = lt$(QUADSUFFIX)$(EXE)
+ MFE = LoopTools$(QUADSUFFIX)$(EXE)
+ INCLUDE = $(BLD)/looptools.h $(BLD)/clooptools.h
+
++LIBRARY=libooptools.so
++REALNAME=$(LIBRARY).$(VER)
++
+ ARGS = $(PARALLEL) \
+ LIB="$(LIB)" \
+ FE="$(FE)" \
+@@ -16,12 +19,12 @@
+ EXE="$(EXE)" \
+ DEF="$(DEF)" \
+ NOUNDERSCORE="$(NOUNDERSCORE)" \
+- XFC="$(FC$(QUADSUFFIX)) $(FFLAGS) $(FFLAGS-quad) -I." \
++ XFC="$(FC$(QUADSUFFIX)) $(FFLAGS) $(FFLAGS-quad) -I. -fPIC" \
+ F90="$(F90)" \
+ CC="$(CC)" \
+- CFLAGS="$(CFLAGS) $(CFLAGS-quad)" \
++ CFLAGS="$(CFLAGS) $(CFLAGS-quad) -fPIC" \
+ CXX="$(CXX)" \
+- CXXFLAGS="$(CXXFLAGS)" \
++ CXXFLAGS="$(CXXFLAGS) -fPIC" \
+ ML="$(ML)" \
+ MCC="$(MCC)" \
+ MCFLAGS="$(MCFLAGS)" \
+@@ -31,20 +34,22 @@
+ DLLTOOL="$(DLLTOOL)" \
+ LDFLAGS="$(LDFLAGS)" \
+ LIBPATH="$(LIBPATH)" \
+- OBJS-quad="$(OBJS-quad)"
++ OBJS-quad="$(OBJS-quad)" \
++ REALNAME="$(REALNAME)"
+
+
+-default all lib frontend mma: force
++default all lib solib frontend mma: force
+ cd $(BLD) && $(MAKE) $(ARGS) $@
+
+-install: lib frontend
+- -mkdir $(PREFIX)
++install: lib solib frontend
++ -mkdir $(DESTDIR)$(PREFIX)
+ -mkdir $(LIBDIR) $(BINDIR) $(INCLUDEDIR)
+ cp -p $(BLD)/$(LIB) $(LIBDIR)
+ cp -p $(INCLUDE$(QUADSUFFIX)) $(INCLUDEDIR)
+- strip $(BLD)/$(FE)
+ cp -p $(BLD)/fcc $(BLD)/$(FE) $(BINDIR)
+- test ! -f $(BLD)/$(MFE) || { strip $(BLD)/$(MFE) ; cp -p $(BLD)/$(MFE) $(BINDIR); }
++ test ! -f $(BLD)/$(MFE) || { cp -p $(BLD)/$(MFE) $(BINDIR); }
++ cp -p $(BLD)/$(REALNAME) $(LIBDIR)
++ cd $(LIBDIR) && ln -s $(REALNAME) $(LIBRARY)
+
+ force: $(BLD)/timestamp
+
+--- src/makefile
++++ src/makefile
+@@ -1,6 +1,6 @@
+-default: frontend mma$(ML)
++default: frontend mma$(ML) solib
+
+-all: frontend mma1
++all: frontend mma1 solib
+
+ frontend: lib $(FE)
+
+@@ -8,6 +8,7 @@
+
+ mma0 lib: $(LIB) clooptools.h fcc
+
++solib: $(REALNAME) fcc
+
+ .SUFFIXES:
+
+@@ -247,6 +248,8 @@
+ $(AR) cru $(LIB) $?
+ -$(RANLIB) $(LIB)
+
++$(REALNAME): $(OBJS)
++ $(XFC) $(LDFLAGS) -shared -Wl,--soname,$(REALNAME) -o $@ $?
+
+ $(FE): lt.F $(LTINC) $(LIB)
+ $(XFC) -o $(FE) lt.F $(LIB)
diff --git a/sci-physics/looptools/looptools-2.12.ebuild b/sci-physics/looptools/looptools-2.12.ebuild
new file mode 100644
index 000000000000..3727a66da958
--- /dev/null
+++ b/sci-physics/looptools/looptools-2.12.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 multilib
+
+MYP=LoopTools-${PV}
+
+DESCRIPTION="Tools for evaluation of scalar and tensor one-loop integrals"
+HOMEPAGE="http://www.feynarts.de/looptools"
+SRC_URI="http://www.feynarts.de/looptools/${MYP}.tar.gz"
+
+LICENSE="LGPL-3"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.10-makefile.patch
+ export VER="${PV}"
+ # necessary fix for prefix
+ sed -i "s/lib\$(LIBDIRSUFFIX)/$(get_libdir)/" makefile.in || die
+}
+
+src_install() {
+ default
+ # another one of these package building archive with pic
+ # no: ooptools is not a typo
+ if use static-libs; then
+ rm "${ED}"/usr/$(get_libdir)/libooptools.a || die
+ fi
+ use doc && dodoc manual/*.pdf
+}
diff --git a/sci-physics/looptools/looptools-2.13.ebuild b/sci-physics/looptools/looptools-2.13.ebuild
new file mode 100644
index 000000000000..752cba285c8f
--- /dev/null
+++ b/sci-physics/looptools/looptools-2.13.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fortran-2
+
+MY_P=LoopTools-${PV}
+
+DESCRIPTION="Tools for evaluation of scalar and tensor one-loop integrals"
+HOMEPAGE="http://www.feynarts.de/looptools"
+SRC_URI="http://www.feynarts.de/looptools/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.10-makefile.patch )
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ export VER="${PV}"
+ # necessary fix for prefix
+ sed -i "s/lib\$(LIBDIRSUFFIX)/$(get_libdir)/" makefile.in || die
+}
+
+src_install() {
+ default
+
+ # another one of these package building archive with pic
+ # no: ooptools is not a typo
+ if ! use static-libs; then
+ rm "${ED%/}"/usr/$(get_libdir)/libooptools.a || die
+ fi
+ use doc && dodoc manual/*.pdf
+}
diff --git a/sci-physics/looptools/looptools-2.8.ebuild b/sci-physics/looptools/looptools-2.8.ebuild
new file mode 100644
index 000000000000..db459a6afcfa
--- /dev/null
+++ b/sci-physics/looptools/looptools-2.8.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 multilib
+
+MYP=LoopTools-${PV}
+
+DESCRIPTION="Tools for evaluation of scalar and tensor one-loop integrals"
+HOMEPAGE="http://www.feynarts.de/looptools"
+SRC_URI="http://www.feynarts.de/looptools/${MYP}.tar.gz"
+
+LICENSE="LGPL-3"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ export VER="${PV}"
+ # necessary fix for prefix
+ sed -i "s/lib\$(LIBDIRSUFFIX)/$(get_libdir)/" makefile.in || die
+}
+
+src_install() {
+ default
+ # another one of these package building archive with pic
+ # no: ooptools is not a typo
+ if use static-libs; then
+ rm "${ED}"/usr/$(get_libdir)/libooptools.a || die
+ fi
+ use doc && dodoc manual/*.pdf
+}
diff --git a/sci-physics/looptools/metadata.xml b/sci-physics/looptools/metadata.xml
new file mode 100644
index 000000000000..0750d041308a
--- /dev/null
+++ b/sci-physics/looptools/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription>
+ A package for evaluation of scalar and tensor one-loop integrals
+ based on the FF package by G.J. van Oldenborgh.
+ It features an easy Fortran, C++, and Mathematica interface
+ to the scalar one-loop functions of FF and in addition provides
+ the 2-, 3-, and 4-point tensor coefficient functions.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/meep/Manifest b/sci-physics/meep/Manifest
new file mode 100644
index 000000000000..6257ee47862c
--- /dev/null
+++ b/sci-physics/meep/Manifest
@@ -0,0 +1,7 @@
+AUX meep-1.2-no-auto-mpb.patch 652 SHA256 b898487ea962ed071db15d8212ce550e995603992b94a124694a83403fa24e59 SHA512 4a25e919ac828920fb1ad2395acb897e0b9d9123fa55ee3ed33a4c07e79d250602cb496435482710315c077d3d5408d0192d629afd70dca64aedc7a649c7091f WHIRLPOOL c3f87de28b30ce3491c17db9297e1776215caf5ee9c017b2b8fbe476fa27d2cf886691fe41cab13ab321bd3ebafce4345bdf45dfc4aea91e2e03366ceecd9d65
+AUX meep-1.2-pc-no-ldflags.patch 503 SHA256 04c8cc58833a3b0abdf4014cc561d4e6dd1099c9662ac786966b3f363b605c17 SHA512 2e8602f21814f4edef4b0572180b0b4f41f91a23d7e2576da6a2c62d602e55e9a70b5c7124cb60b7ea4d2f6debd10db3a30aa451d4b6d82eed7a7d9655a26a82 WHIRLPOOL 90140a3646ee9958b3fe076d858cafae8b946fcb1c625ff97640ebc0d8795e917164f30d1140901d0a0ec2ad4c9de8ba1b27decb1ad21a06b09c0c1d1f1e246e
+DIST meep-1.3.tar.gz 740890 SHA256 564c1ff1b413a3487cf81048a45deabfdac4243a1a37ce743f4fcf0c055fd438 SHA512 4ad8d68f27d9971fe6dd4b8440f78d5b141fe747a80c50da55ecbc56a5beb0c2d31441fb46b54cac3c62d4cb34cb1ce6819c06bd2c54bc35f129ba683dc84aea WHIRLPOOL cc7a5ae88a7c3ccaabd47472ce706465b38d35598288c7d35c237d34ce691d021a5f1ab3c6fe754a0f039ed9cb0ea04cfe883555c2377f7ee2e34f2ab8424944
+EBUILD meep-1.3.ebuild 1137 SHA256 d85818be5f47ad3046050764e9b612ea87b4ab0ecde991d3a262ce727dbcca12 SHA512 c4bfee913eb8d32b0e5f67ffa87a27eff18292dcf3302b29fe1531865e02b564e8c8f43bdc4f4d8d357275238f827d82c4102fc5e68726a9ff67f7ea93ad3da9 WHIRLPOOL dd6fb20e20219836da225d3bdb58c22ad5439bf32cddbb08340cbdabe3bcd06d44d236523126e45474cfc55ae14a5420eb5840a87e4db413d0f906674e72b3b1
+MISC ChangeLog 3731 SHA256 2395d0363bcd9d857cdc7d45ac1a31994d93b8effef51db16bca5c8ada4f4eb1 SHA512 d05bda9d65a7cbfae5f486b4da096217b8dfa66c70256f2bd27ecabe2e9b83a671d4fe28932cc1355d2aadbdd3f91d2f9c8df69ba47b4de0eb8f935d9710388d WHIRLPOOL 9044b24c18b3453464615e38162a98370854039dd648b68958e3c929ef94ecd7bbef8f89d80e0e6369e92bd0aa580701285faf4738a9b33dd9fad03d81f70373
+MISC ChangeLog-2015 3125 SHA256 1615da8f08123731df3c61fec8e879e5767c235956ae78d489028c0108c01b50 SHA512 201298630a8076abd18f288898ea3f7ba179aca1af7b4d0f0bfd599ddcd9baa3aec3253db105247655b5cc0fe77e9f3f531ca03718b58b9f40b5e7d394ed7718 WHIRLPOOL 31d16921d11f974c772fb2b56c078d79ca0cf7b158427a034de9c23fc6d8b20d45a4ceacd844f4569df4c04e38faddf387320477762ec1e40f18c65baab8e7c0
+MISC metadata.xml 525 SHA256 c955cfd850a105de56c74d98c2f8fa3ca2f6356c0a52e51e6f53d1cf2c94403a SHA512 1d6f8f93e9ad60102daeabf5a6017f0f3724b2bfa2ecfca30e6e2069bb624e5067a8743b8839996b3eadc627f431b84b911b2ea4de9a5a97ee30921e158318cd WHIRLPOOL 321b36ca8259740823c0934c42bfdbe2a6eff7a66e21f96986500e88d7ec30631edcd09c7feb068409b2e7bf61b94caf93a3cf868b2791e2de8b0ab117be78a6
diff --git a/sci-physics/meep/files/meep-1.2-no-auto-mpb.patch b/sci-physics/meep/files/meep-1.2-no-auto-mpb.patch
new file mode 100644
index 000000000000..8c287f208d65
--- /dev/null
+++ b/sci-physics/meep/files/meep-1.2-no-auto-mpb.patch
@@ -0,0 +1,16 @@
+diff -Nur meep-1.2.orig/configure.ac meep-1.2/configure.ac
+--- meep-1.2.orig/configure.ac 2012-08-14 21:52:13.000000000 +0100
++++ meep-1.2/configure.ac 2012-08-14 22:00:55.000000000 +0100
+@@ -161,8 +161,10 @@
+
+ ###########################################################################
+ # MPB library
+-
+-AC_CHECK_HEADER(mpb.h, [have_mpb=maybe], [have_mpb=no])
++AC_ARG_WITH(mpb, [AC_HELP_STRING([--without-mpb],[do not build with mpb])], ok=$withval, ok=yes)
++if test "$ok" = "yes"; then
++ AC_CHECK_HEADER(mpb.h, [have_mpb=maybe], [have_mpb=no])
++fi
+
+ if test $have_mpb = maybe; then
+ if test "x$acx_lapack_ok" = x -a "$have_harminv" = xno; then
diff --git a/sci-physics/meep/files/meep-1.2-pc-no-ldflags.patch b/sci-physics/meep/files/meep-1.2-pc-no-ldflags.patch
new file mode 100644
index 000000000000..d7b2f72eaffc
--- /dev/null
+++ b/sci-physics/meep/files/meep-1.2-pc-no-ldflags.patch
@@ -0,0 +1,12 @@
+diff -Nur meep-1.2.orig/configure.ac meep-1.2/configure.ac
+--- meep-1.2.orig/configure.ac 2012-08-14 21:52:13.000000000 +0100
++++ meep-1.2/configure.ac 2012-08-14 21:54:49.000000000 +0100
+@@ -224,7 +224,7 @@
+ ##############################################################################
+ # Libraries and flags (other than -lmeep) required to link Meep:
+
+-MEEPLIBS="$LDFLAGS $LIBS"
++MEEPLIBS="$LIBS"
+ AC_SUBST(MEEPLIBS)
+
+ ##############################################################################
diff --git a/sci-physics/meep/meep-1.3.ebuild b/sci-physics/meep/meep-1.3.ebuild
new file mode 100644
index 000000000000..6cc3d1495390
--- /dev/null
+++ b/sci-physics/meep/meep-1.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Simulation software to model electromagnetic systems"
+HOMEPAGE="http://ab-initio.mit.edu/meep/"
+SRC_URI="http://ab-initio.mit.edu/meep/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples hdf5 guile mpi"
+
+RDEPEND="
+ sci-libs/fftw:3.0=
+ sci-libs/gsl:=
+ sci-physics/harminv
+ guile? ( >=sci-libs/libctl-3.2 )
+ hdf5? ( sci-libs/hdf5:= )
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2-pc-no-ldflags.patch
+ "${FILESDIR}"/${PN}-1.2-no-auto-mpb.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with mpi) \
+ $(use_with hdf5) \
+ $(use_with guile libctl)
+}
+
+src_test() {
+ # pml test buggy with optimization on
+ # http://thread.gmane.org/gmane.comp.science.electromagnetism.meep.general/4579
+ emake -C tests pml CXXFLAGS="-O0"
+ emake check
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sci-physics/meep/metadata.xml b/sci-physics/meep/metadata.xml
new file mode 100644
index 000000000000..a6fba91cb5cc
--- /dev/null
+++ b/sci-physics/meep/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ The MIT Electromagnetic Equation Propagation (MEEP) is a
+ finite-difference time-domain (FDTD) simulation software package
+ developed at MIT to model electromagnetic systems, along with the MPB
+ eigenmode package.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/metadata.xml b/sci-physics/metadata.xml
new file mode 100644
index 000000000000..2ad6cdefcdbf
--- /dev/null
+++ b/sci-physics/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The sci-physics category contains physics related software.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria sci-physics contém programas relacionados com
+ física.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría sci-physics contiene software relacionado con
+ la física.
+ </longdescription>
+</catmetadata>
+
diff --git a/sci-physics/paw/Manifest b/sci-physics/paw/Manifest
new file mode 100644
index 000000000000..1cd9cd5ed02f
--- /dev/null
+++ b/sci-physics/paw/Manifest
@@ -0,0 +1,9 @@
+AUX paw-2.14.04-glibc-2.10.patch 311 SHA256 a729f58b8d633624340c4ce0eeee453082b6dd8e5b11a2ccc3ac3b286d0b8535 SHA512 b053bedfddf6472d3b8e728b8cac518dd511a1b2ec9e12d7249f0858b3fa9c1214484461217ca4fa8111190c055ad5e69e7ece6b5c7be027f2fd1dfd869f34f7 WHIRLPOOL affcdcb981c40f0c731181bc5e3e1dbd0af9eb37efdd602fe92003722222b629746159664ec43123e7d6cb66679ca5448198cc5b19ab281eff44323db331e033
+DIST paw_2.14.04.dfsg.2-8.debian.tar.gz 75788 SHA256 1fa912310f5c2eb4cd856fca53808d6142451fc6be4ffa3be14f54195f8e2203 SHA512 63800b6071c0614d3d68eceffc23117703a9e48f6a9da3fd160b2eb27b326ffe7dc38718245d40e713b2c047967233e1aa56e7381754bbc95804b4c208d1d270 WHIRLPOOL 38899fa56f370cc4cbae0d593006a09cee451ecfb97b8d236b18bc4a36bfde7d5c4891a9309bd9e8bad9da8d8ba8691fc77b37f7e48545b989f6b9983e61ab38
+DIST paw_2.14.04.dfsg.2-9.debian.tar.gz 79495 SHA256 ff00ccfbc79ea3e727678ff0098d08a87851bc6a18a22b15ddd7e9a7634cef48 SHA512 e0ffd28aef621fbe7ff372bf1add2c3614897c755ada061d80835e43f0e7ebe342c44f5c989110ce53d8896d9738798277689bcb9fcba87c4eeae89e4d340b81 WHIRLPOOL befbf2ef10f1cf28733e06f5d08f36cd1eda8af99640aaf680daec9954ed1ca52a29599855c77e09a949306590a926eba13a5236dc3810debe528c0e720d5bf3
+DIST paw_2.14.04.dfsg.2.orig.tar.gz 3334317 SHA256 68925384706a4a61c477a48ed0fad539d214a4b04fdb9db5ef4e8d453f26c44e SHA512 6e4ef312195936b42ad641a63335586f48e0383e8a7f4330d52173492584f9d03c5fa4eab7e7de594e30556a1daacbe162b4f879718c9c489cb7a89f072b962e WHIRLPOOL a1c78a8d66cc10a1014a96d0b276fc0bf0725ff08ed6055ff4be9c194d50d1416ea32bfae32ea18d1b919d03ff2746c0bda29b74c15b2296f211d58086951551
+EBUILD paw-2.14.04-r4.ebuild 1793 SHA256 41258b5a0f35c63b300bc4819b7e5adaa791caaadad0f75251ff77fe075a30fb SHA512 040d9795bc1115730c9fd7fe11e558759ff81085a16c44a5d94f50108fcc7a3f1368e842582699c40618027f95fb6d757dc27bb6c81a33965150714332f23d6d WHIRLPOOL 451a51e54f14f5c49c6843e98262c85c56e3b44245f0d5ffebae82f1cf92942d72dd16157964c874d86f2ced18546e5bc1e4a80961445101d205685f26f37abf
+EBUILD paw-2.14.04-r5.ebuild 1797 SHA256 7f59f06c8dc530ffedbb3c43bc2a6dcaea22c6dc85d76cb889b4d016686ea2dc SHA512 545245d1ffcf864fa381a51dda25318348010c155b95b0b79f4f1f2e6b845d04f4401b5ce8452e788a510332e2aabddb947e93025fe35d4ab50035d6475a8fd8 WHIRLPOOL 3ffd23489399bced58537ded4107401a06f39c1109b62082c0f137e25f97d9936a4980f7a8b5435d75f49ab10d557f1ed5d7ed36155cf14e64871ec961990c75
+MISC ChangeLog 2521 SHA256 ade321e298ece1989f9e85fc7c4d585d1de35c83cc29ad847e564f086fc7bc55 SHA512 2c302b3a8acf35a88e0fdc0221beb0b7d9fde64678526fb6c90b9a7b7402aa6feb10c50df51d766ab277a5b30232268bd12b125a04f37efe565e7ea94dd17fc6 WHIRLPOOL 57a0fe4c6ef88bfe7ce294f205b9ef332fd8903a2e3ae7adb41b8134dcee4992ca3b3265d1d9d63ab7625b5c60a84c7c35c9e8b3a0d9e618cbf6e14d916de93a
+MISC ChangeLog-2015 5036 SHA256 0627ddf7bc9473fdbb2746d445dbf33f5e015e4cabac6a2019682c645abdbba5 SHA512 f71d66b7c4d35bdbb34d263133d1b2a8bb46b2f728fe5a98acc6c2a241a55dbebf9347dde3fff19531c002b900744b31c31683d8ea59f00eb75211f93dc2c99e WHIRLPOOL af3fa52ab29dd882bd357ad4cc9f1e2a0c805caa65e8d6cc21097e0f9a1c58a948f238d9e6c9e2a3f3ae1886eb06d001fc0d1be6ddf5b7851dbd9029d3e9c188
+MISC metadata.xml 781 SHA256 d4d8d4f397bcf6f0cb9643fd8ab3a4c564e28b169efc70781cab7a16f5c2b83b SHA512 195d9621e493c6deb26e79f7193bbe0dd02df65a693ca65462efb9ac23904f1de534eed3f390d01e9a20786e6a79d3dff7f1e488f2441dd132db6b323ee06af0 WHIRLPOOL 1c4014e7fd255f650ee9beb98dcec79373109697a3c31e18257221f41667657c47ae0a72bdebcecf03fba85d79bf3ffa3e22e03e1623cbaefa0893c39b104fa7
diff --git a/sci-physics/paw/files/paw-2.14.04-glibc-2.10.patch b/sci-physics/paw/files/paw-2.14.04-glibc-2.10.patch
new file mode 100644
index 000000000000..7cfa5aa03d12
--- /dev/null
+++ b/sci-physics/paw/files/paw-2.14.04-glibc-2.10.patch
@@ -0,0 +1,11 @@
+--- src/pawlib/paw/cpaw/bugrep.c.orig 2009-07-13 00:38:38.000000000 +0400
++++ src/pawlib/paw/cpaw/bugrep.c 2009-07-13 08:47:54.934308924 +0400
+@@ -20,6 +20,8 @@
+ * Paw
+ *
+ */
++#define _POSIX_SOURCE
++
+ #include "paw/pilot.h"
+ #if defined(CERNLIB_BUGREPORT)
+ /*CMZ : 2.07/19 21/11/95 18.17.13 by Unknown*/
diff --git a/sci-physics/paw/metadata.xml b/sci-physics/paw/metadata.xml
new file mode 100644
index 000000000000..38d0f44222c5
--- /dev/null
+++ b/sci-physics/paw/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ PAW is an interactive program providing interactive graphical
+ presentation and statistical and mathematical analysis tools. It is
+ designed to work on objects familiar to physicists such as histograms,
+ event files (Ntuples), vectors, etc.
+ The program is linked statically against the CERN libraries on 64-bit
+ architectures in order to function properly, as its design is not very
+ 64-bit clean. Even so, AMD64 is the only 64-bit platform where it
+ functions well.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/paw/paw-2.14.04-r4.ebuild b/sci-physics/paw/paw-2.14.04-r4.ebuild
new file mode 100644
index 000000000000..74a1cbc75beb
--- /dev/null
+++ b/sci-physics/paw/paw-2.14.04-r4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs fortran-2
+
+DEB_PN=paw
+DEB_PV=${PV}.dfsg.2
+DEB_PR=8
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="CERN's Physics Analysis Workstation data analysis program"
+HOMEPAGE="https://paw.web.cern.ch/paw/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+KEYWORDS="amd64 hppa sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ sci-physics/cernlib
+ x11-libs/libXaw
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae"
+DEPEND="${RDEPEND}
+ dev-lang/cfortran
+ virtual/latex-base
+ x11-misc/imake
+ x11-misc/makedepend"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}.orig"
+
+src_prepare() {
+ mv ../debian . && cp debian/add-ons/Makefile .
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+
+ # fix some path stuff and collision for comis.h,
+ # already installed by cernlib and replace hardcoded fortran compiler
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ -e '/comis.h/d' \
+ -e "s/gfortran/$(tc-getFC)/g" \
+ Makefile || die
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+}
+
+src_compile() {
+ VARTEXFONTS="${T}"/fonts
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_install() {
+ default
+ cd debian
+ dodoc changelog README.* deadpool.txt copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/paw/paw-2.14.04-r5.ebuild b/sci-physics/paw/paw-2.14.04-r5.ebuild
new file mode 100644
index 000000000000..5774f34fa4e7
--- /dev/null
+++ b/sci-physics/paw/paw-2.14.04-r5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs fortran-2
+
+DEB_PN=paw
+DEB_PV=${PV}.dfsg.2
+DEB_PR=9
+DEB_P=${DEB_PN}_${DEB_PV}
+
+DESCRIPTION="CERN's Physics Analysis Workstation data analysis program"
+HOMEPAGE="https://paw.web.cern.ch/paw/"
+SRC_URI="
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${DEB_PN:0:1}/${DEB_PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2 BSD"
+KEYWORDS="~amd64 ~hppa ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ sci-physics/cernlib
+ x11-libs/libXaw
+ >=x11-libs/motif-2.3:0
+ x11-libs/xbae"
+DEPEND="${RDEPEND}
+ dev-lang/cfortran
+ virtual/latex-base
+ x11-misc/imake
+ x11-misc/makedepend"
+
+S="${WORKDIR}/${DEB_PN}-${DEB_PV}.orig"
+
+src_prepare() {
+ mv ../debian . && cp debian/add-ons/Makefile .
+ export DEB_BUILD_OPTIONS="$(tc-getFC) nostrip nocheck"
+
+ # fix some path stuff and collision for comis.h,
+ # already installed by cernlib and replace hardcoded fortran compiler
+ sed -i \
+ -e "s:/usr/local:${EROOT}/usr:g" \
+ -e '/comis.h/d' \
+ -e "s/gfortran/$(tc-getFC)/g" \
+ Makefile || die
+
+ einfo "Applying Debian patches"
+ emake -j1 patch
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+ # since we depend on cfortran, do not use the one from cernlib
+ rm src/include/cfortran/cfortran.h || die
+ sed -i \
+ -e "s|\(ArCmdBase[[:space:]]*\)ar|\1$(tc-getAR)|g" \
+ -e "s|\(RanlibCmd[[:space:]]*\)ranlib|\1$(tc-getRANLIB)|g" \
+ src/config/Imake.tmpl \
+ || die "sed Imake.tmpl failed"
+}
+
+src_compile() {
+ VARTEXFONTS="${T}"/fonts
+ emake -j1 cernlib-indep cernlib-arch
+}
+
+src_install() {
+ default
+ cd debian
+ dodoc changelog README.* deadpool.txt copyright
+ newdoc add-ons/README README.add-ons
+}
diff --git a/sci-physics/pythia/Manifest b/sci-physics/pythia/Manifest
new file mode 100644
index 000000000000..88f7f9907c0e
--- /dev/null
+++ b/sci-physics/pythia/Manifest
@@ -0,0 +1,27 @@
+AUX pythia-8.2.26-run-tests.patch 1044 SHA256 2ea7f4a3f4464a6db7414b2919f9ed06a3150b24f01f22760285089ae3350e4d SHA512 37297dbf852b402adc03f9a60ca2f9108d192dc005de1c6dfd9a9725220a50da322267938a91cfe082301942059a9b4caf91a85e41179becee6e9889881c9b57 WHIRLPOOL 5452bef046813a79c14cc68a5cf0339ed82938077185c956c92cae9e5ce20c51cd616be8e21cdb7889ab10d2d62e60e7e223e34af875d4892ff7fecab2fd6c22
+AUX pythia8209-root-noninteractive.patch 500 SHA256 c38c2adc49affd1c795d91592ee6965f813c11a2a9e9c464874496d6978ec8e0 SHA512 9dad44ee084b5edea6560ba639e562c6ddc56cd7170ec21628176aeaec11d535de2813599b9c45b49511ad3d0ad9cb0540d9052179c9e9907d10d81ea55bdea2 WHIRLPOOL 1e30b9ed028dde60c83d73666a618016593240f4e763d14faeb2766419cbcd786ca451ce7a9311cbb2a53952401dc422330a1838b6b696515ee6bcd2e62d1e31
+AUX pythia8209-run-tests.patch 962 SHA256 a720d26670f1de89fc59e10fc6b647e8fa9bd61b7d2fb69c40701d7afcee20be SHA512 e0629ca9016fc77cef78d81ed84d4a54171d7497488e8c1a2b60adef0e32f18a96353e55d9d08789ebc144dee209844f8f7cb8215347c7ed943725fff21921b0 WHIRLPOOL c7454aeae278124356bbe6361a14482ced0967be2a391c2f6b90df7c6093593e3dbbac98e3b28b9a02ab0e90c7f3f631917e75b2d5c4f2e09c8e2a627d529e12
+DIST CT10.tar.gz 10246366 SHA256 bcef4600c5af42d6b151b60e29297609e3604f02f5e80f8ec7767a22b185f49d SHA512 90406bd102ab54b683fa3e6f3fc759febea2454a0b96c6a8d373cdec297f5d652097057a015c7d87241792ed9b5d9ac658a33155cdd7362f59110f8f06ecce73 WHIRLPOOL a433983f9938d848a0b23f94195c41a3caf2a4a131f225f8ec27b43d7ca88761e302ed7968c66492b1fee7288e921aa7a40644833d90eeb66a139a8524553003
+DIST MRST2004qed.tar.gz 185079 SHA256 f043f5385d828523169458c01e2d82767468002789ad792d3543efacc4fcb9cd SHA512 404aacf0e241f572cc42ad4cf963deef1acd3d365fa68cfa3518878f921858046377ea39caf663fdced2cdde07af2f6ce695737f7fea229489df3d3f38283c95 WHIRLPOOL 1eb5a8c5a63005b1087ad5b39faf5ba928071ca1edb3aa9e957b43b0a32a3ddb252b75c5fd30f2e364f628583834febc6ff14984b832f2916ad06a2fcdf0d77d
+DIST MRST2007lomod.tar.gz 56685 SHA256 26533c463c17c96c467d40a0aa5603bbe657f986e05154e90782aac43f34598d SHA512 8e55627a01c85d90a62e4fb11b115c2faac2220479b6d558d3d6f1b801fc5c3e88abc377cd5437ccaeedd34b2ca42d6e833014566b796e5e1eebcf4d620e5dc0 WHIRLPOOL 16dfc110168fb3d865f3e743b4a8ce5e5995496fee53a286e82c647eff5afb7072e9d1ef8c940408c4a8184e5a9f7a190f9deea26e1b7bf227c1e5d6eaa3ff77
+DIST NNPDF23_nlo_as_0119_qed_mc.tar.gz 25223180 SHA256 61e36f3aec29e7b38d161a4ebc4978032e5e1f7af70764f6726cabdbac6283b1 SHA512 fc6998d50a61bbe65eef827021c0f453164795c079daef6a4932f825f8db4ae318bbf0e8781b61f1d3ffa9a495b5c4813af3aa31c77694657a44356d93fa970f WHIRLPOOL 31fe0ba55fac9d032441dc955a2117d42d2ab1cc697567e4b9350c4c1866982036178378a9ddeb5416ef1c2712e54cbba32dac4260fff0de07d7fc8c3a2b339d
+DIST NNPDF23_nnlo_as_0119_qed_mc.tar.gz 28940412 SHA256 4f9598322452856e165ea419ef878bb9b5d8284933cef896b7bc339d1f8ae728 SHA512 5088c30acbd1da4e412ba9f6a997ceaa34f426f41c7ebacaf4d2e8aa49b8b45052913e8d873b293d9f140c01e82c05735b66dd527a9aa124b86f73bf5e4d8c53 WHIRLPOOL 1845bb1dbd7b23389fa45af43517e36abc941d6beb2fc650462e1ef875781d0ab40186ae4f4ddfc0ed6d819be056dd11fd63e2bdf02ae1d9365892476415235c
+DIST cteq66.tar.gz 8647237 SHA256 1e1987c3b844d06bac8c205544ea1613515de2965e7e5565892acf37984a2626 SHA512 25d0fa01dcdb59d71c7092367af8258471a2bc6dfd146766cc79f90ffb0feafa0f2011d0a37a7d75315c10ba7c7a6e3fa583d9c0a28119b072228ac800294e48 WHIRLPOOL a8c34f0242fd6a2986484bf60793604a07ad0356b1fabb6350289afd4655f2eeb1953d0e558440b94ed30a7af4cd5d58d9fc07f3f06a72c3f3381094b8036321
+DIST cteq6l1.tar.gz 317834 SHA256 57c9c99d7b83c8ed1ca70480a0ec7bf2183bfa1bd9276a0e146772c5cf3bb5ac SHA512 7177608e97077eaf45a292db4ea74eb9a28b4b500ab8be02098b4837a5583cd397828abc3bf43ead448926eaa75ae3968bd059ecde333d90ed6e4295cbe1873c WHIRLPOOL cb0fff30e96dbcda1ac76550968bda22872d249d6fe14f31060aef5d1913b314365b933fb2bc57676ac5578f39ed3824cce2cd657086b4a92aa4d6e4ce037239
+DIST lutp0613man2.pdf 2902047 SHA256 03d637310ea80f0d7aea761492bd38452c602890d8cf913a1ec9edacd79fa43d SHA512 a8439b3b150b6f3924d4d3671a4fad6a815c374b1f46060072ca6c1faa797a2f73f8727920aaa7ae885c4f6f135c8d8f94d43e518cfe25271bb95652112def58 WHIRLPOOL dd74046a145264653efdc1f96c330a0aa1e71b72578f32b114d9041c6a50e6e03aa5b3e028ab737afa01d9f3fc9928fa3589238ff4c232e90c8362201792ef99
+DIST pythia-6.4.18-examples.tar.bz2 36366 SHA256 17b1809fb0cffba20115c2bc1032c24d8efece25bd3f1f632f88265ade4dd084 SHA512 ba921379a6df4ca417b60ea5b78af506f13135cdf896fa6beeca9713428ad6f298c94c0fe65fca3e583f8f268dcf84ebe4f1f81b46fd865d5f641f7c1e9fa7e1 WHIRLPOOL 5b53f523d0819400da791d471c207c4d0d6cfd43cbb9423900b593015aa4db68632d97615ffd213493ff0b0306ce7b8c4851e58672e1188df1a61352e1af0d17
+DIST pythia-6.4.28.tar.xz 490248 SHA256 6ca6acc172314cf7b56e2a8e18321d28ce57a511e34210a6c64ebbfd5e06d5f4 SHA512 f9db72658f2132ce08d31c8a9f7fe727466b184ef41cc4b762fe2bde48dbdfd7b5df19b21a869e20a1f107c96e9daec115c980e11592968eb2cad666b7c96bdc WHIRLPOOL d6ab42af092348b1ae5c5078c34ef17042b46f728d6c4068cd0930999ccbfefae9b55be05499188525c9fc6499c8cb8c490fe6a37f04bf9b45048f7cf8026cdb
+DIST pythia6-20160413.tar.gz 567976 SHA256 d613dcb27c905710e2f13a934913cc5545e3e5d0e477e580107385d9ef260056 SHA512 2a9ea2ae299e8d49bd9750f8c68f0b7f534fb91254c2eebc60ef40828400bdf5e5c4e0956d61807e773a51db873ab4a036c3ac264f904d0bb2b85f4860e538d3 WHIRLPOOL ab69aeb8d3591b3b0adcc22ed249047bac99f05daf74801c6d26d04df1ad6807cb4ce66ce8acf54476ea20eb9cdac2b719fc6d9280d546fe4be1d09f55840d01
+DIST pythia6.tar.gz 567451 SHA256 ebc90b8ec94897d8b09030341323d2c7c6e5c7c65077f98b96c8cff00d40a5ce SHA512 baa18023de22c3e90f14d2a5a39efa171905f507a31a90f87c65dca271b3be4c9f0d1a56282f5a04b3efabe0b5b15c964e4569d1f9994a75750e52e0be4360b1 WHIRLPOOL e334779f77e938cde85ecd0fbc2dbf0d86a52fc1ef673c909b8533f779e51d6d6680bc5de3aceeb002015ccfdf03da3f975aaf0cc7a249c462cdd3b206c359a2
+DIST pythia8186.tgz 8921248 SHA256 1c0914fc04801ee922c1ad3b544a3cd48b34d9afa4407ae40afbacd009039bd2 SHA512 84729004abbdf522183c27918ae35db037a8954af761a2b452dcff54f82076b1e3bfc7fe9ea0a7cb2c0b6499aedb1c25cc13768d47b24edaa08d631b55d0b86b WHIRLPOOL ecef83d2cb018b1aac55225850cf2a3a8f2b87d08f99bd9c5881f4fa341f012eeabed3b9a43ffda3699daebc54c181d08aac30c1f6b514e98516c29e88a6fbaf
+DIST pythia8210.tgz 14301345 SHA256 a2564c6011235a286115ba9da065f50c1233229b2f1a824583565dfeec0baa35 SHA512 fe2d02e32fd5d25bcdcc216754b91ca509a189c58f1a06ca8deba975af552586632fc8cf8ad3e62920884ee64c4af596fbe7c6872f5ddbd1f5a0cea4ba4bc90d WHIRLPOOL d2d3f212ed2ad700fa6ae44b2b670cce1623e80382af04072bee884a72ea269346c10728cc77cfa4c9377e8cd775febe9488427cb0b890e52c651efebd66f60c
+DIST pythia8226.tgz 17639842 SHA256 8ff4281bce9d22b17f1ec88e9e9353e8172512d5ef96296ace9486860e9ed2c9 SHA512 85db807264f99c27dd87ad0572b98f4ac8d37fed818c3dd1ac89f0ac124ae0a5ee13b290727e515cb04269a6e0be8b386d954bed62309f26d1e60b431f952ca0 WHIRLPOOL 6e020ec815b4d0b9649ebf2f9a149fc4680ba804568625e854005fa8ccdd3bbabde79df78da4f1ffaa1710df4809a17b4b8e745bcd909e9e914f05500d061472
+EBUILD pythia-6.4.28-r1.ebuild 1908 SHA256 1b90c96d8afe8e34591d82fd18b01a35c1d177e78d04bb442cf6c77d3f8958a9 SHA512 dcbf3226adf25fb2c738f0825cd70aef70d3c1d77d123bb765db2f9666b7fe23e06f469ed2ee285dd1a315731ddc7a90d798e53b88723b72586a0dfe11ad7863 WHIRLPOOL c3195e173dddc0ea189d53ddb74c028bae0f27325f431e3e03764d7fa29f88a35b986629259886a4003244c642caa70cf413c127ae5bba7dd2683ab0e29c5c82
+EBUILD pythia-6.4.28.ebuild 1864 SHA256 8d8ed0bd27789648c8f5db52f9876ceb8f4b326d966d1ee055a23d397292c60f SHA512 9e3fa32d791672b3aec15f779700fd33a6a83488ca315e365e3fdc7eb88ee3a8405dffcc6eda705d3334c79e8a726c1130ba97b2baf0d91004c881b1e922a2af WHIRLPOOL 5e546aa26c93d282c30e5eb696a78ff19bf3cedaf4c4b4e642592bd9f5d9f9431346890aeeffb84b7aa84d80fe57a179f9ebd76045e221f6458cd4fe5cfed4a0
+EBUILD pythia-8.1.86-r1.ebuild 2618 SHA256 3e0da89cdfafd7b83785064c6ef699270377dfe32fc1fdcf3a558fe77fed626b SHA512 0b07f2d9d85cc46a04cd79d9363bb044f80494c20ace27411d9593d4847932c79453129a158fc20ddf616f63a0965be165c1e68c61994919f0fb17e13a14af1c WHIRLPOOL 0caf70264889395cafbfc99fd2178ea279037c9d06347593a7b6ecdf95942bcb6c02bf4402eaac6e137dcf76842a505fc88a8cca860f88c2d9f36a04e2bc8b03
+EBUILD pythia-8.1.86.ebuild 2573 SHA256 e9fb92f26097fa230e1c112d2193229e212e81bbdae6a3bef02c7d3eea95d789 SHA512 e1682daf71c734fd97a0d957975856158e3ba4c674a804be6ee9e1dedf4b03fb3f5b2639a39a2ae37bbef96d980efe1ce57b9d6dc89e2635c6a720df75b9a5f5 WHIRLPOOL edd093d1eec6b22f01c4cc09ce1f40c6ccdc28a2807cf7748f81e7a6cb2c624c3a72e02f0403dbe370dc24803f5849fb4f2ff09d842a700ae804e38e3eaf1f4e
+EBUILD pythia-8.2.10.ebuild 5797 SHA256 55101f279291705835f2105808543e4515c79f8d2de3713020d0705168ae67e2 SHA512 51c097f3449f1224eec5691fa5d64ab23d8d29d6473f350578683dbe49e0edc0c6020615c28bdcd01d110984838a7dbe2e6c09312fed7d430ee5f7ab1805dd14 WHIRLPOOL 9002ceb788fc1322495a0ec0b1658d552aa68cfcfb1c6bfb1a062b1471dee670cbdc2c73ac0153f1040900e6999faf6a90154202c13ab404a4afcd132125acbc
+EBUILD pythia-8.2.26.ebuild 5823 SHA256 ac510983cb09725afe2e3c900d74b7551be21dabe5372fd65c02529d62bc470e SHA512 85988101cfee5d378a4024c1da7206ac57297972ed506d5bf968bc9ede0f1b1dd1d6990d6f605c10f43b39113ae98aba32fc1c84198794fc12c061127bae6fc1 WHIRLPOOL a92d9e0a708590bccd136e2f0275dbf87d439af075221dbe16c639563200a5719ef5bae7089fdff8fa21c207d87d86cd431eb716530dc48c86b154baa4e748c1
+MISC ChangeLog 3142 SHA256 f6b496654a55b4b6f7a1ea59688912f27e4b3bdbc986bb25625a3bdb1a02496e SHA512 21ccfb65798ffead4532fa46faa4130d902498f3a0cf72f6bb0b15c5c5b9f0e77d8dc9e6da46431473b9e667414e8b18f3b7296643da4056eb6d530d5906fb75 WHIRLPOOL fa9d175dd816fb98f722a41ed09d7c1361040274be1084d299cf84ff5671ae4d98e7c56bfa70491107efaa47e8fa6cda2098030accffffcafebb30c171bc7ceb
+MISC ChangeLog-2015 9682 SHA256 5ed2e9a82e9604471d44f36747aceb031c330451eba55f91cc66c33fd6f4074d SHA512 0fdbdd098f837dd47b298c814166aca76ba0086d9c34b8e6fd4880aa236e9511ae31c893971bd2d2592e13b30806404c2dcee95416c97da661de3ee78ad4e2f9 WHIRLPOOL 7231aad59148ddf01b180eafd4b291c97516bcc2e2e118232be9c91cac57e6a8805d3e7059eafab508f58bcf3623491a8ee3e79d160c66c3e7bde739333ebf1e
+MISC metadata.xml 1298 SHA256 d286eff10cc261968fe26a6c2785f05dc39d2e262aff1ab09849b29414d28b7f SHA512 b991381193c62d05d01ea82c74a2fabe3968683b4a1e0914027768dbbc3d2b52a85584b77b1b7274e77222e10da0aaa1a55d3982b423bc7c2b5deb4d775e6389 WHIRLPOOL 57a6cb583f22f2d4a01135664f82c74411f57cb2cecf58d93f5b3043fb0b80b8630c1e692173422e6ee2745efa3f63732db5d3c446bd0e07e46e498e3d21e8f8
diff --git a/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch b/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch
new file mode 100644
index 000000000000..34c7179fa55d
--- /dev/null
+++ b/sci-physics/pythia/files/pythia-8.2.26-run-tests.patch
@@ -0,0 +1,27 @@
+--- examples/Makefile.orig 2017-07-25 11:56:03.545393093 +0200
++++ examples/Makefile 2017-07-25 11:56:37.468572887 +0200
+@@ -158,6 +158,7 @@
+ rm -f $(LOCAL_EXAMPLE)/weakbosons.lhe
+ rm -f $(LOCAL_EXAMPLE)/Pythia8.promc
+ rm -f $(LOCAL_EXAMPLE)/hist.root
++ rm main*out *.dat
+
+ # Clean all temporary and generated files.
+ distclean: clean
+@@ -168,3 +169,16 @@
+ rm -f $(LOCAL_SHARE)/COPYING
+ rm -f $(LOCAL_SHARE)/GUIDELINES
+ rm -f $(LOCAL_SHARE)/README
++
++# Run tests, inject test-specific arguments when needed
++main%.out: main%
++ ./$< \
++ $(if $(findstring $*,16 42 43 $(shell seq 81 89)), main$*.cmnd) \
++ $(if $(findstring $*, $(shell seq 81 83)), w+_production_lhc_0.lhe) \
++ $(if $(findstring $*, 84), hepmcout84.dat 2 w+_production_lhc) \
++ $(if $(findstring $*, $(shell seq 85 88)), w_production) \
++ $(if $(findstring $*, 42 43 $(shell seq 81 89)), histout$*.dat) \
++ > $@
++
++main89.out: main89
++ $(foreach cmd, $(wildcard main89*.cmnd), ./$< $(cmd) histout-$(cmd).dat >> $@ || exit;)
diff --git a/sci-physics/pythia/files/pythia8209-root-noninteractive.patch b/sci-physics/pythia/files/pythia8209-root-noninteractive.patch
new file mode 100644
index 000000000000..4581eaea389b
--- /dev/null
+++ b/sci-physics/pythia/files/pythia8209-root-noninteractive.patch
@@ -0,0 +1,17 @@
+--- pythia8209/examples/main91.cc.orig 2015-06-05 07:44:27.000000000 +0300
++++ pythia8209/examples/main91.cc 2015-06-05 08:17:22.477228166 +0300
+@@ -62,13 +62,9 @@
+ // Statistics on event generation.
+ pythia.stat();
+
+- // Show histogram. Possibility to close it.
+- mult->Draw();
+- std::cout << "\nDouble click on the histogram window to quit.\n";
+- gPad->WaitPrimitive();
+-
+ // Save histogram on file and close file.
+ mult->Write();
++ outFile->Close();
+ delete outFile;
+
+ // Done.
diff --git a/sci-physics/pythia/files/pythia8209-run-tests.patch b/sci-physics/pythia/files/pythia8209-run-tests.patch
new file mode 100644
index 000000000000..d1edc8393726
--- /dev/null
+++ b/sci-physics/pythia/files/pythia8209-run-tests.patch
@@ -0,0 +1,20 @@
+--- pythia8209/examples/Makefile.orig 2015-06-04 22:21:53.000000000 +0300
++++ pythia8209/examples/Makefile 2015-06-05 05:35:25.324262331 +0300
+@@ -139,3 +139,17 @@
+ rm -f test[0-9][0-9][0-9]; rm -f out[0-9][0-9][0-9];\
+ rm -f weakbosons.lhe; rm -f Pythia8.promc; rm -f hist.root;\
+ rm -f *~; rm -f \#*; rm -f core*; rm -f *Dct.*
++ rm -f main*out *.dat
++
++# Run tests, inject test-specific arguments when needed
++main%.out: main%
++ ./$< \
++ $(if $(findstring $*,16 42 43 $(shell seq 81 89)), main$*.cmnd) \
++ $(if $(findstring $*, $(shell seq 81 83)), w+_production_lhc_0.lhe) \
++ $(if $(findstring $*, 84), hepmcout84.dat 2 w+_production_lhc) \
++ $(if $(findstring $*, $(shell seq 85 88)), w_production) \
++ $(if $(findstring $*, 42 43 $(shell seq 81 89)), histout$*.dat) \
++ > $@
++
++main89.out: main89
++ $(foreach cmd, $(wildcard main89*.cmnd), ./$< $(cmd) histout-$(cmd).dat >> $@ || exit;)
diff --git a/sci-physics/pythia/metadata.xml b/sci-physics/pythia/metadata.xml
new file mode 100644
index 000000000000..aaef5640ca63
--- /dev/null
+++ b/sci-physics/pythia/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ PYTHIA is a program for the generation of high-energy physics
+ events, i.e. for the description of collisions at high energies
+ between elementary particles such as e+, e-, p and pbar in various
+ combinations. It contains theory and models for a number of physics
+ aspects, including hard and soft interactions, parton distributions,
+ initial- and final-state parton showers, multiple interactions,
+ fragmentation and decay. It is largely based on original research,
+ but also borrows many formulae and other knowledge from the
+ literature.
+</longdescription>
+ <use>
+ <flag name="fastjet">Build jets using the <pkg>sci-physics/fastjet</pkg> package</flag>
+ <flag name="hepmc">Adds support for High Energy Physics Monte Carlo Generators <pkg>sci-physics/hepmc</pkg></flag>
+ <flag name="lhapdf">Support the use of external PDF sets via <pkg>sci-physics/lhapdf</pkg></flag>
+ <flag name="root">Use <pkg>sci-physics/root</pkg> trees and histograms (in examples only)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/pythia/pythia-6.4.28-r1.ebuild b/sci-physics/pythia/pythia-6.4.28-r1.ebuild
new file mode 100644
index 000000000000..92d4af7849ac
--- /dev/null
+++ b/sci-physics/pythia/pythia-6.4.28-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fortran-2 versionator
+
+MV=$(get_major_version)
+MY_PN=${PN}${MV}
+DOC_PV=0613
+EX_PV=6.4.18
+PYR_P=pythia6-20160413
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia6.hepforge.org/"
+
+# pythia6 from root is needed for some files to interface pythia6 with root.
+# To produce a split version, replace the 6.4.x by the current version:
+# svn export http://svn.hepforge.org/pythia6/tags/v_6_4_x/ pythia-6.4.x
+# tar cJf pythia-6.4.x.tar.xz
+SRC_URI="
+ https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.xz
+ https://root.cern.ch/download/pythia6.tar.gz -> ${PYR_P}.tar.gz
+ doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp${DOC_PV}man2.pdf )
+ examples? ( mirror://gentoo/${PN}-${EX_PV}-examples.tar.bz2 )"
+
+SLOT="6"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ cp ../pythia6/tpythia6_called_from_cc.F .
+ cp ../pythia6/pythia6_common_address.c .
+ cat > configure.ac <<-EOF
+ AC_INIT(${PN},${PV})
+ AM_INIT_AUTOMAKE
+ AC_PROG_F77
+ LT_INIT
+ AC_CHECK_LIB(m,sqrt)
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ echo >> Makefile.am "lib_LTLIBRARIES = libpythia6.la"
+ echo >> Makefile.am "libpythia6_la_SOURCES = \ "
+ # replace wildcard from makefile to ls in shell
+ local f
+ for f in py*.f struct*.f up*.f fh*.f; do
+ echo >> Makefile.am " ${f} \\"
+ done
+ echo >> Makefile.am " ssmssm.f sugra.f visaje.f pdfset.f \\"
+ echo >> Makefile.am " tpythia6_called_from_cc.F pythia6_common_address.c"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc update_notes.txt
+ use doc && dodoc "${DISTDIR}"/lutp${DOC_PV}man2.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-6.4.28.ebuild b/sci-physics/pythia/pythia-6.4.28.ebuild
new file mode 100644
index 000000000000..af2b9cbbb1be
--- /dev/null
+++ b/sci-physics/pythia/pythia-6.4.28.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools fortran-2 versionator
+
+MV=$(get_major_version)
+MY_PN=${PN}${MV}
+DOC_PV=0613
+EX_PV=6.4.18
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia6.hepforge.org/"
+
+# pythia6 from root is needed for some files to interface pythia6 with root.
+# To produce a split version, replace the 6.4.x by the current version:
+# svn export http://svn.hepforge.org/pythia6/tags/v_6_4_x/ pythia-6.4.x
+# tar cJf pythia-6.4.x.tar.xz
+SRC_URI="
+ https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.xz
+ https://root.cern.ch/download/pythia6.tar.gz
+ doc? ( http://home.thep.lu.se/~torbjorn/pythia/lutp${DOC_PV}man2.pdf )
+ examples? ( mirror://gentoo/${PN}-${EX_PV}-examples.tar.bz2 )"
+
+SLOT="6"
+LICENSE="public-domain"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ cp ../pythia6/tpythia6_called_from_cc.F .
+ cp ../pythia6/pythia6_common_address.c .
+ cat > configure.ac <<-EOF
+ AC_INIT(${PN},${PV})
+ AM_INIT_AUTOMAKE
+ AC_PROG_F77
+ LT_INIT
+ AC_CHECK_LIB(m,sqrt)
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ echo >> Makefile.am "lib_LTLIBRARIES = libpythia6.la"
+ echo >> Makefile.am "libpythia6_la_SOURCES = \ "
+ # replace wildcard from makefile to ls in shell
+ local f
+ for f in py*.f struct*.f up*.f fh*.f; do
+ echo >> Makefile.am " ${f} \\"
+ done
+ echo >> Makefile.am " ssmssm.f sugra.f visaje.f pdfset.f \\"
+ echo >> Makefile.am " tpythia6_called_from_cc.F pythia6_common_address.c"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc update_notes.txt
+ use doc && dodoc "${DISTDIR}"/lutp${DOC_PV}man2.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.1.86-r1.ebuild b/sci-physics/pythia/pythia-8.1.86-r1.ebuild
new file mode 100644
index 000000000000..60aca11c2471
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.1.86-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator toolchain-funcs multilib
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc static-libs"
+
+DEPEND="
+ gzip? ( dev-libs/boost sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ PYTHIADIR="${EPREFIX}/usr/share/pythia8"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../xmldoc:${PYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2::g" \
+ configure || die
+ sed -i \
+ -e "s:LIBDIR=.*:LIBDIR=$(get_libdir):" \
+ -e "s:LIBDIRARCH=.*:LIBDIRARCH=$(get_libdir):" \
+ -e "s:cp -r lib:cp -r $(get_libdir):" \
+ -e '/ln -fs/d' \
+ Makefile examples/Makefile || die
+}
+
+src_configure() {
+ export USRCXXFLAGS="${CXXFLAGS}"
+ export USRLDFLAGSSHARED="${LDFLAGS}"
+ tc-export CC CXX
+ # homemade configure script
+ ./configure \
+ --installdir="${EPREFIX}/usr" \
+ --datadir="${PYTHIADIR}" \
+ --enable-shared \
+ $(usex gzip "--enable-gzip=yes" "") \
+ $(usex hepmc "--with-hepmcversion=2 --with-hepmc=${EPREFIX}/usr" "") \
+ || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/targets.*=$(LIBDIR.*\.a$/d' \
+ -e 's/+=\(.*libpythia8\.\)/=\1/' \
+ Makefile || die
+ sed -i \
+ -e 's:\.a:\.so:g' \
+ -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
+ examples/Makefile || die
+ fi
+}
+
+src_test() {
+ cd examples || die
+ # use emake for parallel instead of long runmains
+ local tests="$(echo main0{1..8})" t
+ use hepmc && tests="${tests} main31"
+ emake ${tests}
+ for t in ${tests}; do
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ bin/${t}.exe > ${t}.out || die "test ${t} failed"
+ done
+ emake clean && rm main*out
+}
+
+src_install() {
+ emake INSTALLDIR="${ED}/usr" DATADIR="${D}/${PYTHIADIR}" install
+ rm -r "${D}"/${PYTHIADIR}/{html,php}doc || die
+ echo "PYTHIA8DATA=${PYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc GUIDELINES AUTHORS README
+ if use doc; then
+ dodoc worksheet.pdf htmldoc/pythia8100.pdf
+ dohtml -r htmldoc/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples rootexamples
+ docompress -x /usr/share/doc/${PF}/{root,}examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.1.86.ebuild b/sci-physics/pythia/pythia-8.1.86.ebuild
new file mode 100644
index 000000000000..b7a47e6657ba
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.1.86.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator toolchain-funcs multilib
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc static-libs"
+
+DEPEND="
+ gzip? ( dev-libs/boost sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ PYTHIADIR="${EPREFIX}/usr/share/pythia8"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../xmldoc:${PYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2::g" \
+ configure || die
+ sed -i \
+ -e "s:LIBDIR=.*:LIBDIR=$(get_libdir):" \
+ -e "s:LIBDIRARCH=.*:LIBDIRARCH=$(get_libdir):" \
+ -e "s:cp -r lib:cp -r $(get_libdir):" \
+ -e '/ln -fs/d' \
+ Makefile examples/Makefile || die
+}
+
+src_configure() {
+ export USRCXXFLAGS="${CXXFLAGS}"
+ export USRLDFLAGSSHARED="${LDFLAGS}"
+ tc-export CC CXX
+ # homemade configure script
+ ./configure \
+ --installdir="${EPREFIX}/usr" \
+ --datadir="${PYTHIADIR}" \
+ --enable-shared \
+ $(usex gzip "--enable-gzip=yes" "") \
+ $(usex hepmc "--with-hepmcversion=2 --with-hepmc=${EPREFIX}/usr" "") \
+ || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/targets.*=$(LIBDIR.*\.a$/d' \
+ -e 's/+=\(.*libpythia8\.\)/=\1/' \
+ Makefile || die
+ sed -i \
+ -e 's:\.a:\.so:g' \
+ -e 's:$(LIBDIRARCH):$(LIBDIR):g' \
+ examples/Makefile || die
+ fi
+}
+
+src_test() {
+ cd examples || die
+ # use emake for parallel instead of long runmains
+ local tests="$(echo main0{1..8})" t
+ use hepmc && tests="${tests} main31"
+ emake ${tests}
+ for t in ${tests}; do
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ bin/${t}.exe > ${t}.out || die "test ${t} failed"
+ done
+ emake clean && rm main*out
+}
+
+src_install() {
+ emake INSTALLDIR="${ED}/usr" DATADIR="${D}/${PYTHIADIR}" install
+ rm -r "${D}"/${PYTHIADIR}/{html,php}doc || die
+ echo "PYTHIA8DATA=${PYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc GUIDELINES AUTHORS README
+ if use doc; then
+ dodoc worksheet.pdf
+ dohtml -r htmldoc/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sci-physics/pythia/pythia-8.2.10.ebuild b/sci-physics/pythia/pythia-8.2.10.ebuild
new file mode 100644
index 000000000000..84240a7e7d52
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.2.10.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+LHA_VER="6.1"
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz
+ test? ( lhapdf? (
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz
+ ) )"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc fastjet lhapdf root static-libs test"
+
+RDEPEND="
+ fastjet? ( >=sci-physics/fastjet-3 )
+ gzip? ( sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )
+ lhapdf? ( >=sci-physics/lhapdf-6:= )
+"
+# ROOT is used only when building related tests
+DEPEND="${RDEPEND}
+ test? ( root? ( sci-physics/root:= ) )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ if use root && ! use test; then
+ ewarn "ROOT support will only affect examples code build during test stage."
+ ewarn "Since you have tests disabled, this is a no-op."
+ fi
+}
+
+src_prepare() {
+ PYTHIADIR="/usr/share/pythia8"
+ EPYTHIADIR="${EPREFIX}${PYTHIADIR}"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../share/Pythia8/xmldoc:${EPYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2:${CXXFLAGS}:g" \
+ -e "s:Cint:Core:g" \
+ configure || die
+ sed -i 's:$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):$(CXX) $(LDFLAGS) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):g' \
+ Makefile || die
+ sed -i 's:$(CXX):$(CXX) $(LDFLAGS):' examples/Makefile || die
+ # we use lhapdf6 instead of lhapdf5
+ # some PDFs changed, use something similar
+ sed -i \
+ -e "s:LHAPDF5:LHAPDF6:g" \
+ -e "s:\.LHgrid::g" \
+ -e "s:\.LHpdf::g" \
+ -e "s:MRST2001lo:MRST2007lomod:g" \
+ -e "s:cteq6ll:cteq6l1:g" \
+ -e "s:cteq6m:cteq66:g" \
+ examples/*.{cc,cmnd} || die
+ # After lhapdf5->6 migration PDFs are identical within ~1/1000
+ # https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/README
+ sed -i \
+ -e "s:1e-8:3e-1:g" \
+ -e "s:nlo_as_0119_qed:nlo_as_0119_qed_mc:g" \
+ -e "s:xmldoc:share/Pythia8/xmldoc:g" \
+ examples/main54.cc || die
+ # ask cflags from root
+ sed -i "s:root-config:root-config --cflags:g" examples/Makefile || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \
+ -e 's:libpythia8\.a$:libpythia8\.so$:g' \
+ Makefile || die
+ sed -i 's:libpythia8\.a:libpythia8\.so:g' \
+ examples/Makefile || die
+ fi
+
+ epatch "${FILESDIR}/${PN}8209-run-tests.patch"
+ epatch "${FILESDIR}/${PN}8209-root-noninteractive.patch"
+}
+
+# TODO: the following optional packages are out of Gentoo tree:
+# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/
+# - PowHEG http://powhegbox.mib.infn.it/
+# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/
+src_configure() {
+ # homemade configure script
+ ./configure \
+ --arch=Linux \
+ --cxx=$(tc-getCXX) \
+ --enable-shared \
+ --prefix="${EPREFIX}/usr" \
+ --prefix-lib="$(get_libdir)" \
+ --prefix-share="${EPYTHIADIR}" \
+ $(usex fastjet "--with-fastjet3" "") \
+ $(usex gzip "--with-gzip" "") \
+ $(usex hepmc "--with-hepmc2" "") \
+ $(usex lhapdf "--with-lhapdf6
+ --with-lhapdf6-plugin=LHAPDF6.h
+ --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \
+ $(usex root "--with-root
+ --with-root-include=${EPREFIX}/usr/include/root
+ --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \
+ || die
+
+ # fix pythia config script
+ sed -i \
+ -e 's:pythia8/examples/Makefile.inc:pythia8/Makefile.inc:' \
+ -e 's:LINE%=:LINE%%=:' \
+ bin/pythia8-config || die
+}
+
+src_test() {
+ cd examples || die
+
+ local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
+ use hepmc && tests+=" $(echo main{41,42,85,86}.out)"
+ use hepmc && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
+ use lhapdf && tests+=" $(echo main{51..54}.out)"
+ use fastjet && tests+=" $(echo main{71,72}.out)"
+ use fastjet && use hepmc && use lhapdf && tests+=" $(echo main{81..84}).out"
+ use root && tests+=" main91.out"
+ # Disabled tests:
+ # 33 needs PowHEG
+ # 46 needs ProMC
+ # 48 needs EvtGen
+ # 92 generated ROOT dictionary is badly broken
+
+ # use emake for parallel instead of long runmains
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ PYTHIA8DATA="../share/Pythia8/xmldoc/" \
+ LHAPDF_DATA_PATH="${WORKDIR}" \
+ emake ${tests}
+ emake clean
+}
+
+src_install() {
+ # make install is too broken, much easier to install manually
+ dobin bin/pythia8-config
+ doheader -r include/*
+ dolib lib/*
+ insinto "${PYTHIADIR}"
+ doins -r share/Pythia8/xmldoc examples/Makefile.inc
+
+ echo "PYTHIA8DATA=${EPYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc AUTHORS GUIDELINES README
+ if use doc; then
+ dodoc share/Pythia8/pdfdoc/*
+ dohtml -r share/Pythia8/htmldoc/*
+ fi
+ if use examples; then
+ # reuse system Makefile.inc
+ rm examples/Makefile.inc || die
+ sed -i "s:include Makefile.inc:include ${EPYTHIADIR}:" \
+ examples/Makefile || die
+
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # cleanup
+ unset PYTHIADIR EPYTHIADIR
+}
diff --git a/sci-physics/pythia/pythia-8.2.26.ebuild b/sci-physics/pythia/pythia-8.2.26.ebuild
new file mode 100644
index 000000000000..2851fad340e6
--- /dev/null
+++ b/sci-physics/pythia/pythia-8.2.26.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib toolchain-funcs versionator
+
+MV=$(get_major_version)
+MY_P=${PN}$(replace_all_version_separators "" ${PV})
+LHA_VER="6.1"
+
+DESCRIPTION="Lund Monte Carlo high-energy physics event generator"
+HOMEPAGE="http://pythia8.hepforge.org/"
+SRC_URI="http://home.thep.lu.se/~torbjorn/${PN}${MV}/${MY_P}.tgz
+ test? ( lhapdf? (
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/CT10.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/MRST2007lomod.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/NNPDF23_nnlo_as_0119_qed_mc.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq66.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/cteq6l1.tar.gz
+ https://www.hepforge.org/archive/lhapdf/pdfsets/${LHA_VER}/unvalidated/MRST2004qed.tar.gz
+ ) )"
+
+SLOT="8"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gzip +hepmc fastjet lhapdf root static-libs test"
+
+RDEPEND="
+ fastjet? ( >=sci-physics/fastjet-3 )
+ gzip? ( sys-libs/zlib )
+ hepmc? ( sci-physics/hepmc:0= )
+ lhapdf? ( >=sci-physics/lhapdf-6:= )
+"
+# ROOT is used only when building related tests
+DEPEND="${RDEPEND}
+ test? ( root? ( sci-physics/root:= ) )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ if use root && ! use test; then
+ ewarn "ROOT support will only affect examples code build during test stage."
+ ewarn "Since you have tests disabled, this is a no-op."
+ fi
+}
+
+src_prepare() {
+ PYTHIADIR="/usr/share/pythia8"
+ EPYTHIADIR="${EPREFIX}${PYTHIADIR}"
+ # set datadir for xmldor in include file
+ sed -i \
+ -e "s:../share/Pythia8/xmldoc:${EPYTHIADIR}/xmldoc:" \
+ include/Pythia8/Pythia.h || die
+ # respect libdir, prefix, flags
+ sed -i \
+ -e "s:/lib:/$(get_libdir):g" \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:-O2:${CXXFLAGS}:g" \
+ -e "s:Cint:Core:g" \
+ configure || die
+ sed -i 's:$(CXX) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):$(CXX) $(LDFLAGS) $^ -o $@ $(CXX_COMMON) $(CXX_SHARED):g' \
+ Makefile || die
+ sed -i 's:$(CXX):$(CXX) $(LDFLAGS):' examples/Makefile || die
+ # we use lhapdf6 instead of lhapdf5
+ # some PDFs changed, use something similar
+ sed -i \
+ -e "s:LHAPDF5:LHAPDF6:g" \
+ -e "s:\.LHgrid::g" \
+ -e "s:\.LHpdf::g" \
+ -e "s:MRST2001lo:MRST2007lomod:g" \
+ -e "s:cteq6ll:cteq6l1:g" \
+ -e "s:cteq6m:cteq66:g" \
+ examples/*.{cc,cmnd} || die
+ # After lhapdf5->6 migration PDFs are identical within ~1/1000
+ # https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/README
+ sed -i \
+ -e "s:1e-8:3e-1:g" \
+ -e "s:nlo_as_0119_qed:nlo_as_0119_qed_mc:g" \
+ -e "s:xmldoc:share/Pythia8/xmldoc:g" \
+ examples/main54.cc || die
+ # ask cflags from root
+ sed -i "s:root-config:root-config --cflags:g" examples/Makefile || die
+ if ! use static-libs; then
+ sed -i \
+ -e '/TARGETS=$(LOCAL_LIB)\/libpythia8\.a/d' \
+ -e 's:libpythia8\.a$:libpythia8$(LIB_SUFFIX):g' \
+ Makefile || die
+ sed -i 's:libpythia8\.a:libpythia8$(LIB_SUFFIX):g' \
+ examples/Makefile || die
+ fi
+
+ eapply "${FILESDIR}/${PF}-run-tests.patch"
+ eapply "${FILESDIR}/${PN}8209-root-noninteractive.patch"
+ eapply_user
+}
+
+# TODO: the following optional packages are out of Gentoo tree:
+# - EvtGen http://atlas-computing.web.cern.ch/atlas-computing/links/externalDirectory/EvtGen/
+# - PowHEG http://powhegbox.mib.infn.it/
+# - ProMC https://github.com/Argonne-National-Laboratory/ProMC/
+src_configure() {
+ # homemade configure script
+ ./configure \
+ --arch=Linux \
+ --cxx=$(tc-getCXX) \
+ --enable-shared \
+ --prefix="${EPREFIX}/usr" \
+ --prefix-lib="$(get_libdir)" \
+ --prefix-share="${EPYTHIADIR}" \
+ $(usex fastjet "--with-fastjet3" "") \
+ $(usex gzip "--with-gzip" "") \
+ $(usex hepmc "--with-hepmc2" "") \
+ $(usex lhapdf "--with-lhapdf6
+ --with-lhapdf6-plugin=LHAPDF6.h
+ --with-lhapdf6-lib=${EPREFIX}/usr/$(get_libdir)" "") \
+ $(usex root "--with-root
+ --with-root-include=${EPREFIX}/usr/include/root
+ --with-root-lib=${EPREFIX}/usr/$(get_libdir)/root" "") \
+ || die
+
+ # fix pythia config script
+ sed -i \
+ -e 's:pythia8/examples/Makefile.inc:pythia8/Makefile.inc:' \
+ -e 's:LINE%=:LINE%%=:' \
+ bin/pythia8-config || die
+}
+
+src_test() {
+ cd examples || die
+
+ local tests="$(echo main{{01..32},37,38,61,62,73,80}.out)"
+ use hepmc && tests+=" $(echo main{41,42,85,86}.out)"
+ use hepmc && use lhapdf && tests+=" $(echo main{43,{87..89}}.out)"
+ use lhapdf && tests+=" $(echo main{51..54}.out)"
+ use fastjet && tests+=" $(echo main{71,72}.out)"
+ use fastjet && use hepmc && use lhapdf && tests+=" $(echo main{81..84}).out"
+ use root && tests+=" main91.out"
+ # Disabled tests:
+ # 33 needs PowHEG
+ # 46 needs ProMC
+ # 48 needs EvtGen
+ # 92 generated ROOT dictionary is badly broken
+
+ # use emake for parallel instead of long runmains
+ LD_LIBRARY_PATH="${S}/$(get_libdir):${LD_LIBRARY_PATH}" \
+ PYTHIA8DATA="../share/Pythia8/xmldoc/" \
+ LHAPDF_DATA_PATH="${WORKDIR}" \
+ emake ${tests}
+ emake clean
+}
+
+src_install() {
+ # make install is too broken, much easier to install manually
+ dobin bin/pythia8-config
+ doheader -r include/*
+ dolib lib/*
+ insinto "${PYTHIADIR}"
+ doins -r share/Pythia8/xmldoc examples/Makefile.inc
+
+ echo "PYTHIA8DATA=${EPYTHIADIR}/xmldoc" >> 99pythia8
+ doenvd 99pythia8
+
+ dodoc AUTHORS GUIDELINES README
+ if use doc; then
+ dodoc share/Pythia8/pdfdoc/*
+ dohtml -r share/Pythia8/htmldoc/*
+ fi
+ if use examples; then
+ # reuse system Makefile.inc
+ rm examples/Makefile.inc || die
+ sed -i "s:include Makefile.inc:include ${EPYTHIADIR}:" \
+ examples/Makefile || die
+
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # cleanup
+ unset PYTHIADIR EPYTHIADIR
+}
diff --git a/sci-physics/qutip/Manifest b/sci-physics/qutip/Manifest
new file mode 100644
index 000000000000..aa945704f4bb
--- /dev/null
+++ b/sci-physics/qutip/Manifest
@@ -0,0 +1,3 @@
+DIST qutip-4.2.0.tar.gz 424805 SHA256 3c7fed0e9b04c0f69dab1555babed1b847d388c0cef9f26fbdc2f4db611d61e7 SHA512 888e569b30a1085162ecfa768967526f5ce34b19e1a1b0f76f1331eb3978159ba321e126a1bc57e0936c5819218f07a336a57c80193b33af1009d1cd87fa95de WHIRLPOOL 8c735c618bb21d51009bf5373d3e1e8d89d3186edcbea1be729daf13bf1fcc7d151bfad176ddf960f7563e1e0fa7e35f095f2c8e9e8c3839ac94ceb408f80e88
+EBUILD qutip-4.2.0.ebuild 1151 SHA256 f51950816dda3b4148e9dcec846c3ace17613b1b91b84445d30357267c1f9887 SHA512 0c3f399b1b684e7805b94f387ce87c275a037de82bd101edeeb0099b326f3ddbe797cf2bc1912a971cd68c0b6cc5d788841d8096889ed3d96f4f192a77d62296 WHIRLPOOL 679000448c54392e44883451eed150a6bb7fe605e04d2672476c93b87ff4332830d79c4a53d4f73170fb64c6e316defcf4be2bd2950d40193d829791b8336d6f
+MISC metadata.xml 1166 SHA256 eca450cc7908a8c2e722bcc4aec64ed00eda808a8ff33624a1b94ee152d90d45 SHA512 eedcc69cefe905b4d0f39a106f5b444c9924ba60e2ecea1bdbca8551a946b1008a5e9ec83ef285f201fefd20b4a7bab76f4280f0f6827a3422257c6500e4c4af WHIRLPOOL 273cf85211356350364ab888fdc35f457b8d16fe345b7aa3d4b164e7370f3619f1b24a17c9e2264b028e4e1d03ca5ccb17665fad641f3aa6eaca2bb2819f2cbd
diff --git a/sci-physics/qutip/metadata.xml b/sci-physics/qutip/metadata.xml
new file mode 100644
index 000000000000..fb7fc53aee2b
--- /dev/null
+++ b/sci-physics/qutip/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven (lorem_ipsum)</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ QuTiP is open-source software for simulating the dynamics of open quantum systems. The QuTiP library depends on the excellent Numpy, Scipy, and Cython numerical packages. In addition, graphical output is provided by Matplotlib. QuTiP aims to provide user-friendly and efficient numerical simulations of a wide variety of Hamiltonians, including those with arbitrary time-dependence, commonly found in a wide range of physics applications such as quantum optics, trapped ions, superconducting circuits, and quantum nanomechanical resonators.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">qutip/qutip</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/qutip/qutip-4.2.0.ebuild b/sci-physics/qutip/qutip-4.2.0.ebuild
new file mode 100644
index 000000000000..e5514134e279
--- /dev/null
+++ b/sci-physics/qutip/qutip-4.2.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} )
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="Simulating dynamics of open quantum systems in Python."
+HOMEPAGE="http://qutip.org"
+SRC_URI="https://github.com/qutip/qutip/archive/v$PV.tar.gz -> $P.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="openmp test"
+
+RDEPEND="dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ sci-libs/scipy[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+python_prepare_all() {
+ sed -i setup.py \
+ -e 's/_compiler_flags = .*$/_compiler_flags = []/' || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ use openmp && mydistutilsargs=( --with-openmp )
+}
+
+python_test() {
+ cd "${BUILD_DIR}"/lib* || die
+ ${EPYTHON} -c "import qutip.testing as qt ; qt.run()" || die
+}
diff --git a/sci-physics/reduze/Manifest b/sci-physics/reduze/Manifest
new file mode 100644
index 000000000000..07a1e14d1111
--- /dev/null
+++ b/sci-physics/reduze/Manifest
@@ -0,0 +1,9 @@
+AUX reduze-2.0.9-gcc6.patch 2077 SHA256 b8926d9fe3e6ca68f703a9cb87a81aaa44238a0a8a0c348a6c9b3ff839468b20 SHA512 3636a1f22e129b7ceea50add15d52e96b96dfa28629b46e6bd1fd5e51f47a8f0d4f232e2b70858fa460cb0c9e842e7325df5a5d6bcabf6b17805a9c8a03d8cc4 WHIRLPOOL 8edbdf79c047930326017ae5e60cd23ed886121c8ad3c89ce078eece47d06769c7fb9f5fb28ce7c322b7d5ec2624799a321ec30a65b5461a03549faff91a63d4
+AUX reduze-2.1-gcc6.patch 850 SHA256 8d7ad4b374c827b664d3aee215205727b3de1c5c0ec66199c06ca559b78cf753 SHA512 2df799698e9aab61c00f36cfa9b8e4806b9856180ba0621e4e4a30b485018a5fc9a1195cfe5579910b4f946119ec1a205b3e7778417bf205c1dd3ab6227f3813 WHIRLPOOL 37f11078d916606d8dea855642e825a2f374cf4b4670414f0a317bf2f1bf6e6abb56f0279f27532e4beda83fc513ce520996fdd960206107dbad56998e0b7f88
+DIST reduze-2.0.9.tar.gz 568570 SHA256 e56494519faffa381f16c8c9b439e9c17485392d47b836ef372d3c4ff451e67a SHA512 69818d7edaf3c69996d3f703401865f67722ec8d33b285642c71030f2852273b4b4028a00f0c639589cb801def739f93a05d504d4fb2edf228674962897d5f01 WHIRLPOOL 1aa84d755668badf01c077b3e9c63cf1c68c5f37f438875c3f3de11804013e551a92f98c7aacd5b8ea155e1540023d4273f1ceb98ea4e7551de9fe7613b18021
+DIST reduze-2.1.tar.gz 650423 SHA256 757556ba0b05b7b4c14091ce4a54f79259b530ed22180417b41f9ae443378ea7 SHA512 e27f711639fe4b95c2aef4e73a7f6d9dd1574d1a62bc531d0f5177c505ffd353193548f29332f3b5320d4907bebd404ef082d3fea1dd392b83573d085b4a795a WHIRLPOOL 5964aa240132b2e002039486977ad17c27c5a027a0d7339cae1d9979e394b5a236cf3894eef774bee5d79de272eea1aced1988dd53a986035b3ae1dfbb6393b5
+EBUILD reduze-2.0.9.ebuild 1422 SHA256 03eed8be3f5e5b94ddfda2e98902f698358a7e99c85ab508ddd6b8c562188307 SHA512 48c183662fb22751e0aa55a8be99a0d174fa67a5ac33f16e85075b982a584692e909a36d460c196c36195cce34dd4dc0f3a3e3cce392f03f21f36acbb280160d WHIRLPOOL c2c129550dc93effb86c4b8d900149989f658b1c1c1fca1d94a04d2798d35f7ba63d1c692e22bae7a910a9e6a0fdc9c1bc8be62ee87c001350676e2516358d83
+EBUILD reduze-2.1.ebuild 1429 SHA256 2d6cc0ac62edc32536e5176317c6207e692e818c6d113cdc3e8ad78d4ac76beb SHA512 db7df515fe96c676a9ee84708c5d61ae1a7092430f15c4f8eb06c8af5ee4dc85c073f19a3997500e73934136d905e3d563bb83c85a307fecfe64483b24df934b WHIRLPOOL c149b013ae09a785cfeb5848c2f734a8b25ab68d225ade310065eb77b9d3068bd885fc06aa3f4819f478149fb42befc778eccd5578e23e69e6b1a8d87b641cbf
+MISC ChangeLog 2699 SHA256 63179c7409df0f47290b55f212ad120b81ec71a5252fa270d24872d3f114a7dc SHA512 1f06df35d44a05a2d5c0ede827eb4d2982bf8fbf782451ac918ac103fc76e03b3a9309776d728f947a283a613d7b73bf571d304193bf83cfbfbc09d58da2ee29 WHIRLPOOL 8a41b2b5801d0224de4b04e95146d059f614e822b269b4d0181e9eddf3afeb049bd0e61a11b517d4c5d2b46333c477791d27fa4483bc7c47078226f6456ea242
+MISC ChangeLog-2015 840 SHA256 684b99df70a9bdd93b6ba39d5d5f65ba126461b39c725a5c280b2c4ca7667925 SHA512 aec87f5661a5c71ed908eac254603816aecf85bf0ee738dea530fccca3b9992d04e47884bed1ab0c1df7a260794d7272b9924e7162ffecdbaa1d00a765e8bce5 WHIRLPOOL a64f7b1c874a568ca2dcee658e1136c93790984bbaa442072731832dc23649a78f796945e84049c133fe903c88ee2fda7d2c53750717a67fc54a888e37366ad6
+MISC metadata.xml 454 SHA256 a8251d92622c824b5afb570a6a73ddac217f9c0532cd475735c30baedcc7c18c SHA512 2c4ba8ba43848a07834cb7f31a474f7c236356ef228e87db2870a4d19c3d2edf29189fab25f05efe70c004a3fdb7c2fd065687b104fe33d1fd20626c6aea4372 WHIRLPOOL facce8bba364b5b0c52d1a532f862e505d4046a6d9cd9563670d069dec636577f4fc2a137db838e58824b973c62d407ba2713df786be55d53635c34bbb2f831b
diff --git a/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
new file mode 100644
index 000000000000..9864163cdec9
--- /dev/null
+++ b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
@@ -0,0 +1,58 @@
+--- a/reduze/amplitude.cpp
++++ b/reduze/amplitude.cpp
+@@ -782,7 +782,7 @@
+
+ ex resultLeadingNc = result;
+ for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
+- VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Color");
++ VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Color");
+ VERIFY(is_a<lst>(it->op(0)));
+ ex res(1);
+ for (size_t i = 0; i < it->op(0).nops(); ++i)
+@@ -823,7 +823,7 @@
+ timer.restart();
+ exmap m;
+ for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
+- VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Lorentz");
++ VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Lorentz");
+ VERIFY(is_a<lst>(it->op(0)));
+
+ ex res(1);
+--- a/reduze/files.cpp
++++ b/reduze/files.cpp
+@@ -420,7 +420,7 @@
+ get_filename_sectormappings(m.integralfamily()->name());
+ ofstream file(file_name.c_str());
+ if (!file)
+- ABORT("Can't write to " << file);
++ ABORT("Can't write to " << file_name);
+ os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
+ os << m << YAML::EndMap;
+ file << os.c_str();
+@@ -617,7 +617,7 @@
+
+ bool is_readable_file(const string& filename) {
+ ifstream is(filename.c_str());
+- bool ok = is;
++ bool ok = !is.fail();
+ is.close();
+ return ok;
+ }
+--- a/reduze/sectormappings.cpp
++++ b/reduze/sectormappings.cpp
+@@ -757,13 +757,13 @@
+ const Node& z_node = node["zero_sectors"];
+ for (Iterator n = z_node.begin(); n != z_node.end(); ++n)
+ for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
+- m.zero_sectors_.insert(*s);
++ m.zero_sectors_.insert((const int) *s);
+
+ if (node.FindValue("sectors_without_graph")) {
+ const Node& ng_node = node["sectors_without_graph"];
+ for (Iterator n = ng_node.begin(); n != ng_node.end(); ++n)
+ for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
+- m.sectors_without_graph_.insert(*s);
++ m.sectors_without_graph_.insert((const int) *s);
+ }
+
+ const Node& rel_node = node["sector_relations"];
diff --git a/sci-physics/reduze/files/reduze-2.1-gcc6.patch b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
new file mode 100644
index 000000000000..3b347ef413c3
--- /dev/null
+++ b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
@@ -0,0 +1,29 @@
+--- a/reduze/files.cpp
++++ b/reduze/files.cpp
+@@ -723,7 +723,7 @@
+ string file_name_tmp = file_name + ".tmp";
+ ofstream file(file_name_tmp.c_str());
+ if (!file)
+- ABORT("Can't write to " << file);
++ ABORT("Can't write to " << file_name_tmp);
+ Emitter os;
+ os << BeginMap;
+ os << Key << "crossings" << Value;
+@@ -752,7 +752,7 @@
+ string file_name_tmp = file_name + ".tmp";
+ ofstream file(file_name_tmp.c_str());
+ if (!file)
+- ABORT("Can't write to " << file);
++ ABORT("Can't write to " << file_name_tmp);
+ os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
+ os << m << YAML::EndMap;
+ file << os.c_str();
+@@ -1036,7 +1036,7 @@
+
+ bool is_readable_file(const string& filename) {
+ ifstream is(filename.c_str());
+- bool ok = is;
++ bool ok = !is.fail();
+ is.close();
+ return ok && !is_readable_directory(filename);
+ }
diff --git a/sci-physics/reduze/metadata.xml b/sci-physics/reduze/metadata.xml
new file mode 100644
index 000000000000..4b1d47af2649
--- /dev/null
+++ b/sci-physics/reduze/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ A program for reducing Feynman integrals
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/reduze/reduze-2.0.9.ebuild b/sci-physics/reduze/reduze-2.0.9.ebuild
new file mode 100644
index 000000000000..3c0713e8e163
--- /dev/null
+++ b/sci-physics/reduze/reduze-2.0.9.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Program for reducing Feynman integrals"
+HOMEPAGE="http://reduze.hepforge.org/"
+SRC_URI="http://reduze.hepforge.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb doc mpi"
+
+RDEPEND=">=sci-mathematics/ginac-1.4.1
+ berkdb? ( sys-libs/db[cxx] )
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+DOCS=( ChangeLog README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc6.patch
+
+ # gentoo doc directory
+ sed -i \
+ -e "s:share/reduze:share/doc/${PF}:g" \
+ CMakeLists.txt || die
+ use doc || sed -i -e '/share/d' CMakeLists.txt
+ # prefix fix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ reduze/CMakeLists.txt || die
+
+ # remove bundled yaml-cpp
+ # no: it does not build. is it patched?
+ # sed -i -e '/add_subdirectory ("yaml")/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_HASH_TABLE=ON
+ $(cmake-utils_use berkdb USE_DATABASE)
+ $(cmake-utils_use mpi USE_MPI)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(use doc && echo doc)
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}"
+ emake check
+ use mpi && emake check_mpi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r "${CMAKE_BUILD_DIR}"/doc/code/html/*
+}
diff --git a/sci-physics/reduze/reduze-2.1.ebuild b/sci-physics/reduze/reduze-2.1.ebuild
new file mode 100644
index 000000000000..ad6f52292b44
--- /dev/null
+++ b/sci-physics/reduze/reduze-2.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Program for reducing Feynman integrals"
+HOMEPAGE="http://reduze.hepforge.org/"
+SRC_URI="http://reduze.hepforge.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb doc mpi"
+
+RDEPEND=">=sci-mathematics/ginac-1.4.1
+ berkdb? ( sys-libs/db:=[cxx] )
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # gentoo doc directory
+ sed -i \
+ -e "s:share/reduze:share/doc/${PF}:g" \
+ CMakeLists.txt || die
+ if ! use doc ; then
+ sed -i -e '/share/d' CMakeLists.txt || die
+ fi
+ # prefix fix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ reduze/CMakeLists.txt || die
+
+ # remove bundled yaml-cpp
+ # no: it does not build. is it patched?
+ # sed -i -e '/add_subdirectory ("yaml")/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_HASH_TABLE=ON
+ -DUSE_DATABASE=$(usex berkdb)
+ -DUSE_MPI=$(usex mpi)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(usev doc)
+}
+
+src_test() {
+ cmake-utils_src_compile check
+ use mpi && cmake-utils_src_compile check_mpi
+}
+
+src_install() {
+ use doc && HTML_DOCS+=( "${BUILD_DIR}"/doc/code/html/. )
+ cmake-utils_src_install
+}
diff --git a/sci-physics/rivet/Manifest b/sci-physics/rivet/Manifest
new file mode 100644
index 000000000000..356f3a9ac7e0
--- /dev/null
+++ b/sci-physics/rivet/Manifest
@@ -0,0 +1,7 @@
+DIST Rivet-2.3.0.tar.bz2 2742948 SHA256 dd07702981d586e4b97b0fa56ae08cd08a631a952322a9b52e7622a46a7741ab SHA512 b51b77f80d69156dead899312cad838bc03479a072e163df50262e86790503515f8ab8af93723c3cbd33007d9812aa10581b2c960d92bc1fcf5031d27018d239 WHIRLPOOL ce9e5dd34ba9b53de192aee39bcd94565a62a328bd35dcb1ef810cc7b129e9ae6529fc8f970889f7a6970567bdd0f040d15fc5bbb83ec22e38daccb34cbb4fdf
+DIST Rivet-2.5.2.tar.bz2 3005023 SHA256 70aa27764a14159c94c0b753a0c3d3600ac669def398cb2d8a6c63ae17704f05 SHA512 dd84143eb5d4b24ae2e5ace175e349fe48b4b5e6a47b3aa031a4144c635f016e8bbd731ed3f96b5c2f52c7df8ff0f1db70750fc45381bdfcdd469fd4c058beef WHIRLPOOL cd17c53ba337cc5f6e9d747f37640b86958844cfbf328a99350a3e7850e1ae158aab6cbedd8791da3f5f56084ed219a8ff7d9b2bc3d9c73848531f0d868c475a
+DIST refs.bib 16907 SHA256 bc6f313c09d8b7a8a2dd1ff448ba1a51b4b138428fbcc4447f9effff67286e40 SHA512 64755e6aeaa1f0b3fb76a33ffdf226bcd42ee597a78a8d458b728f0e6f576d4dafbb276a0498c3b573d23054ccbf54ada6f6c12faf52dbfbeef2372094d01181 WHIRLPOOL f026ee892cd3456c4723fa982f6d739a0c126481bfdd6dd16a20e4f0d6fdfa34a0630c48115c6597eda15d0fa8cc12b8069b0ce1d12bc1acdffdc304acb4888f
+EBUILD rivet-2.3.0.ebuild 1305 SHA256 bbdcd1f29aca0ad141d9ed6892911e9f1119a9c71246cef0b08e4b8dc03b6d73 SHA512 d366357c41ed61d2fc7937e014d92dea94b6b7a47913694048276d4a041cdc2e185849869c9b21db0ff2a503dc11bde70a4cf2a86a9116e992a21a27e1467193 WHIRLPOOL 2ddcce4a66cb9380197163d6a7c9e30093ab8d7c8c1fe3c91374bf678b24994a4594c296a6235276300e50995ace95d044125b878a783b864e4b533dc4b0996d
+EBUILD rivet-2.5.2.ebuild 1768 SHA256 aa2e10f81779ae0ba79cdf7e4334ffd16d45ad88cab2b63d250b95ff8abd9841 SHA512 8bf89e54ce4279b5703b440a5c5dafddb1559b3aab08b5bc3ed1028bd4467c31f5a996cf9d919b0426ef88996fc63aea35393f6ad7c70934074dde876bf675b7 WHIRLPOOL bc3ffe07423df1e5db54496ed6e063d15f7923825d7f8adc258521741be7d5ff7b4e54a8b48773945656ed52a78bd495a9b9958fbbde76399ab6f9bb0df104b1
+MISC ChangeLog 1712 SHA256 7b63118e676a826768232e59376cd1874bc95de383a10f57ca65417cbbf93663 SHA512 e5efcc7f6b4523973c3f9d99d373a3fe88213ad462cb20dae56730f33c72da0b5a441550c35f775b14e984afdc55b37b79d66de98073dfbd52f527e88870e36a WHIRLPOOL c71c228c6ab450320a5dfa68c0ccc7ff11403a9fab2f5f85ff3597c1f3f8703a26696c24ec3209bad5ec93708c58897096358ad3bda08b6524f077feaeb0b595
+MISC metadata.xml 830 SHA256 a1c82602710263487fd5a837266e16c5a9cb8cfbba09a798180f76fbb9440ea3 SHA512 a13f39174c4d4e6ef47a2f7c3b3cdbf67f0cdd72f18bf15d6bc37c41c1cf33286219c9030ba525694cb5f6cc28f0ace5b839610904415735e502494dbdd3f29d WHIRLPOOL 6374f4efba7e06409688f70f9269992f0b97a2851ab10d017d6aebd5fc08875351310cb2e24ab4431387a59b048324328236d1f4d1901308fcc9ab679ca322cf
diff --git a/sci-physics/rivet/metadata.xml b/sci-physics/rivet/metadata.xml
new file mode 100644
index 000000000000..532272a0d9cd
--- /dev/null
+++ b/sci-physics/rivet/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription>
+ The Rivet project (Robust Independent Validation of Experiment and
+ Theory) is a toolkit for validation of Monte Carlo event
+ generators. It provides a large (and ever growing) set of
+ experimental analyses useful for MC generator development,
+ validation, and tuning, as well as a convenient infrastructure for
+ adding your own analyses. Rivet is the most widespread way by which
+ analysis code from the LHC and other high-energy collider
+ experiments is preserved for comparison to and development of future
+ theory models.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/rivet/rivet-2.3.0.ebuild b/sci-physics/rivet/rivet-2.3.0.ebuild
new file mode 100644
index 000000000000..63dece0d0092
--- /dev/null
+++ b/sci-physics/rivet/rivet-2.3.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 autotools-utils bash-completion-r1
+
+MYP=Rivet-${PV}
+
+DESCRIPTION="Toolkit for validation of Monte Carlo HEP event generators"
+HOMEPAGE="http://rivet.hepforge.org/"
+
+SRC_URI="http://www.hepforge.org/archive/${PN}/${MYP}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc python static-libs"
+
+RDEPEND="
+ dev-libs/boost:0=
+ sci-libs/gsl:0=
+ sci-physics/fastjet:0=[plugins]
+ sci-physics/hepmc:0=
+ sci-physics/yoda:0=[python]
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[latex,dot] )
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MYP}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable python pyext)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ use doc && doxygen Doxyfile
+}
+
+src_install() {
+ autotools-utils_src_install
+ newbashcomp "${ED}"/usr/share/Rivet/rivet-completion rivet
+ use doc && dohtml -r doxy/html/* && dodoc doc/rivet-manual.pdf
+}
diff --git a/sci-physics/rivet/rivet-2.5.2.ebuild b/sci-physics/rivet/rivet-2.5.2.ebuild
new file mode 100644
index 000000000000..86e41340c503
--- /dev/null
+++ b/sci-physics/rivet/rivet-2.5.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools bash-completion-r1 python-single-r1
+
+DESCRIPTION="Toolkit for validation of Monte Carlo HEP event generators"
+HOMEPAGE="http://rivet.hepforge.org/"
+
+SRC_URI="http://www.hepforge.org/archive/${PN}/${P^}.tar.bz2
+ doc? ( https://rivet.hepforge.org/trac/export/8a05acecd26c18f368f4b748da2d5aa2db46be6c/doc/refs.bib )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/boost:=
+ sci-libs/gsl:=
+ sci-physics/fastjet[plugins]
+ sci-physics/hepmc
+ >=sci-physics/yoda-1.5.0[python]
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[latex,dot] )
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${P^}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ unpack "${P^}.tar.bz2"
+
+ if use doc; then
+ # refs.bib is missing in tarball (reported upstream)
+ cp "${DISTDIR}"/refs.bib "${S}"/doc || die
+ fi
+}
+
+src_prepare() {
+ default
+
+ # Install rivet-manual.pdf to docdir intead of pkgdatadir
+ sed -i '/pkgdata_DATA = $(DOCS)/s/pkgdata/doc/' doc/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable python pyext) \
+ $(use_enable static-libs static) \
+ $(use_enable doc doxygen) \
+ $(use_enable doc pdfmanual)
+}
+
+src_compile() {
+ use doc && export VARTEXFONTS="${T}/fonts"
+ default
+
+ if use doc; then
+ doxygen Doxyfile || die
+ HTML_DOCS+=( doxy/html/. )
+ fi
+}
+
+src_install() {
+ default
+
+ newbashcomp "${ED%/}"/usr/share/Rivet/rivet-completion rivet
+ rm -f "${ED%/}"/usr/share/Rivet/rivet-completion || die
+}
diff --git a/sci-physics/root/Manifest b/sci-physics/root/Manifest
new file mode 100644
index 000000000000..5b3ea7baccc5
--- /dev/null
+++ b/sci-physics/root/Manifest
@@ -0,0 +1,25 @@
+AUX proofd.confd 415 SHA256 261738817b4ba50fb07007741305d0a88e9067a45e3cbfd1d3fc8bebe70ece38 SHA512 5aa6e6313cf159d2b407286a15f7f959d966a7e9b74bd2a74f13bd3fe01c04d99b46b5fb55f4a7434ebe911cd8b6469657d96591d624a7bfc7d39d49ab62b900 WHIRLPOOL 4a0604d8827cd733a2f5b34183bfd9458aff94f036f9177f2de3283da7722cf2e6dbf6acae93fe3ccd8144ad646c283458550f97f357148cc9f903c7469c57ca
+AUX proofd.initd 606 SHA256 9780b035d00c543bba8a040e0b435ceaec4f606d14d78d7a8dc45e2399f40a75 SHA512 de72ea4ea106ab6ec4cc892c2eaf1b17f85db3de9dbfe85d34678678268c943868e4698a1a046e51b5694f03109cb06484b90aea83cf2728229a065f35c3d165 WHIRLPOOL 8a42c63a1cc5e1455c04353bf83f76380f7a2814e71563cfbc43dedaef128582990d7f0350d9f539bf083c64ab23fc11d1ce846241c0d3f9bbdcf3c05baf4b7e
+AUX root-5.28.00b-glibc212.patch 276 SHA256 e51e127a80e2bf1afad41c2b7ca5233c362bce017057ca489bedb2a9442efb62 SHA512 26138c8d14f319248d2b33395a57767c8d9bbf552244c2c55a7d6c0a1526de4c84313e020dc6c7483866cb3a927ba047d60f9b4dc8bd8291dd451a847b7e7379 WHIRLPOOL 0226880ce82aa5ba6e552f9bd2042842250694105734186a2185436ba8e2a13131f7e6263a99a1c228df724178453962f89ab74d90b62521e6db42be792c1fa9
+AUX root-5.32.00-afs.patch 1322 SHA256 a8f8d551668299516e2e091fd29ae15ceb1ba034d9df95b76f99b1dabc94a8dc SHA512 4c021dadf266d58cc6ba3906ba3cd3ca2e2051f69266a7c3b32931ef8c0f40af2d79cb640aaf9c93b3302f9f17a3361683f616c18db2f25d86ca21d37f7b0bf8 WHIRLPOOL b35195e89b86ec6b7fef4927f97180ef3a6860c822e684b89fa76d53b595ede4c4eabe9948f067b1c1de91dce1f57011404c6534909e3b33a2b7451db5ae76a8
+AUX root-5.32.00-cfitsio.patch 593 SHA256 9f4f244f272d75e115d8f139670fdcc0cdbcb68972689edbc78e467c3fad3e40 SHA512 1e9b1de637aeb667718e7e262615126626f951acefd2e1c4a3f53cfb13fb4dbde0186c301ffcc175cbab701825f340cffdb26cf741b244fba84cb8938ccb89e8 WHIRLPOOL 2231b4b349ad3a97aca94b21337981cc7477592a8aad4d604ac6d7aee98d9e5d66d90a0155c47ce53244b550f1c5b1d5b7581208d1c16a57a2e8fe6de3fbdc32
+AUX root-5.32.00-chklib64.patch 886 SHA256 5560c5ce62faeb4a5f3e4a8dcf997facddc6b5f87810b0791b592d3a9343f269 SHA512 45a9776ca5110170099ea33dfe19a7b3a358734e3376aaf242202701df7e9d4f2d337962663c7d38c5ce189efdb1ad6b3c9382f2bb4a5ec2cf5bf9253985b067 WHIRLPOOL fcd143d0dfc62ac67307fefe70ce00864c8a6f4da64860181f376350083b08a5298fb85b926bdb4c2eb89a2096187317cfd43082d590a2099f2c6487e75e3a25
+AUX root-5.32.00-dotfont.patch 2563 SHA256 7b4fc5da17ee8bfa71ed4cb60926a02e4b7058f8955dd54fb7f15ee4910823f6 SHA512 332ffe0ac6d1249ef1643b6a1df77ef23c1af1c4547f248295c1ae9c284384446a84a374b2b117b1157e770ac65a404be1c4cc17a497c43e2c34bcbf51619441 WHIRLPOOL 9633f52670bd8ad65393ddba7b2152e644feedb97df479229a07b232da10e4fae911356c2700fc0ff552096e575fb29882e46e38f609399ecbdc97f3f16b8e96
+AUX root-5.34.05-nobyte-compile.patch 5504 SHA256 5f550158605286f915dfb6ea7c44b4daa95198e680ebf18509482e7e819bcc08 SHA512 ef1405b2cd67393402ac365d66f7eb2846a62ff8a492649cbaf3bc004f5c98592c9b926458055912217ca7f755bcfa5d3b741f61e6648dfaf05fa2b62f62b27d WHIRLPOOL b3e7abd63872bc073e9389839b68c534a58547750bb71a6a5eaaf2a3ff8dca9b040e9c781554d69130dce2153ed86a2a3a4aded486a2af1bcc3221256943d5fe
+AUX root-5.34.13-unuran.patch 1555 SHA256 279c7f4495ddbd508ac6f2e9fff53d65fc6e623997d1fbe917c4e6a8adb627e8 SHA512 571d6bd56d2419e4b96f7ca95d14d291768cc98024f871ca35bfae1a7d1e010a7c101f927c66ece4c006ca89401aeaea89945b8502f1ae2b2068f535d0bc95f3 WHIRLPOOL cb1b889e0d35a0d1f0969491c8909eb62ef931dd9d2f76e93cefab2cd9cb9a5aeb79337ba124089a45c069a75b936b9225d2e8909be751f0b8d6ed87063dac79
+AUX root-5.34.26-ldflags.patch 626 SHA256 1b4b6bee742ce4641fd6fad89d8c2425fcdfc41742743ff40b13ce1450be3a24 SHA512 fa38441a472b8b811c293aecbf1e233ea619cb4a2c9bfb8dda1706c0ac34bf5c3dcf23a43a517a72aab5faa63e733eee74515cbf70b6f15e3cfba46e3e5c4ccc WHIRLPOOL d3bf11dd359c4ed73f4bd0e70703b2407f33f02f71b9ad92419bf1bf4608525db0572b6f39baf3caf262a67978ba73df2ea0973c1ad68579e28172f17ec4ba60
+AUX root-6.00.01-dotfont.patch 2718 SHA256 27d05ede039fb85472203839a628b15f8ee9fc3c39e1d29a19349e069f891d61 SHA512 8f01655e863d36678dea37df934e3d8d9c2bc85920497345feb8d863bdc1b7413c783b916050d1e7b476ecdf9e1e8afdcbb32e621d625305898d51947b6955c6 WHIRLPOOL 75e2712f13cf64102fd0dce6d92c7c21c3606ad4679615336ce6b607f236eb6b1d57ffa0498ae3df194b08c6cdc371fef36912fb3e3cc1fc84ac3f1664793708
+AUX root-6.00.01-llvm.patch 439 SHA256 aff58b4454204daa4f68deb4ace730137d9083d11cb679c8d37a7b5ceab2b101 SHA512 cb9edb78a937ace744687506a6ec45b9022b6c7ca687e8fe1e2ee2ddf9e01b49fe8d6933910e2898f14247bdcf5d86b248d28938d28e3453615d56d5f12291d0 WHIRLPOOL dd22f60f3b9ae19b3965114a824f2f0dce153a285312b878fe663d9a51b5195f76f47d299904ce237de4d98e26d3417b27cfbca18ac8f5e1bfbc1e8d3093a0f9
+AUX root-6.00.01-nobyte-compile.patch 1308 SHA256 6b93b8bd7f8a2bc68289c7a4bf316ab3d75a2d4d28669dd05baadf8f22d93f92 SHA512 6387c3277ec16ceb23caa1952b3a9e3869fedd12ed1fd93a4241e865898cd74b4abfe99e0f6fb266cfd5f3a46ede98e56f933ed0ad83829e8445ef583555b674 WHIRLPOOL 401c5144709896b54c894077e4c7fa41e9df230b87f1bfa589d6ddddacab36d1ce5bd62b465cc01a70608d4f751f0048172ff1689bd5c72691ac98678ea0dac3
+AUX root-6.02.05-xrootd4.patch 478 SHA256 8dd88f12eb0f3982ede6cd6279a7c8e16ba91e4f02f21000c4b47c2bd2cc23e2 SHA512 47f37ca84c06d71fc207b18bc38798ccde457e61758ec56f84543aa4619929869e15dd53a8d7302bd4ca458b1e880428aafba4963d63bc5711f4540a096c4ff8 WHIRLPOOL 0545d00ca85b564c294e5301f6266c67925b838b4b9618191cca0dddebfc010f2638318aae7c688327543b91c9aa1eaa1f2eccacb3fd55d5aa9b0463f639d0d2
+AUX root-6.04.06-gsl2.patch 1980 SHA256 0740882b1f1f8a01c2b9a8a4bbc1395d032ee856c2b15d3d5d0a826541887aba SHA512 493a261589c766fe7ffb1936475466f7aa6ef8f97a99c99c3676149dc5a898621272916e38eaf98d45b4a6a6ef57c0c1eeff565d36d0a2c5c0286ba99c2ed59d WHIRLPOOL fceafede1097bcf0f5e135b5cf3bd3bfc566b416c738841f781c04fbd1dcf700567d0c3a610946ad5abbf6304a8a3c41d7244ffc4d02fedae08258af6e812ab1
+AUX root-6.04.06-prop-flags.patch 732 SHA256 1adcd2f4f2bb35011e16e56489b87ef65dd882aeb9336bf70e30e1d2fb072af8 SHA512 bdd2403c9d96fc3bb4a3a60c584aaa78128d4ed067ba173fd79c7a54e71cd9d3d400f13a4e9f056b4c985a9bdde815f5ae8f5ff22fd40e0a6ab49f38f1c589f5 WHIRLPOOL d0b6bc5b7ae405140ba88bd2fe6bd1eaa828df480da39ad0f0525045e189e68e19278790e191011009dbc0cb13350eca94e485cb32e3507658e73cb0d64c8de6
+AUX rootd.confd 199 SHA256 7b69f646ce0b2546ce797ec4a05949b02302dc5f4e41d2e8896ed0bc6575ac8d SHA512 2ce6753d37a7f22cc3656f110f802b8e07c1469bfe4524606c1472369352f8c584c01c716760252fab40369470b72d8c77cdbb2d52126c39371faaf597bf58d8 WHIRLPOOL b4c65e5026d6583775cda7b13fdbc5ae48c82c36710efbdd6b112243310090c05b5726d6e76d1ae25d585ecaa4aec4a5059336bf54135bafd0e4a921db468742
+AUX rootd.initd 622 SHA256 c81c6565e5f517efcbd9e6af58dffe26e9c3abc5e7db26bd044d0fca6f1d6e50 SHA512 fde858a37b52540285d228e52845c963b18065a250aef0753f469753d541f577ac401f01438297c030e47176350bb23c3c0280c9b4ccbc1feda3313ab7c9be2e WHIRLPOOL ee80590e73a0d3db2456b600d568fbc7164a694da2aa380e05348c81d2cbeb355f257e7a21be1b704fa9e378213716155eb12851f6f5c30ef6b3c1744ad8ee26
+DIST root_v5.34.36.source.tar.gz 75427331 SHA256 fc868e5f4905544c3f392cc9e895ef5571a08e48682e7fe173bd44c0ba0c7dcd SHA512 2cc0c8f8b63b2a3ce01c49c41704483548a7324d92c21a63e3e36a00f4d6f5656a7844fdf48cb71a6f2a2c974112527300ffd3bb5502d8365ffaf138e6ae4c7a WHIRLPOOL 137c054874645913372edca3e02087c0c4f2a3c4d662b488eedaec517f75a8ab956ade418e2942aee925e58da804b325bbd6756be653bd767cc1c82cb7a650c9
+DIST root_v6.04.06.source.tar.gz 99180724 SHA256 6deac9cd71fe2d7a48ea2bcbd793639222c4743275dbc946c158295b1e1fe330 SHA512 ac96ac998ed4894587b7d286d79bcbea7b33f15764cc2513ae089e86c584e2dcb064cd135d44a4bfd2bede368eb772ccbffcd6bf426857a1236f5d7e9f5ce6fd WHIRLPOOL 7ffca036917d798ade31e1a22e9518d567e4267af5d1db555ea0e82c1bc2c7a1f665c8cd76d3ce6511507ab7befea4881580259c6142f1e668edafbcbc5e496e
+EBUILD root-5.34.36.ebuild 12182 SHA256 d84f8cce4e0e5f2906264fc16df753def922cf6052514a0e09551988cd659673 SHA512 920df65fdcb34d91b4ad7c894c2e9996f15f4bc7c25bff1378887f89d7b35ef08163824bedbdd2522a33555384077c90600015a7c0560e642d36abcadea98f18 WHIRLPOOL 80afdeb2166b9b4473ab89e58d66783b391475905d843ed52502760ae1cff9345faaf9fb501c731831e59d53f7b223c3c849dce017cb5d710c5d9994de83e911
+EBUILD root-6.04.06.ebuild 14857 SHA256 25903883ddb4aef88e3a8499abc9711a3994fdfbb5c150ace92b84de96ecb579 SHA512 b8c3e9b0bc2c211dffbc8e2f4207108b989ecf7833a5e14bac58eb2def2a260b7a802519521170d9f1cdf9bd31b32715a9209bcaa7977517e98cceabb1893e07 WHIRLPOOL 99baf33ac794eaff65b313ff63b022c973f6fdd0e3acdf73c59321bee19948e4c1bae247a55c80bac774ff45c3e598e541b6ac82fa69f4b184dbe52560b052ff
+MISC ChangeLog 8774 SHA256 fa96c1b135a69b4147ae977c6f04b3bee6fff2ceeca4e2327c9b524adb1d751b SHA512 e39d99d570b4080480be71135e2937de55c5a7c1ef8c7ede9ff1732f1ef329a47996ee0a9c903d044c94b47be67eb8fe71b8f69fc498f680f854157a14294e90 WHIRLPOOL 2faf7612525be191396e544ea6a04b59893f41a72824e2fe89ba9695e0534063c7011764e7993b4c13b5b3be8eb4419b7df42be37eee643ef353550128460331
+MISC ChangeLog-2015 43756 SHA256 ade6aab53e66a09766da814e190f3a1bd8b3ecb1ce57e65cfab811aef875238b SHA512 7c471f9b608235922af44e3fa507a8c019abc6fef5333539879004436fd116ade2a03d1cfa7139e710eac6207715ccd3c5d91aa77077ca16fc68fd6e041b94a5 WHIRLPOOL 673a18c84ac41cc37bd00ab7c49090a0e6fb1b4da110cbb4cfa2223fdf4c0baed310b1da3d58ea30a7cf10f17b335d7d66c9b0063300d97b83285e3e80110a66
+MISC metadata.xml 2101 SHA256 a73eaba47fdedc5a86e71cffc876f97c3df640b3ca1ace50462c314b49e5f4ef SHA512 3bfcc2dfc023fdf2da96b4433f19b66e2858bcb112e76817d7b8a66ce27315a94b4b5bf94340703d402390a4c603d801fe11bdda497daaeb16642f0b03a26615 WHIRLPOOL 63e17ce295a24d4b21da582a3510511535d97f1bed7ea80c64a9432a81a312243506c46fe561672406c0cf15b35cc82fc2d8849ca4b1be934adf50be83fc2faf
diff --git a/sci-physics/root/files/proofd.confd b/sci-physics/root/files/proofd.confd
new file mode 100644
index 000000000000..81720a7eb335
--- /dev/null
+++ b/sci-physics/root/files/proofd.confd
@@ -0,0 +1,12 @@
+# conf.d file for proof daemon
+#
+# Please refer to the proofd(1) man(1) page for more information on
+# command line parameters.
+#
+PROOFD_OPTS=
+
+# Specify your base of your PROOF directory here. If left blank, it
+# will use the system default (e.g., /usr/share/root/proof).
+# Note, however, that ROOT recommends that this directory is shared (via
+# NFS or similar) among all the nodes of the cluster.
+PROOF_DIR=
diff --git a/sci-physics/root/files/proofd.initd b/sci-physics/root/files/proofd.initd
new file mode 100644
index 000000000000..ee865133cb25
--- /dev/null
+++ b/sci-physics/root/files/proofd.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need root-file-server
+ use logger
+}
+
+start() {
+ ebegin "Starting parallel ROOT facility server"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/proofd.pid \
+ --exec /usr/bin/proofd -- ${PROOFD_OPTS} ${PROOF_DIR}
+ pidof /usr/bin/proofd > /var/run/proofd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping parallel ROOT facility server"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/proofd.pid \
+ --exec /usr/bin/proofd
+ eend $?
+}
diff --git a/sci-physics/root/files/root-5.28.00b-glibc212.patch b/sci-physics/root/files/root-5.28.00b-glibc212.patch
new file mode 100644
index 000000000000..a365431396f5
--- /dev/null
+++ b/sci-physics/root/files/root-5.28.00b-glibc212.patch
@@ -0,0 +1,11 @@
+--- root.orig/net/auth/src/TAFS.cxx 2010-09-14 03:22:22.647915854 +0400
++++ root/net/auth/src/TAFS.cxx 2010-09-14 03:22:39.034599899 +0400
+@@ -11,6 +11,7 @@
+
+ #ifndef WIN32
+ # include <unistd.h>
++# include <sys/stat.h>
+ #else
+ # define ssize_t int
+ # include <io.h>
+
diff --git a/sci-physics/root/files/root-5.32.00-afs.patch b/sci-physics/root/files/root-5.32.00-afs.patch
new file mode 100644
index 000000000000..2bf31798e6e0
--- /dev/null
+++ b/sci-physics/root/files/root-5.32.00-afs.patch
@@ -0,0 +1,33 @@
+--- root/net/auth/src/TAFS.cxx.orig 2011-12-04 00:56:29.405007770 +0400
++++ root/net/auth/src/TAFS.cxx 2011-12-04 00:56:35.534709259 +0400
+@@ -138,7 +138,7 @@
+ } else {
+ if (isatty(0) != 0 && isatty(1) != 0) {
+ Gl_config("noecho", 1);
+- pw = Getline((char *) prompt.Data());
++ pw = const_cast<char *>( Getline((char *) prompt.Data()) );
+ Gl_config("noecho", 0);
+ } else {
+ Warning("TAFS", "not tty: cannot prompt for passwd: failure");
+--- root/core/clib/src/strlcat.c.orig 2011-12-04 01:49:26.495179487 +0400
++++ root/core/clib/src/strlcat.c 2011-12-04 01:50:41.407524763 +0400
+@@ -38,7 +38,7 @@
+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
+ * If retval >= siz, truncation occurred.
+ */
+-size_t
++size_t __attribute__((weak))
+ strlcat(char *dst, const char *src, size_t siz)
+ {
+ register char *d = dst;
+--- root/core/clib/src/strlcpy.c.orig 2011-12-04 01:49:34.329797251 +0400
++++ root/core/clib/src/strlcpy.c 2011-12-04 01:50:49.051151843 +0400
+@@ -36,7 +36,7 @@
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+-size_t
++size_t __attribute__((weak))
+ strlcpy(char *dst, const char *src, size_t siz)
+ {
+ register char *d = dst;
diff --git a/sci-physics/root/files/root-5.32.00-cfitsio.patch b/sci-physics/root/files/root-5.32.00-cfitsio.patch
new file mode 100644
index 000000000000..853c3f39f207
--- /dev/null
+++ b/sci-physics/root/files/root-5.32.00-cfitsio.patch
@@ -0,0 +1,13 @@
+--- configure.orig 2012-01-19 23:44:44.127607638 +0100
++++ configure 2012-01-20 00:19:20.420652913 +0100
+@@ -3435,9 +3435,7 @@
+ cfitsioinc=$found_hdr
+ cfitsioincdir=$found_dir
+
+- # At this time, libcfitsio.a should always be prefered over .so,
+- # to avoid forcing users to install cfitsio.
+- check_library "libcfitsio cfitsio" "no" "$cfitsiolibdir" \
++ check_library "libcfitsio cfitsio" "yes" "$cfitsiolibdir" \
+ $CFITSIO ${CFITSIO:+$CFITSIO/lib} ${CFITSIO:+$CFITSIO/.libs} \
+ ${finkdir:+$finkdir/lib} \
+ /usr/local/lib /usr/lib /opt/cfitsio/lib
diff --git a/sci-physics/root/files/root-5.32.00-chklib64.patch b/sci-physics/root/files/root-5.32.00-chklib64.patch
new file mode 100644
index 000000000000..979220f02f35
--- /dev/null
+++ b/sci-physics/root/files/root-5.32.00-chklib64.patch
@@ -0,0 +1,24 @@
+bug fix for #406817
+--- configure.orig 2012-02-29 19:46:41.000000000 +0400
++++ configure 2012-03-22 03:28:43.458968696 +0400
+@@ -441,14 +441,13 @@
+ fi
+ else
+ if file $filearg $chklib64 | grep 'ASCII' > /dev/null 2>& 1 ; then
+- check_link $chklib64
+- ret=$link_result
+- else
+- logmsg " file $filearg $chklib64 | grep '64-bit'"
+- if file $filearg $chklib64 | grep '64-bit' > /dev/null 2>& 1 ; then
+- ret=1
+- fi
++ # get real binary .so name from .so ld script
++ chklib64=$(gawk '($1 == "GROUP") { print $3 }' $chklib64)
+ fi
++ logmsg " file $filearg $chklib64 | grep '64-bit'"
++ if file $filearg $chklib64 | grep '64-bit' > /dev/null 2>& 1 ; then
++ ret=1
++ fi
+ fi
+ logmsg " result: $ret"
+ if test $ret -eq 1 ; then
diff --git a/sci-physics/root/files/root-5.32.00-dotfont.patch b/sci-physics/root/files/root-5.32.00-dotfont.patch
new file mode 100644
index 000000000000..85d6dea7655e
--- /dev/null
+++ b/sci-physics/root/files/root-5.32.00-dotfont.patch
@@ -0,0 +1,58 @@
+--- root/html/src/TClassDocOutput.cxx.orig 2012-05-25 16:18:10.000000000 +0400
++++ root/html/src/TClassDocOutput.cxx 2012-05-29 21:36:53.813593012 +0400
+@@ -625,7 +625,7 @@
+ << "size=\"8,10\";" << endl
+ << "ratio=auto;" << endl
+ << "margin=0;" << endl
+- << "node [shape=plaintext,fontsize=40,width=4,height=0.75];" << endl
++ << "node [shape=plaintext,fontsize=40,width=4,height=0.75,fontname=\"DejaVu Serif\"];" << endl
+ << "\"" << fCurrentClass->GetName() << "\" [shape=ellipse];" << endl;
+
+ std::stringstream ssDep;
+@@ -704,7 +704,7 @@
+ outdot << ";" << endl;
+ } else if (writeAndMoreFor) {
+ outdot << " \"...andmore" << writeAndMoreFor->GetName()
+- << "\" [label=\"...and more\",fontname=\"Times-Italic\",fillcolor=lightgrey,style=filled];" << endl;
++ << "\" [label=\"...and more\",fontname=\"DejaVu Serif Italic\",fillcolor=lightgrey,style=filled];" << endl;
+ }
+ }
+ if (!levelExists) break;
+@@ -733,7 +733,7 @@
+ << "ranksep=0.1;" << endl
+ << "nodesep=0;" << endl
+ << "margin=0;" << endl;
+- outdot << " node [style=filled,width=0.7,height=0.15,fixedsize=true,shape=plaintext,fontsize=10];" << endl;
++ outdot << " node [style=filled,width=0.7,height=0.15,fixedsize=true,shape=plaintext,fontsize=10,fontname=\"DejaVu Serif\"];" << endl;
+
+ std::stringstream ssDep;
+ const int numColumns = 3;
+@@ -939,7 +939,7 @@
+ << "ranksep=0;" << endl
+ << "nodesep=0;" << endl
+ << "size=\"8,10\";" << endl
+- << "node [fontsize=20,shape=plaintext];" << endl;
++ << "node [fontsize=20,shape=plaintext,fontname=\"DejaVu Serif\"];" << endl;
+
+ for (std::list<std::string>::iterator iFile = listFilesToParse.begin();
+ iFile != listFilesToParse.end(); ++iFile) {
+@@ -999,7 +999,8 @@
+ << "ranksep=0.7;" << endl
+ << "nodesep=0.3;" << endl
+ << "size=\"8,8\";" << endl
+- << "ratio=compress;" << endl;
++ << "ratio=compress;" << endl
++ << "node [fontname=\"DejaVu Serif\"];" << endl;
+
+ TString libs(fCurrentClass->GetSharedLibs());
+ outdot << "\"All Libraries\" [URL=\"LibraryDependencies.html\",shape=box,rank=max,fillcolor=lightgray,style=filled];" << endl;
+@@ -1109,7 +1110,8 @@
+
+ dotout << "digraph G {" << endl
+ << "ratio=auto;" << endl
+- << "rankdir=RL;" << endl;
++ << "rankdir=RL;" << endl
++ << "node [fontname=\"DejaVu Serif\"];" << endl;
+
+ // loop on all classes
+ TClassDocInfo* cdi = 0;
diff --git a/sci-physics/root/files/root-5.34.05-nobyte-compile.patch b/sci-physics/root/files/root-5.34.05-nobyte-compile.patch
new file mode 100644
index 000000000000..ec67a15887f6
--- /dev/null
+++ b/sci-physics/root/files/root-5.34.05-nobyte-compile.patch
@@ -0,0 +1,137 @@
+diff -Naur root.as-needed/Makefile root/Makefile
+--- a/Makefile.orig 2013-02-15 02:27:56.000000000 +0400
++++ b/Makefile 2013-02-23 02:22:14.556465852 +0400
+@@ -1258,10 +1258,7 @@
+ for lib in $(RFLX_GRFLXPY); do \
+ rm -f $(DESTDIR)$(LIBDIR)/$${lib#lib/}; \
+ done; \
+- for lib in $(RFLX_GRFLXPYC); do \
+- rm -f $(DESTDIR)$(LIBDIR)/$${lib#lib/}; \
+- done; \
+- if test "x$(RFLX_GRFLXPY)$(RFLX_GRFLXPYC)" != "x"; then \
++ if test "x$(RFLX_GRFLXPY)" != "x"; then \
+ dir=$(subst lib/,,$(RFLX_GRFLXDD)); \
+ while test "x$${dir}" != "x" && \
+ test -d $(DESTDIR)$(LIBDIR)/$${dir} && \
+diff -Naur root.as-needed/bindings/pyroot/Module.mk root/bindings/pyroot/Module.mk
+--- root.as-needed/bindings/pyroot/Module.mk 2011-07-10 10:42:48.991561304 +0400
++++ root/bindings/pyroot/Module.mk 2011-07-10 10:43:21.493339703 +0400
+@@ -48,8 +48,6 @@
+ ROOTPY := $(subst $(MODDIR),$(LPATH),$(ROOTPYS))
+ $(LPATH)/%.py: $(MODDIR)/%.py; cp $< $@
+ endif
+-ROOTPYC := $(ROOTPY:.py=.pyc)
+-ROOTPYO := $(ROOTPY:.py=.pyo)
+
+ # used in the main Makefile
+ ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(PYROOTH))
+@@ -68,10 +66,8 @@
+ include/%.h: $(PYROOTDIRI)/%.h
+ cp $< $@
+
+-%.pyc: %.py; python -c 'import py_compile; py_compile.compile( "$<" )'
+-%.pyo: %.py; python -O -c 'import py_compile; py_compile.compile( "$<" )'
+
+-$(PYROOTLIB): $(PYROOTO) $(PYROOTDO) $(ROOTPY) $(ROOTPYC) $(ROOTPYO) \
++$(PYROOTLIB): $(PYROOTO) $(PYROOTDO) $(ROOTPY) \
+ $(ROOTLIBSDEP) $(PYTHONLIBDEP)
+ @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
+ "$(SOFLAGS)" libPyROOT.$(SOEXT) $@ \
+@@ -113,7 +109,7 @@
+
+ distclean-$(MODNAME): clean-$(MODNAME)
+ @rm -f $(PYROOTDEP) $(PYROOTDS) $(PYROOTDH) $(PYROOTLIB) \
+- $(ROOTPY) $(ROOTPYC) $(ROOTPYO) $(PYROOTMAP) \
++ $(ROOTPY) $(PYROOTMAP) \
+ $(PYROOTPYD) $(PYTHON64DEP) $(PYTHON64)
+
+ distclean:: distclean-$(MODNAME)
+diff -Naur root.as-needed/build/package/debian/rules root/build/package/debian/rules
+--- root.as-needed/build/package/debian/rules 2011-07-10 10:42:49.241549346 +0400
++++ root/build/package/debian/rules 2011-07-10 10:48:06.989670589 +0400
+@@ -691,10 +691,6 @@
+ -X$(SYSCONFDIR)/root/system.rootauthrc \
+ -X$(SYSCONFDIR)/root/system.rootdaemonrc \
+ -X$(PREFIX)/lib/root/$(SOVERS)/libAfterImage.a \
+- -X$(PREFIX)/lib/root/$(SOVERS)/PyCintex.pyc \
+- -X$(PREFIX)/lib/root/$(SOVERS)/PyCintex.pyo \
+- -X$(PREFIX)/lib/root/$(SOVERS)/ROOT.pyc \
+- -X$(PREFIX)/lib/root/$(SOVERS)/ROOT.pyo \
+ -X$(PREFIX)/lib/root/$(SOVERS)/cint7 \
+ -X$(PREFIX)/include/root/Minuit2
+ # $(foreach i, \
+diff -Naur root.as-needed/cint/cintex/Module.mk root/cint/cintex/Module.mk
+--- root.as-needed/cint/cintex/Module.mk 2011-07-10 10:42:49.104889217 +0400
++++ root/cint/cintex/Module.mk 2011-07-10 10:43:21.496672876 +0400
+@@ -31,10 +31,6 @@
+ CINTEXPY := $(subst $(MODDIR)/python,$(LPATH),$(CINTEXPYS))
+ $(LPATH)/%.py: $(MODDIR)/python/%.py; cp $< $@
+ endif
+-ifneq ($(BUILDPYTHON),no)
+-CINTEXPYC := $(CINTEXPY:.py=.pyc)
+-CINTEXPYO := $(CINTEXPY:.py=.pyo)
+-endif
+
+ # used in the main Makefile
+ ALLHDRS += $(patsubst $(MODDIRI)/Cintex/%.h,include/Cintex/%.h,$(CINTEXH))
+@@ -86,8 +82,6 @@
+ fi)
+ cp $< $@
+
+-%.pyc: %.py; python -c 'import py_compile; py_compile.compile( "$<" )'
+-%.pyo: %.py; python -O -c 'import py_compile; py_compile.compile( "$<" )'
+
+ $(CINTEXLIB): $(CINTEXO) $(CINTEXPY) $(CINTEXPYC) $(CINTEXPYO) \
+ $(ORDER_) $(subst $(CINTEXLIB),,$(MAINLIBS)) $(CINTEXLIBDEP)
+diff -Naur root.as-needed/cint/reflex/Module.mk root/cint/reflex/Module.mk
+--- root.as-needed/cint/reflex/Module.mk 2011-07-10 10:42:49.074890651 +0400
++++ root/cint/reflex/Module.mk 2011-07-10 10:43:21.496672876 +0400
+@@ -48,9 +48,6 @@
+ RFLX_GRFLXS := $(wildcard $(RFLX_GRFLXSD)/*.py)
+ RFLX_GRFLXPY := $(patsubst $(RFLX_GRFLXSD)/%.py,$(RFLX_GRFLXDD)/%.py,$(RFLX_GRFLXS))
+ RFLX_GRFLXPY += $(RFLX_GCCXMLPATHPY)
+-ifneq ($(BUILDPYTHON),no)
+-RFLX_GRFLXPYC := $(subst .py,.pyc,$(RFLX_GRFLXPY))
+-endif
+
+ RFLX_LIBDIR = $(LIBDIR)
+
+@@ -92,7 +89,7 @@
+
+ ALLEXECS += $(RFLX_GENMAPX)
+
+-POSTBIN += $(RFLX_GRFLXPYC) $(RFLX_GRFLXPY)
++POSTBIN += $(RFLX_GRFLXPY)
+
+ ##### local rules #####
+ .PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME) \
+@@ -122,8 +119,6 @@
+ mkdir -p lib/python/genreflex; fi )
+ cp $< $@
+
+-$(RFLX_GRFLXDD)/%.pyc: $(RFLX_GRFLXDD)/%.py
+- @python -c 'import py_compile; py_compile.compile( "$<" )'
+
+ $(RFLX_GENMAPO) : CXXFLAGS += -I$(REFLEXDIRS)/genmap
+
+@@ -149,7 +144,7 @@
+ $(RLIBMAP) -o $@ -l $(REFLEXDICTLIB) \
+ -d $(REFLEXDICTLIBDEPM) -c $(REFLEXL)
+
+-all-$(MODNAME): $(REFLEXLIB) $(REFLEXDICTLIB) $(REFLEXDICTMAP) $(RFLX_GRFLXPYC) $(RFLX_GRFLXPY)
++all-$(MODNAME): $(REFLEXLIB) $(REFLEXDICTLIB) $(REFLEXDICTMAP) $(RFLX_GRFLXPY)
+
+ clean-genreflex:
+ @rm -rf lib/python/genreflex
+diff -Naur root.as-needed/cint/reflex/python/CMakeLists.txt root/cint/reflex/python/CMakeLists.txt
+--- root.as-needed/cint/reflex/python/CMakeLists.txt 2011-07-10 10:42:49.074890651 +0400
++++ root/cint/reflex/python/CMakeLists.txt 2011-07-10 10:43:21.496672876 +0400
+@@ -15,7 +15,7 @@
+ ##################### sources ####################
+
+ FILE(GLOB_RECURSE GENREFLEX_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} genreflex/*.py)
+-SET(GENREFLEX_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/genreflex/genreflex.pyc PARENT_SCOPE)
++SET(GENREFLEX_SCRIPT PARENT_SCOPE)
+
+ ##################### gccxmlpath ####################
+
diff --git a/sci-physics/root/files/root-5.34.13-unuran.patch b/sci-physics/root/files/root-5.34.13-unuran.patch
new file mode 100644
index 000000000000..8262313184b5
--- /dev/null
+++ b/sci-physics/root/files/root-5.34.13-unuran.patch
@@ -0,0 +1,40 @@
+diff --git a/math/unuran/Module.mk b/math/unuran/Module.mk
+index 00a530b..7cd22dc 100644
+--- a/math/unuran/Module.mk
++++ b/math/unuran/Module.mk
+@@ -31,7 +31,7 @@ UNRS := $(wildcard $(UNRDIRS)/src/utils/*.c) \
+ $(wildcard $(UNRDIRS)/src/uniform/*.c) \
+ $(wildcard $(UNRDIRS)/src/urng/*.c)
+ else
+-UNRTARCONTENT:=$(subst $(UNRVERS),$(UNRDIRS),$(shell mkdir -p $(UNRDIR); cd $(UNRDIR); gunzip -c $(UNRSRCS) | tar tf -))
++UNRTARCONTENT:=
+ UNRS := $(filter %.c, \
+ $(filter $(UNRDIRS)/src/utils/%,$(UNRTARCONTENT)) \
+ $(filter $(UNRDIRS)/src/methods/%,$(UNRTARCONTENT)) \
+@@ -81,10 +81,9 @@ INCLUDEFILES += $(UNURANDEP)
+ ##### local rules #####
+ .PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
+
+-include/%.h: $(UNURANDIRI)/%.h $(UNURANETAG)
++include/%.h: $(UNURANDIRI)/%.h
+ cp $< $@
+
+-$(UNURANDEP): $(UNRCFG)
+ $(UNRS): $(UNURANETAG)
+
+ $(UNURANETAG): $(UNRSRCS)
+@@ -137,12 +136,12 @@ $(UNRCFG): $(UNURANETAG)
+ GNUMAKE=$(MAKE) ./configure CC="$$ACC" \
+ CFLAGS="$$ACFLAGS");
+
+-$(UNURANLIB): $(UNRCFG) $(UNRO) $(UNURANO) $(UNURANDO) $(ORDER_) \
++$(UNURANLIB): $(UNURANO) $(UNURANDO) $(ORDER_) \
+ $(MAINLIBS) $(UNURANLIBDEP)
+ @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
+ "$(SOFLAGS)" libUnuran.$(SOEXT) $@ \
+ "$(UNURANO) $(UNURANDO)" \
+- "$(UNURANLIBEXTRA) $(UNRO)"
++ "$(UNURANLIBEXTRA) -lunuran"
+
+ $(UNURANDS): $(UNRINIT) $(UNURANDH1) $(UNURANL) $(ROOTCINTTMPDEP)
+ $(MAKEDIR)
diff --git a/sci-physics/root/files/root-5.34.26-ldflags.patch b/sci-physics/root/files/root-5.34.26-ldflags.patch
new file mode 100644
index 000000000000..b81dbb5edb00
--- /dev/null
+++ b/sci-physics/root/files/root-5.34.26-ldflags.patch
@@ -0,0 +1,19 @@
+commit 3c8bc686abf57e7e2037c4c191cb63a1a5172b5b
+Author: Andrew Savchenko <bircoph@gmail.com>
+Date: Sun Feb 22 03:45:21 2015 +0300
+
+ root-5.32.00-prop-flags.patch -> root-5.34.26-prop-flags.patch
+
+diff --git a/config/Makefile.in b/config/Makefile.in
+index 89674e7..91d25b9 100644
+--- a/config/Makefile.in
++++ b/config/Makefile.in
+@@ -29,7 +29,7 @@ EXTRA_CFLAGS := -Iinclude @cflags@
+ USERCONF_CFLAGS:= @usercflags@
+ EXTRA_CXXFLAGS := -Iinclude @cflags@
+ USERCONF_CXXFLAGS:= @usercxxflags@
+-EXTRA_LDFLAGS := @ldflags@
++EXTRA_LDFLAGS := @ldflags@ $(LDFLAGS)
+ WERROR := @werror@
+ WINRTDEBUG := @winrtdebug@
+
diff --git a/sci-physics/root/files/root-6.00.01-dotfont.patch b/sci-physics/root/files/root-6.00.01-dotfont.patch
new file mode 100644
index 000000000000..6c765f75a505
--- /dev/null
+++ b/sci-physics/root/files/root-6.00.01-dotfont.patch
@@ -0,0 +1,58 @@
+--- root/html/src/TClassDocOutput.cxx.orig 2012-06-08 02:13:51.000000000 +0400
++++ root/html/src/TClassDocOutput.cxx 2012-06-08 02:34:45.705436577 +0400
+@@ -625,7 +625,7 @@
+ << "size=\"8,10\";" << std::endl
+ << "ratio=auto;" << std::endl
+ << "margin=0;" << std::endl
+- << "node [shape=plaintext,fontsize=40,width=4,height=0.75];" << std::endl
++ << "node [shape=plaintext,fontsize=40,width=4,height=0.75,fontname=\"DejaVu Serif\"];" << std::endl
+ << "\"" << fCurrentClass->GetName() << "\" [shape=ellipse];" << std::endl;
+
+ std::stringstream ssDep;
+@@ -704,7 +704,7 @@
+ outdot << ";" << std::endl;
+ } else if (writeAndMoreFor) {
+ outdot << " \"...andmore" << writeAndMoreFor->GetName()
+- << "\" [label=\"...and more\",fontname=\"Times-Italic\",fillcolor=lightgrey,style=filled];" << std::endl;
++ << "\" [label=\"...and more\",fontname=\"DejaVu Serif Italic\",fillcolor=lightgrey,style=filled];" << std::endl;
+ }
+ }
+ if (!levelExists) break;
+@@ -733,7 +733,7 @@
+ << "ranksep=0.1;" << std::endl
+ << "nodesep=0;" << std::endl
+ << "margin=0;" << std::endl;
+- outdot << " node [style=filled,width=0.7,height=0.15,fixedsize=true,shape=plaintext,fontsize=10];" << std::endl;
++ outdot << " node [style=filled,width=0.7,height=0.15,fixedsize=true,shape=plaintext,fontsize=10,fontname=\"DejaVu Serif\"];" << std::endl;
+
+ std::stringstream ssDep;
+ const int numColumns = 3;
+@@ -939,7 +939,7 @@
+ << "ranksep=0;" << std::endl
+ << "nodesep=0;" << std::endl
+ << "size=\"8,10\";" << std::endl
+- << "node [fontsize=20,shape=plaintext];" << std::endl;
++ << "node [fontsize=20,shape=plaintext,fontname=\"DejaVu Serif\"];" << std::endl;
+
+ for (std::list<std::string>::iterator iFile = listFilesToParse.begin();
+ iFile != listFilesToParse.end(); ++iFile) {
+@@ -999,7 +999,8 @@
+ << "ranksep=0.7;" << std::endl
+ << "nodesep=0.3;" << std::endl
+ << "size=\"8,8\";" << std::endl
+- << "ratio=compress;" << std::endl;
++ << "ratio=compress;" << std::endl
++ << "node [fontname=\"DejaVu Serif\"];" << std::endl;
+
+ TString libs(fCurrentClass->GetSharedLibs());
+ outdot << "\"All Libraries\" [URL=\"LibraryDependencies.html\",shape=box,rank=max,fillcolor=lightgray,style=filled];" << std::endl;
+@@ -1109,7 +1110,8 @@
+
+ dotout << "digraph G {" << std::endl
+ << "ratio=auto;" << std::endl
+- << "rankdir=RL;" << std::endl;
++ << "rankdir=RL;" << std::endl
++ << "node [fontname=\"DejaVu Serif\"];" << std::endl;
+
+ // loop on all classes
+ TClassDocInfo* cdi = 0;
diff --git a/sci-physics/root/files/root-6.00.01-llvm.patch b/sci-physics/root/files/root-6.00.01-llvm.patch
new file mode 100644
index 000000000000..c6abb353ee64
--- /dev/null
+++ b/sci-physics/root/files/root-6.00.01-llvm.patch
@@ -0,0 +1,13 @@
+diff --git a/interpreter/llvm/src/Makefile.config.in b/interpreter/llvm/src/Makefile.config.in
+index 7633be2..c8756b1 100644
+--- a/interpreter/llvm/src/Makefile.config.in
++++ b/interpreter/llvm/src/Makefile.config.in
+@@ -170,6 +170,8 @@ CXXFLAGS += @CXXFLAGS@
+
+ # Linker flags.
+ LDFLAGS += @LDFLAGS@
++NOUNDEF := -Wl,--no-undefined
++LDFLAGS := $(filter-out $(NOUNDEF),$(LDFLAGS))
+
+ # Path to the library archiver program.
+ AR_PATH = @AR@
diff --git a/sci-physics/root/files/root-6.00.01-nobyte-compile.patch b/sci-physics/root/files/root-6.00.01-nobyte-compile.patch
new file mode 100644
index 000000000000..aa58f20686dc
--- /dev/null
+++ b/sci-physics/root/files/root-6.00.01-nobyte-compile.patch
@@ -0,0 +1,33 @@
+diff -Naur root.as-needed/bindings/pyroot/Module.mk root/bindings/pyroot/Module.mk
+--- root.as-needed/bindings/pyroot/Module.mk 2011-07-10 10:42:48.991561304 +0400
++++ root/bindings/pyroot/Module.mk 2011-07-10 10:43:21.493339703 +0400
+@@ -48,8 +48,6 @@
+ ROOTPY := $(subst $(MODDIR),$(LPATH),$(ROOTPYS))
+ $(LPATH)/%.py: $(MODDIR)/%.py; cp $< $@
+ endif
+-ROOTPYC := $(ROOTPY:.py=.pyc)
+-ROOTPYO := $(ROOTPY:.py=.pyo)
+
+ # used in the main Makefile
+ ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(PYROOTH))
+@@ -68,10 +66,8 @@
+ include/%.h: $(PYROOTDIRI)/%.h
+ cp $< $@
+
+-%.pyc: %.py; python -c 'import py_compile; py_compile.compile( "$<" )'
+-%.pyo: %.py; python -O -c 'import py_compile; py_compile.compile( "$<" )'
+
+-$(PYROOTLIB): $(PYROOTO) $(PYROOTDO) $(ROOTPY) $(ROOTPYC) $(ROOTPYO) \
++$(PYROOTLIB): $(PYROOTO) $(PYROOTDO) $(ROOTPY) \
+ $(ROOTLIBSDEP) $(PYTHONLIBDEP)
+ @$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
+ "$(SOFLAGS)" libPyROOT.$(SOEXT) $@ \
+@@ -113,7 +109,7 @@
+
+ distclean-$(MODNAME): clean-$(MODNAME)
+ @rm -f $(PYROOTDEP) $(PYROOTDS) $(PYROOTDH) $(PYROOTLIB) \
+- $(ROOTPY) $(ROOTPYC) $(ROOTPYO) $(PYROOTMAP) \
++ $(ROOTPY) $(PYROOTMAP) \
+ $(PYROOTPYD) $(PYTHON64DEP) $(PYTHON64)
+
+ distclean:: distclean-$(MODNAME)
diff --git a/sci-physics/root/files/root-6.02.05-xrootd4.patch b/sci-physics/root/files/root-6.02.05-xrootd4.patch
new file mode 100644
index 000000000000..0b4a4bef0f2e
--- /dev/null
+++ b/sci-physics/root/files/root-6.02.05-xrootd4.patch
@@ -0,0 +1,11 @@
+https://sft.its.cern.ch/jira/browse/ROOT-6998
+--- root-6.02.05/net/netxng/src/TNetXNGFile.cxx.orig 2015-02-09 11:59:47.000000000 +0300
++++ root-6.02.05/net/netxng/src/TNetXNGFile.cxx 2015-04-05 11:32:31.893127758 +0300
+@@ -28,6 +28,7 @@
+ #include <XrdCl/XrdClFile.hh>
+ #include <XrdCl/XrdClXRootDResponses.hh>
+ #include <XrdCl/XrdClDefaultEnv.hh>
++#include <XrdVersion.hh>
+ #include <iostream>
+
+ //------------------------------------------------------------------------------
diff --git a/sci-physics/root/files/root-6.04.06-gsl2.patch b/sci-physics/root/files/root-6.04.06-gsl2.patch
new file mode 100644
index 000000000000..5d9fb102b73c
--- /dev/null
+++ b/sci-physics/root/files/root-6.04.06-gsl2.patch
@@ -0,0 +1,58 @@
+commit ee9964210c56e7c1868618a4434c5340fef38fe4
+Author: Pere Mato <pere.mato@cern.ch>
+Date: Tue Dec 15 11:58:24 2015 +0100
+
+ Fix for ROOT-7776 - Integrate GSL 2.0 in ROOT. Changed the version used when option builtin_gsl=ON to 2.1 (latest production).
+
+diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake
+index 6f04dad..309a8de 100644
+--- a/cmake/modules/SearchInstalledSoftware.cmake
++++ b/cmake/modules/SearchInstalledSoftware.cmake
+@@ -332,7 +332,7 @@ if(mathmore OR builtin_gsl)
+ endif()
+ endif()
+ else()
+- set(gsl_version 1.15)
++ set(gsl_version 2.1)
+ message(STATUS "Downloading and building GSL version ${gsl_version}")
+ ExternalProject_Add(
+ GSL
+diff --git a/math/mathmore/src/GSLMultiFit.h b/math/mathmore/src/GSLMultiFit.h
+index 1d86da5..5b5a887 100644
+--- a/math/mathmore/src/GSLMultiFit.h
++++ b/math/mathmore/src/GSLMultiFit.h
+@@ -31,6 +31,7 @@
+ #include "gsl/gsl_matrix.h"
+ #include "gsl/gsl_multifit_nlin.h"
+ #include "gsl/gsl_blas.h"
++#include "gsl/gsl_version.h"
+ #include "GSLMultiFitFunctionWrapper.h"
+
+ #include "Math/IFunction.h"
+@@ -143,7 +144,11 @@ public:
+ /// gradient value at the minimum
+ const double * Gradient() const {
+ if (fSolver == 0) return 0;
++#if GSL_MAJOR_VERSION > 1
++ fType->gradient(fSolver->state, fVec);
++#else
+ gsl_multifit_gradient(fSolver->J, fSolver->f,fVec);
++#endif
+ return fVec->data;
+ }
+
+@@ -154,7 +159,14 @@ public:
+ unsigned int npar = fSolver->fdf->p;
+ fCov = gsl_matrix_alloc( npar, npar );
+ static double kEpsrel = 0.0001;
++#if GSL_MAJOR_VERSION > 1
++ gsl_matrix* J = gsl_matrix_alloc(npar,npar);
++ gsl_multifit_fdfsolver_jac (fSolver, J);
++ int ret = gsl_multifit_covar(J, kEpsrel, fCov);
++ gsl_matrix_free(J);
++#else
+ int ret = gsl_multifit_covar(fSolver->J, kEpsrel, fCov);
++#endif
+ if (ret != GSL_SUCCESS) return 0;
+ return fCov->data;
+ }
diff --git a/sci-physics/root/files/root-6.04.06-prop-flags.patch b/sci-physics/root/files/root-6.04.06-prop-flags.patch
new file mode 100644
index 000000000000..90db15e21f6d
--- /dev/null
+++ b/sci-physics/root/files/root-6.04.06-prop-flags.patch
@@ -0,0 +1,22 @@
+ config/Makefile.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/config/Makefile.in b/config/Makefile.in
+index 9243c90..a23a4d2 100644
+--- a/config/Makefile.in
++++ b/config/Makefile.in
+@@ -64,11 +64,11 @@ HOST := @host@
+ USECONFIG := @useconfig@
+ MKLIBOPTIONS := @mkliboption@
+
+-EXTRA_CFLAGS := -Iinclude @cflags@
++EXTRA_CFLAGS := -Iinclude @cflags@ $(CFLAGS)
+ USERCONF_CFLAGS:= @usercflags@
+-EXTRA_CXXFLAGS := -Iinclude @cflags@
++EXTRA_CXXFLAGS := -Iinclude @cflags@ $(CXXFLAGS)
+ USERCONF_CXXFLAGS:= @usercxxflags@
+-EXTRA_LDFLAGS := @ldflags@
++EXTRA_LDFLAGS := @ldflags@ $(LDFLAGS)
+ WERROR := @werror@
+ WINRTDEBUG := @winrtdebug@
+ CTORSINITARRAY := @ctorsinitarray@
diff --git a/sci-physics/root/files/rootd.confd b/sci-physics/root/files/rootd.confd
new file mode 100644
index 000000000000..7516b8c9b6dd
--- /dev/null
+++ b/sci-physics/root/files/rootd.confd
@@ -0,0 +1,8 @@
+# conf.d file for root daemon
+
+# User to run as (default is `rootd')
+ROOTD_USER="rootd"
+
+# Please refer to the rootd(1) man(1) page for more information on
+# command line parameters.
+ROOTD_OPTS=""
diff --git a/sci-physics/root/files/rootd.initd b/sci-physics/root/files/rootd.initd
new file mode 100644
index 000000000000..f808259c3670
--- /dev/null
+++ b/sci-physics/root/files/rootd.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use logger
+ provide root-file-server
+}
+
+start() {
+ ebegin "Starting ROOT file server"
+ pid=$(start-stop-daemon --start --quiet --user ${ROOTD_USER} \
+ --pidfile /var/run/rootd.pid \
+ --exec /usr/bin/rootd -- ${ROOTD_OPTS})
+ retval=$?
+ echo ${ROOTD_PID} > /var/run/rootd.pid
+ eend ${retval}
+}
+
+stop() {
+ ebegin "Stopping ROOT file server"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/rootd.pid \
+ --exec /usr/bin/rootd
+ eend $?
+}
diff --git a/sci-physics/root/metadata.xml b/sci-physics/root/metadata.xml
new file mode 100644
index 000000000000..fc9965963e8c
--- /dev/null
+++ b/sci-physics/root/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ ROOT Object Oriented Technologies is an object oriented data
+ analysis framework written in C++ by the CERN. Widely used in
+ high energy physics, but also in other data analysis applications. It
+ contains the CINT C/C++ interpreter and many classes such as
+ statistics, serialization, optimization, linear algebra, graphics,
+ GUI toolkit, and a complete visualization framework.
+</longdescription>
+ <use>
+ <flag name="c++11"> Build ROOT using the C++11 standard</flag>
+ <flag name="c++14"> Build ROOT using the C++14 standard</flag>
+ <flag name="fits">Support for images and data from FITS files with <pkg>sci-libs/cfitsio</pkg></flag>
+ <flag name="gdml">Enable GDML writer and reader</flag>
+ <flag name="geocad">Enable ROOT-CAD interface using <pkg>sci-libs/opencascade</pkg></flag>
+ <flag name="http">Enable http server support including but not limited to fastcgi support</flag>
+ <flag name="math">Build all math related libraries plugins, needs <pkg>sci-libs/gsl</pkg> </flag>
+ <flag name="memstat">Build memory statistics library, helps to detect memory leaks</flag>
+ <flag name="pythia6">Build the interface for <pkg>sci-physics/pythia</pkg> version 6.x </flag>
+ <flag name="pythia8">Build the interface for <pkg>sci-physics/pythia</pkg> version 8.x </flag>
+ <flag name="reflex">Build the reflection database for the C++ interpreter</flag>
+ <flag name="shadow">Enable shadow authentication in rootd and proofd</flag>
+ <flag name="table">Build libTable contrib library</flag>
+ <flag name="xrootd">Build the interface for <pkg>net-libs/xrootd</pkg> </flag>
+ <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/root/root-5.34.36.ebuild b/sci-physics/root/root-5.34.36.ebuild
new file mode 100644
index 000000000000..86b4a8feaaa8
--- /dev/null
+++ b/sci-physics/root/root-5.34.36.ebuild
@@ -0,0 +1,441 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="http://root.cern.ch/git/root.git"
+else
+ SRC_URI="https://root.cern.ch/download/${PN}_v${PV}.source.tar.gz"
+ KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+fi
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
+ toolchain-funcs user versionator prefix
+
+DESCRIPTION="C++ data analysis framework and interpreter from CERN"
+HOMEPAGE="https://root.cern.ch"
+
+SLOT="0/$(get_version_component_range 1-3 ${PV})"
+LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
+IUSE="+X afs c++11 c++14 doc emacs examples fits fftw gdml
+ graphviz http kerberos ldap +math +memstat mpi mysql odbc
+ +opengl openmp oracle postgres prefix pythia6 pythia8
+ python qt4 +reflex ruby shadow sqlite ssl table +tiff xinetd
+ xml xrootd zeroconf"
+
+# TODO: add support for: davix
+# TODO: unbundle: vdt
+
+REQUIRED_USE="
+ !X? ( !opengl !qt4 !tiff )
+ mpi? ( math !openmp )
+ openmp? ( math !mpi )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+CDEPEND="
+ app-arch/xz-utils:0=
+ >=dev-lang/cfortran-4.4-r2
+ dev-libs/libpcre:3=
+ media-fonts/dejavu
+ media-libs/freetype:2=
+ media-libs/libpng:0=
+ sys-libs/zlib:0=
+ X? (
+ media-libs/ftgl:0=
+ media-libs/glew:0=
+ x11-libs/libX11:0=
+ x11-libs/libXext:0=
+ x11-libs/libXpm:0=
+ || (
+ media-libs/libafterimage[gif,jpeg,png,tiff?]
+ >=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
+ )
+ opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
+ qt4? (
+ dev-qt/qtgui:4=
+ dev-qt/qtopengl:4=
+ dev-qt/qt3support:4=
+ dev-qt/qtsvg:4=
+ dev-qt/qtwebkit:4=
+ dev-qt/qtxmlpatterns:4=
+ )
+ x11-libs/libXft:0=
+ )
+ afs? ( net-fs/openafs )
+ emacs? ( virtual/emacs )
+ fits? ( sci-libs/cfitsio:0= )
+ fftw? ( sci-libs/fftw:3.0= )
+ graphviz? ( media-gfx/graphviz:0= )
+ http? ( dev-libs/fcgi:0= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:0= )
+ math? (
+ sci-libs/gsl:0=
+ sci-mathematics/unuran:0=
+ mpi? ( virtual/mpi )
+ )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
+ oracle? ( dev-db/oracle-instantclient-basic:0= )
+ postgres? ( dev-db/postgresql:= )
+ pythia6? ( sci-physics/pythia:6= )
+ pythia8? ( >=sci-physics/pythia-8.1.80:8= <sci-physics/pythia-8.2.0:8= )
+ python? ( ${PYTHON_DEPS} )
+ ruby? (
+ dev-lang/ruby:=
+ dev-ruby/rubygems:=
+ )
+ shadow? ( virtual/shadow )
+ sqlite? ( dev-db/sqlite:3= )
+ ssl? ( dev-libs/openssl:0= )
+ xml? ( dev-libs/libxml2:2= )
+ xrootd? ( >=net-libs/xrootd-3.3.5:0= )
+ zeroconf? ( net-dns/avahi:0= )
+"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ reflex? ( dev-cpp/gccxml )
+ xinetd? ( sys-apps/xinetd )"
+
+PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
+
+S="${WORKDIR}/${PN}"
+
+# install stuff in ${P} and not ${PF} for easier tracking in root-docs
+DOC_DIR="/usr/share/doc/${P}"
+
+die_compiler() {
+ eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
+ die "Need one of the following C++$1 capable compilers:\n"\
+ " >=sys-devel/gcc[cxx]-$2\n"\
+ " >=sys-devel/clang-$3\n"\
+ " >=dev-lang/icc-$4"
+}
+
+# check compiler to satisfy minimal versions
+# $1 - std version
+# $2 - g++
+# $3 - clang++
+# $4 - icc/icpc
+check_compiler() {
+ local cur ver
+ case "$(tc-getCXX)" in
+ *clang++*)
+ ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
+ cur="$3"
+ ;;
+ *g++*)
+ ver="$(gcc-version)"
+ cur="$2"
+ ;;
+ *icc*|*icpc*)
+ ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
+ cur="$4"
+ ;;
+ *)
+ ewarn "You are using an unsupported compiler."
+ ewarn "Please report any issues upstream."
+ return 0
+ ;;
+ esac
+ version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
+}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ use python && python-single-r1_pkg_setup
+ echo
+ elog "There are extra options on packages not yet in Gentoo:"
+ elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
+ elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
+ elog "You can use the env variable EXTRA_ECONF variable for this."
+ elog "For example, for SRP, you would set: "
+ elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
+ echo
+
+ enewgroup rootd
+ enewuser rootd -1 -1 /var/spool/rootd rootd
+
+ if use math; then
+ if use openmp; then
+ if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
+ ewarn "You are using a g++ without OpenMP capabilities"
+ die "Need an OpenMP capable compiler"
+ else
+ export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
+ fi
+ elif use mpi; then
+ export USE_MPI=1 USE_PARALLEL_MINUIT2=1
+ fi
+ fi
+
+ use c++11 && check_compiler "11" "4.8" "3.3" "13"
+ use c++14 && check_compiler "14" "4.9" "3.4" "15"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-5.28.00b-glibc212.patch \
+ "${FILESDIR}"/${PN}-5.32.00-cfitsio.patch \
+ "${FILESDIR}"/${PN}-5.32.00-chklib64.patch \
+ "${FILESDIR}"/${PN}-5.32.00-dotfont.patch \
+ "${FILESDIR}"/${PN}-5.34.05-nobyte-compile.patch \
+ "${FILESDIR}"/${PN}-5.34.13-unuran.patch \
+ "${FILESDIR}"/${PN}-5.34.26-ldflags.patch
+
+ # make sure we use system libs and headers
+ rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
+ rm -r graf2d/asimage/src/libAfterImage || die
+ rm -r graf3d/ftgl/{inc,src} || die
+ rm -r graf2d/freetype/src || die
+ rm -r graf3d/glew/{inc,src} || die
+ rm -r core/pcre/src || die
+ rm -r math/unuran/src/unuran-*.tar.gz || die
+ LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
+ xargs -0 rm || die
+ rm -r core/lzma/src/*.tar.gz || die
+ rm graf3d/gl/{inc,src}/gl2ps.* || die
+ sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
+ graf3d/gl/Module.mk || die
+
+ # In Gentoo, libPythia6 is called libpythia6
+ # iodbc is in /usr/include/iodbc
+ # pg_config.h is checked instead of libpq-fe.h
+ sed -i \
+ -e 's:libPythia6:libpythia6:g' \
+ -e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
+ -e 's:libpq-fe.h:pg_config.h:' \
+ configure || die "adjusting configure for Gentoo failed"
+
+ hprefixify configure
+ hprefixify -e "s,I/usr/include,I${EPREFIX}/usr/include," config/Makefile.in
+
+ # CSS should use local images
+ sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
+
+ # fix reflex path (bug #497280)
+ sed -i -e 's|${ROOTSYS}/lib|@libdir@|' config/genreflex.in || die
+
+ # QTDIR only used for qt3 in gentoo, and configure looks for it.
+ unset QTDIR
+}
+
+src_configure() {
+ local -a myconf
+ # Some compilers need special care
+ case "$(tc-getCXX)" in
+ *clang++*)
+ myconf=(
+ --with-clang
+ --with-f77="$(tc-getFC)"
+ )
+ ;;
+ *icc*|*icpc*)
+ # For icc we need to provide architecture manually
+ # and not to tamper with tc-get*
+ use x86 && myconf=( linuxicc )
+ use amd64 && myconf=( linuxx8664icc )
+ ;;
+ *) # gcc goes here too
+ myconf=(
+ --with-cc="$(tc-getCC)"
+ --with-cxx="$(tc-getCXX)"
+ --with-f77="$(tc-getFC)"
+ --with-ld="$(tc-getCXX)"
+ )
+ ;;
+ esac
+
+ # the configure script is not the standard autotools
+ myconf+=(
+ --prefix="${EPREFIX}/usr"
+ --etcdir="${EPREFIX}/etc/root"
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}"
+ --docdir="${EPREFIX}${DOC_DIR}"
+ --tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials"
+ --testdir="${EPREFIX}${DOC_DIR}/examples/tests"
+ --cflags='${CFLAGS}'
+ --cxxflags='${CXXFLAGS}'
+ --disable-builtin-afterimage
+ --disable-builtin-ftgl
+ --disable-builtin-freetype
+ --disable-builtin-glew
+ --disable-builtin-lzma
+ --disable-builtin-pcre
+ --disable-builtin-zlib
+ --disable-cling
+ --disable-werror
+ --enable-explicitlink
+ --enable-shared
+ --enable-soversion
+ --fail-on-missing
+ --nohowto
+ --with-afs-shared=yes
+ --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps"
+ $(use_enable X x11)
+ $(use_enable X asimage)
+ $(use_enable X xft)
+ $(use_enable afs)
+ $(use_enable c++11 cxx11)
+ $(use_enable c++14 cxx14)
+ $(use_enable fits fitsio)
+ $(use_enable fftw fftw3)
+ $(use_enable gdml)
+ $(use_enable graphviz gviz)
+ $(use_enable http)
+ $(use_enable kerberos krb5)
+ $(use_enable ldap)
+ $(use_enable math genvector)
+ $(use_enable math gsl-shared)
+ $(use_enable math mathmore)
+ $(use_enable math minuit2)
+ $(use_enable math roofit)
+ $(use_enable math tmva)
+ $(use_enable math vc)
+ $(use_enable math vdt)
+ $(use_enable math unuran)
+ $(use_enable memstat)
+ $(use_enable mysql)
+ $(usex mysql "--with-mysql-incdir=${EPREFIX}/usr/include/mysql" "")
+ $(use_enable odbc)
+ $(use_enable opengl)
+ $(use_enable oracle)
+ $(use_enable postgres pgsql)
+ $(use_enable prefix rpath)
+ $(use_enable pythia6)
+ $(use_enable pythia8)
+ $(use_enable python)
+ $(use_enable qt4 qt)
+ $(use_enable qt4 qtgsi)
+ $(use_enable reflex cintex)
+ $(use_enable reflex)
+ $(use_enable ruby)
+ $(use_enable shadow shadowpw)
+ $(use_enable sqlite)
+ $(use_enable ssl)
+ $(use_enable table)
+ $(use_enable tiff astiff)
+ $(use_enable xml)
+ $(use_enable xrootd)
+ $(use_enable zeroconf bonjour)
+ ${EXTRA_ECONF}
+ )
+
+ # usex can't be used here, because pg_config may be not
+ # installed with USE="-postgres"
+ use postgres && myconf+=( --with-pgsql-incdir=$(pg_config --includedir) )
+
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+src_compile() {
+ # The build system does not handle the dependency of bin/rmkdepend correctly,
+ # preventing it to be called in parallel. Build bin/rmkdepend explicitly
+ # first to circumvent the problem.
+ emake bin/rmkdepend
+ emake \
+ OPT="${CXXFLAGS}" \
+ F77OPT="${FFLAGS}" \
+ ROOTSYS="${S}" \
+ LD_LIBRARY_PATH="${S}/lib"
+ use emacs && elisp-compile build/misc/*.el
+}
+
+daemon_install() {
+ local daemons="rootd proofd"
+ dodir /var/spool/rootd
+ fowners rootd:rootd /var/spool/rootd
+ dodir /var/spool/rootd/{pub,tmp}
+ fperms 1777 /var/spool/rootd/{pub,tmp}
+
+ local i
+ for i in ${daemons}; do
+ newinitd "${FILESDIR}"/${i}.initd ${i}
+ newconfd "${FILESDIR}"/${i}.confd ${i}
+ done
+ if use xinetd; then
+ insinto /etc/xinetd
+ doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
+ fi
+}
+
+desktop_install() {
+ cd "${S}"
+ echo "Icon=root-system-bin" >> etc/root.desktop
+ domenu etc/root.desktop
+ doicon build/package/debian/root-system-bin.png
+
+ insinto /usr/share/icons/hicolor/48x48/mimetypes
+ doins build/package/debian/application-x-root.png
+
+ insinto /usr/share/icons/hicolor/48x48/apps
+ doicon build/package/debian/root-system-bin.xpm
+}
+
+cleanup_install() {
+ # Cleanup of files either already distributed or unused on Gentoo
+ pushd "${ED}" > /dev/null
+ rm usr/share/root/fonts/LICENSE || die
+ rm etc/root/proof/*.sample || die
+ rm -r etc/root/daemons || die
+ # these should be in PATH
+ mv etc/root/proof/utils/pq2/pq2* usr/bin/ || die
+ rm ${DOC_DIR#/}/{INSTALL,LICENSE,COPYING.CINT} || die
+ use examples || rm -r ${DOC_DIR#/}/examples || die
+ cd usr/$(get_libdir)/root/cint/cint
+ rm lib/posix/mktypes lib/dll_stl/setup lib/G__* || die
+ rm lib/dll_stl/G__* lib/dll_stl/rootcint_* lib/posix/exten.o || die
+ rm include/makehpib || die
+ popd > /dev/null
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "LDPATH=${EPREFIX%/}/usr/$(get_libdir)/root" > 99root
+
+ use pythia8 && echo "PYTHIA8=${EPREFIX%/}/usr" >> 99root
+ if use python; then
+ echo "PYTHONPATH=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root
+ python_optimize "${D}/usr/$(get_libdir)/root"
+ use reflex && python_optimize "${D}/usr/$(get_libdir)/root/python/genreflex/"
+ fi
+ use ruby && \
+ echo "RUBYLIB=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root
+ use emacs && elisp-install ${PN} build/misc/*.{el,elc}
+ if use examples; then
+ # these should really be taken care of by the root make install
+ insinto ${DOC_DIR}/examples/tutorials/tmva
+ doins -r tmva/test
+ fi
+ doenvd 99root
+
+ # The build system installs Emacs support unconditionally in the wrong
+ # directory. Remove it and call elisp-install in case of USE=emacs.
+ rm -r "${ED}"/usr/share/emacs || die
+
+ daemon_install
+ desktop_install
+ cleanup_install
+
+ # do not copress files used by ROOT's CLI (.credit, .demo, .license)
+ docompress -x "${DOC_DIR}"/{CREDITS,examples/tutorials}
+ # needed for .license command to work
+ dosym "${ED}"usr/portage/licenses/LGPL-2.1 "${DOC_DIR}/LICENSE"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-physics/root/root-6.04.06.ebuild b/sci-physics/root/root-6.04.06.ebuild
new file mode 100644
index 000000000000..826af7a7fffb
--- /dev/null
+++ b/sci-physics/root/root-6.04.06.ebuild
@@ -0,0 +1,498 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
+ toolchain-funcs user versionator
+
+DESCRIPTION="C++ data analysis framework and interpreter from CERN"
+HOMEPAGE="https://root.cern.ch"
+SRC_URI="https://root.cern.ch/download/${PN}_v${PV}.source.tar.gz"
+
+SLOT="0/$(get_version_component_range 1-3 ${PV})"
+LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+X afs doc emacs examples fits fftw gdml geocad
+ graphviz http kerberos ldap +math +memstat mpi mysql odbc
+ +opengl openmp oracle postgres prefix pythia6 pythia8
+ python qt4 R shadow sqlite ssl table +tiff xinetd xml xrootd
+ zeroconf"
+
+# TODO: add support for: davix
+# TODO: ROOT-6 supports x32 ABI, but half of its dependencies doesn't
+# TODO: unbundle: cling, vdt
+
+REQUIRED_USE="
+ !X? ( !opengl !qt4 !tiff )
+ mpi? ( math !openmp )
+ openmp? ( math !mpi )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+CDEPEND="
+ app-arch/xz-utils:0=
+ >=dev-lang/cfortran-4.4-r2
+ dev-libs/libpcre:3=
+ media-fonts/dejavu
+ media-libs/freetype:2=
+ media-libs/libpng:0=
+ >=sys-devel/clang-3.4:=
+ sys-libs/ncurses:=
+ sys-libs/zlib:0=
+ X? (
+ media-libs/ftgl:0=
+ media-libs/glew:0=
+ x11-libs/libX11:0=
+ x11-libs/libXext:0=
+ x11-libs/libXpm:0=
+ || (
+ media-libs/libafterimage[gif,jpeg,png,tiff?]
+ >=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
+ )
+ opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
+ qt4? (
+ dev-qt/qtgui:4=
+ dev-qt/qtopengl:4=
+ dev-qt/qt3support:4=
+ dev-qt/qtsvg:4=
+ dev-qt/qtwebkit:4=
+ dev-qt/qtxmlpatterns:4=
+ )
+ x11-libs/libXft:0=
+ )
+ afs? ( net-fs/openafs )
+ emacs? ( virtual/emacs )
+ fits? ( sci-libs/cfitsio:0= )
+ fftw? ( sci-libs/fftw:3.0= )
+ geocad? ( <sci-libs/opencascade-6.8.0:= )
+ graphviz? ( media-gfx/graphviz:0= )
+ http? ( dev-libs/fcgi:0= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:0= )
+ math? (
+ sci-libs/gsl:0=
+ sci-mathematics/unuran:0=
+ mpi? ( virtual/mpi )
+ )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
+ oracle? ( dev-db/oracle-instantclient-basic:0= )
+ postgres? ( dev-db/postgresql:= )
+ pythia6? ( sci-physics/pythia:6= )
+ pythia8? ( >=sci-physics/pythia-8.1.80:8= )
+ python? ( ${PYTHON_DEPS} )
+ R? ( dev-lang/R )
+ shadow? ( virtual/shadow )
+ sqlite? ( dev-db/sqlite:3= )
+ ssl? ( dev-libs/openssl:0= )
+ xml? ( dev-libs/libxml2:2= )
+ xrootd? ( >=net-libs/xrootd-3.3.5:0= )
+ zeroconf? ( net-dns/avahi:0= )
+"
+
+# TODO: ruby is not yet ported to ROOT-6, reenable when (if?) ready
+# ruby? (
+# dev-lang/ruby:=
+# dev-ruby/rubygems:=
+# )
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+RDEPEND="${CDEPEND}
+ xinetd? ( sys-apps/xinetd )"
+
+PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
+
+# install stuff in ${P} and not ${PF} for easier tracking in root-docs
+DOC_DIR="/usr/share/doc/${P}"
+
+OC_UNSUPPORTED="6.8.0"
+
+die_compiler() {
+ eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
+ die "Need one of the following C++$1 capable compilers:\n"\
+ " >=sys-devel/gcc[cxx]-$2\n"\
+ " >=sys-devel/clang-$3\n"\
+ " >=dev-lang/icc-$4"
+}
+
+# check compiler to satisfy minimal versions
+# $1 - std version
+# $2 - g++
+# $3 - clang++
+# $4 - icc/icpc
+check_compiler() {
+ local cur ver
+ case "$(tc-getCXX)" in
+ *clang++*)
+ ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
+ cur="$3"
+ ;;
+ *g++*)
+ ver="$(gcc-version)"
+ if version_is_at_least "5" "${ver}"; then
+ eerror ""
+ eerror "GCC-5 is not yet supported in ROOT-6."
+ eerror "The code may build for you, but will have run-time failures."
+ eerror "See the following bugs:"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7285"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7319"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7654"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7721"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7818"
+ eerror "https://sft.its.cern.ch/jira/browse/ROOT-7895"
+ eerror "https://bugs.gentoo.org/show_bug.cgi?id=564306"
+ eerror ""
+ eerror "Please use GCC-4.9 for now."
+ eerror ""
+ die "gcc-5 is not yet supported"
+ fi
+ cur="$2"
+ ;;
+ *icc*|*icpc*)
+ ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
+ eerror "ROOT-6 is known not to build with ICC."
+ eerror "Please report any isuses upstream."
+ cur="$4"
+ ;;
+ *)
+ ewarn "You are using an unsupported compiler."
+ ewarn "Please report any issues upstream."
+ return 0
+ ;;
+ esac
+ version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
+}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ use python && python-single-r1_pkg_setup
+ echo
+ elog "There are extra options on packages not yet in Gentoo:"
+ elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
+ elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
+ elog "You can use the env variable EXTRA_ECONF variable for this."
+ elog "For example, for SRP, you would set: "
+ elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
+ echo
+
+ enewgroup rootd
+ enewuser rootd -1 -1 /var/spool/rootd rootd
+
+ if use math; then
+ if use openmp; then
+ if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
+ ewarn "You are using a g++ without OpenMP capabilities"
+ die "Need an OpenMP capable compiler"
+ else
+ export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
+ fi
+ elif use mpi; then
+ export USE_MPI=1 USE_PARALLEL_MINUIT2=1
+ fi
+ fi
+
+ # c++11 support is mandatory
+ check_compiler "11" "4.8" "3.4" "13"
+
+ # Active version of opencascade may be >= $OC_UNSUPPORTED,
+ # so we need to eselect proper version (it must exist due to DEPEND requirement)
+ if use geocad; then
+ oc_current=$(eselect opencascade show)
+ # Proceed only if active version is unsupported
+ if version_is_at_least "${OC_UNSUPPORTED}" "${oc_current}"; then
+ local -a vlist
+ vlist=( $(version_sort $(eselect opencascade list | awk '/^ / { print $2 }')) )
+ local i
+ # search for higehr version < $OC_UNSUPPORTED
+ # list is sorted acsending, so loop backwards
+ for (( i=$(( ${#vlist[@]} -1 )); i>=0; i-- )); do
+ version_is_at_least "${OC_UNSUPPORTED}" "${vlist[i]}" || break
+ done
+ [[ $i == "-1" ]] && die "No suitable opencascade eselect slot is available (<${OC_UNSUPPORTED})"
+
+ einfo "Switching opencascade to supported slot: ${oc_current} -> ${vlist[i]}"
+ eselect opencascade set ${vlist[i]} > /dev/null || die "eselect opencascade set ${vlist[i]} failed!"
+ else
+ # forget it, effectively disabling eselect cleanup
+ unset oc_current
+ fi
+ fi
+}
+
+src_prepare() {
+ # Second version of makepch is required in order to generate
+ # PCH file appropriate for Gentoo include headers layout.
+ # This can be done only at install stage, when files are placed
+ # as appropriate. Premature modification of makepch.sh will
+ # broke build process, however.
+ #cp "etc/dictpch/makepch.sh" "etc/dictpch/makepch-gentoo.sh" || die
+
+ epatch \
+ "${FILESDIR}"/${PN}-5.28.00b-glibc212.patch \
+ "${FILESDIR}"/${PN}-5.32.00-afs.patch \
+ "${FILESDIR}"/${PN}-5.32.00-cfitsio.patch \
+ "${FILESDIR}"/${PN}-5.32.00-chklib64.patch \
+ "${FILESDIR}"/${PN}-5.34.13-unuran.patch \
+ "${FILESDIR}"/${PN}-6.00.01-dotfont.patch \
+ "${FILESDIR}"/${PN}-6.00.01-llvm.patch \
+ "${FILESDIR}"/${PN}-6.00.01-nobyte-compile.patch \
+ "${FILESDIR}"/${PN}-6.04.06-prop-flags.patch \
+ "${FILESDIR}"/${PN}-6.04.06-gsl2.patch
+ # "${FILESDIR}"/${PN}-6.02.05-xrootd4.patch
+ # "${FILESDIR}"/${PN}-6.02.05-dictpch.patch \
+
+ # make sure we use system libs and headers
+ rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
+ rm -r graf2d/asimage/src/libAfterImage || die
+ rm -r graf3d/ftgl/{inc,src} || die
+ rm -r graf2d/freetype/src || die
+ rm -r graf3d/glew/{inc,src} || die
+ rm -r core/pcre/src || die
+ rm -r math/unuran/src/unuran-*.tar.gz || die
+ LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
+ xargs -0 rm || die
+ rm -r core/lzma/src/*.tar.gz || die
+ rm graf3d/gl/{inc,src}/gl2ps.* || die
+ sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
+ graf3d/gl/Module.mk || die
+
+ # In Gentoo, libPythia6 is called libpythia6
+ # iodbc is in /usr/include/iodbc
+ # pg_config.h is checked instead of libpq-fe.h
+ sed -i \
+ -e 's:libPythia6:libpythia6:g' \
+ -e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
+ -e 's:libpq-fe.h:pg_config.h:' \
+ configure || die "adjusting configure for Gentoo failed"
+
+ # prefixify the configure script
+ sed -i \
+ -e 's:/usr:${EPREFIX}/usr:g' \
+ configure || die "prefixify configure failed"
+
+ # CSS should use local images
+ sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
+
+ # QTDIR only used for qt3 in gentoo, and configure looks for it.
+ unset QTDIR
+}
+
+# NB: ROOT uses bundled LLVM, because it is patched and API-incompatible with
+# system LLVM.
+# NB: As of 6.00.0.1 cmake is not ready as it can't fully replace configure,
+# e.g. for afs and geocad.
+
+src_configure() {
+ local -a myconf
+ # Some compilers need special care
+ case "$(tc-getCXX)" in
+ *clang++*)
+ myconf=(
+ --with-clang
+ --with-f77="$(tc-getFC)"
+ )
+ ;;
+ *icc*|*icpc*)
+ # For icc we need to provide architecture manually
+ # and not to tamper with tc-get*
+ use x86 && myconf=( linuxicc )
+ use amd64 && myconf=( linuxx8664icc )
+ ;;
+ *) # gcc goes here too
+ myconf=(
+ --with-cc="$(tc-getCC)"
+ --with-cxx="$(tc-getCXX)"
+ --with-f77="$(tc-getFC)"
+ --with-ld="$(tc-getCXX)"
+ )
+ ;;
+ esac
+
+ # the configure script is not the standard autotools
+ myconf+=(
+ --prefix="${EPREFIX}/usr"
+ --etcdir="${EPREFIX}/etc/root"
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${PN}"
+ --docdir="${EPREFIX}${DOC_DIR}"
+ --tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials"
+ --testdir="${EPREFIX}${DOC_DIR}/examples/tests"
+ --disable-builtin-afterimage
+ --disable-builtin-ftgl
+ --disable-builtin-freetype
+ --disable-builtin-glew
+ --disable-builtin-lzma
+ --disable-builtin-pcre
+ --disable-builtin-zlib
+ --disable-werror
+ --enable-explicitlink
+ --enable-shared
+ --enable-soversion
+ --fail-on-missing
+ --nohowto
+ --with-afs-shared=yes
+ --with-sys-iconpath="${EPREFIX}/usr/share/pixmaps"
+ # Invalid option '-mtune=native'. Try ./configure --help
+ # --cflags=\"${CFLAGS}\"
+ # --cxxflags=\"${CXXFLAGS}\"
+ $(use_enable X x11)
+ $(use_enable X asimage)
+ $(use_enable X xft)
+ $(use_enable afs)
+ $(use_enable fits fitsio)
+ $(use_enable fftw fftw3)
+ $(use_enable gdml)
+ $(use_enable geocad)
+ $(use_enable graphviz gviz)
+ $(use_enable http)
+ $(use_enable kerberos krb5)
+ $(use_enable ldap)
+ $(use_enable math genvector)
+ $(use_enable math gsl-shared)
+ $(use_enable math mathmore)
+ $(use_enable math minuit2)
+ $(use_enable math roofit)
+ $(use_enable math tmva)
+ $(use_enable math vc)
+ $(use_enable math vdt)
+ $(use_enable math unuran)
+ $(use_enable memstat)
+ $(use_enable mysql)
+ $(usex mysql "--with-mysql-incdir=${EPREFIX}/usr/include/mysql" "")
+ $(use_enable odbc)
+ $(use_enable opengl)
+ $(use_enable oracle)
+ $(use_enable postgres pgsql)
+ $(use_enable prefix rpath)
+ $(use_enable pythia6)
+ $(use_enable pythia8)
+ $(use_enable python)
+ $(use_enable qt4 qt)
+ $(use_enable qt4 qtgsi)
+ $(use_enable R r)
+ $(use_enable shadow shadowpw)
+ $(use_enable sqlite)
+ $(use_enable ssl)
+ $(use_enable table)
+ $(use_enable tiff astiff)
+ $(use_enable xml)
+ $(use_enable xrootd)
+ $(use_enable zeroconf bonjour)
+ ${EXTRA_ECONF}
+ )
+
+ # usex can't be used here, because pg_config may be not
+ # installed with USE="-postgres"
+ use postgres && myconf+=( --with-pgsql-incdir=$(pg_config --includedir) )
+
+ einfo "Configuring with ${myconf[@]}"
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+src_compile() {
+ emake \
+ OPT="${CXXFLAGS}" \
+ F77OPT="${FFLAGS}" \
+ ROOTSYS="${S}" \
+ LD_LIBRARY_PATH="${S}/lib"
+ use emacs && elisp-compile build/misc/*.el
+}
+
+daemon_install() {
+ local daemons="rootd proofd"
+ dodir /var/spool/rootd
+ fowners rootd:rootd /var/spool/rootd
+ dodir /var/spool/rootd/{pub,tmp}
+ fperms 1777 /var/spool/rootd/{pub,tmp}
+
+ local i
+ for i in ${daemons}; do
+ newinitd "${FILESDIR}"/${i}.initd ${i}
+ newconfd "${FILESDIR}"/${i}.confd ${i}
+ done
+ if use xinetd; then
+ insinto /etc/xinetd
+ doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
+ fi
+}
+
+desktop_install() {
+ cd "${S}"
+ echo "Icon=root-system-bin" >> etc/root.desktop
+ domenu etc/root.desktop
+ doicon build/package/debian/root-system-bin.png
+
+ insinto /usr/share/icons/hicolor/48x48/mimetypes
+ doins build/package/debian/application-x-root.png
+
+ insinto /usr/share/icons/hicolor/48x48/apps
+ doicon build/package/debian/root-system-bin.xpm
+}
+
+cleanup_install() {
+ # Cleanup of files either already distributed or unused on Gentoo
+ pushd "${ED}" > /dev/null
+ rm usr/share/root/fonts/LICENSE || die
+ rm etc/root/proof/*.sample || die
+ rm -r etc/root/daemons || die
+ # these should be in PATH
+ mv etc/root/proof/utils/pq2/pq2* usr/bin/ || die
+ rm ${DOC_DIR#/}/INSTALL || die
+ use examples || rm -r ${DOC_DIR#/}/examples || die
+
+ # clean hardcoded sandbox paths
+ #rm etc/root/dictpch/allCppflags.txt.tmp || die
+ #sed -i "s|${S}/||" etc/root/cling/llvm/Config/llvm-config.h || die
+ # regenerate pch for Gentoo headers layout
+ #rm "etc/root/allDict.cxx.pch" || die
+ #sed -i 's|etc/dictpch|etc/root/dictpch|' etc/root/dictpch/allLinkDefs.h || die
+ #sed -i 's|etc/cling|etc/root/cling|' etc/root/dictpch/allHeaders.h || die
+ #sed -i "s|ROOTDIR_TEMPLATE|${ED}|" etc/root/dictpch/makepch-gentoo.sh || die
+ #etc/root/dictpch/makepch-gentoo.sh etc/root/allDict.cxx.pch || die "PCH generation failed"
+}
+
+src_install() {
+ ROOTSYS="${S}" emake DESTDIR="${D}" install
+ insinto "${DOC_DIR}"
+ doins README.md
+
+ echo "LDPATH=${EPREFIX%/}/usr/$(get_libdir)/root" > 99root
+ use pythia8 && echo "PYTHIA8=${EPREFIX%/}/usr" >> 99root
+
+ if use python; then
+ echo "PYTHONPATH=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root
+ python_optimize "${D}/usr/$(get_libdir)/root"
+ fi
+ use emacs && elisp-install ${PN} build/misc/*.{el,elc}
+ doenvd 99root
+
+ # The build system installs Emacs support unconditionally in the wrong
+ # directory. Remove it and call elisp-install in case of USE=emacs.
+ rm -r "${ED}"/usr/share/emacs || die
+
+ daemon_install
+ desktop_install
+ cleanup_install
+
+ # do not copress files used by ROOT's CLI (.credit, .demo, .license)
+ docompress -x "${DOC_DIR}"/{CREDITS,examples/tutorials}
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ # restort opencascade eselect slot
+ if use geocad && [[ -n ${oc_current} ]]; then
+ einfo "Switching to user set slot: $(eselect opencascade show) -> ${oc_current}"
+ eselect opencascade set ${oc_current} > /dev/null || eerror "eselect opencascade set ${vlist[i]} failed!"
+ unset oc_current
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-physics/sassena/Manifest b/sci-physics/sassena/Manifest
new file mode 100644
index 000000000000..ec3561a37a0e
--- /dev/null
+++ b/sci-physics/sassena/Manifest
@@ -0,0 +1,8 @@
+AUX sassena-1.4.2_cmake-remove-missing.patch 1044 SHA256 cf166393e48c5a3ba1d9df04fdd5e44f7fd7855de7a60dd861b8caa7227d640b SHA512 cb26b4ea75ec321f5db2ec5d61b982ffc6d40d6817d1c1b89aa2c11763467a02fa14fe051f498065255ede032b2c0ab4a15bfa3f1f6a53eca035c6c4001e5d19 WHIRLPOOL 727bb56e05efaf767f1e0debb9d2bceb514a91d4cf01ee3167b34cc447df6530fde06ca7e7995541b669ac4280d4cdce47782b0c0c517ddca082017cd778e95f
+AUX sassena-1.4.2_link_boost_thread.patch 4581 SHA256 0f2c73cf7aeb0f1b2fd1298ad6e8060aa9e406281960e78a9f237a4d27684d89 SHA512 12e5d62d972eb9e0e89587db66f335496ba921009435a40ca61824165726244cf394634b88cd9ebbde08217d00ea4fd5a182aa7854be2ec481edf970a7442a37 WHIRLPOOL f008f122e360c398eaf49fdb2c09d3b1157f827d9bac750147e86dda80f97d6ddf7bf4d952878ea78c65d8689641bdf8ddf4328694706d16f83303a5ac478802
+AUX sassena-1.4.2_uint32_t.patch 491 SHA256 aa67a7844f459d5aa89f57396a5561164ba7db868ec8374bf9eb8adbeda4978d SHA512 1cf7bf57cbb4c967c63b32b063e71ef62f40640858464b4db4d392fe967be25010fa9e22f5cbca2e82e7cc185ccf07819919087ed72b79bace8ce152bace1b2e WHIRLPOOL 9db7e4a0040a3c4b85c9e589a199e87d052ea19affe7c1a15ed5273b2724911d795bf751235282a59dc19ffdcc2c67b10ab55b91ad926a9f0ebcec2ec56fad74
+DIST sassena-1.4.2.tar.gz 783708 SHA256 2df437eeaaed8275d73d8168f28242c5a02f2dc4dca302c3e9968cadab586115 SHA512 07dbd44494a50de29b6f3b3542d862328726d132bda097352ac2f6ad24479b93b2d77c5ea2ef812b2956d0ac950ad69b93da0996f14ff1ce9f0e310b27728942 WHIRLPOOL 7c105aa798a3eb962c675f77b195cef68b973c9f34185bbd3f5639b24822da8c9a5fa771777e0f9c652ecdf64d28536bc0ad79bb419d746a72524333f98d6caa
+EBUILD sassena-1.4.2.ebuild 712 SHA256 12f9320f5eca2cecbda832523987c44ffb3a66ba0086a3fade87f796f30bb15a SHA512 4cf60609ea5239b8a9db57b5b80da87d4b7614700cec6a9b38d6091ed05602be58189ff9a589b1530bf0cd387cff5a43ff03982459dbb4cedc1695accdf04892 WHIRLPOOL 7cebcacd3073451f03f8c7aa40eb1a75375b93c08264278ff61200213a836b53369fa24ff07beeed45c79ad5ea48ec85008187294c10d161c616ed2451dd051b
+MISC ChangeLog 3103 SHA256 80fb24a834d271842af3a5abff2f72ab4e173cd6130b73fcfaaec896177980fe SHA512 e0e70d8efbc2fd840fc47e4d3f13de89026d28253b328c145b508434d77ff1c67979e231ccf1ad32f8cd074d3af998043b26690d187a07f3542557ff93b6dec3 WHIRLPOOL d7e55f88bc5a454a343ae7244a0997978be90ac766c76d96b7825863c41d1cfbfacc0fd8254ddd2b196aa4890492e2b3b98eda46ece56feaaf9c40acf3dc2027
+MISC ChangeLog-2015 405 SHA256 a6f3eb99dade636a7e4740be9167c7fe22542863a199103af95951d1bff3c919 SHA512 01716d76565f08df0b2ad85b64e3a686f71931506e0a46fce196308fd71ae21ee855971653f71eea713470d929b4f79263377973b3af89661d6007c64aaa9a3f WHIRLPOOL 1f301bc02611a37873836d3367527b73702e70b152763dd2bdc58d0b02254865b940ae2db88288fad460fa10e5c838e315320b14fee10a6bf6e4ed59247efa9a
+MISC metadata.xml 328 SHA256 848c1d046bec70b59ea2e4396b6e47e94ac883583bc7603d03aac48ab34b11e3 SHA512 32e9e1d75cdaf8d4019c85ae952194ed9f60991068ffc10015b552ec3ea673e8e9ff35bde421059f5e0ee098a109af61b97de16bd16408e8b94b402e605163f6 WHIRLPOOL 4b6f9d365d20b4fbb7804f85d6c35e14e7efd634581123075e68e507faa9a18588a4ac7516a92d9a4e5bc6013d466bbf9f7aa6b9c1446d5916638e3761bdc314
diff --git a/sci-physics/sassena/files/sassena-1.4.2_cmake-remove-missing.patch b/sci-physics/sassena/files/sassena-1.4.2_cmake-remove-missing.patch
new file mode 100644
index 000000000000..7131d3514526
--- /dev/null
+++ b/sci-physics/sassena/files/sassena-1.4.2_cmake-remove-missing.patch
@@ -0,0 +1,33 @@
+diff -ru sassena-1.4.2_org/cmake/CMakeLists.txt.executables sassena-1.4.2/cmake/CMakeLists.txt.executables
+--- sassena-1.4.2_org/cmake/CMakeLists.txt.executables 2014-07-29 11:02:12.652053749 +0200
++++ sassena-1.4.2/cmake/CMakeLists.txt.executables 2014-07-29 11:04:57.831042602 +0200
+@@ -18,18 +18,12 @@
+ tests/unit_broadcast.cpp
+ )
+
+-ADD_EXECUTABLE(unit_parameters
+- src/common.cpp
+- tests/unit_parameters.cpp
+-)
+-
+
+ IF(STATIC)
+ SET_TARGET_PROPERTIES(sassena PROPERTIES LINK_SEARCH_END_STATIC 1)
+ SET_TARGET_PROPERTIES(s_stage PROPERTIES LINK_SEARCH_END_STATIC 1)
+ SET_TARGET_PROPERTIES(s_maketnx PROPERTIES LINK_SEARCH_END_STATIC 1)
+ SET_TARGET_PROPERTIES(unit_broadcast PROPERTIES LINK_SEARCH_END_STATIC 1)
+-SET_TARGET_PROPERTIES(unit_parameters PROPERTIES LINK_SEARCH_END_STATIC 1)
+ ENDIF(STATIC)
+
+ TARGET_LINK_LIBRARIES (s_stage
+@@ -89,10 +83,4 @@
+ ${BOOST_LIBRARIES}
+ )
+
+-TARGET_LINK_LIBRARIES (unit_parameters
+- sass_log
+- sass_controlio
+- ${BOOST_LIBRARIES}
+-)
+-
+ INSTALL(TARGETS unit_broadcast RUNTIME DESTINATION bin)
diff --git a/sci-physics/sassena/files/sassena-1.4.2_link_boost_thread.patch b/sci-physics/sassena/files/sassena-1.4.2_link_boost_thread.patch
new file mode 100644
index 000000000000..424ca381a511
--- /dev/null
+++ b/sci-physics/sassena/files/sassena-1.4.2_link_boost_thread.patch
@@ -0,0 +1,92 @@
+diff -ru sassena-1.4.2_org/src/main/sassena.cpp sassena-1.4.2/src/main/sassena.cpp
+--- sassena-1.4.2_org/src/main/sassena.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/main/sassena.cpp 2014-07-29 12:52:56.978605357 +0200
+@@ -62,6 +62,7 @@
+ #include <boost/serialization/complex.hpp>
+ #include <boost/serialization/map.hpp>
+ #include <boost/serialization/vector.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "exceptions/exceptions.hpp"
+Nur in sassena-1.4.2/src/main: .sassena.cpp.swp.
+diff -ru sassena-1.4.2_org/src/main/s_stage.cpp sassena-1.4.2/src/main/s_stage.cpp
+--- sassena-1.4.2_org/src/main/s_stage.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/main/s_stage.cpp 2014-07-29 12:51:22.257611749 +0200
+@@ -33,6 +33,7 @@
+ #include <boost/serialization/complex.hpp>
+ #include <boost/serialization/map.hpp>
+ #include <boost/serialization/vector.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "exceptions/exceptions.hpp"
+diff -ru sassena-1.4.2_org/src/scatter_devices/abstract_scatter_device.cpp sassena-1.4.2/src/scatter_devices/abstract_scatter_device.cpp
+--- sassena-1.4.2_org/src/scatter_devices/abstract_scatter_device.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/scatter_devices/abstract_scatter_device.cpp 2014-07-29 13:02:20.824567306 +0200
+@@ -18,6 +18,7 @@
+ #include <boost/accumulators/accumulators.hpp>
+ #include <boost/accumulators/statistics.hpp>
+ #include <boost/lexical_cast.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "exceptions/exceptions.hpp"
+Nur in sassena-1.4.2/src/scatter_devices: .abstract_scatter_device.cpp.swp.
+diff -ru sassena-1.4.2_org/src/scatter_devices/all_vectors_scatter_device.cpp sassena-1.4.2/src/scatter_devices/all_vectors_scatter_device.cpp
+--- sassena-1.4.2_org/src/scatter_devices/all_vectors_scatter_device.cpp 2014-07-29 11:02:12.649053750 +0200
++++ sassena-1.4.2/src/scatter_devices/all_vectors_scatter_device.cpp 2014-07-29 13:04:04.907560282 +0200
+@@ -18,6 +18,7 @@
+ #include <boost/accumulators/accumulators.hpp>
+ #include <boost/accumulators/statistics.hpp>
+ #include <boost/lexical_cast.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "math/coor3d.hpp"
+Nur in sassena-1.4.2/src/scatter_devices: .all_vectors_scatter_device.cpp.swp.
+diff -ru sassena-1.4.2_org/src/scatter_devices/multipole_scatter_device.cpp sassena-1.4.2/src/scatter_devices/multipole_scatter_device.cpp
+--- sassena-1.4.2_org/src/scatter_devices/multipole_scatter_device.cpp 2014-07-29 11:02:12.649053750 +0200
++++ sassena-1.4.2/src/scatter_devices/multipole_scatter_device.cpp 2014-07-29 13:01:16.038571678 +0200
+@@ -19,6 +19,7 @@
+ #include <boost/accumulators/statistics.hpp>
+ #include <boost/lexical_cast.hpp>
+ #include <boost/math/special_functions.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "math/coor3d.hpp"
+diff -ru sassena-1.4.2_org/src/scatter_devices/self_vectors_scatter_device.cpp sassena-1.4.2/src/scatter_devices/self_vectors_scatter_device.cpp
+--- sassena-1.4.2_org/src/scatter_devices/self_vectors_scatter_device.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/scatter_devices/self_vectors_scatter_device.cpp 2014-07-29 13:01:45.753569673 +0200
+@@ -18,6 +18,7 @@
+ #include <boost/accumulators/accumulators.hpp>
+ #include <boost/accumulators/statistics.hpp>
+ #include <boost/lexical_cast.hpp>
++#include <boost/thread/thread.hpp>
+
+ // other headers
+ #include "math/coor3d.hpp"
+diff -ru sassena-1.4.2_org/src/services/file_writer_service.cpp sassena-1.4.2/src/services/file_writer_service.cpp
+--- sassena-1.4.2_org/src/services/file_writer_service.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/services/file_writer_service.cpp 2014-07-29 13:08:07.448543914 +0200
+@@ -13,6 +13,7 @@
+
+ #include <boost/lexical_cast.hpp>
+ #include <boost/filesystem.hpp>
++#include <boost/thread/thread.hpp>
+ #include <log.hpp>
+ #include <control.hpp>
+ #include <math/smath.hpp>
+Nur in sassena-1.4.2/src/services: .file_writer_service.cpp.swp.
+diff -ru sassena-1.4.2_org/src/services/monitor_service.cpp sassena-1.4.2/src/services/monitor_service.cpp
+--- sassena-1.4.2_org/src/services/monitor_service.cpp 2014-07-29 11:02:12.650053749 +0200
++++ sassena-1.4.2/src/services/monitor_service.cpp 2014-07-29 13:07:06.617548019 +0200
+@@ -13,6 +13,7 @@
+ #include <boost/lexical_cast.hpp>
+ #include <boost/filesystem.hpp>
+ #include <boost/random/uniform_int.hpp>
++#include <boost/thread/thread.hpp>
+ #include <log.hpp>
+ #include <control.hpp>
+ #include <report/timer.hpp>
diff --git a/sci-physics/sassena/files/sassena-1.4.2_uint32_t.patch b/sci-physics/sassena/files/sassena-1.4.2_uint32_t.patch
new file mode 100644
index 000000000000..ecb6e845a6b1
--- /dev/null
+++ b/sci-physics/sassena/files/sassena-1.4.2_uint32_t.patch
@@ -0,0 +1,11 @@
+diff -ru sassena-1.4.2_org/src/sample/frames.cpp sassena-1.4.2/src/sample/frames.cpp
+--- sassena-1.4.2_org/src/sample/frames.cpp 2014-07-29 11:02:12.651053749 +0200
++++ sassena-1.4.2/src/sample/frames.cpp 2014-07-29 11:11:39.229015514 +0200
+@@ -298,6 +298,7 @@
+ dcdfile.seekg(marker,ios_base::cur);
+ dcdfile.read((char*) &marker,sizeof(int32_t));
+
++ using boost::uint32_t;
+ uint32_t noa;
+ dcdfile.read((char*) &marker,sizeof(int32_t));
+ dcdfile.read((char*) &noa,sizeof(uint32_t));
diff --git a/sci-physics/sassena/metadata.xml b/sci-physics/sassena/metadata.xml
new file mode 100644
index 000000000000..4fac2fa01530
--- /dev/null
+++ b/sci-physics/sassena/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">benlabs/sassena</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-physics/sassena/sassena-1.4.2.ebuild b/sci-physics/sassena/sassena-1.4.2.ebuild
new file mode 100644
index 000000000000..4546a6090317
--- /dev/null
+++ b/sci-physics/sassena/sassena-1.4.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Software for Calculating Scattering Diagrams on Massively Parallel Computers"
+HOMEPAGE="http://www.sassena.org"
+SRC_URI="https://github.com/benlabs/sassena/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+DEPEND="
+ dev-libs/boost[mpi]
+ sci-libs/hdf5[mpi]
+ dev-libs/libxml2
+ sci-libs/fftw:3.0
+ virtual/mpi
+ virtual/blas
+ virtual/lapack"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}_cmake-remove-missing.patch"
+ "${FILESDIR}/${P}_uint32_t.patch"
+ "${FILESDIR}/${P}_link_boost_thread.patch"
+)
diff --git a/sci-physics/siscone/Manifest b/sci-physics/siscone/Manifest
new file mode 100644
index 000000000000..d9a0ed0d3ee3
--- /dev/null
+++ b/sci-physics/siscone/Manifest
@@ -0,0 +1,7 @@
+DIST siscone-2.0.6.tar.gz 473370 SHA256 f66f0ca5360f2cf0413f720b376bf850cde46fe72af093560536e6f0338d8a76 SHA512 3a1bbd50db8800a2ce00eac4f4cd498d7e6674ba739ed8157f6e0c0e32fd7724d19d227b5a023fa945a5b4be5c415c5c77c2e2a60e80ec4029c016e3fd95983d WHIRLPOOL ebe4f44ae784bfca39b47e9eb20d0ea50daeb9c01b2e92f1608f246f416960fd1dec6e0f8e9f9d49fba155fae2c86b4a4853c199737803c3c50d580a4b725637
+DIST siscone-3.0.3.tar.gz 540939 SHA256 c90813ef7d870e62edcd78c24bc5120979bcb386b6f48ab9bf22c29f30c13769 SHA512 dccbb872c897b8c0c28dff593d7f015b396923a0bd885182930d74e5115b901875a89565244a33fad0329fdfb5a83d6cc570152d0085c45c24bc427de075e559 WHIRLPOOL 8a91cacb1be855b039309f3ba77b0d72a430354020cc9a6cd2cc1c3bb5a1fe6ddc09259d6555b2982a2b9da4b4268212f4072e5af179a3557a4cf93b7375314e
+EBUILD siscone-2.0.6.ebuild 656 SHA256 4469a7cb97c341352670b852cf3599a9ff82ddf6eb6aed0cfd0ed6b2d1204120 SHA512 b5e4b5ee97bc82c1af7639dc4da21e6c3b1a4182f82ae6a843c4134f33489f97dc06737753460e6dd4677b032cd5599cdbb2bb5febd6c15a704d8d342b372794 WHIRLPOOL cbb580410ee3f54dee0e25a80ef9a3a699fe3668c9ef9453f5a6da035d9ce7916495e700f5cd6efebfe054b8d1645e297bd4f8c9a06a0d844101cea788094b04
+EBUILD siscone-3.0.3.ebuild 676 SHA256 20cdacb42e02b0892d957ea10a6fa6d4d92f512ac8c2c5a86f8ee18ee2c7e0b8 SHA512 0fecdbeb640f389b60de9bfd5738c9bc252d811bbf72d4e1aa717858cb205df94604566cc0ff7bf5a95b88539c6a101a1de54a9f1ab7d04bc7a1f5fd06fcbc46 WHIRLPOOL ffc97b992af757f7c74209e09c527e13edf6c09f81736f6f481f6eb230b6d6085454b2c02457f291b1b0a6695aa31fb616f4b58339bf2cf78a7789fde567f73b
+MISC ChangeLog 2710 SHA256 3302929fbad0183d7da49f5955a916a9a639add80e2b7949520850a1e3675535 SHA512 788acabd1920884e4173e752dc0efa0fdc838374fabc46565784ec8abd7e3559dbdaf9810d4bce804cb3159c86bed92b624b918a46c1cc958b96af5f6a67e0ee WHIRLPOOL ac1c200a2ce67a8260e2a9b19cafe3ff9b65391b23b0d497885d5faa6471c879a1b60ba544b33b5e370c86ee68ce1aa65d9098fe87d196e42c7b762127ff722d
+MISC ChangeLog-2015 693 SHA256 6f8216751a5dc72319e00ed778cf775f67ea5e47812cc0804720f4ff9679e791 SHA512 66cfac609dc59fd80e6410e9772800521637c5d7aea308ad11ec7d1d88b21b6b00d2d15153c869d7131b87c805bd34ac07703887c97ff28af7a20fe6efd79e39 WHIRLPOOL fab2a46fc5619fea0f71815cc80625f7c2ca6e9784b33c79e5382c3e491e89b03c423bce4eb1c85684927835a087f98542b1212276e7ef8ed2958db55e6d18f2
+MISC metadata.xml 480 SHA256 89e474dd37b61ae4606947d3ca21958efb05cce6181cd11c9077dfe1e4b9fca2 SHA512 738dbd7ec74f7e002c263923e2a896c94674f2c4c5171b2f91109960f72d792d3c1fe40da7b700f27717a5cf3a1a4e6ee0df8d408cb91547b025085ab0d6eaee WHIRLPOOL 9231490a9bd44cd40a1b45327dd90782c75f74f4b5266e6efaa7f01f3117088984f662bd708df4e8a215571bba4512140f6dab93b2e65b606314ed9fa8b28efc
diff --git a/sci-physics/siscone/metadata.xml b/sci-physics/siscone/metadata.xml
new file mode 100644
index 000000000000..36aacf0ea76b
--- /dev/null
+++ b/sci-physics/siscone/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription lang="en">
+ SISCone implements a seedless infrared (IR) safe cone jet algorithm, it takes
+ N^2*ln(N) time to find jets among N particles, comparing to N*2^N time of
+ other algorithms.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/siscone/siscone-2.0.6.ebuild b/sci-physics/siscone/siscone-2.0.6.ebuild
new file mode 100644
index 000000000000..c6e2acc0d5c7
--- /dev/null
+++ b/sci-physics/siscone/siscone-2.0.6.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Hadron Seedless Infrared-Safe Cone jet algorithm"
+HOMEPAGE="http://siscone.hepforge.org/"
+SRC_URI="http://www.hepforge.org/archive/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.{cpp,h}
+ insinto /usr/share/doc/${PF}/examples/events
+ doins examples/events/*.dat
+ fi
+}
diff --git a/sci-physics/siscone/siscone-3.0.3.ebuild b/sci-physics/siscone/siscone-3.0.3.ebuild
new file mode 100644
index 000000000000..0d54e124cd9e
--- /dev/null
+++ b/sci-physics/siscone/siscone-3.0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Hadron Seedless Infrared-Safe Cone jet algorithm"
+HOMEPAGE="http://siscone.hepforge.org/"
+SRC_URI="http://www.hepforge.org/archive/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ if use examples; then
+ docinto examples
+ dodoc examples/*.{cpp,h}
+ docinto examples/events
+ dodoc examples/events/*.dat
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/sci-physics/thepeg/Manifest b/sci-physics/thepeg/Manifest
new file mode 100644
index 000000000000..af7b536619bf
--- /dev/null
+++ b/sci-physics/thepeg/Manifest
@@ -0,0 +1,13 @@
+AUX thepeg-1.8.3-java.patch 922 SHA256 1b71b643587a784699dae94d601de1eb3b352e2e6a91126105121b0e631972ef SHA512 2c2bd711e6a96e3e8ab12b313929b7e4814b69bd7f7631e137c233ec2478d4538299113c035ed94b8e58aa1195b0c8cdc21d23996fbecbb0319815b162556699 WHIRLPOOL 23461aff09193196472c1f3be8be1475855c161d47943cfd01523958df5e7a53b85f91c15cc5bb5da473e4e6c59e80ef64d9e7c54321ad6834a14a5456e3889b
+DIST GRV98nlo.LHgrid 221908 SHA256 78e7b133ac1f1d5576aa688f98adb8b6e29feb15cbb58556c860cb7e183da647 SHA512 fce5226a6eb56c9cc970d2d2bb23c5a0cde3afbb1f463e3e062825c2379213100a2d149ff6b25d9726e80ee817f9ae74eafcc85b2b30419aa7f095847dbcd8b6 WHIRLPOOL ce0d01cd7c293efd199704cdeb0cb5ad9093393eef56b72cb6096b2e6135ce57d1710b0cbcd219bb4dfe82b15d684a3f6a5aad6dda97d3428dc2f645ec5a2dc4
+DIST MRST2001nlo.LHgrid 719692 SHA256 7ec031afa2bd254b95b66b3058291365091f58b48e4be2b368e61fc170c51d58 SHA512 126461ec2358e61221445483074a804c915b94be4a4dfd0330a9cf71feff9a9b981c5594a9d2a1efd236122f44891dd25182649803dccb3b383d03e85e96f930 WHIRLPOOL bce25b3dc3b0a29c537eafac243c81bdb83b4e3daca34627d7d8bb8c59f802bb12ea6e8611fe2758a8c9a9880dab16276c11a332059431df0b14ecb6eb6d40f3
+DIST ThePEG-1.9.2.tar.bz2 1870577 SHA256 ff7bbb256866f994dae04ade1f57c92d2670edaac3df11c9a300419a5343faf4 SHA512 bc43606c79bb15938969b9d444db49c6af5c8ba21072a879a502086a77fe18b13fec44691046b4e0772b260b83ea7ef29b906027eadda6a8ea004ace9318379c WHIRLPOOL fb686c14a6c8a958f08be670085f10463d2928dacd8efe039e0e5fa781dc7532310702146dd9a0aef5bb8e881e1ff0e5d7f07637b8ad56a80c3d197e67d9c970
+DIST ThePEG-2.0.0.tar.bz2 1938251 SHA256 571730cc956027dc82780dc04ef6e7382ab5ea853fcfebe259e488c6df302a04 SHA512 a3e9a4ab90b126ea67187e2adc5b64480e5afd49ac58d6f3a3855003251d5c7b6ab67fa35b0380684e39f38cf8d4bc8e0ccd9dc4cb7d7b900e90b3448d6182a9 WHIRLPOOL 1c1052972e006c497bd3d23b63b05e97fae922bfe14c1233da39ac5c51b74a18a3480052c1a9dd06bca1ca816218b7a5945b86314ddbea953dd7c9e40e9865d9
+DIST ThePEG-2.0.4.tar.bz2 1921082 SHA256 f3b625b411667e2708995f1d1379b5b8691406853c8c2cca2f4e4e6e062da0e4 SHA512 5c037033daa89748267691df644209f62f46ccdff6865cfeceeda6909cff3de0c474c5ced067db6c5659ba6ebe5a51fc9b8fee46a36886278f8d29e13de2a81c WHIRLPOOL fe2f618837b99d034f36aea103918e02e825c3fc220252f69f9b4ca66e4674f0966b6da4915efb7638d3d8168ea742a7ad7ec39065a2bfda2440d4bf26f70307
+DIST cteq5l.LHgrid 134797 SHA256 83c92bc90fd6e12be9cd76bc032eca26dcedbe90f0c11aef843bbf54734d5bba SHA512 1ba41fd773104a933af6f37745dcb6f8422e1aece74ba2b1e15a5fb69fdaf694336c0ec1dc6fbc964d2cf3fe363d17ca0c01a6c2ba6def0afa4389cb4083f34b WHIRLPOOL 8a86877fcbae2b45576e3fae08dfd4771c668257893ba2f813c578641dce9800f42bfd57d0d8ac2abc6bf7cd40921020478f1912014a36cfb722ed408ca1430f
+DIST cteq6ll.LHpdf 1461 SHA256 a3c6bd1ebea30f75fa23fa94922ba281872a66e59465b61f73a0f3629c2b5c03 SHA512 b89a87d1c1c7cc910aa4af53abc3cc6550670a5a6332989232d33c7da1ba01ce49bbbf9f3bb454e673312fb5bc1679f86eea18f95a1443d1c80d3a622e2b8728 WHIRLPOOL 3eeba4277668b92bfa0de3d0fb27d0d9b940904061b6aa212936e4a9b86f9955188b81d9572672f64155abc7f2c6184fc90f8f81dd7eabbe1b015b749a5af304
+EBUILD thepeg-1.9.2.ebuild 2345 SHA256 b4e7400140962004de1040f53274670a491ae11108bd10ca395fd8d34c7fbe9c SHA512 8c90e20af8ad8558df22dba90cb9c505e473d4d7e5c27813d32f8fec376ed4315e7a3ea0edc07967b5a7e9490f459c13093f62c11a70a34f2593f2a12c3b3d3c WHIRLPOOL 83aeb59f9fe1887d709f99c6332d91b9c9bc5b22cdc3d8e5b3b094200e87b36440e0dc8efa672c5727b5b9dda224c1e1988cea82a14460be230ebe423fefc66d
+EBUILD thepeg-2.0.0.ebuild 2345 SHA256 4f905b5756b15c630153655dd63e0c45b5013201f5d6809d33692eeead68b6ca SHA512 3ef17477953fdabbf805344ffce4f22027855e9dfe2a5dec8580c3e144cb891f3bf36bc58ecc11a32da78a707d07afed666ca7eb26d3f9a9d3d72250a29710ba WHIRLPOOL cb1e29986057180eb1cd56a53b2850b93c50469700445250ec1f541635f0ba10d5289c3491aa5e69c463611ebc472b57a13c6fd125a79f5e7ec8f5edf8f494ff
+EBUILD thepeg-2.0.4.ebuild 2227 SHA256 bca027985043510c847504f9f4019143db82c16c9921cf0c846aa7e9f5de9687 SHA512 72b7869e9e56d947849be6c0291cce6ae1607d77757e1364e4b03e7efea97b19f6e33588e111bafc96633d5086ec5aa3be5c095c33d04d25dba2d4d35c1775c7 WHIRLPOOL 7b2740d5f5aeb509d2cd3b78cd1d7cd1c4ec92e1eae898128c55d0ab9deab409e771353ca097af31032d35a58fa79baedd101cc31fe30fb854b07d28288f992d
+MISC ChangeLog 2509 SHA256 db8c890f569e40913ae9e04256171410866681c8c0495de42eb4e71402b181cf SHA512 af2248e7a2a9d4fb1565422d4525e63499a5d77fc5ff51ebee68be2ed5bd9bd747706189cf96a81809b017ffe7fb450793969fa7fdac9f1b7f0d7da3c9ec58f1 WHIRLPOOL af83ca0f3ed92fe2cafb1d50226c8e335039d8c391e46f4f58a79e1030b5f45abf111c6784f5241a1debe7e4b23142e4f15cf79b3736f856983ead64fc136319
+MISC metadata.xml 1066 SHA256 a49853a487c0f8618d6d6529eaa1da6d6a5028ba75ab6c9dd81cfbe580d6b7ea SHA512 f42af9eb2e0cb212ed9c374b9da6775f4857435c5cb418ebef15f39b061b0a2ddb85269aff102e40cc499a9834cb16d24e44d3b3de9de3a26078edfc7162eac5 WHIRLPOOL 3d29946d0a2bdd4eb0dc71ffde636be576482a203e94997ed89eeb30da5c3db6dd3852fb38526306a762965f3676935d47093c10fbfa88f226db62b267bbb10b
diff --git a/sci-physics/thepeg/files/thepeg-1.8.3-java.patch b/sci-physics/thepeg/files/thepeg-1.8.3-java.patch
new file mode 100644
index 000000000000..305207ef779f
--- /dev/null
+++ b/sci-physics/thepeg/files/thepeg-1.8.3-java.patch
@@ -0,0 +1,37 @@
+--- a/java/Makefile.am
++++ b/java/Makefile.am
+@@ -11,8 +12,7 @@
+
+ CLEANFILES = ThePEG.jar thepeg.sh
+
+-jardir = $(pkglibdir)
+-nodist_jar_DATA = ThePEG.jar
++noinst_DATA = ThePEG.jar
+
+ dist_noinst_DATA = $(JAVASOURCES) jar-manifest
+
+@@ -34,7 +34,7 @@
+ $(JAR) cmf ThePEG/jar-manifest ThePEG.jar ThePEG/*.class
+
+ thepeg.sh: thepeg.install Makefile
+- sed -e s:@pkglibdir[@]:$(pkglibdir):g \
++ sed -e s:@datadir[@]:$(datadir):g \
+ -e s:@bindir[@]:$(bindir):g \
+ -e s:@java[@]:$(JAVA):g $(srcdir)/thepeg.install > thepeg.sh
+ chmod +x thepeg.sh
+--- a/java/thepeg.install
++++ b/java/thepeg.install
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-pkglibdir=@pkglibdir@
++source @datadir@/thepeg/package.env
+ bindir=@bindir@
+
+ ThePEG_CMD="${bindir}/setupThePEG"
+@@ -19,4 +19,4 @@
+
+
+
+-exec @java@ ${HEADLESS} -jar ${pkglibdir}/ThePEG.jar ${ThePEG_CMD} "$@"
++exec @java@ ${HEADLESS} -jar ${CLASSPATH} ${ThePEG_CMD} "$@"
diff --git a/sci-physics/thepeg/metadata.xml b/sci-physics/thepeg/metadata.xml
new file mode 100644
index 000000000000..b98a9450c6f2
--- /dev/null
+++ b/sci-physics/thepeg/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription>
+ Toolkit for High Energy Physics Event Generation.
+ ThePEG has been broken out from the PYTHIA7 program
+ to better factorize the parts which were PYTHIA-specific
+ from those which are general model-independent components
+ of the toolkit and which can be used by any event generator model.
+ </longdescription>
+ <use>
+ <flag name="c++11">Build ThePEG using the C++11 standard.
+ Experimental feature, not for production use.</flag>
+ <flag name="fastjet">Adds support for <pkg>sci-physics/fastjet</pkg></flag>
+ <flag name="hepmc">Adds support for High Energy Physics Monte Carlo
+ Generators <pkg>sci-physics/hepmc</pkg></flag>
+ <flag name="lhapdf">Adds support for <pkg>sci-physics/lhapdf</pkg></flag>
+ <flag name="rivet">Adds support for <pkg>sci-physics/rivet</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-physics/thepeg/thepeg-1.9.2.ebuild b/sci-physics/thepeg/thepeg-1.9.2.ebuild
new file mode 100644
index 000000000000..c9f56f360928
--- /dev/null
+++ b/sci-physics/thepeg/thepeg-1.9.2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils elisp-common eutils java-pkg-opt-2
+
+MYP=ThePEG-${PV}
+
+DESCRIPTION="Toolkit for High Energy Physics Event Generation"
+HOMEPAGE="http://home.thep.lu.se/ThePEG/"
+
+TEST_URI="http://www.hepforge.org/archive/lhapdf/pdfsets/current"
+SRC_URI="http://www.hepforge.org/archive/thepeg/${MYP}.tar.bz2
+ test? ( hepmc? (
+ ${TEST_URI}/cteq6ll.LHpdf
+ ${TEST_URI}/cteq5l.LHgrid
+ ${TEST_URI}/GRV98nlo.LHgrid
+ ${TEST_URI}/MRST2001nlo.LHgrid ) )"
+LICENSE="GPL-2"
+
+SLOT="0/18"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 emacs fastjet hepmc java lhapdf rivet static-libs test zlib"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ emacs? ( virtual/emacs )
+ fastjet? ( sci-physics/fastjet:0= )
+ hepmc? ( sci-physics/hepmc:0= )
+ java? ( >=virtual/jre-1.5:* )
+ lhapdf? ( sci-physics/lhapdf:0= )
+ rivet? ( sci-physics/rivet:0= )
+ zlib? ( sys-libs/zlib:0= )"
+DEPEND="${RDEPEND}
+ test? ( sys-process/time )"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.8.3-java.patch )
+
+src_prepare() {
+ find -name 'Makefile.am' -exec \
+ sed -i -e '1ipkgdatadir=$(datadir)/thepeg' {} \; || die
+ # trick to force c++ linking
+ sed -i \
+ -e '1inodist_EXTRA_libThePEG_la_SOURCES = dummy.cxx' \
+ -e '/dist_pkgdata_DATA = ThePEG.el/d' \
+ lib/Makefile.am || die
+ autotools-utils_src_prepare
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable c++11 stdcxx11)
+ $(use_with fastjet fastjet "${EPREFIX}"/usr)
+ $(use_with hepmc hepmc "${EPREFIX}"/usr)
+ $(use_with java javagui)
+ $(use_with lhapdf lhapdf "${EPREFIX}"/usr)
+ $(use_with rivet rivet "${EPREFIX}"/usr)
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ use emacs && elisp-compile lib/ThePEG.el
+}
+
+src_test() {
+ emake LHAPATH="${DISTDIR}" -C "${BUILD_DIR}" check
+}
+
+src_install() {
+ autotools-utils_src_install
+ use emacs && elisp-install ${PN} lib/ThePEG.el{,c}
+ use java && java-pkg_newjar java/ThePEG.jar
+
+ cat <<-EOF > "${T}"/50${PN}
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/ThePEG"
+ EOF
+ doenvd "${T}"/50${PN}
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-physics/thepeg/thepeg-2.0.0.ebuild b/sci-physics/thepeg/thepeg-2.0.0.ebuild
new file mode 100644
index 000000000000..dc94272fe72e
--- /dev/null
+++ b/sci-physics/thepeg/thepeg-2.0.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils elisp-common eutils java-pkg-opt-2
+
+MYP=ThePEG-${PV}
+
+DESCRIPTION="Toolkit for High Energy Physics Event Generation"
+HOMEPAGE="http://home.thep.lu.se/ThePEG/"
+
+TEST_URI="http://www.hepforge.org/archive/lhapdf/pdfsets/current"
+SRC_URI="http://www.hepforge.org/archive/thepeg/${MYP}.tar.bz2
+ test? ( hepmc? (
+ ${TEST_URI}/cteq6ll.LHpdf
+ ${TEST_URI}/cteq5l.LHgrid
+ ${TEST_URI}/GRV98nlo.LHgrid
+ ${TEST_URI}/MRST2001nlo.LHgrid ) )"
+LICENSE="GPL-2"
+
+SLOT="0/20"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 emacs fastjet hepmc java lhapdf rivet static-libs test zlib"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ emacs? ( virtual/emacs )
+ fastjet? ( sci-physics/fastjet:0= )
+ hepmc? ( sci-physics/hepmc:0= )
+ java? ( >=virtual/jre-1.5:* )
+ lhapdf? ( sci-physics/lhapdf:0= )
+ rivet? ( sci-physics/rivet:0= )
+ zlib? ( sys-libs/zlib:0= )"
+DEPEND="${RDEPEND}
+ test? ( sys-process/time )"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.8.3-java.patch )
+
+src_prepare() {
+ find -name 'Makefile.am' -exec \
+ sed -i -e '1ipkgdatadir=$(datadir)/thepeg' {} \; || die
+ # trick to force c++ linking
+ sed -i \
+ -e '1inodist_EXTRA_libThePEG_la_SOURCES = dummy.cxx' \
+ -e '/dist_pkgdata_DATA = ThePEG.el/d' \
+ lib/Makefile.am || die
+ autotools-utils_src_prepare
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable c++11 stdcxx11)
+ $(use_with fastjet fastjet "${EPREFIX}"/usr)
+ $(use_with hepmc hepmc "${EPREFIX}"/usr)
+ $(use_with java javagui)
+ $(use_with lhapdf lhapdf "${EPREFIX}"/usr)
+ $(use_with rivet rivet "${EPREFIX}"/usr)
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ use emacs && elisp-compile lib/ThePEG.el
+}
+
+src_test() {
+ emake LHAPATH="${DISTDIR}" -C "${BUILD_DIR}" check
+}
+
+src_install() {
+ autotools-utils_src_install
+ use emacs && elisp-install ${PN} lib/ThePEG.el{,c}
+ use java && java-pkg_newjar java/ThePEG.jar
+
+ cat <<-EOF > "${T}"/50${PN}
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/ThePEG"
+ EOF
+ doenvd "${T}"/50${PN}
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-physics/thepeg/thepeg-2.0.4.ebuild b/sci-physics/thepeg/thepeg-2.0.4.ebuild
new file mode 100644
index 000000000000..84e48567e16a
--- /dev/null
+++ b/sci-physics/thepeg/thepeg-2.0.4.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools elisp-common java-pkg-opt-2
+
+MY_P=ThePEG-${PV}
+
+DESCRIPTION="Toolkit for High Energy Physics Event Generation"
+HOMEPAGE="http://home.thep.lu.se/ThePEG/"
+
+TEST_URI="http://www.hepforge.org/archive/lhapdf/pdfsets/current"
+SRC_URI="http://www.hepforge.org/archive/thepeg/${MY_P}.tar.bz2
+ test? ( hepmc? (
+ ${TEST_URI}/cteq6ll.LHpdf
+ ${TEST_URI}/cteq5l.LHgrid
+ ${TEST_URI}/GRV98nlo.LHgrid
+ ${TEST_URI}/MRST2001nlo.LHgrid ) )"
+LICENSE="GPL-2"
+
+SLOT="0/20"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 emacs fastjet hepmc java lhapdf rivet static-libs test zlib"
+
+RDEPEND="
+ sci-libs/gsl:0=
+ emacs? ( virtual/emacs )
+ fastjet? ( sci-physics/fastjet:0= )
+ hepmc? ( sci-physics/hepmc:0= )
+ java? ( >=virtual/jre-1.5:* )
+ lhapdf? ( >=sci-physics/lhapdf-6.0:0= )
+ rivet? ( sci-physics/rivet:0= )
+ zlib? ( sys-libs/zlib:0= )"
+DEPEND="${RDEPEND}
+ test? ( sys-process/time )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.8.3-java.patch )
+
+src_prepare() {
+ find -name 'Makefile.am' -exec \
+ sed -i -e '1ipkgdatadir=$(datadir)/thepeg' {} \; || die
+ # trick to force c++ linking
+ sed -i \
+ -e '1inodist_EXTRA_libThePEG_la_SOURCES = dummy.cxx' \
+ -e '/dist_pkgdata_DATA = ThePEG.el/d' \
+ lib/Makefile.am || die
+ default
+ java-pkg-opt-2_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable c++11 stdcxx11) \
+ $(use_with fastjet fastjet "${EPREFIX}"/usr) \
+ $(use_with hepmc hepmc "${EPREFIX}"/usr) \
+ $(use_with java javagui) \
+ $(use_with lhapdf lhapdf "${EPREFIX}"/usr) \
+ $(use_with rivet rivet "${EPREFIX}"/usr) \
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+}
+
+src_compile() {
+ default
+ use emacs && elisp-compile lib/ThePEG.el
+}
+
+src_test() {
+ emake LHAPATH="${DISTDIR}" check
+}
+
+src_install() {
+ default
+ use emacs && elisp-install ${PN} lib/ThePEG.el{,c}
+ use java && java-pkg_newjar java/ThePEG.jar
+
+ cat <<-EOF > "${T}"/50${PN}
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/ThePEG"
+ EOF
+ doenvd "${T}"/50${PN}
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-physics/xfoil/Manifest b/sci-physics/xfoil/Manifest
new file mode 100644
index 000000000000..c040948c29ff
--- /dev/null
+++ b/sci-physics/xfoil/Manifest
@@ -0,0 +1,11 @@
+AUX xfoil-6.96-gfortran.patch 920 SHA256 2f4f34aabea6d715ef61d0c71acf629888d74740e9d9b3d5055fe0d68c1c1ec9 SHA512 7f708a3176a08367b125cbe30dcb1830e05df55706e32b5e8964317d0bf961ba0032dd7237f3a721ec3d7b813792decfb9a6d4e750fbb72d70a92a26b1d287ef WHIRLPOOL 4705980e3e5573c9361d262b25bed45316fbc58b37db2985d0506a03191f629e2e4d94874fc41e5eda10fa5fe248d088bd8ff1b3702472d90c278808e1c8fbaf
+AUX xfoil-6.97-overflow.patch 558 SHA256 8c17bc84c000147cfc50915690244cb1b6e801c9e5e1e4cad8eb5f4190d94df4 SHA512 98e12c43fe8b2cbb06595c09f0a65ebf25271649918272672bd72e7132792f6be107874b6ecd6cf49e18e5cbf970ae043da30c3e33e659b155115bb00bfd5a47 WHIRLPOOL 7be53a8627fa7c2c99cc88c4148a379b82b3ed10a6ccfaf30a311b9ffbf538ce1347700f12d44ddbc2083c785b72b7ffb9102369d71f264d2f5e3567140a0b99
+AUX xfoil-6.99-overflow.patch 399 SHA256 8b3c7b22c4439936ec4c66c09cb71288903d43ea238d6bf275499475bf0c8f6b SHA512 8d6defa10c11c204128bea359461da12c3780f178d9738071f5f111d26d6151adbfa67e6898b814df4740e6b7006f5bbbd6ec3bc4ddf65fb511b1ffdf79c468f WHIRLPOOL 98be0c2ecf87579a00a03467c5007ff66905a2c6f52aa3eea1bff13dce4a8b16dc76e61a1f03c2933f1bf999ffdccb4b813a7e5424ca72b3a2a19848a6386451
+DIST dataflow.pdf 7654 SHA256 4596c77a3fa24cd334b35c34fcbd0b4f1d9055273c0862643e2d07b5e774aff5 SHA512 1bb5be8e70fca1fa90f28d214140e96a8795c7d82a37f4fe4d68606fa3eb28252913b8fb13eb3e97a3cf05c3001c88dbfcdb8a2f20d4baed5e730770a2d602b1 WHIRLPOOL 8e13137933ae0e8edc2890ccdd0537444d5fa9530e76caefb3701173c7720d2cb68d9073b70e7948a11ed6668dcd64b3685c750f5cef889c31d1506d3788a530
+DIST xfoil6.97.tar.gz 3972497 SHA256 293e28e269bd88a62f8b6ba6bf684f16843f6776736e6b77aaa8b6bebc467a81 SHA512 02c0a123fb99fa20de1e3577ca7c6ce00d494058f2ef3ec82e3fdea48901f4346180aea3436e001c5b90401007ccdd5b7e9daa6a96794f0d6b5781a5b36e36e7 WHIRLPOOL 3de5e6c56a906a71b2be1fcf39ea031454c9192b4a649a23aaa889566fea2e92b37239fa6ed90c4b050bdb5759943d0265881f316ecd5b48a06fe4217af36ef7
+DIST xfoil6.99.tgz 4515991 SHA256 5c0250643f52ce0e75d7338ae2504ce7907f2d49a30f921826717b8ac12ebe40 SHA512 6f5bed520826dba2efd1b191b1f90dd810b53d9041cbbaddde09207ba9042f99dd0c9e9aa8b8cdf48767bf2695e328ac8fbd297e1510e53ac10b0f1eea35cfef WHIRLPOOL 88ca7c92fb1335f416577dc7df67e22581a32b56affb234f440b9523122429ad7ad37455e3270461909b0eb3d181013daa3db0e869086e218e2eaf5bf5f4e3ce
+EBUILD xfoil-6.97-r1.ebuild 1757 SHA256 9aef8831214a2b71f993d25e3840e0622f379e6ef4825177efc3a14a1bd5f1fb SHA512 e17aff9ca7fde8c9aacfd82364f20f01e3081a63b6c5dd9a27f09e5b7236c4915264bf3a3df510a37ab11a6ba010eadece099e3cfd658d83aa55c0d93f4e4959 WHIRLPOOL 4664c4cb3b1b81b9af9ab64e2d0ae101776a486bb812494873f08db216583841cfaefa29a888c76f1c622820f49b8b00ee40eeb652e1fb5ba4af8b30d0ec41e4
+EBUILD xfoil-6.99.ebuild 1796 SHA256 59cf910244158dfef838ad81852aacf921e259c14542e3ff4f8300078a5e950b SHA512 9f85697b7c355c17ac24ca7971de844af2e2ad194fda2d88cfbaf6945ef35f915dcbf89f2bf46f5e8afd9ad4a064ee25ebdb4a31095726b090a32035b49e001e WHIRLPOOL cf05a3d4af2f13175f0f25a3cfd89b3c3409d9f4a39af03e1f997d2361b2d6a6b881ebc325192b3335c28b1b27e102f53d27b47a30c3b4a693088690416ef060
+MISC ChangeLog 3053 SHA256 7031ae77dad1fbdb0e60b5e023b1eb36aa35c302c265f6cef08b1233e0927420 SHA512 c057e66ad560aee9457f60257b219c251c24fd3082e8bf0811864b325d827ee3f49f9c8ad9f6f27b095721d31a6cfc5e173198e4894361a2523b6759e45a7f45 WHIRLPOOL 7b01d55f8a8db197ceb243296df9c61b2947210fffd6ae2a3409ffd89351424247d30ef9bf4df0e9f99a0c80f4d2110ce747c182218ae53acd1058f0fc31d380
+MISC ChangeLog-2015 3764 SHA256 dd6f4885236409f0c33989b483444cdde05c93d57785fc16478211d4c90ce1b9 SHA512 970115eff91fdbc7c7b1953156b53468f7334694441a379d79fc4abd52aa88570fd18683561fdbdabaa3a08cc3bd2ab3fc8219774437e0accaa4522dd1643bee WHIRLPOOL 5ddab93da3802fb49140474d87319f4d5af0b340110e9d4ccdcc70fab0bae03e2c5a2c603f06ce6b6c3aed6edede66c76693cea3797bf06ea4ac8b827a664b8e
+MISC metadata.xml 980 SHA256 3ee003c7965d6b6bb89c8f918c6e569cf0d917d7fde9887da6f1e2a86e6dfb59 SHA512 7f08a27aabf08fcaed680a4422b318aac095cafef30677cf6b9d5d0336856249b4bd407a364eebf713e321c481c650352e8b12f8242980a6482b745f7c9315af WHIRLPOOL 1141aa7c20df256a35b55b98acad86e289b8fdaf1ae74c1d01f066536b861960e307ec738130ea3d891147eed8e855609522e4c8c20bfc9f0daf1518a50f6094
diff --git a/sci-physics/xfoil/files/xfoil-6.96-gfortran.patch b/sci-physics/xfoil/files/xfoil-6.96-gfortran.patch
new file mode 100644
index 000000000000..b63db05b254c
--- /dev/null
+++ b/sci-physics/xfoil/files/xfoil-6.96-gfortran.patch
@@ -0,0 +1,29 @@
+--- a/plotlib/ps_subs.f
++++ b/plotlib/ps_subs.f
+@@ -559,7 +559,7 @@
+ c in the iout array (3,1,3,1,3,1,3,1)
+ c Note: the bit mask is shifted to always start counting on a '1' bit.
+ c
+-c--- Uses the library routines and() and rshift() for bit manipulation
++c--- Uses the library routines and() and ishft() for bit manipulation
+ c which are present in most fortran libraries as extensions to f77.
+ c
+ dimension iout(*)
+@@ -570,7 +570,7 @@
+ ibitold = and(1,imask)
+ if(ibitold.NE.0) go to 5
+ nshft = n
+- imask = rshift(imask,1)
++ imask = ishft(imask,-1)
+ end do
+ c
+ 5 nout = 0
+@@ -594,7 +594,7 @@
+ c
+ ibitold = ibit
+ nbits = nbits + 1
+- imask = rshift(imask,1)
++ imask = ishft(imask,-1)
+ end do
+ c--- Add final bit(s) to end of 16 bits checked
+ c--- Now append any zero bits shifted out originally
diff --git a/sci-physics/xfoil/files/xfoil-6.97-overflow.patch b/sci-physics/xfoil/files/xfoil-6.97-overflow.patch
new file mode 100644
index 000000000000..6f71440f050c
--- /dev/null
+++ b/sci-physics/xfoil/files/xfoil-6.97-overflow.patch
@@ -0,0 +1,22 @@
+--- a/src/pplot.f
++++ b/src/pplot.f
+@@ -36,7 +36,7 @@
+ PROGRAM PPLOT
+ INCLUDE 'PPLOT.INC'
+ C
+- LOGICAL ERROR, LGETFN
++ LOGICAL ERROR, LGETFN, LERR
+ REAL RINP(10)
+ REAL CPOLO(NAX,IPTOT,NPX), VPOLO(NAX,2,NPX)
+ C
+--- a/src/xoper.f
++++ b/src/xoper.f
+@@ -114,7 +114,7 @@
+ C---- don't try to read integers, since might get integer overflow
+ DO I=1, NINPUT
+ IF(ABS(RINPUT(I)) .GT. 2.1E9) THEN
+- IINPUT(I) = 2**31
++ IINPUT(I) = HUGE(0)
+ ELSE
+ IINPUT(I) = INT(RINPUT(I))
+ ENDIF
diff --git a/sci-physics/xfoil/files/xfoil-6.99-overflow.patch b/sci-physics/xfoil/files/xfoil-6.99-overflow.patch
new file mode 100644
index 000000000000..d35528caa089
--- /dev/null
+++ b/sci-physics/xfoil/files/xfoil-6.99-overflow.patch
@@ -0,0 +1,11 @@
+--- Xfoil/src/xoper.f.orig 2013-12-08 22:21:22.000000000 +0400
++++ Xfoil/src/xoper.f 2017-03-05 23:02:33.214895357 +0300
+@@ -114,7 +114,7 @@
+ C---- don't try to read integers, since might get integer overflow
+ DO I=1, NINPUT
+ IF(ABS(RINPUT(I)) .GT. 2.1E9) THEN
+- IINPUT(I) = 2**30
++ IINPUT(I) = HUGE(0)
+ ELSE
+ IINPUT(I) = INT(RINPUT(I))
+ ENDIF
diff --git a/sci-physics/xfoil/metadata.xml b/sci-physics/xfoil/metadata.xml
new file mode 100644
index 000000000000..d754bd62132e
--- /dev/null
+++ b/sci-physics/xfoil/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ XFOIL is an interactive program for the design and analysis of subsonic isolated airfoils.
+ It consists of a collection of menu-driven routines which perform various useful functions such as:
+ * Viscous (or inviscid) analysis of an existing airfoil
+ * Airfoil design and redesign by interactive modification of surface speed distributions
+ * Airfoil redesign by interactive modification of geometric parameters
+ * Blending of airfoils
+ * Writing and reading of airfoil coordinates and polar save files
+ * Plotting of geometry, pressure distributions, and multiple polars
+</longdescription>
+</pkgmetadata>
diff --git a/sci-physics/xfoil/xfoil-6.97-r1.ebuild b/sci-physics/xfoil/xfoil-6.97-r1.ebuild
new file mode 100644
index 000000000000..4582882797f9
--- /dev/null
+++ b/sci-physics/xfoil/xfoil-6.97-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fortran-2
+
+DESCRIPTION="Design and analysis of subsonic isolated airfoils"
+HOMEPAGE="http://raphael.mit.edu/xfoil/"
+SRC_URI="
+ http://web.mit.edu/drela/Public/web/${PN}/${PN}${PV}.tar.gz
+ doc? ( http://web.mit.edu/drela/Public/web/${PN}/dataflow.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-overflow.patch )
+
+S="${WORKDIR}/${PN^}"
+
+src_prepare() {
+ # fix bug #147033
+ [[ $(tc-getFC) == *gfortran ]] && PATCHES+=( "${FILESDIR}"/${PN}-6.96-gfortran.patch )
+ default
+
+ sed \
+ -e '/^FC/d' \
+ -e '/^CC/d' \
+ -e '/^FFLAGS/d' \
+ -e '/^CFLAGS/d' \
+ -e 's/^\(FFLOPT .*\)/FFLOPT = $(FFLAGS)/g' \
+ -i {bin,plotlib,orrs/bin}/Makefile plotlib/config.make \
+ || die "sed for flags and compilers failed"
+
+ sed \
+ -e "s:/var/local/codes/orrs/osmap.dat:${EPREFIX}/usr/share/xfoil/orrs/osmap.dat:" \
+ -i orrs/src/osmap.f || die "sed osmap.f failed"
+}
+
+src_compile() {
+ emake -C orrs/bin FLG="${FFLAGS}" FTNLIB="${LDFLAGS}" OS
+ pushd orrs >/dev/null || die
+ bin/osgen osmaps_ns.lst
+ popd >/dev/null || die
+ emake -C plotlib CFLAGS="${CFLAGS} -DUNDERSCORE"
+
+ local i
+ for i in xfoil pplot pxplot; do
+ emake -C bin \
+ PLTOBJ="../plotlib/libPlt.a" \
+ CFLAGS="${CFLAGS} -DUNDERSCORE" \
+ FTNLIB="${LDFLAGS}" \
+ $i
+ done
+}
+
+src_install() {
+ dobin bin/{pplot,pxplot,xfoil}
+ insinto /usr/share/xfoil/orrs
+ doins orrs/osm*.dat
+
+ local DOCS=( *.txt README )
+ use doc && DOCS+=( "${DISTDIR}"/dataflow.pdf )
+ einstalldocs
+ if use examples; then
+ dodoc -r runs
+ docompress -x /usr/share/doc/${PF}/runs
+ fi
+}
diff --git a/sci-physics/xfoil/xfoil-6.99.ebuild b/sci-physics/xfoil/xfoil-6.99.ebuild
new file mode 100644
index 000000000000..ab0b383ef990
--- /dev/null
+++ b/sci-physics/xfoil/xfoil-6.99.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit fortran-2
+
+DESCRIPTION="Design and analysis of subsonic isolated airfoils"
+HOMEPAGE="http://raphael.mit.edu/xfoil/"
+SRC_URI="
+ http://web.mit.edu/drela/Public/web/${PN}/${PN}${PV}.tgz
+ doc? ( http://web.mit.edu/drela/Public/web/${PN}/dataflow.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-overflow.patch )
+
+S="${WORKDIR}/${PN^}"
+
+src_prepare() {
+ # fix bug #147033
+ [[ $(tc-getFC) == *gfortran ]] && PATCHES+=( "${FILESDIR}"/${PN}-6.96-gfortran.patch )
+ default
+
+ sed \
+ -e '/^FC/d' \
+ -e '/^CC/d' \
+ -e '/^FFLAGS/d' \
+ -e '/^CFLAGS/d' \
+ -e '/INSTALLCMD/d' \
+ -e 's/^\(FFLOPT .*\)/FFLOPT = $(FFLAGS)/g' \
+ -i {bin,plotlib,orrs/bin}/Makefile plotlib/config.make \
+ || die "sed for flags and compilers failed"
+
+ sed \
+ -e "s:/var/local/codes/orrs/osmap.dat:${EPREFIX}/usr/share/xfoil/orrs/osmap.dat:" \
+ -i orrs/src/osmap.f || die "sed osmap.f failed"
+}
+
+src_compile() {
+ emake -C orrs/bin FLG="${FFLAGS}" FTNLIB="${LDFLAGS}" OS
+ pushd orrs >/dev/null || die
+ bin/osgen osmaps_ns.lst || die
+ popd >/dev/null || die
+ emake -C plotlib CFLAGS="${CFLAGS} -DUNDERSCORE"
+
+ local i
+ for i in blu pplot pxplot xfoil; do
+ emake -C bin \
+ PLTOBJ="../plotlib/libPlt_gSP.a" \
+ CFLAGS="${CFLAGS} -DUNDERSCORE" \
+ FTNLIB="${LDFLAGS}" \
+ $i
+ done
+}
+
+src_install() {
+ dobin bin/{blu,pplot,pxplot,xfoil}
+ insinto /usr/share/xfoil/orrs
+ doins orrs/osm*.dat
+
+ local DOCS=( *.txt README )
+ use doc && DOCS+=( "${DISTDIR}"/dataflow.pdf )
+ einstalldocs
+ if use examples; then
+ dodoc -r runs
+ docompress -x /usr/share/doc/${PF}/runs
+ fi
+}
diff --git a/sci-physics/yoda/Manifest b/sci-physics/yoda/Manifest
new file mode 100644
index 000000000000..e67739a468ac
--- /dev/null
+++ b/sci-physics/yoda/Manifest
@@ -0,0 +1,6 @@
+DIST YODA-1.4.0.tar.bz2 809432 SHA256 e76a129f7c2b72b53525fe0b712606eeeab0dc145daa070ebf0728f0384eaf48 SHA512 f1873888f3d2c28d42ac54fa9f3fa4a98e648a638ebceffce0a2f742c5fb6647fabd0de49c00407741e937600fc8a12d33ca26b8b9cd9b81c28a4d2e11f2bd3a WHIRLPOOL 6c8e0176b729d951351b3b9d574c91add5d6302aa76417241e560f3f3bbf38f4b60f41713d89a03a62b1c4ad3a98bd5342fd05901671e6aedf0c2c11dc36b024
+DIST YODA-1.6.5.tar.bz2 818613 SHA256 1477fe754cfe2e4e06aa363a773accf18aab960a8b899968b77834368cac14c5 SHA512 bead0a3ada233c1fbafe66d25e65262c20d9a9dfa6265440320a0fc782e91b3ac6581698e2015d86f2b58dc305dedbc48ed648ff03ec9f6abc11a7fb27938b1a WHIRLPOOL b6b88832b89357dbf0309641f9e4180f0c0fabf917ec7f36bafe75b811b849f0cf1cf24877b468b50d340f7a1ae1575d07fc63e9ec810a318dda7adb9b9aeed7
+EBUILD yoda-1.4.0.ebuild 1112 SHA256 248324b803a85c8a657ec129a18d4d32250bd5564e879ba92624ef4231e4c18c SHA512 8417899f7db56918156257996539b29cc5756b18f606919e43a8e8a13cebedf45d966c8191065a1057c6f459c3a3a321d3dc65cbbb27e57ef57d1a4ab399c5e8 WHIRLPOOL 43661afb14d3f7bf3623854c92668d6055cc76a951b3883e5602d1c21285858d9d67fc24f0a579011ed280bcc46aeb515a3af9aa82f52479b69ecf3a62dcadbe
+EBUILD yoda-1.6.5.ebuild 1042 SHA256 5fcaa76573b60a3ddcec979fc49e5026a5819c75bf54ff24f7aef2d494e3ea35 SHA512 0fe36248bd11c97839ff9a8ddcc2f0db306a16a906354289a8fca879d46b5eece81cbc2cb71334d5dd5ee3cb8a15dbea3efa5e6535183610279ea58711d45cbb WHIRLPOOL ba668558a43d32fdad6137630131c315a100c32459f4a3064d9c075d9638125bbae52e754da713507b8358238dba53a47288b5af7c9de454b1c9bc8100083021
+MISC ChangeLog 1872 SHA256 7d953111ff71d6a07e5e65ccbda05ed550f1b470431232ab4ecc98a91248c475 SHA512 8f888c3cf1075aa3ee06d2b9145de4d442fb3b16e9c9e1fea88255faddf5c639e44b9fbb9867e740d9b600fcb4b08d30252a5ffb93d90cc38a7d58ef80dc1760 WHIRLPOOL f7dce5f56e3a01e239e9e42b7f3d43cb4dfbb75662ddc8e97e25e4340b52b7f78a8c6442f8b4bdec5180d6f2a69c4a074569a197a3fdd0359d7520ef094352dc
+MISC metadata.xml 719 SHA256 42c63651baa2238ff23f6647011ab4c9412829d14b87088d9a5e7bcfa39bf6e6 SHA512 e41f7be6cad26c10a4632a0d70de86793771a3c616f649d526885d960bc880c5300e08a88f9d3c97be017f3682e46a18d3ef271264a720a297355f56590c19c8 WHIRLPOOL 34fb7a46655897a5447498445d8cf618ae0df98e3653ef16cedfa77fa4ce66d806ae638a1ef0b2722aa82c50ad8b8b7ac80cb52b2281db9a5ac82e2d3c531215
diff --git a/sci-physics/yoda/metadata.xml b/sci-physics/yoda/metadata.xml
new file mode 100644
index 000000000000..61a7329540bc
--- /dev/null
+++ b/sci-physics/yoda/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+</maintainer>
+<longdescription>
+ Yet more Objects for Data Analysis is a small set of data analysis
+ (specifically histogramming) classes being developed by MCnet
+ members as a lightweight common system for MC event generator
+ validation analyses, particularly as the core histogramming system
+ in Rivet.
+</longdescription>
+<use>
+ <flag name="c++11"> Build using the C++11 standard</flag>
+ <flag name="root">Adds support for <pkg>sci-physics/root</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-physics/yoda/yoda-1.4.0.ebuild b/sci-physics/yoda/yoda-1.4.0.ebuild
new file mode 100644
index 000000000000..81a8d7b03a90
--- /dev/null
+++ b/sci-physics/yoda/yoda-1.4.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 autotools-utils bash-completion-r1
+
+MYP=YODA-${PV}
+
+DESCRIPTION="Yet more Objects for (High Energy Physics) Data Analysis"
+HOMEPAGE="http://yoda.hepforge.org/"
+
+SRC_URI="http://www.hepforge.org/archive/${PN}/${MYP}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="c++11 python root static-libs"
+
+RDEPEND="
+ dev-libs/boost:0=
+ python? ( ${PYTHON_DEPS} )
+ root? ( sci-physics/root:0=[python=,${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MYP}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable c++11 stdcxx11)
+ $(use_enable python pyext)
+ $(use_enable root)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ newbashcomp "${ED}"/usr/share/YODA/yoda-completion yoda
+}
diff --git a/sci-physics/yoda/yoda-1.6.5.ebuild b/sci-physics/yoda/yoda-1.6.5.ebuild
new file mode 100644
index 000000000000..00d3f8949c26
--- /dev/null
+++ b/sci-physics/yoda/yoda-1.6.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit bash-completion-r1 python-single-r1
+
+DESCRIPTION="Yet more Objects for (High Energy Physics) Data Analysis"
+HOMEPAGE="http://yoda.hepforge.org/"
+
+SRC_URI="http://www.hepforge.org/archive/${PN}/${P^^}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="python root static-libs"
+
+RDEPEND="
+ dev-libs/boost:=
+ python? ( ${PYTHON_DEPS} )
+ root? ( sci-physics/root:=[python=,${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ python? ( dev-python/cython[${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${P^^}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ econf \
+ $(use_enable python pyext) \
+ $(use_enable root) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ newbashcomp "${ED%/}"/usr/share/YODA/yoda-completion ${PN}
+ rm "${ED%/}"/usr/share/YODA/yoda-completion || die
+}