summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.1.ebuild41
-rw-r--r--sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.2.ebuild41
-rw-r--r--sci-chemistry/GromacsWrapper/Manifest2
-rw-r--r--sci-chemistry/GromacsWrapper/files/0001-Drop-chmod-hack.patch28
-rw-r--r--sci-chemistry/GromacsWrapper/metadata.xml12
-rw-r--r--sci-chemistry/PyMca/Manifest1
-rw-r--r--sci-chemistry/PyMca/PyMca-4.6.2-r1.ebuild41
-rw-r--r--sci-chemistry/PyMca/PyMca-4.6.2.ebuild43
-rw-r--r--sci-chemistry/PyMca/files/4.4.1_p1-gentoo.patch40
-rw-r--r--sci-chemistry/PyMca/files/4.4.1_p1-impl-dec.patch12
-rw-r--r--sci-chemistry/PyMca/files/PyMca-4.6.2-gentoo.patch16
-rw-r--r--sci-chemistry/PyMca/metadata.xml22
-rw-r--r--sci-chemistry/acpype/Manifest3
-rw-r--r--sci-chemistry/acpype/acpype-366.ebuild38
-rw-r--r--sci-chemistry/acpype/acpype-374.ebuild38
-rw-r--r--sci-chemistry/acpype/acpype-389.ebuild39
-rw-r--r--sci-chemistry/acpype/files/acpype.patch37
-rw-r--r--sci-chemistry/acpype/metadata.xml9
-rw-r--r--sci-chemistry/ambertools/Manifest2
-rw-r--r--sci-chemistry/ambertools/ambertools-1.5-r1.ebuild144
-rw-r--r--sci-chemistry/ambertools/files/ambertools-1.5-gentoo.patch386
-rw-r--r--sci-chemistry/ambertools/metadata.xml9
-rw-r--r--sci-chemistry/apbs/Manifest1
-rw-r--r--sci-chemistry/apbs/apbs-1.4.1-r2.ebuild128
-rw-r--r--sci-chemistry/apbs/files/apbs-1.4.1-manip.patch50
-rw-r--r--sci-chemistry/apbs/files/apbs-1.4.1-multilib.patch92
-rw-r--r--sci-chemistry/apbs/files/apbs-1.4.1-python.patch122
-rw-r--r--sci-chemistry/apbs/metadata.xml26
-rw-r--r--sci-chemistry/aqua/Manifest2
-rw-r--r--sci-chemistry/aqua/aqua-3.2-r2.ebuild93
-rw-r--r--sci-chemistry/aqua/files/3.2-flags.patch84
-rw-r--r--sci-chemistry/aqua/metadata.xml8
-rw-r--r--sci-chemistry/aria/Manifest1
-rw-r--r--sci-chemistry/aria/aria-2.3.2_p20130826.ebuild89
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-python.patch30
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch139
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-through-space.patch118
-rw-r--r--sci-chemistry/aria/metadata.xml8
-rw-r--r--sci-chemistry/arp-warp-bin/Manifest1
-rw-r--r--sci-chemistry/arp-warp-bin/arp-warp-bin-7.5.ebuild81
-rw-r--r--sci-chemistry/arp-warp-bin/files/7.3-setup.patch30
-rw-r--r--sci-chemistry/arp-warp-bin/metadata.xml5
-rw-r--r--sci-chemistry/autodock/Manifest1
-rw-r--r--sci-chemistry/autodock/autodock-4.2.6.ebuild102
-rw-r--r--sci-chemistry/autodock/files/4.0.1-gcc-4.3.patch10
-rw-r--r--sci-chemistry/autodock/files/autodock-4.2.6-buildsystem.patch44
-rw-r--r--sci-chemistry/autodock/metadata.xml5
-rw-r--r--sci-chemistry/autodock_vina/Manifest1
-rw-r--r--sci-chemistry/autodock_vina/autodock_vina-1.1.2.ebuild47
-rw-r--r--sci-chemistry/autodock_vina/files/1.1.1-gentoo.patch68
-rw-r--r--sci-chemistry/autodock_vina/files/1.1.2-gentoo.patch72
-rw-r--r--sci-chemistry/autodock_vina/files/autodock_vina-1.1.2-boost-filesystem.patch79
-rw-r--r--sci-chemistry/autodock_vina/metadata.xml29
-rw-r--r--sci-chemistry/avogadro/Manifest2
-rw-r--r--sci-chemistry/avogadro/avogadro-1.0.3-r2.ebuild55
-rw-r--r--sci-chemistry/avogadro/avogadro-1.1.0.ebuild60
-rw-r--r--sci-chemistry/avogadro/files/1.0.1-gl2ps.patch39
-rw-r--r--sci-chemistry/avogadro/files/avogadro-1.1.0-textrel.patch29
-rw-r--r--sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch16
-rw-r--r--sci-chemistry/avogadro/metadata.xml17
-rw-r--r--sci-chemistry/azara/Manifest1
-rw-r--r--sci-chemistry/azara/azara-2.8-r4.ebuild98
-rw-r--r--sci-chemistry/azara/azara-2.8-r5.ebuild99
-rw-r--r--sci-chemistry/azara/files/2.8-64bit.patch85
-rw-r--r--sci-chemistry/azara/files/2.8-impl-dec.patch226
-rw-r--r--sci-chemistry/azara/files/2.8-prll.patch387
-rw-r--r--sci-chemistry/azara/files/2.8-python.patch44
-rw-r--r--sci-chemistry/azara/metadata.xml9
-rw-r--r--sci-chemistry/babel/Manifest1
-rw-r--r--sci-chemistry/babel/babel-1.6-r1.ebuild37
-rw-r--r--sci-chemistry/babel/files/10babel1
-rw-r--r--sci-chemistry/babel/files/babel-1.6-gcc32.diff28
-rw-r--r--sci-chemistry/babel/files/babel-1.6-gentoo.diff28
-rw-r--r--sci-chemistry/babel/files/babel-1.6-makefile.patch33
-rw-r--r--sci-chemistry/babel/metadata.xml5
-rw-r--r--sci-chemistry/balbes/Manifest2
-rw-r--r--sci-chemistry/balbes/balbes-1.0.0_p100317-r2.ebuild79
-rw-r--r--sci-chemistry/balbes/files/1.0.0_p100317-makefile.patch107
-rw-r--r--sci-chemistry/balbes/files/pyxml-0.8.4-python-2.6.patch28
-rw-r--r--sci-chemistry/balbes/metadata.xml18
-rw-r--r--sci-chemistry/ball/Manifest1
-rw-r--r--sci-chemistry/ball/ball-1.4.2.ebuild83
-rw-r--r--sci-chemistry/ball/files/ball-1.4.1-BondOrder.xml.patch30
-rw-r--r--sci-chemistry/ball/files/ball-1.4.1-missing-signed.patch26
-rw-r--r--sci-chemistry/ball/files/ball-1.4.1-multilib.patch39
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-Fix-compilation-of-sipModularWidget.patch40
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-PDBFile-Fix-compilation-with-gcc-4.8.patch28
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch44
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-underlinking.patch16
-rw-r--r--sci-chemistry/ball/metadata.xml32
-rw-r--r--sci-chemistry/bkchem/Manifest1
-rw-r--r--sci-chemistry/bkchem/bkchem-0.14.0_pre2-r1.ebuild41
-rw-r--r--sci-chemistry/bkchem/files/0.14.0_pre1-piddle-Fix-assertions.patch48
-rw-r--r--sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch106
-rw-r--r--sci-chemistry/bkchem/metadata.xml8
-rw-r--r--sci-chemistry/bodr/Manifest2
-rw-r--r--sci-chemistry/bodr/bodr-10.ebuild27
-rw-r--r--sci-chemistry/bodr/bodr-9-r1.ebuild27
-rw-r--r--sci-chemistry/bodr/metadata.xml15
-rw-r--r--sci-chemistry/burrow-owl/Manifest2
-rw-r--r--sci-chemistry/burrow-owl/burrow-owl-1.5.1.ebuild53
-rw-r--r--sci-chemistry/burrow-owl/files/1.4-glibc-2.12.patch38
-rw-r--r--sci-chemistry/burrow-owl/files/1.4-include.patch12
-rw-r--r--sci-chemistry/burrow-owl/files/burrow-owl-1.5-prll.patch20
-rw-r--r--sci-chemistry/burrow-owl/metadata.xml8
-rw-r--r--sci-chemistry/cara-bin/Manifest2
-rw-r--r--sci-chemistry/cara-bin/cara-bin-1.8.4-r1.ebuild49
-rw-r--r--sci-chemistry/cara-bin/metadata.xml7
-rw-r--r--sci-chemistry/ccp4-apps/Manifest2
-rw-r--r--sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r13.ebuild395
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-clipper-template.patch70
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-balbes.patch14
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-double-and-make-bindir.patch24
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-imosflm.patch11
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-libs.patch35
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-molref.patch19
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-scala.patch42
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-build-xia.patch14
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-configure.patch111
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-dont-make-dirs-in-configure.patch87
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-impl-dec.patch152
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-lapack.patch597
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-pisa.patch23
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-pythonpath.patch65
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-rename-rapper-ng.patch60
-rw-r--r--sci-chemistry/ccp4-apps/files/6.1.3-unbundle.patch131
-rw-r--r--sci-chemistry/ccp4-apps/files/ccp4-apps-6.1.3-tcl8.6.patch130
-rw-r--r--sci-chemistry/ccp4-apps/metadata.xml5
-rw-r--r--sci-chemistry/ccp4/ccp4-6.1.3-r1.ebuild38
-rw-r--r--sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch87
-rw-r--r--sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch11
-rw-r--r--sci-chemistry/ccp4/files/6.0.2-dont-make-dirs-in-configure.patch87
-rw-r--r--sci-chemistry/ccp4/files/6.0.2-gcc-4.1.2-idate-fix.patch14
-rw-r--r--sci-chemistry/ccp4/files/6.0.2-ppc-double-define-gerror.patch11
-rw-r--r--sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch13
-rw-r--r--sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch103
-rw-r--r--sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch11
-rw-r--r--sci-chemistry/ccp4/files/create-mosflm-bindir.patch10
-rw-r--r--sci-chemistry/ccp4/files/dont-build-rasmol.patch19
-rw-r--r--sci-chemistry/ccp4/files/make-ipmosflm-dir.patch10
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch11
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch10
-rw-r--r--sci-chemistry/ccp4/files/make-mosflm-libdir.patch10
-rw-r--r--sci-chemistry/ccp4/files/pass-clipper-enablevals.patch11
-rw-r--r--sci-chemistry/ccp4/metadata.xml9
-rw-r--r--sci-chemistry/ccp4i/Manifest3
-rw-r--r--sci-chemistry/ccp4i/ccp4i-6.1.3-r4.ebuild99
-rw-r--r--sci-chemistry/ccp4i/files/6.1.3-fix-baubles.patch22
-rw-r--r--sci-chemistry/ccp4i/files/6.1.3-rename-rapper.patch61
-rw-r--r--sci-chemistry/ccp4i/files/6.1.3-rename-superpose.patch26
-rw-r--r--sci-chemistry/ccp4i/files/6.1.3-rename-truncate.patch91
-rw-r--r--sci-chemistry/ccp4i/metadata.xml5
-rw-r--r--sci-chemistry/ccpn/Manifest6
-rw-r--r--sci-chemistry/ccpn/ccpn-2.4.1_p150226.ebuild166
-rw-r--r--sci-chemistry/ccpn/ccpn-2.4.2.ebuild166
-rw-r--r--sci-chemistry/ccpn/ccpn-2.4.2_p150325.ebuild166
-rw-r--r--sci-chemistry/ccpn/ccpn-2.4.2_p150413.ebuild166
-rw-r--r--sci-chemistry/ccpn/ccpn-2.4.2_p150421.ebuild166
-rw-r--r--sci-chemistry/ccpn/files/2.3.1-parallel.patch38
-rw-r--r--sci-chemistry/ccpn/files/analysis8
-rw-r--r--sci-chemistry/ccpn/files/dangle8
-rw-r--r--sci-chemistry/ccpn/files/dataShifter8
-rw-r--r--sci-chemistry/ccpn/files/depositionFileImporter8
-rw-r--r--sci-chemistry/ccpn/files/eci8
-rw-r--r--sci-chemistry/ccpn/files/extendNmr8
-rw-r--r--sci-chemistry/ccpn/files/formatConverter8
-rw-r--r--sci-chemistry/ccpn/files/pipe2azara8
-rw-r--r--sci-chemistry/ccpn/files/talosn.patch16
-rw-r--r--sci-chemistry/ccpn/files/xeasy2azara8
-rw-r--r--sci-chemistry/ccpn/metadata.xml8
-rw-r--r--sci-chemistry/chemical-mime-data/Manifest1
-rw-r--r--sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r1.ebuild40
-rw-r--r--sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r2.ebuild61
-rw-r--r--sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94.ebuild40
-rw-r--r--sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-namespace-svg.patch16
-rw-r--r--sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-pigz.patch16
-rw-r--r--sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-turbomole.patch57
-rw-r--r--sci-chemistry/chemical-mime-data/metadata.xml15
-rw-r--r--sci-chemistry/chemtool/Manifest2
-rw-r--r--sci-chemistry/chemtool/chemtool-1.6.13.ebuild57
-rw-r--r--sci-chemistry/chemtool/chemtool-1.6.14.ebuild57
-rw-r--r--sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch78
-rw-r--r--sci-chemistry/chemtool/metadata.xml8
-rw-r--r--sci-chemistry/clashlist/Manifest1
-rw-r--r--sci-chemistry/clashlist/clashlist-3.17-r1.ebuild31
-rw-r--r--sci-chemistry/clashlist/clashlist-3.17.ebuild25
-rw-r--r--sci-chemistry/clashlist/metadata.xml16
-rw-r--r--sci-chemistry/cluster/Manifest1
-rw-r--r--sci-chemistry/cluster/cluster-1.3.081231-r1.ebuild30
-rw-r--r--sci-chemistry/cluster/cluster-1.3.081231.ebuild30
-rw-r--r--sci-chemistry/cluster/files/1.3.081231-includes.patch12
-rw-r--r--sci-chemistry/cluster/files/1.3.081231-ldflags.patch41
-rw-r--r--sci-chemistry/cluster/metadata.xml18
-rw-r--r--sci-chemistry/cns/Manifest4
-rw-r--r--sci-chemistry/cns/cns-1.2.1-r8.ebuild233
-rw-r--r--sci-chemistry/cns/cns-1.3_p7-r1.ebuild216
-rw-r--r--sci-chemistry/cns/files/1.2.1-allow-gcc-openmp.patch20
-rw-r--r--sci-chemistry/cns/files/1.2.1-aria2.3.patch22
-rw-r--r--sci-chemistry/cns/files/1.2.1-gentoo.patch63
-rw-r--r--sci-chemistry/cns/files/1.2.1-ifort.patch126
-rw-r--r--sci-chemistry/cns/files/1.2.1-parallel.patch17
-rw-r--r--sci-chemistry/cns/files/1.3_p7-delete.patch13
-rw-r--r--sci-chemistry/cns/files/1.3_p7-gentoo.patch80
-rw-r--r--sci-chemistry/cns/files/cns_solve_env_sh221
-rw-r--r--sci-chemistry/cns/files/cns_solve_env_sh-1.3_p7229
-rw-r--r--sci-chemistry/cns/metadata.xml21
-rw-r--r--sci-chemistry/coot/Manifest6
-rw-r--r--sci-chemistry/coot/coot-0.7.1-r1.ebuild167
-rw-r--r--sci-chemistry/coot/coot-0.7.2.ebuild165
-rw-r--r--sci-chemistry/coot/coot-0.7.ebuild159
-rw-r--r--sci-chemistry/coot/files/0.6.2-clipper-config.patch17
-rw-r--r--sci-chemistry/coot/files/0.6.2-gl.patch10
-rw-r--r--sci-chemistry/coot/files/0.6.2-libpng15.patch29
-rw-r--r--sci-chemistry/coot/files/0.6.2-mmdb-config.patch18
-rw-r--r--sci-chemistry/coot/files/0.6.2-ssm.patch56
-rw-r--r--sci-chemistry/coot/files/0.6.2-test.patch16
-rw-r--r--sci-chemistry/coot/files/coot-0.7-clipper-config.patch17
-rw-r--r--sci-chemistry/coot/files/coot-0.7-goocanvas.patch25
-rw-r--r--sci-chemistry/coot/files/coot-0.7-mmdb-config.patch18
-rw-r--r--sci-chemistry/coot/files/coot-0.7-ssm.patch56
-rw-r--r--sci-chemistry/coot/metadata.xml5
-rw-r--r--sci-chemistry/cyana/Manifest1
-rw-r--r--sci-chemistry/cyana/cyana-2.1.ebuild72
-rw-r--r--sci-chemistry/cyana/files/2.1-exec.patch77
-rw-r--r--sci-chemistry/cyana/files/2.1-expire.patch15
-rw-r--r--sci-chemistry/cyana/files/2.1-typo.patch13
-rw-r--r--sci-chemistry/cyana/files/2.1-xiar.patch16
-rw-r--r--sci-chemistry/cyana/metadata.xml8
-rw-r--r--sci-chemistry/dssp/Manifest1
-rw-r--r--sci-chemistry/dssp/dssp-2.2.1-r1.ebuild44
-rw-r--r--sci-chemistry/dssp/files/Makefile7
-rw-r--r--sci-chemistry/dssp/files/dssp-2.0.4-gcc47.patch46
-rw-r--r--sci-chemistry/dssp/files/dssp-2.0.4-gentoo.patch70
-rw-r--r--sci-chemistry/dssp/files/dssp-2.1.0-gentoo.patch60
-rw-r--r--sci-chemistry/dssp/metadata.xml8
-rw-r--r--sci-chemistry/easychem/Manifest1
-rw-r--r--sci-chemistry/easychem/easychem-0.6-r1.ebuild40
-rw-r--r--sci-chemistry/easychem/files/0.6-gentoo.patch65
-rw-r--r--sci-chemistry/easychem/files/easychem-0.6-prestrip.patch10
-rw-r--r--sci-chemistry/easychem/metadata.xml15
-rw-r--r--sci-chemistry/eden/Manifest1
-rw-r--r--sci-chemistry/eden/eden-5.3-r2.ebuild87
-rw-r--r--sci-chemistry/eden/files/5.3-makefile-fixes.patch60
-rw-r--r--sci-chemistry/eden/files/eden-5.3-format-security.patch96
-rw-r--r--sci-chemistry/eden/files/eden-5.3-impl-dec.patch28
-rw-r--r--sci-chemistry/eden/files/makefile-fixes.patch25
-rw-r--r--sci-chemistry/eden/metadata.xml9
-rw-r--r--sci-chemistry/elem/Manifest1
-rw-r--r--sci-chemistry/elem/elem-1.0.3-r1.ebuild32
-rw-r--r--sci-chemistry/elem/elem-1.0.3-r2.ebuild35
-rw-r--r--sci-chemistry/elem/metadata.xml8
-rw-r--r--sci-chemistry/freeon/Manifest2
-rw-r--r--sci-chemistry/freeon/files/freeon-1.0.8-blas.patch165
-rw-r--r--sci-chemistry/freeon/freeon-1.0.10.ebuild27
-rw-r--r--sci-chemistry/freeon/freeon-1.0.8-r1.ebuild29
-rw-r--r--sci-chemistry/freeon/metadata.xml12
-rw-r--r--sci-chemistry/gabedit/Manifest3
-rw-r--r--sci-chemistry/gabedit/files/CONFIG.Gentoo14
-rw-r--r--sci-chemistry/gabedit/files/gabedit-2.4.2-gold.patch16
-rw-r--r--sci-chemistry/gabedit/gabedit-2.4.6.ebuild68
-rw-r--r--sci-chemistry/gabedit/gabedit-2.4.7.ebuild68
-rw-r--r--sci-chemistry/gabedit/gabedit-2.4.8.ebuild68
-rw-r--r--sci-chemistry/gabedit/metadata.xml12
-rw-r--r--sci-chemistry/gamess/Manifest2
-rw-r--r--sci-chemistry/gamess/files/gamess-20110811.1.gentoo.patch263
-rw-r--r--sci-chemistry/gamess/files/gamess-checktst.patch21
-rw-r--r--sci-chemistry/gamess/files/gamess-qmmm-tinker-fix-idate.patch20
-rw-r--r--sci-chemistry/gamess/gamess-20110811.1.ebuild337
-rw-r--r--sci-chemistry/gamess/metadata.xml14
-rw-r--r--sci-chemistry/gamessq/Manifest1
-rw-r--r--sci-chemistry/gamessq/gamessq-1.2.ebuild27
-rw-r--r--sci-chemistry/gamessq/metadata.xml5
-rw-r--r--sci-chemistry/gelemental/Manifest2
-rw-r--r--sci-chemistry/gelemental/files/gelemental-1.2.0-doxygen.patch30
-rw-r--r--sci-chemistry/gelemental/files/gelemental-1.2.0-gcc4.3.patch12
-rw-r--r--sci-chemistry/gelemental/files/gelemental-1.2.0-glib-2.32.patch46
-rw-r--r--sci-chemistry/gelemental/gelemental-1.2.0-r1.ebuild64
-rw-r--r--sci-chemistry/gelemental/gelemental-1.2.0.ebuild51
-rw-r--r--sci-chemistry/gelemental/metadata.xml8
-rw-r--r--sci-chemistry/ghemical/Manifest2
-rw-r--r--sci-chemistry/ghemical/files/2.99.2-docs.patch22
-rw-r--r--sci-chemistry/ghemical/files/ghemical-gcc43.patch14
-rw-r--r--sci-chemistry/ghemical/ghemical-2.99.2-r2.ebuild55
-rw-r--r--sci-chemistry/ghemical/ghemical-3.0.0.ebuild55
-rw-r--r--sci-chemistry/ghemical/metadata.xml16
-rw-r--r--sci-chemistry/gopenmol/Manifest1
-rw-r--r--sci-chemistry/gopenmol/files/3.00-impl-dec.patch80
-rw-r--r--sci-chemistry/gopenmol/files/3.00-include-config-for-plugins.patch11
-rw-r--r--sci-chemistry/gopenmol/files/3.00-multilib.patch104
-rw-r--r--sci-chemistry/gopenmol/files/3.00-tcl8.6.patch32
-rw-r--r--sci-chemistry/gopenmol/gopenmol-3.00-r2.ebuild92
-rw-r--r--sci-chemistry/gopenmol/gopenmol-3.00-r3.ebuild91
-rw-r--r--sci-chemistry/gopenmol/metadata.xml5
-rw-r--r--sci-chemistry/gperiodic/Manifest1
-rw-r--r--sci-chemistry/gperiodic/files/gperiodic-2.0.10-makefile.patch64
-rw-r--r--sci-chemistry/gperiodic/files/gperiodic-2.0.10-nls.patch20
-rw-r--r--sci-chemistry/gperiodic/gperiodic-2.0.10-r2.ebuild48
-rw-r--r--sci-chemistry/gperiodic/gperiodic-2.0.10.ebuild52
-rw-r--r--sci-chemistry/gperiodic/metadata.xml10
-rw-r--r--sci-chemistry/gromacs/Manifest6
-rw-r--r--sci-chemistry/gromacs/gromacs-5.0.4-r1.ebuild284
-rw-r--r--sci-chemistry/gromacs/gromacs-5.0.4.ebuild279
-rw-r--r--sci-chemistry/gromacs/gromacs-5.0.5.ebuild284
-rw-r--r--sci-chemistry/gromacs/gromacs-5.0.6.ebuild284
-rw-r--r--sci-chemistry/gromacs/metadata.xml20
-rw-r--r--sci-chemistry/gsim/Manifest1
-rw-r--r--sci-chemistry/gsim/files/0.20.1-build.conf.patch44
-rw-r--r--sci-chemistry/gsim/files/gsim-21.0-build.conf.patch42
-rw-r--r--sci-chemistry/gsim/files/gsim-21.3-build.conf.patch49
-rw-r--r--sci-chemistry/gsim/gsim-21.3.ebuild67
-rw-r--r--sci-chemistry/gsim/metadata.xml14
-rw-r--r--sci-chemistry/gtk-gamess/Manifest1
-rw-r--r--sci-chemistry/gtk-gamess/gtk-gamess-2.00.ebuild30
-rw-r--r--sci-chemistry/gtk-gamess/metadata.xml16
-rw-r--r--sci-chemistry/hollow/Manifest1
-rw-r--r--sci-chemistry/hollow/hollow-1.2-r1.ebuild39
-rw-r--r--sci-chemistry/hollow/metadata.xml8
-rw-r--r--sci-chemistry/icm-browser/Manifest1
-rw-r--r--sci-chemistry/icm-browser/files/90icm-browser1
-rw-r--r--sci-chemistry/icm-browser/files/icm-browser.xpm326
-rw-r--r--sci-chemistry/icm-browser/icm-browser-3.6.1i.ebuild87
-rw-r--r--sci-chemistry/icm-browser/metadata.xml9
-rw-r--r--sci-chemistry/icm/Manifest2
-rw-r--r--sci-chemistry/icm/files/90icm3
-rw-r--r--sci-chemistry/icm/files/icm.xpm326
-rw-r--r--sci-chemistry/icm/icm-3.7.2e.ebuild140
-rw-r--r--sci-chemistry/icm/icm-3.7.3b.ebuild140
-rw-r--r--sci-chemistry/icm/metadata.xml13
-rw-r--r--sci-chemistry/imosflm/Manifest1
-rw-r--r--sci-chemistry/imosflm/files/1.0.4-impl-dec.patch12
-rw-r--r--sci-chemistry/imosflm/files/1.0.4-tk.patch50
-rw-r--r--sci-chemistry/imosflm/files/1.0.7-libpng16.patch13
-rw-r--r--sci-chemistry/imosflm/imosflm-1.0.7-r1.ebuild54
-rw-r--r--sci-chemistry/imosflm/metadata.xml5
-rw-r--r--sci-chemistry/jmol/Manifest3
-rw-r--r--sci-chemistry/jmol/files/12.0.45/jmol-manifest.patch96
-rw-r--r--sci-chemistry/jmol/files/12.0.45/jmol-nointl.patch313
-rw-r--r--sci-chemistry/jmol/files/caffeine.xyz26
-rw-r--r--sci-chemistry/jmol/files/index.html14
-rw-r--r--sci-chemistry/jmol/files/jmol-11.0.3-manifest.patch96
-rw-r--r--sci-chemistry/jmol/files/jmol-11.0.3-nointl.patch266
-rw-r--r--sci-chemistry/jmol/files/jmol-12.2.27-nointl.patch330
-rw-r--r--sci-chemistry/jmol/jmol-12.0.45-r1.ebuild101
-rw-r--r--sci-chemistry/jmol/jmol-12.2.27-r1.ebuild99
-rw-r--r--sci-chemistry/jmol/metadata.xml16
-rw-r--r--sci-chemistry/ksdssp/Manifest1
-rw-r--r--sci-chemistry/ksdssp/ksdssp-040728-r1.ebuild47
-rw-r--r--sci-chemistry/ksdssp/ksdssp-040728.ebuild45
-rw-r--r--sci-chemistry/ksdssp/metadata.xml8
-rw-r--r--sci-chemistry/makecif/Manifest1
-rw-r--r--sci-chemistry/makecif/files/5.6.6-makefile.patch49
-rw-r--r--sci-chemistry/makecif/makecif-5.6.6-r1.ebuild40
-rw-r--r--sci-chemistry/makecif/makecif-5.6.6.ebuild39
-rw-r--r--sci-chemistry/makecif/metadata.xml18
-rw-r--r--sci-chemistry/mars/Manifest1
-rw-r--r--sci-chemistry/mars/mars-1.2.ebuild44
-rw-r--r--sci-chemistry/mars/metadata.xml8
-rw-r--r--sci-chemistry/massxpert/Manifest2
-rw-r--r--sci-chemistry/massxpert/files/massxpert-2.0.5-gentoo.patch84
-rw-r--r--sci-chemistry/massxpert/files/massxpert-3.4.0-gentoo.patch91
-rw-r--r--sci-chemistry/massxpert/massxpert-2.0.5.ebuild56
-rw-r--r--sci-chemistry/massxpert/massxpert-3.4.0.ebuild56
-rw-r--r--sci-chemistry/massxpert/metadata.xml12
-rw-r--r--sci-chemistry/mdanalysis/Manifest1
-rw-r--r--sci-chemistry/mdanalysis/mdanalysis-0.7.7.ebuild35
-rw-r--r--sci-chemistry/mdanalysis/metadata.xml8
-rw-r--r--sci-chemistry/mead/Manifest1
-rw-r--r--sci-chemistry/mead/files/mead-2.2.7-gcc43.patch22
-rw-r--r--sci-chemistry/mead/files/mead-2.2.7-respect-cflags.patch57
-rw-r--r--sci-chemistry/mead/files/mead-2.2.7-respect-flags.patch74
-rw-r--r--sci-chemistry/mead/mead-2.2.7-r1.ebuild44
-rw-r--r--sci-chemistry/mead/mead-2.2.7.ebuild44
-rw-r--r--sci-chemistry/mead/metadata.xml5
-rw-r--r--sci-chemistry/metadata.xml38
-rw-r--r--sci-chemistry/mm-align/Manifest1
-rw-r--r--sci-chemistry/mm-align/files/CMakeLists.txt5
-rw-r--r--sci-chemistry/mm-align/metadata.xml26
-rw-r--r--sci-chemistry/mm-align/mm-align-20120321.ebuild22
-rw-r--r--sci-chemistry/molden/Manifest2
-rw-r--r--sci-chemistry/molden/files/molden-4.7-implicit-dec.patch12
-rw-r--r--sci-chemistry/molden/files/molden-4.8-ambfor.patch12
-rw-r--r--sci-chemistry/molden/files/molden-4.8-ldflags.patch26
-rw-r--r--sci-chemistry/molden/files/molden-4.8-overflow.patch38
-rw-r--r--sci-chemistry/molden/files/molden-5.0-ambfor.patch16
-rw-r--r--sci-chemistry/molden/files/molden-5.0-overflow.patch16
-rw-r--r--sci-chemistry/molden/metadata.xml5
-rw-r--r--sci-chemistry/molden/molden-4.8-r2.ebuild77
-rw-r--r--sci-chemistry/molden/molden-5.0.ebuild77
-rw-r--r--sci-chemistry/moldy/Manifest1
-rw-r--r--sci-chemistry/moldy/files/2.16e-as-needed.patch65
-rw-r--r--sci-chemistry/moldy/metadata.xml5
-rw-r--r--sci-chemistry/moldy/moldy-2.16e-r2.ebuild71
-rw-r--r--sci-chemistry/molequeue/Manifest1
-rw-r--r--sci-chemistry/molequeue/metadata.xml26
-rw-r--r--sci-chemistry/molequeue/molequeue-0.7.1.ebuild58
-rw-r--r--sci-chemistry/molmol/Manifest2
-rw-r--r--sci-chemistry/molmol/files/cast.patch21
-rw-r--r--sci-chemistry/molmol/files/ldflags.patch13
-rw-r--r--sci-chemistry/molmol/files/libpng15.patch32
-rw-r--r--sci-chemistry/molmol/files/molmol-2k_p2-fink.patch356
-rw-r--r--sci-chemistry/molmol/files/opengl.patch96
-rw-r--r--sci-chemistry/molmol/files/pjf_RH9_molmol2k2.diff103
-rw-r--r--sci-chemistry/molmol/files/prefix.patch22
-rw-r--r--sci-chemistry/molmol/files/wild.patch1866
-rw-r--r--sci-chemistry/molmol/metadata.xml5
-rw-r--r--sci-chemistry/molmol/molmol-2k_p2-r2.ebuild80
-rw-r--r--sci-chemistry/molmol/molmol-2k_p2-r3.ebuild84
-rw-r--r--sci-chemistry/molmol/molmol-2k_p2-r4.ebuild86
-rw-r--r--sci-chemistry/molmol/molmol-2k_p2-r5.ebuild85
-rw-r--r--sci-chemistry/molrep/Manifest2
-rw-r--r--sci-chemistry/molrep/files/10.2.35-respect-FLAGS.patch61
-rw-r--r--sci-chemistry/molrep/files/11.0.00-respect-FLAGS.patch12
-rw-r--r--sci-chemistry/molrep/files/11.0.00-test.patch191
-rw-r--r--sci-chemistry/molrep/files/11.0.03-EOR.patch16
-rw-r--r--sci-chemistry/molrep/metadata.xml8
-rw-r--r--sci-chemistry/molrep/molrep-11.0.02.ebuild57
-rw-r--r--sci-chemistry/molrep/molrep-11.0.03-r1.ebuild59
-rw-r--r--sci-chemistry/molscript/Manifest1
-rw-r--r--sci-chemistry/molscript/files/2.1.2-ldflags.patch22
-rw-r--r--sci-chemistry/molscript/files/2.1.2-libpng15.patch19
-rw-r--r--sci-chemistry/molscript/files/2.1.2-prll.patch10
-rw-r--r--sci-chemistry/molscript/files/fix-makefile-shared.patch62
-rw-r--r--sci-chemistry/molscript/files/glutbitmap.h32
-rw-r--r--sci-chemistry/molscript/metadata.xml5
-rw-r--r--sci-chemistry/molscript/molscript-2.1.2-r2.ebuild68
-rw-r--r--sci-chemistry/molsketch/Manifest2
-rw-r--r--sci-chemistry/molsketch/files/molsketch-0.2.0-openbabel-231.patch54
-rw-r--r--sci-chemistry/molsketch/files/molsketch-0.3.0-_DEFAULT_SOURCE.patch16
-rw-r--r--sci-chemistry/molsketch/files/molsketch-0.3.0-desktop.patch19
-rw-r--r--sci-chemistry/molsketch/files/molsketch-0.3.0-no-quotes.patch16
-rw-r--r--sci-chemistry/molsketch/metadata.xml16
-rw-r--r--sci-chemistry/molsketch/molsketch-0.2.0-r1.ebuild48
-rw-r--r--sci-chemistry/molsketch/molsketch-0.3.0.ebuild60
-rw-r--r--sci-chemistry/mongochem/Manifest1
-rw-r--r--sci-chemistry/mongochem/metadata.xml11
-rw-r--r--sci-chemistry/mongochem/mongochem-0.7.0.ebuild29
-rw-r--r--sci-chemistry/mopac7/Manifest3
-rw-r--r--sci-chemistry/mopac7/files/Makefile23
-rw-r--r--sci-chemistry/mopac7/metadata.xml8
-rw-r--r--sci-chemistry/mopac7/mopac7-1.15-r1.ebuild66
-rw-r--r--sci-chemistry/mopac7/mopac7-1.15.ebuild75
-rw-r--r--sci-chemistry/mosflm/Manifest1
-rw-r--r--sci-chemistry/mosflm/files/7.0.6-Makefile.patch13
-rw-r--r--sci-chemistry/mosflm/files/7.0.6-impl-dec.patch36
-rw-r--r--sci-chemistry/mosflm/files/7.0.6-parallel.patch28
-rw-r--r--sci-chemistry/mosflm/files/7.0.7-parallel.patch92
-rw-r--r--sci-chemistry/mosflm/files/7.0.9-parallel.patch92
-rw-r--r--sci-chemistry/mosflm/files/mosflm-7.0.7-buffer-overflow.patch16
-rw-r--r--sci-chemistry/mosflm/files/mosflm-7.0.7-impl-dec.patch29
-rw-r--r--sci-chemistry/mosflm/files/mosflm-7.0.9-buffer-overflow.patch16
-rw-r--r--sci-chemistry/mosflm/metadata.xml8
-rw-r--r--sci-chemistry/mosflm/mosflm-7.0.9.ebuild74
-rw-r--r--sci-chemistry/mpqc/Manifest1
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-as-needed.patch163
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch55
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-respect-ldflags.patch25
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-test-failure-hack.patch11
-rw-r--r--sci-chemistry/mpqc/metadata.xml8
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild93
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild103
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild107
-rw-r--r--sci-chemistry/mrbump/Manifest1
-rw-r--r--sci-chemistry/mrbump/files/0.4.4-superpose.patch11
-rw-r--r--sci-chemistry/mrbump/metadata.xml10
-rw-r--r--sci-chemistry/mrbump/mrbump-0.4.4.ebuild57
-rw-r--r--sci-chemistry/msms-bin/Manifest2
-rw-r--r--sci-chemistry/msms-bin/metadata.xml8
-rw-r--r--sci-chemistry/msms-bin/msms-bin-2.6.1-r1.ebuild45
-rw-r--r--sci-chemistry/mustang/Manifest1
-rw-r--r--sci-chemistry/mustang/files/mustang-3-gcc43.patch55
-rw-r--r--sci-chemistry/mustang/files/mustang-3.2.1-gcc-4.7.patch16
-rw-r--r--sci-chemistry/mustang/metadata.xml5
-rw-r--r--sci-chemistry/mustang/mustang-3.2.1.ebuild49
-rw-r--r--sci-chemistry/namd/Manifest2
-rw-r--r--sci-chemistry/namd/files/namd-2.10-gentoo.patch124
-rw-r--r--sci-chemistry/namd/files/namd-2.6-gentoo.patch107
-rw-r--r--sci-chemistry/namd/files/namd-2.7-gentoo.patch117
-rw-r--r--sci-chemistry/namd/files/namd-2.7-iml-dec.patch24
-rw-r--r--sci-chemistry/namd/files/namd-2.7-ldflags.patch41
-rw-r--r--sci-chemistry/namd/files/namd-2.7_beta2-gentoo.patch126
-rw-r--r--sci-chemistry/namd/files/namd-2.9-gentoo.patch151
-rw-r--r--sci-chemistry/namd/files/namd-barrier-fix-gentoo.patch61
-rw-r--r--sci-chemistry/namd/files/namd-fftw-lib-gentoo.patch15
-rw-r--r--sci-chemistry/namd/files/namd-makefile-gentoo.patch88
-rw-r--r--sci-chemistry/namd/files/namd-tcl-lib-gentoo.patch16
-rw-r--r--sci-chemistry/namd/metadata.xml9
-rw-r--r--sci-chemistry/namd/namd-2.10.ebuild105
-rw-r--r--sci-chemistry/namd/namd-2.9-r1.ebuild105
-rw-r--r--sci-chemistry/nmrglue/Manifest2
-rw-r--r--sci-chemistry/nmrglue/files/nmrglue-0.5-nohyper.patch33
-rw-r--r--sci-chemistry/nmrglue/metadata.xml29
-rw-r--r--sci-chemistry/nmrglue/nmrglue-0.4.ebuild25
-rw-r--r--sci-chemistry/nmrglue/nmrglue-0.5-r1.ebuild36
-rw-r--r--sci-chemistry/numbat/Manifest1
-rw-r--r--sci-chemistry/numbat/files/numbat-0.999-gnuplot.patch42
-rw-r--r--sci-chemistry/numbat/metadata.xml19
-rw-r--r--sci-chemistry/numbat/numbat-0.999-r1.ebuild53
-rw-r--r--sci-chemistry/oasis/Manifest1
-rw-r--r--sci-chemistry/oasis/files/4.0-makefile.patch15
-rw-r--r--sci-chemistry/oasis/metadata.xml8
-rw-r--r--sci-chemistry/oasis/oasis-4.0-r3.ebuild70
-rw-r--r--sci-chemistry/openbabel-perl/Manifest1
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch28
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-swig.patch25
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.1-makefile.patch9
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch108
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch41
-rw-r--r--sci-chemistry/openbabel-perl/metadata.xml15
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild65
-rw-r--r--sci-chemistry/openbabel-python/Manifest1
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-bindings_only.patch209
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-swig-3.0.3.patch97
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-testpybel.patch28
-rw-r--r--sci-chemistry/openbabel-python/metadata.xml15
-rw-r--r--sci-chemistry/openbabel-python/openbabel-python-2.3.2.ebuild90
-rw-r--r--sci-chemistry/openbabel/Manifest1
-rw-r--r--sci-chemistry/openbabel/files/openbabel-2.3.2-test_lib_path.patch27
-rw-r--r--sci-chemistry/openbabel/metadata.xml14
-rw-r--r--sci-chemistry/openbabel/openbabel-2.3.2.ebuild82
-rw-r--r--sci-chemistry/ortep3/Manifest1
-rw-r--r--sci-chemistry/ortep3/metadata.xml5
-rw-r--r--sci-chemistry/ortep3/ortep3-1.0.3-r1.ebuild37
-rw-r--r--sci-chemistry/p3d/Manifest1
-rw-r--r--sci-chemistry/p3d/metadata.xml21
-rw-r--r--sci-chemistry/p3d/p3d-0.4.3.ebuild35
-rw-r--r--sci-chemistry/p3d/p3d-9999.ebuild30
-rw-r--r--sci-chemistry/parassign/Manifest1
-rw-r--r--sci-chemistry/parassign/metadata.xml27
-rw-r--r--sci-chemistry/parassign/parassign-20130522.ebuild65
-rw-r--r--sci-chemistry/pdb-extract/Manifest2
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.004-Makefile.patch46
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.004-cflags-install.patch199
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.004-env.patch11
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.004-gcc-4.3.patch20
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.11-cflags-install.patch207
-rw-r--r--sci-chemistry/pdb-extract/files/pdb-extract-3.11-gcc-4.7.patch64
-rw-r--r--sci-chemistry/pdb-extract/metadata.xml5
-rw-r--r--sci-chemistry/pdb-extract/pdb-extract-3.004-r2.ebuild71
-rw-r--r--sci-chemistry/pdb-extract/pdb-extract-3.11.ebuild60
-rw-r--r--sci-chemistry/pdb-tools/Manifest1
-rw-r--r--sci-chemistry/pdb-tools/metadata.xml11
-rw-r--r--sci-chemistry/pdb-tools/pdb-tools-0.2.1-r1.ebuild80
-rw-r--r--sci-chemistry/pdb-tools/pdb-tools-0.2.1-r2.ebuild84
-rw-r--r--sci-chemistry/pdb2pqr/Manifest1
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pka13
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr13
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-flags.patch45
-rw-r--r--sci-chemistry/pdb2pqr/files/pdb2pqr-1.9.0-install-py.patch15
-rw-r--r--sci-chemistry/pdb2pqr/metadata.xml12
-rw-r--r--sci-chemistry/pdb2pqr/pdb2pqr-1.9.0-r1.ebuild130
-rw-r--r--sci-chemistry/pdbcat/Manifest1
-rw-r--r--sci-chemistry/pdbcat/files/CMakeLists.txt11
-rw-r--r--sci-chemistry/pdbcat/files/pdbcat-1.3-gcc.patch17
-rw-r--r--sci-chemistry/pdbcat/metadata.xml24
-rw-r--r--sci-chemistry/pdbcat/pdbcat-1.3.ebuild24
-rw-r--r--sci-chemistry/pdbcns/Manifest1
-rw-r--r--sci-chemistry/pdbcns/metadata.xml8
-rw-r--r--sci-chemistry/pdbcns/pdbcns-2.0.010504.ebuild26
-rw-r--r--sci-chemistry/pdbmat/Manifest1
-rw-r--r--sci-chemistry/pdbmat/files/CMakeLists.txt14
-rw-r--r--sci-chemistry/pdbmat/metadata.xml24
-rw-r--r--sci-chemistry/pdbmat/pdbmat-3.89.ebuild29
-rw-r--r--sci-chemistry/phaser/Manifest1
-rw-r--r--sci-chemistry/phaser/files/phaser-2.1.4-chmod.patch13
-rw-r--r--sci-chemistry/phaser/metadata.xml9
-rw-r--r--sci-chemistry/phaser/phaser-2.1.4.ebuild115
-rw-r--r--sci-chemistry/platon/Manifest1
-rw-r--r--sci-chemistry/platon/files/20110126-buffer-overflow.patch15
-rw-r--r--sci-chemistry/platon/metadata.xml5
-rw-r--r--sci-chemistry/platon/platon-20110126.ebuild77
-rw-r--r--sci-chemistry/pointless/Manifest2
-rw-r--r--sci-chemistry/pointless/files/1.5.1-gcc4.4.patch12
-rw-r--r--sci-chemistry/pointless/metadata.xml8
-rw-r--r--sci-chemistry/pointless/pointless-1.6.14-r1.ebuild56
-rw-r--r--sci-chemistry/pointless/pointless-1.6.14.ebuild60
-rw-r--r--sci-chemistry/pointless/pointless-1.6.2.ebuild60
-rw-r--r--sci-chemistry/povscript+/Manifest2
-rw-r--r--sci-chemistry/povscript+/files/povscript+-2.1.2.2.19-libpng15.patch19
-rw-r--r--sci-chemistry/povscript+/metadata.xml5
-rw-r--r--sci-chemistry/povscript+/povscript+-2.1.2.2.19.ebuild55
-rw-r--r--sci-chemistry/povscript+/povscript+-2.1.2.2.20.ebuild56
-rw-r--r--sci-chemistry/prekin/Manifest1
-rw-r--r--sci-chemistry/prekin/files/6.51.081122-Makefile.patch41
-rw-r--r--sci-chemistry/prekin/files/6.51.081122-overflow.patch28
-rw-r--r--sci-chemistry/prekin/metadata.xml5
-rw-r--r--sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild53
-rw-r--r--sci-chemistry/probe/Manifest2
-rw-r--r--sci-chemistry/probe/files/2.12.110413-as-needed.patch38
-rw-r--r--sci-chemistry/probe/files/as-needed.patch21
-rw-r--r--sci-chemistry/probe/files/probe-2.13.110909-as-needed.patch25
-rw-r--r--sci-chemistry/probe/metadata.xml5
-rw-r--r--sci-chemistry/probe/probe-2.12.110413.ebuild38
-rw-r--r--sci-chemistry/probe/probe-2.13.110909.ebuild34
-rw-r--r--sci-chemistry/procheck/Manifest3
-rw-r--r--sci-chemistry/procheck/files/3.5.4-ldflags.patch49
-rw-r--r--sci-chemistry/procheck/files/procheck-3.5.4-close.patch35
-rw-r--r--sci-chemistry/procheck/metadata.xml9
-rw-r--r--sci-chemistry/procheck/procheck-3.5.4-r1.ebuild87
-rw-r--r--sci-chemistry/procheck/procheck-3.5.4-r2.ebuild88
-rw-r--r--sci-chemistry/prodecomp/Manifest1
-rw-r--r--sci-chemistry/prodecomp/metadata.xml18
-rw-r--r--sci-chemistry/prodecomp/prodecomp-3.0.ebuild46
-rw-r--r--sci-chemistry/propka/Manifest1
-rw-r--r--sci-chemistry/propka/metadata.xml8
-rw-r--r--sci-chemistry/propka/propka-3.1_p140511.ebuild38
-rw-r--r--sci-chemistry/psi/Manifest1
-rw-r--r--sci-chemistry/psi/files/3.4.0-destdir.patch41
-rw-r--r--sci-chemistry/psi/files/3.4.0-dont-build-libint.patch13
-rw-r--r--sci-chemistry/psi/files/3.4.0-fortify.patch58
-rw-r--r--sci-chemistry/psi/files/3.4.0-gcc-4.3.patch293
-rw-r--r--sci-chemistry/psi/files/3.4.0-ldflags.patch21
-rw-r--r--sci-chemistry/psi/files/3.4.0-man_paths.patch25
-rw-r--r--sci-chemistry/psi/files/3.4.0-parallel_fix.patch400
-rw-r--r--sci-chemistry/psi/files/psi-3.4.0-parallel-make.patch19
-rw-r--r--sci-chemistry/psi/files/use-external-libint.patch37
-rw-r--r--sci-chemistry/psi/metadata.xml8
-rw-r--r--sci-chemistry/psi/psi-3.4.0-r2.ebuild81
-rw-r--r--sci-chemistry/pymol-apbs-plugin/Manifest4
-rw-r--r--sci-chemistry/pymol-apbs-plugin/files/pymol-apbs-plugin-2.1_p26-tcltk8.6.patch176
-rw-r--r--sci-chemistry/pymol-apbs-plugin/metadata.xml8
-rw-r--r--sci-chemistry/pymol-apbs-plugin/pymol-apbs-plugin-0_p15.ebuild57
-rw-r--r--sci-chemistry/pymol-apbs-plugin/pymol-apbs-plugin-0_p18.ebuild57
-rw-r--r--sci-chemistry/pymol-apbs-plugin/pymol-apbs-plugin-2.1_p24.ebuild57
-rw-r--r--sci-chemistry/pymol-apbs-plugin/pymol-apbs-plugin-2.1_p26-r1.ebuild56
-rw-r--r--sci-chemistry/pymol-apbs-plugin/pymol-apbs-plugin-2.1_p26.ebuild56
-rw-r--r--sci-chemistry/pymol-plugins-bni-tools/Manifest2
-rw-r--r--sci-chemistry/pymol-plugins-bni-tools/metadata.xml12
-rw-r--r--sci-chemistry/pymol-plugins-bni-tools/pymol-plugins-bni-tools-0.25.1.ebuild41
-rw-r--r--sci-chemistry/pymol-plugins-bni-tools/pymol-plugins-bni-tools-0.27.ebuild35
-rw-r--r--sci-chemistry/pymol-plugins-caver/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-caver/metadata.xml5
-rw-r--r--sci-chemistry/pymol-plugins-caver/pymol-plugins-caver-2.1.2.ebuild54
-rw-r--r--sci-chemistry/pymol-plugins-dssp/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-dssp/metadata.xml8
-rw-r--r--sci-chemistry/pymol-plugins-dssp/pymol-plugins-dssp-110430-r1.ebuild39
-rw-r--r--sci-chemistry/pymol-plugins-dssp/pymol-plugins-dssp-110430.ebuild49
-rw-r--r--sci-chemistry/pymol-plugins-dynamics/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-dynamics/metadata.xml11
-rw-r--r--sci-chemistry/pymol-plugins-dynamics/pymol-plugins-dynamics-1.2.0.ebuild43
-rw-r--r--sci-chemistry/pymol-plugins-emovie/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-emovie/files/1.0.4-indent.patch22
-rw-r--r--sci-chemistry/pymol-plugins-emovie/metadata.xml8
-rw-r--r--sci-chemistry/pymol-plugins-emovie/pymol-plugins-emovie-1.0.4.ebuild54
-rw-r--r--sci-chemistry/pymol-plugins-msms/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-msms/files/100415-msms.patch33
-rw-r--r--sci-chemistry/pymol-plugins-msms/metadata.xml17
-rw-r--r--sci-chemistry/pymol-plugins-msms/pymol-plugins-msms-100415-r1.ebuild42
-rw-r--r--sci-chemistry/pymol-plugins-msms/pymol-plugins-msms-100415.ebuild54
-rw-r--r--sci-chemistry/pymol-plugins-promol/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-promol/metadata.xml7
-rw-r--r--sci-chemistry/pymol-plugins-promol/pymol-plugins-promol-3.0.2-r1.ebuild61
-rw-r--r--sci-chemistry/pymol-plugins-psico/Manifest1
-rw-r--r--sci-chemistry/pymol-plugins-psico/metadata.xml11
-rw-r--r--sci-chemistry/pymol-plugins-psico/pymol-plugins-psico-3.1-r1.ebuild43
-rw-r--r--sci-chemistry/pymol/Manifest4
-rw-r--r--sci-chemistry/pymol/files/pymol-1.7.3.1-maeffplugin.cpp.patch11
-rw-r--r--sci-chemistry/pymol/metadata.xml12
-rw-r--r--sci-chemistry/pymol/pymol-1.7.0.1.ebuild101
-rw-r--r--sci-chemistry/pymol/pymol-1.7.4.0.ebuild106
-rw-r--r--sci-chemistry/pymol/pymol-1.7.6.0.ebuild113
-rw-r--r--sci-chemistry/rasmol/Manifest1
-rw-r--r--sci-chemistry/rasmol/files/2.7.5-bundled-lib.patch80
-rw-r--r--sci-chemistry/rasmol/files/rasmol-2.7.5.2-format-security.patch39
-rw-r--r--sci-chemistry/rasmol/files/rasmol-2.7.5.2-glib.h.patch31
-rw-r--r--sci-chemistry/rasmol/files/rasmol-2.7.5.2-longlong.patch12
-rw-r--r--sci-chemistry/rasmol/metadata.xml8
-rw-r--r--sci-chemistry/rasmol/rasmol-2.7.5.2-r2.ebuild107
-rw-r--r--sci-chemistry/raster3d/Manifest2
-rw-r--r--sci-chemistry/raster3d/files/2.9.1-as-needed.patch41
-rw-r--r--sci-chemistry/raster3d/files/3.0.2-as-needed.patch50
-rw-r--r--sci-chemistry/raster3d/files/3.0.2-gentoo-prefix.patch24
-rw-r--r--sci-chemistry/raster3d/files/raster3d-gcc-4.1-gentoo.patch74
-rw-r--r--sci-chemistry/raster3d/metadata.xml11
-rw-r--r--sci-chemistry/raster3d/raster3d-3.0.2.ebuild107
-rw-r--r--sci-chemistry/raster3d/raster3d-3.0.3.ebuild107
-rw-r--r--sci-chemistry/reduce/Manifest3
-rw-r--r--sci-chemistry/reduce/files/3.13.080428-CFLAGS.patch22
-rw-r--r--sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch11
-rw-r--r--sci-chemistry/reduce/files/3.14.080821-CFLAGS.patch22
-rw-r--r--sci-chemistry/reduce/metadata.xml5
-rw-r--r--sci-chemistry/reduce/reduce-3.13.080428-r1.ebuild54
-rw-r--r--sci-chemistry/reduce/reduce-3.14.080821.ebuild51
-rw-r--r--sci-chemistry/reduce/reduce-3.16.111118.ebuild51
-rw-r--r--sci-chemistry/refmac/Manifest2
-rw-r--r--sci-chemistry/refmac/files/5.5-test.log.patch32
-rw-r--r--sci-chemistry/refmac/files/5.5.0110-allow-dynamic-linking.patch84
-rw-r--r--sci-chemistry/refmac/files/5.5.0110-gcc4.6.patch17
-rw-r--r--sci-chemistry/refmac/files/5.6.0110-allow-dynamic-linking.patch341
-rw-r--r--sci-chemistry/refmac/files/5.6.0116-allow-dynamic-linking.patch341
-rw-r--r--sci-chemistry/refmac/metadata.xml9
-rw-r--r--sci-chemistry/refmac/refmac-5.5.0110-r3.ebuild85
-rw-r--r--sci-chemistry/relax/Manifest5
-rw-r--r--sci-chemistry/relax/metadata.xml30
-rw-r--r--sci-chemistry/relax/relax-3.3.4.ebuild69
-rw-r--r--sci-chemistry/relax/relax-3.3.5.ebuild69
-rw-r--r--sci-chemistry/relax/relax-3.3.6.ebuild73
-rw-r--r--sci-chemistry/relax/relax-3.3.7.ebuild73
-rw-r--r--sci-chemistry/relax/relax-3.3.8.ebuild71
-rw-r--r--sci-chemistry/scala/Manifest1
-rw-r--r--sci-chemistry/scala/files/3.3.18-gcc4.6.patch17
-rw-r--r--sci-chemistry/scala/files/Makefile.am7
-rw-r--r--sci-chemistry/scala/files/configure.ac14
-rw-r--r--sci-chemistry/scala/metadata.xml13
-rw-r--r--sci-chemistry/scala/scala-3.3.20.ebuild38
-rw-r--r--sci-chemistry/sfcheck/Manifest1
-rw-r--r--sci-chemistry/sfcheck/files/7.03.17-ldflags.patch12
-rw-r--r--sci-chemistry/sfcheck/metadata.xml5
-rw-r--r--sci-chemistry/sfcheck/sfcheck-7.03.18-r1.ebuild42
-rw-r--r--sci-chemistry/shelx/Manifest18
-rw-r--r--sci-chemistry/shelx/files/20060317-autotool.patch47
-rw-r--r--sci-chemistry/shelx/files/20060317-gfortran.patch20
-rw-r--r--sci-chemistry/shelx/metadata.xml5
-rw-r--r--sci-chemistry/shelx/shelx-20141228.ebuild60
-rw-r--r--sci-chemistry/solve-resolve-bin/Manifest2
-rw-r--r--sci-chemistry/solve-resolve-bin/metadata.xml8
-rw-r--r--sci-chemistry/solve-resolve-bin/solve-resolve-bin-2.13.ebuild68
-rw-r--r--sci-chemistry/sparky/Manifest1
-rw-r--r--sci-chemistry/sparky/files/3.115-fpic.patch42
-rw-r--r--sci-chemistry/sparky/files/3.115-ldflags.patch61
-rw-r--r--sci-chemistry/sparky/files/3.115-makefile.patch17
-rw-r--r--sci-chemistry/sparky/files/3.115-paths.patch13
-rw-r--r--sci-chemistry/sparky/files/3.115-wrapper-r1.patch41
-rw-r--r--sci-chemistry/sparky/files/3.115-wrapper.patch41
-rw-r--r--sci-chemistry/sparky/files/fix-install.patch259
-rw-r--r--sci-chemistry/sparky/metadata.xml8
-rw-r--r--sci-chemistry/sparky/sparky-3.115-r1.ebuild119
-rw-r--r--sci-chemistry/suitename/Manifest1
-rw-r--r--sci-chemistry/suitename/metadata.xml22
-rw-r--r--sci-chemistry/suitename/suitename-0.3.070628.ebuild37
-rw-r--r--sci-chemistry/surf/Manifest1
-rw-r--r--sci-chemistry/surf/metadata.xml5
-rw-r--r--sci-chemistry/surf/surf-1.0.ebuild44
-rw-r--r--sci-chemistry/theseus/Manifest3
-rw-r--r--sci-chemistry/theseus/metadata.xml8
-rw-r--r--sci-chemistry/theseus/theseus-2.0.6.ebuild65
-rw-r--r--sci-chemistry/theseus/theseus-3.0.0.ebuild70
-rw-r--r--sci-chemistry/theseus/theseus-3.3.0.ebuild70
-rw-r--r--sci-chemistry/threeV/Manifest1
-rw-r--r--sci-chemistry/threeV/files/1.2-gentoo.patch107
-rw-r--r--sci-chemistry/threeV/metadata.xml8
-rw-r--r--sci-chemistry/threeV/threeV-1.2.ebuild34
-rw-r--r--sci-chemistry/tinker/Manifest1
-rw-r--r--sci-chemistry/tinker/files/5.1.09-Makefile.patch13
-rw-r--r--sci-chemistry/tinker/files/6-openmp.patch15
-rw-r--r--sci-chemistry/tinker/files/7.1.2-openmp.patch15
-rw-r--r--sci-chemistry/tinker/files/tinker-7.1.2-build.patch17
-rw-r--r--sci-chemistry/tinker/metadata.xml5
-rw-r--r--sci-chemistry/tinker/tinker-7.1.2.ebuild104
-rw-r--r--sci-chemistry/tm-align/Manifest1
-rw-r--r--sci-chemistry/tm-align/files/CMakeLists.txt6
-rw-r--r--sci-chemistry/tm-align/metadata.xml24
-rw-r--r--sci-chemistry/tm-align/tm-align-20140601.ebuild25
-rw-r--r--sci-chemistry/viewmol/Manifest1
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-change-default-path-to-usr.patch11
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch68
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-look-for-python-in-right-place.patch20
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch23
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-use-root-for-app-defaults.patch20
-rw-r--r--sci-chemistry/viewmol/metadata.xml8
-rw-r--r--sci-chemistry/viewmol/viewmol-2.4.1-r2.ebuild87
-rw-r--r--sci-chemistry/vmd/Manifest2
-rw-r--r--sci-chemistry/vmd/files/vmd-1.9.1-cuda-device_ptr.patch28
-rw-r--r--sci-chemistry/vmd/files/vmd-1.9.1-tcl8.6.patch25
-rw-r--r--sci-chemistry/vmd/files/vmd-1.9.2-format-security.patch16
-rw-r--r--sci-chemistry/vmd/metadata.xml16
-rw-r--r--sci-chemistry/vmd/vmd-1.9.2.ebuild250
-rw-r--r--sci-chemistry/votca-csg/Manifest6
-rw-r--r--sci-chemistry/votca-csg/metadata.xml17
-rw-r--r--sci-chemistry/votca-csg/votca-csg-1.2.2.ebuild87
-rw-r--r--sci-chemistry/votca-csg/votca-csg-1.2.4-r1.ebuild96
-rw-r--r--sci-chemistry/votca-csgapps/Manifest2
-rw-r--r--sci-chemistry/votca-csgapps/files/votca-csgapps-1.2.2-dso.patch266
-rw-r--r--sci-chemistry/votca-csgapps/metadata.xml12
-rw-r--r--sci-chemistry/votca-csgapps/votca-csgapps-1.2.2.ebuild31
-rw-r--r--sci-chemistry/votca-csgapps/votca-csgapps-1.2.4.ebuild28
-rw-r--r--sci-chemistry/wxmacmolplt/Manifest2
-rw-r--r--sci-chemistry/wxmacmolplt/files/wxmacmolplt-7.4.2-glew.patch12
-rw-r--r--sci-chemistry/wxmacmolplt/files/wxmacmolplt-7.5-glew.patch12
-rw-r--r--sci-chemistry/wxmacmolplt/metadata.xml11
-rw-r--r--sci-chemistry/wxmacmolplt/wxmacmolplt-7.4.2.ebuild46
-rw-r--r--sci-chemistry/wxmacmolplt/wxmacmolplt-7.5.ebuild46
-rw-r--r--sci-chemistry/xds-bin/Manifest3
-rw-r--r--sci-chemistry/xds-bin/metadata.xml5
-rw-r--r--sci-chemistry/xds-bin/xds-bin-20150301.ebuild53
-rw-r--r--sci-chemistry/xdsgui/Manifest2
-rw-r--r--sci-chemistry/xdsgui/metadata.xml15
-rw-r--r--sci-chemistry/xdsgui/xdsgui-0_p130530.ebuild42
-rw-r--r--sci-chemistry/xdsi/Manifest1
-rw-r--r--sci-chemistry/xdsi/files/0.92-gentoo.patch27
-rw-r--r--sci-chemistry/xdsi/metadata.xml17
-rw-r--r--sci-chemistry/xdsi/xdsi-0.92-r1.ebuild54
-rw-r--r--sci-chemistry/xdsstat-bin/Manifest2
-rw-r--r--sci-chemistry/xdsstat-bin/metadata.xml8
-rw-r--r--sci-chemistry/xdsstat-bin/xdsstat-bin-140225.ebuild33
-rw-r--r--sci-chemistry/xia2/Manifest6
-rw-r--r--sci-chemistry/xia2/files/0.3.1.0-fix-syntax.patch61
-rw-r--r--sci-chemistry/xia2/files/0.3.1.6-fix-syntax.patch61
-rw-r--r--sci-chemistry/xia2/files/0.3.1.7-fix-syntax.patch61
-rw-r--r--sci-chemistry/xia2/files/0.3.3.1-fix-syntax.patch61
-rw-r--r--sci-chemistry/xia2/files/0.3.3.3-fix-syntax.patch28
-rw-r--r--sci-chemistry/xia2/files/0.3.4.0-fix-syntax.patch28
-rw-r--r--sci-chemistry/xia2/metadata.xml5
-rw-r--r--sci-chemistry/xia2/xia2-0.3.1.0.ebuild59
-rw-r--r--sci-chemistry/xia2/xia2-0.3.1.6.ebuild66
-rw-r--r--sci-chemistry/xia2/xia2-0.3.1.7.ebuild66
-rw-r--r--sci-chemistry/xia2/xia2-0.3.3.1.ebuild70
-rw-r--r--sci-chemistry/xia2/xia2-0.3.3.3.ebuild70
-rw-r--r--sci-chemistry/xia2/xia2-0.3.4.0.ebuild70
-rw-r--r--sci-chemistry/xyza2pipe/Manifest2
-rw-r--r--sci-chemistry/xyza2pipe/files/20101129-gentoo.patch152
-rw-r--r--sci-chemistry/xyza2pipe/files/xyza2pipe-20121001-gentoo.patch168
-rw-r--r--sci-chemistry/xyza2pipe/metadata.xml8
-rw-r--r--sci-chemistry/xyza2pipe/xyza2pipe-20101129.ebuild28
-rw-r--r--sci-chemistry/xyza2pipe/xyza2pipe-20121001.ebuild33
814 files changed, 39094 insertions, 0 deletions
diff --git a/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.1.ebuild b/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.1.ebuild
new file mode 100644
index 000000000000..ef7987d5d03e
--- /dev/null
+++ b/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-2
+ EGIT_REPO_URI="
+ git://github.com/orbeckst/${PN}.git
+ https://github.com/orbeckst/${PN}.git"
+ EGIT_BRANCH="develop"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ scm_eclass=vcs-snapshot
+ SRC_URI="https://github.com/orbeckst/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit eutils distutils-r1 ${scm_eclass}
+
+DESCRIPTION="Python framework for Gromacs"
+HOMEPAGE="http://orbeckst.github.com/GromacsWrapper/"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ >=dev-python/matplotlib-0.91.3[${PYTHON_USEDEP}]
+ >=dev-python/RecSQL-0.3[${PYTHON_USEDEP}]
+ >=sci-libs/scipy-0.9[${PYTHON_USEDEP}]
+ "
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0001-Drop-chmod-hack.patch"
+)
diff --git a/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.2.ebuild b/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.2.ebuild
new file mode 100644
index 000000000000..6d95361ce0f4
--- /dev/null
+++ b/sci-chemistry/GromacsWrapper/GromacsWrapper-0.3.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-2
+ EGIT_REPO_URI="
+ git://github.com/orbeckst/${PN}.git
+ https://github.com/orbeckst/${PN}.git"
+ EGIT_BRANCH="develop"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ scm_eclass=vcs-snapshot
+ SRC_URI="https://github.com/orbeckst/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit eutils distutils-r1 ${scm_eclass}
+
+DESCRIPTION="Python framework for Gromacs"
+HOMEPAGE="http://orbeckst.github.com/GromacsWrapper/"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ >=dev-python/matplotlib-0.91.3[${PYTHON_USEDEP}]
+ >=dev-python/RecSQL-0.3[${PYTHON_USEDEP}]
+ >=sci-libs/scipy-0.9[${PYTHON_USEDEP}]
+ "
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0001-Drop-chmod-hack.patch"
+)
diff --git a/sci-chemistry/GromacsWrapper/Manifest b/sci-chemistry/GromacsWrapper/Manifest
new file mode 100644
index 000000000000..4c77ff3c1ead
--- /dev/null
+++ b/sci-chemistry/GromacsWrapper/Manifest
@@ -0,0 +1,2 @@
+DIST GromacsWrapper-0.3.1.tar.gz 1575486 SHA256 ddd2668060668528878370961a9a33257cf3643fd0d9e9191b1d26d4f78e803b SHA512 655dae431bf575963af58a5f75abe6703fe1ecdddba5839b671d9237ddee0e33ab19b528e89bcba4db9063fe30622d44e8f47c7b6452b4d1eed8c7400873a012 WHIRLPOOL 3b848aff931190eabd49426d61186a3c1eef9779a9fabf95b4d21d47793e5543adbcba5ac2b39c8a9af7c2479930a8ea65bb336e2155dfca98378df56ba4cb3e
+DIST GromacsWrapper-0.3.2.tar.gz 1592147 SHA256 2fe0173275ca125a4260aa05f82746338f237766fe8aa998e85a5b40cf83e42c SHA512 a9e0abb5e7ad0c6831e23b6a8c09c6e4cc74b33d66cd17df8e00b876dc275dda11c3d3723565d8d58c45bdf6b2b00323bf85e24e2d5324a8d8b597cc3e5d78a4 WHIRLPOOL 852d73d01e1060369521ec5ff5197c86daa30ae98f285fe5e3d392a315cff10c68e2ba54ec9a2659260cf6830cf17cb1e094eecbd63652e9c3f13fff8707a824
diff --git a/sci-chemistry/GromacsWrapper/files/0001-Drop-chmod-hack.patch b/sci-chemistry/GromacsWrapper/files/0001-Drop-chmod-hack.patch
new file mode 100644
index 000000000000..8645df77b86e
--- /dev/null
+++ b/sci-chemistry/GromacsWrapper/files/0001-Drop-chmod-hack.patch
@@ -0,0 +1,28 @@
+From 49b8d9662365e0e9b0725682b8a8479de402b272 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <alexxy@gentoo.org>
+Date: Sat, 23 Mar 2013 16:40:04 +0400
+Subject: [PATCH] Drop chmod hack.
+
+It doesnt work if wrapper installed system-wide
+
+Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
+---
+ gromacs/config.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/gromacs/config.py b/gromacs/config.py
+index cece6fc..2e686e7 100644
+--- a/gromacs/config.py
++++ b/gromacs/config.py
+@@ -619,8 +619,6 @@ del g
+ # Must extract because it is part of a zipped python egg;
+ # see http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources
+ GridMAT_MD = resource_filename(__name__,'external/GridMAT-MD_v1.0.2/GridMAT-MD.pl')
+-os.chmod(GridMAT_MD, 0755)
+-
+
+ #: 3rd party bundled analysis scripts and tools; this is a list of triplets of
+ #:
+--
+1.8.1.5
+
diff --git a/sci-chemistry/GromacsWrapper/metadata.xml b/sci-chemistry/GromacsWrapper/metadata.xml
new file mode 100644
index 000000000000..43390c98619e
--- /dev/null
+++ b/sci-chemistry/GromacsWrapper/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">orbeckst/GromacsWrapper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/PyMca/Manifest b/sci-chemistry/PyMca/Manifest
new file mode 100644
index 000000000000..c6899e234b21
--- /dev/null
+++ b/sci-chemistry/PyMca/Manifest
@@ -0,0 +1 @@
+DIST pymca4.6.2-src.tgz 15979581 SHA256 c50d3a54cad633bac3ec361d1b3b63a78292f1ad4ed976e5206665edd76bc32d SHA512 e33188b446c399e50cf65ebca4bfeef34e1b7d99c331f670dc41ca204284fbba996a1c83bd12a2410a9972927aa9c92b42b5374c58c924b3a8583d4f37be6528 WHIRLPOOL 47f0491aa0e470661bea1aa247d1db730f1db7266f1d2be2272d08f203faa2a084bcb40d579861365ace26d2f94abe03485183eed03139ad7b697cf57bfa5324
diff --git a/sci-chemistry/PyMca/PyMca-4.6.2-r1.ebuild b/sci-chemistry/PyMca/PyMca-4.6.2-r1.ebuild
new file mode 100644
index 000000000000..449f9b5ab220
--- /dev/null
+++ b/sci-chemistry/PyMca/PyMca-4.6.2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PV="${PV/_}"
+
+DESCRIPTION="X-ray Fluorescence Toolkit"
+HOMEPAGE="http://pymca.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/pymca/pymca/${PN}${PV/_p1}/pymca${MY_PV}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="X hdf5 matplotlib"
+
+DEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyopengl[${PYTHON_USEDEP}]
+ dev-python/sip[${PYTHON_USEDEP}]
+ virtual/opengl
+ X? (
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/pyqwt[${PYTHON_USEDEP}]
+ )
+ hdf5? ( dev-python/h5py[${PYTHON_USEDEP}] )
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+#S="${WORKDIR}/${PN}${MY_PV}"
+
+python_prepare_all() {
+ local PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+ export SPECFILE_USE_GNU_SOURCE=1
+ distutils-r1_python_prepare_all
+}
diff --git a/sci-chemistry/PyMca/PyMca-4.6.2.ebuild b/sci-chemistry/PyMca/PyMca-4.6.2.ebuild
new file mode 100644
index 000000000000..b1e6d2f50524
--- /dev/null
+++ b/sci-chemistry/PyMca/PyMca-4.6.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-pypy-*"
+
+inherit distutils eutils
+
+MY_PV="${PV/_}"
+
+DESCRIPTION="X-ray Fluorescence Toolkit"
+HOMEPAGE="http://pymca.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/pymca/pymca/${PN}${PV/_p1}/pymca${MY_PV}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="X hdf5 matplotlib"
+
+DEPEND="
+ dev-python/numpy
+ dev-python/sip
+ virtual/opengl
+ dev-python/pyopengl
+ X? (
+ dev-python/PyQt4
+ dev-python/pyqwt
+ )
+ hdf5? ( dev-python/h5py )
+ matplotlib? ( dev-python/matplotlib )"
+RDEPEND="${DEPEND}"
+
+#S="${WORKDIR}/${PN}${MY_PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ export SPECFILE_USE_GNU_SOURCE=1
+ distutils_src_prepare
+}
diff --git a/sci-chemistry/PyMca/files/4.4.1_p1-gentoo.patch b/sci-chemistry/PyMca/files/4.4.1_p1-gentoo.patch
new file mode 100644
index 000000000000..487a45963d21
--- /dev/null
+++ b/sci-chemistry/PyMca/files/4.4.1_p1-gentoo.patch
@@ -0,0 +1,40 @@
+diff --git a/setup.py b/setup.py
+index 0b0fa58..a4fdab6 100755
+--- a/setup.py
++++ b/setup.py
+@@ -41,34 +41,8 @@ for line in file(os.path.join('PyMca', 'PyMcaMain.py')).readlines():
+ print "PyMca X-Ray Fluorescence Toolkit %s" % __version__
+ print
+
+-print "Type 'L' to view the license."
+-print "Type 'yes' to accept the terms of the license."
+-print "Type 'no' to decline the terms of the license."
+-print
+-
+-while 1:
+- try:
+- resp = raw_input("Do you accept the terms of the license? ")
+- except KeyboardInterrupt:
+- raise SystemExit
+- except:
+- resp = ""
+-
+- resp = string.lower(string.strip(resp))
+-
+- if resp == "yes":
+- break
+-
+- if resp == "no":
+- sys.exit(1)
+-
+- if resp == "l":
+- os.system("more LICENSE.GPL")
+-
+-
+ # Specify all the required PyMca data
+-data_files = [('PyMca', ['LICENSE.GPL',
+- 'PyMca/Scofield1973.dict',
++data_files = [('PyMca', ['PyMca/Scofield1973.dict',
+ 'PyMca/changelog.txt',
+ 'PyMca/McaTheory.cfg',
+ 'PyMca/PyMcaSplashImage.png',
diff --git a/sci-chemistry/PyMca/files/4.4.1_p1-impl-dec.patch b/sci-chemistry/PyMca/files/4.4.1_p1-impl-dec.patch
new file mode 100644
index 000000000000..ea37348066d2
--- /dev/null
+++ b/sci-chemistry/PyMca/files/4.4.1_p1-impl-dec.patch
@@ -0,0 +1,12 @@
+diff --git a/PyMca/specfile/src/sfwrite.c b/PyMca/specfile/src/sfwrite.c
+index 24df907..93c18e9 100755
+--- a/PyMca/specfile/src/sfwrite.c
++++ b/PyMca/specfile/src/sfwrite.c
+@@ -55,6 +55,7 @@
+ */
+ #include <SpecFile.h>
+ #include <SpecFileP.h>
++#include <unistd.h>
+
+ /*
+ * Declarations
diff --git a/sci-chemistry/PyMca/files/PyMca-4.6.2-gentoo.patch b/sci-chemistry/PyMca/files/PyMca-4.6.2-gentoo.patch
new file mode 100644
index 000000000000..81dfaf038fa6
--- /dev/null
+++ b/sci-chemistry/PyMca/files/PyMca-4.6.2-gentoo.patch
@@ -0,0 +1,16 @@
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0a77cdf..e7ba643 100644
+--- a/setup.py
++++ b/setup.py
+@@ -55,7 +55,7 @@ packages = ['PyMca','PyMca.PyMcaPlugins', 'PyMca.tests']
+ py_modules = []
+
+ # Specify all the required PyMca data
+-data_files = [(PYMCA_DATA_DIR, ['LICENSE.GPL',
++data_files = [(PYMCA_DATA_DIR, [
+ 'PyMca/PyMcaData/Scofield1973.dict',
+ 'changelog.txt',
+ 'PyMca/PyMcaData/McaTheory.cfg',
diff --git a/sci-chemistry/PyMca/metadata.xml b/sci-chemistry/PyMca/metadata.xml
new file mode 100644
index 000000000000..91146f1d585b
--- /dev/null
+++ b/sci-chemistry/PyMca/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+The PyMca Toolkit is a collection of Python tools for visualization and
+analysis of energy-dispersive X-ray fluorescence data. It builds its graphic
+interface and plotting routines on top of the C++ libraries Qt and Qwt
+through their respective Python bindings PyQt and PyQwt. Nevertheless,
+the data analysis routines can be used independently of any graphical
+interface.
+</longdescription>
+ <use>
+ <flag name="matplotlib">Support for plotting through matplotlib</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">pymca</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/acpype/Manifest b/sci-chemistry/acpype/Manifest
new file mode 100644
index 000000000000..e1cd9723b479
--- /dev/null
+++ b/sci-chemistry/acpype/Manifest
@@ -0,0 +1,3 @@
+DIST acpype-366.tar.xz 539408 SHA256 f0c77abea0a5680ecbbecadc1a95c8f851159b7c84d079f6f527336d447e1e9d
+DIST acpype-374.tar.xz 521076 SHA256 60a15d1c29ba3254a17c0792ae859444641e7a9375bd24cdd8baccc27920fde3 SHA512 99915299b32878e2139f67503260b491e05f8a592c37c5668e5aea3414822965827a91e09578264cfb48684decbadfb60c833706b756ff277ffde8b15159391e WHIRLPOOL b4e59eec36438eb2ee6d05183a6f08200213923ff50fbff1377cd976c8e39cc24429eb727d890028af2b5b5ad90428c70a10821ae20b50f7fc494ff9163322a8
+DIST acpype-389.tar.xz 524460 SHA256 4fd4036308cd81a480beaa56ae65b43a8c5ee3bbfc64b07b4d0b6649602f529a SHA512 0fbcb83ae8306d6bcc1cfd921d70c67a15e14c443453ab8c4cfd7082c15b95599801abbe31a46313674aa4841c5cd5499b69cc080221acc2793dc808df247987 WHIRLPOOL 21c8ee51c651c7a519716c818b0febd5fd62384aeeb6a5ce0f8dcf877181edba75fdd15be0d5a158b5a22d051765fb231c7c10038b8da1bcd98bede848057e95
diff --git a/sci-chemistry/acpype/acpype-366.ebuild b/sci-chemistry/acpype/acpype-366.ebuild
new file mode 100644
index 000000000000..01a804da9cba
--- /dev/null
+++ b/sci-chemistry/acpype/acpype-366.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils python
+PYTHON_DEPEND="2:2.5"
+
+DESCRIPTION="AnteChamber PYthon Parser interfacE"
+HOMEPAGE="http://code.google.com/p/acpype/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+DEPEND="sci-chemistry/ambertools"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}.patch"
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ newbin ${PN}.py ${PN}
+ newbin CcpnToAcpype.py CcpnToAcpype
+ dodoc NOTE.txt README.txt
+ insinto /usr/share/${PN}
+ doins -r ffamber_additions test
+}
diff --git a/sci-chemistry/acpype/acpype-374.ebuild b/sci-chemistry/acpype/acpype-374.ebuild
new file mode 100644
index 000000000000..56036152102c
--- /dev/null
+++ b/sci-chemistry/acpype/acpype-374.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.5"
+
+inherit python
+
+DESCRIPTION="AnteChamber PYthon Parser interfacE"
+HOMEPAGE="http://code.google.com/p/acpype/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+DEPEND="sci-chemistry/ambertools"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ newbin ${PN}.py ${PN}
+ newbin CcpnToAcpype.py CcpnToAcpype
+ dodoc NOTE.txt README.txt
+ insinto /usr/share/${PN}
+ doins -r ffamber_additions test
+}
diff --git a/sci-chemistry/acpype/acpype-389.ebuild b/sci-chemistry/acpype/acpype-389.ebuild
new file mode 100644
index 000000000000..6ff35e1fcc47
--- /dev/null
+++ b/sci-chemistry/acpype/acpype-389.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="AnteChamber PYthon Parser interfacE"
+HOMEPAGE="http://code.google.com/p/acpype/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ sci-chemistry/ambertools"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed \
+ -e '1s:^:#!/usr/bin/python\n\n:g' \
+ -i CcpnToAcpype.py || die
+}
+
+src_install() {
+ python_parallel_foreach_impl python_newscript ${PN}.py ${PN}
+ python_parallel_foreach_impl python_newscript CcpnToAcpype.py CcpnToAcpype
+ dodoc NOTE.txt README.txt
+ insinto /usr/share/${PN}
+ doins -r ffamber_additions test
+}
diff --git a/sci-chemistry/acpype/files/acpype.patch b/sci-chemistry/acpype/files/acpype.patch
new file mode 100644
index 000000000000..9354527cc8a9
--- /dev/null
+++ b/sci-chemistry/acpype/files/acpype.patch
@@ -0,0 +1,37 @@
+Index: acpype.py
+===================================================================
+--- acpype.py (revision 366)
++++ acpype.py (working copy)
+@@ -3020,32 +3020,6 @@
+ acMol2FileName = '%s_%s_%s.mol2' % (base, chargeType, atomType)
+ self.acMol2FileName = acMol2FileName
+ self.charmmBase = '%s_CHARMM' % base
+- # check for which version of antechamber
+- if 'amber10' in self.acExe:
+- if qprog == 'sqm':
+- self.printWarn("SQM is not implemented in AmberTools 1.2")
+- self.printWarn("Setting mopac for antechamber")
+- qprog = 'mopac'
+- elif qprog == 'divcon':
+- if not os.path.exists(os.path.join(os.path.dirname(self.acExe), qprog)):
+- self.printWarn("DIVCON is not installed")
+- self.printWarn("Setting mopac for antechamber")
+- qprog = 'mopac'
+- elif 'amber11' in self.acExe:
+- if qprog == 'divcon':
+- self.printWarn("DIVCON is not implemented in AmberTools 1.3 anymore")
+- self.printWarn("Setting sqm for antechamber")
+- qprog = 'sqm'
+- elif qprog == 'mopac':
+- if not os.path.exists(os.path.join(os.path.dirname(self.acExe), qprog)):
+- self.printWarn("MOPAC is not installed")
+- self.printWarn("Setting sqm for antechamber")
+- return None
+- qprog = 'sqm'
+- else:
+- self.printWarn("Old version of antechamber. Strongly consider upgrading to AmberTools")
+- self.printWarn("Setting mopac for antechamber")
+- qprog = 'mopac'
+ self.qFlag = qDict[qprog]
+ self.outTopols = [outTopol]
+ if outTopol == 'all':
diff --git a/sci-chemistry/acpype/metadata.xml b/sci-chemistry/acpype/metadata.xml
new file mode 100644
index 000000000000..13ef0bf5a17c
--- /dev/null
+++ b/sci-chemistry/acpype/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/ambertools/Manifest b/sci-chemistry/ambertools/Manifest
new file mode 100644
index 000000000000..747dbffa95d4
--- /dev/null
+++ b/sci-chemistry/ambertools/Manifest
@@ -0,0 +1,2 @@
+DIST AmberTools-1.5.tar.bz2 121062582 SHA256 0c7d397d2e91603bb9123ae68e91af3525269e60800ced360f68c13350651d7c
+DIST ambertools-1.5-bugfix_1-10.patch.xz 31708 SHA256 5773aaa8a2478ad478f0f3afafaa39669002c31ebe755c0d12ff277ce9ab8352
diff --git a/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild b/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild
new file mode 100644
index 000000000000..47adf6201db7
--- /dev/null
+++ b/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="A suite for carrying out complete molecular mechanics investigations"
+HOMEPAGE="http://ambermd.org/#AmberTools"
+SRC_URI="
+ AmberTools-${PV}.tar.bz2
+ mirror://gentoo/${P}-bugfix_1-10.patch.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="mpi openmp static-libs X"
+
+RESTRICT="fetch"
+
+RDEPEND="
+ virtual/cblas
+ virtual/lapack
+ sci-libs/clapack
+ sci-libs/arpack
+ sci-libs/cifparse-obj
+ sci-chemistry/mopac7
+ sci-libs/netcdf
+ sci-libs/fftw:2.1
+ sci-chemistry/reduce"
+DEPEND="${RDEPEND}
+ dev-util/byacc
+ dev-libs/libf2c
+ sys-devel/ucpp
+ virtual/pkgconfig"
+S="${WORKDIR}/amber11"
+
+pkg_nofetch() {
+ einfo "Go to ${HOMEPAGE} and get ${A}"
+ einfo "Place it in ${DISTDIR}"
+}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ if use openmp; then
+ tc-has-openmp || \
+ die "Please select an openmp capable compiler like gcc[openmp]"
+ fi
+ AMBERHOME="${S}"
+}
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}/${P}-bugfix_1-10.patch" \
+ "${FILESDIR}/${P}-gentoo.patch"
+ cd AmberTools/src
+ rm -r arpack blas lapack fftw-2.1.5 c9x-complex cifparse netcdf pnetcdf reduce ucpp-1.3 || die
+}
+
+src_configure() {
+ cd AmberTools/src
+ sed \
+ -e "s:\\\\\$(LIBDIR)/arpack.a:-larpack:g" \
+ -e "s:\\\\\$(LIBDIR)/lapack.a:$($(tc-getPKG_CONFIG) --libs lapack) -lclapack:g" \
+ -e "s:\\\\\$(LIBDIR)/blas.a:$($(tc-getPKG_CONFIG) --libs blas cblas):g" \
+ -e "s:\\\\\$(LIBDIR)/libdrfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \
+ -e "s:\\\\\$(LIBDIR)/libdfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \
+ -e "s:CFLAGS=:CFLAGS=${CFLAGS} -DBINTRAJ :g" \
+ -e "s:FFLAGS=:FFLAGS=${FFLAGS} :g" \
+ -e "s:LDFLAGS=$ldflags:LDFLAGS=${LDFLAGS}:g" \
+ -e "s:fc=g77:fc=$(tc-getFC):g" \
+ -e "s:\$netcdflib:$($(tc-getPKG_CONFIG) --libs netcdf):g" \
+ -e "s:NETCDF=\$netcdf:NETCDF=netcdf.mod:g" \
+ -e "s:-O3::g" \
+ -i configure || die
+ sed -e "s:arsecond_:arscnd_:g" \
+ -i sff/time.c \
+ -i sff/sff.h \
+ -i sff/sff.c || die
+ sed -e "s:\$(NAB):\$(NAB) -lrfftw:g" \
+ -i nss/Makefile || die
+
+ local myconf
+
+ use X || myconf="${myconf} -noX11"
+
+ for x in mpi openmp; do
+ use ${x} && myconf="${myconf} -${x}"
+ done
+
+ ./configure \
+ ${myconf} \
+ -nobintraj \
+ -nomdgx \
+ -nopython \
+ -nomtkpp \
+ gnu
+# $(expr match "$(tc-getCC)" '.*\([a-z]cc\)')
+}
+
+src_compile() {
+ cd AmberTools/src
+ emake
+}
+
+src_install() {
+ rm -r bin/chemistry bin/MMPBSA_mods
+ rm bin/ante-MMPBSA.py bin/extractFrcmod.py
+ for x in bin/*
+ do dobin ${x} || die
+ done
+ rm "${ED}/usr/bin/yacc"
+ dobin AmberTools/src/antechamber/mopac.sh
+ sed -e "s:\$AMBERHOME/bin/mopac:mopac7:g" \
+ -i "${ED}/usr/bin/mopac.sh" || die
+ # Make symlinks untill binpath for amber will be fixed
+ dodir /usr/share/${PN}/bin
+ cd "${ED}/usr/bin"
+ for x in *; do
+ dosym /usr/bin/${x} /usr/share/${PN}/bin/${x}
+ done
+ cd "${S}"
+# sed -e "s:\$AMBERHOME/dat:\$AMBERHOME/share/ambertools/dat:g" \
+# -i "${ED}/usr/bin/xleap" \
+# -i "${ED}/usr/bin/tleap" || die
+ dodoc doc/AmberTools.pdf doc/leap_pg.pdf
+
+ use static-libs && dolib.a lib/*
+
+ insinto /usr/include/${PN}
+ doins include/*
+
+ insinto /usr/share/${PN}
+ doins -r dat
+
+ cd AmberTools
+ doins -r benchmarks examples test
+
+ cat >> "${T}"/99ambertools <<- EOF
+ AMBERHOME="${EPREFIX}/usr/share/ambertools"
+ EOF
+ doenvd "${T}"/99ambertools
+}
diff --git a/sci-chemistry/ambertools/files/ambertools-1.5-gentoo.patch b/sci-chemistry/ambertools/files/ambertools-1.5-gentoo.patch
new file mode 100644
index 000000000000..0e41d26d6f9c
--- /dev/null
+++ b/sci-chemistry/ambertools/files/ambertools-1.5-gentoo.patch
@@ -0,0 +1,386 @@
+diff -urN amber11.orig/AmberTools/src/configure amber11/AmberTools/src/configure
+--- amber11.orig/AmberTools/src/configure 2011-04-14 15:30:55.000000000 +0300
++++ amber11/AmberTools/src/configure 2011-06-04 12:26:45.000000000 +0300
+@@ -293,7 +293,8 @@
+ echo "Your AMBERHOME environment variable is not set! It should be set to"
+ echo "$ambhome NOT doing so may cause errors when you compile. Continue"
+ echo "anyway? (yes or no)"
+- read answer
++ #read answer
++ answer='yes'
+ if [ "$answer" = 'yes' -o "$answer" = 'Yes' -o "$answer" = 'YES' -o "$answer" = 'y' -o "$answer" = 'Y' ]; then
+ echo ""
+ echo "Continuing anyway... Setting AMBERHOME to $ambhome temporarily"
+@@ -356,11 +357,11 @@
+ mpi_flag=
+ lex=flex
+ flibs_mkl=
+-lapack=install
+-blas=install
++lapack=skip
++blas=skip
+ f2c=skip
+-ucpp=install
+-cpp="\$(BINDIR)/ucpp -l"
++ucpp=skip
++cpp="\$(EPREFIX)/usr/bin/ucpp -l"
+
+ #-----------------------------------
+ # skip building of sleap?
+@@ -1655,24 +1656,24 @@
+ #--------------------------------------------------------------------------
+ # Configure fftw-3.2.2:
+ #--------------------------------------------------------------------------
+- if [ "$mdgx" = 'yes' ]; then
+- mdgxflag="--prefix=$AMBERHOME --disable-fortran"
+- echo
+- echo "Configuring fftw-3.2.2 (may be time-consuming)..."
+- echo
+- cd fftw-3.2.2 && \
+- env CC="$cc" CFLAGS="$cflags $cnooptflags" \
+- ./configure $mdgxflag > ../fftw3_config.log 2>&1
+- ncerror=$?
+- if [ $ncerror -gt 0 ]; then
+- echo " Error: FFTW configure returned $ncerror"
+- echo " FFTW configure failed! Check the fftw3_config.log file."
+- exit 1
+- else
+- echo " fftw-3.2.2 configure succeeded."
+- fi
+- cd ..
+- fi
++ #if [ "$mdgx" = 'yes' ]; then
++ # mdgxflag="--prefix=$AMBERHOME --disable-fortran"
++ # echo
++ # echo "Configuring fftw-3.2.2 (may be time-consuming)..."
++ # echo
++ # cd fftw-3.2.2 && \
++ # env CC="$cc" CFLAGS="$cflags $cnooptflags" \
++ # ./configure $mdgxflag > ../fftw3_config.log 2>&1
++ # ncerror=$?
++ # if [ $ncerror -gt 0 ]; then
++ # echo " Error: FFTW configure returned $ncerror"
++ # echo " FFTW configure failed! Check the fftw3_config.log file."
++ # exit 1
++ # else
++ # echo " fftw-3.2.2 configure succeeded."
++ # fi
++ # cd ..
++ #fi
+
+ #--------------------------------------------------------------------------
+ # Configure python
+@@ -1792,27 +1793,27 @@
+ echo
+ echo "Configuring fftw-2.1.5 (may be time-consuming)..."
+ echo
+- cd fftw-2.1.5
+- if [ "$mpi" = 'yes' ]; then
+- ./configure $rismflag --enable-mpi \
+- CC="$cc" CFLAGS="$cflags $coptflags" \
+- F77="$fc" FFLAGS="$fflags $foptflags" \
+- FLIBS="$flibs_arch" > ../fftw2_config.log 2>&1
+- else
+- ./configure $rismflag \
+- CC="$cc" CFLAGS="$cflags $coptflags" \
+- F77="$fc" FFLAGS="$fflags $foptflags" \
+- FLIBS="$flibs_arch" > ../fftw2_config.log 2>&1
+- fi
+- ncerror=$?
+- if [ $ncerror -gt 0 ]; then
+- echo " Error: fftw configure returned $ncerror"
+- echo " fftw configure failed! Check the fftw2_config.log file."
+- exit 1
+- else
+- echo " fftw-2.1.5 configure succeeded."
+- fi
+- cd ..
++ # cd fftw-2.1.5
++ # if [ "$mpi" = 'yes' ]; then
++ # ./configure $rismflag --enable-mpi \
++ # CC="$cc" CFLAGS="$cflags $coptflags" \
++ # F77="$fc" FFLAGS="$fflags $foptflags" \
++ # FLIBS="$flibs_arch" > ../fftw2_config.log 2>&1
++ # else
++ # ./configure $rismflag \
++ # CC="$cc" CFLAGS="$cflags $coptflags" \
++ # F77="$fc" FFLAGS="$fflags $foptflags" \
++ # FLIBS="$flibs_arch" > ../fftw2_config.log 2>&1
++ # fi
++ # ncerror=$?
++ # if [ $ncerror -gt 0 ]; then
++ # echo " Error: fftw configure returned $ncerror"
++ # echo " fftw configure failed! Check the fftw2_config.log file."
++ # exit 1
++ # else
++ # echo " fftw-2.1.5 configure succeeded."
++ # fi
++ # cd ..
+ flibs_fftw2="-ldrfftw -ldfftw"
+ if [ "$mpi" = 'yes' ]; then
+ flibs_fftw2="-ldrfftw_mpi -ldfftw_mpi $flibs_fftw2"
+diff -urN amber11.orig/AmberTools/src/cpptraj/src/Makefile_at amber11/AmberTools/src/cpptraj/src/Makefile_at
+--- amber11.orig/AmberTools/src/cpptraj/src/Makefile_at 2011-04-14 15:30:16.000000000 +0300
++++ amber11/AmberTools/src/cpptraj/src/Makefile_at 2011-05-20 00:45:48.000000000 +0300
+@@ -65,8 +65,8 @@
+ -/bin/rm FindDepend.o
+ -/bin/rm findDepend
+
+-cpptraj$(SFX): $(NETCDFLIB) $(OBJECTS)
+- $(CXX) $(LDFLAGS) -o cpptraj$(SFX) $(OBJECTS) $(NETCDFLIB) $(ZLIB) $(BZLIB)
++cpptraj$(SFX): $(OBJECTS)
++ $(CXX) $(LDFLAGS) -o cpptraj$(SFX) $(OBJECTS) $(NETCDFLIB) $(ZLIB) $(BZLIB) -lgomp
+
+ $(NETCDFLIB): ../../netcdf_config.log
+ cd ../../netcdf/src && $(MAKE) install
+diff -urN amber11.orig/AmberTools/src/Makefile amber11/AmberTools/src/Makefile
+--- amber11.orig/AmberTools/src/Makefile 2011-04-14 15:30:12.000000000 +0300
++++ amber11/AmberTools/src/Makefile 2011-05-19 23:36:36.000000000 +0300
+@@ -8,15 +8,15 @@
+
+ install: $(INSTALLTYPE)
+
+-serial: configured_serial $(NETCDFLIB) $(PYINSTALL) $(MTKPP)
++serial: configured_serial
+ @echo "Starting installation of ${AMBERTOOLS} serial at `date`".
+ # utility routines and libraries:
+- (cd ucpp-1.3 && $(MAKE) $(UCPP) )
++# (cd ucpp-1.3 && $(MAKE) $(UCPP) )
+ (cd byacc && $(MAKE) install )
+- (cd arpack && $(MAKE) install );
+- (cd lapack && $(MAKE) $(LAPACK) )
+- (cd blas && $(MAKE) $(BLAS) )
+- (cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
++# (cd arpack && $(MAKE) install );
++# (cd lapack && $(MAKE) $(LAPACK) )
++# (cd blas && $(MAKE) $(BLAS) )
++# (cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
+ (cd etc && $(MAKE) install )
+ (cd chamber && $(MAKE) install )
+ (cd pbsa && $(MAKE) install )
+@@ -32,7 +32,7 @@
+ (cd cpptraj && $(MAKE) $(CPPTRAJ))
+
+ # miscellaneous:
+- (cd reduce && $(MAKE) install )
++# (cd reduce && $(MAKE) install )
+
+ # leap and gleap:
+ (cd leap && $(MAKE) install )
+@@ -42,7 +42,7 @@
+ (cd rism && $(MAKE) install )
+
+ # nab:
+- (cd cifparse && $(MAKE) install )
++# (cd cifparse && $(MAKE) install )
+ (cd sff && $(MAKE) install )
+ (cd pbsa && $(MAKE) libinstall )
+ (cd nab && $(MAKE) install )
+@@ -63,19 +63,19 @@
+ @echo "Installation of ${AMBERTOOLS} serial is complete at `date`."
+ @echo ""
+
+-nabonly: $(NETCDFLIB)
++nabonly:
+ # utility routines and libraries:
+- (cd ucpp-1.3 && $(MAKE) $(UCPP) )
++# (cd ucpp-1.3 && $(MAKE) $(UCPP) )
+ (cd byacc && $(MAKE) install )
+- (cd arpack && $(MAKE) install );
+- (cd lapack && $(MAKE) $(LAPACK) )
+- (cd blas && $(MAKE) $(BLAS) )
+- (cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
++# (cd arpack && $(MAKE) install );
++# (cd lapack && $(MAKE) $(LAPACK) )
++# (cd blas && $(MAKE) $(BLAS) )
++# (cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
+ (cd pbsa && $(MAKE) libinstall )
+ (cd rism && $(MAKE) install )
+
+ # nab:
+- (cd cifparse && $(MAKE) install )
++# (cd cifparse && $(MAKE) install )
+ (cd sff && $(MAKE) install )
+ (cd nab && $(MAKE) install )
+ (cd nss && $(MAKE) install )
+diff -urN amber11.orig/AmberTools/src/mdgx/Makefile amber11/AmberTools/src/mdgx/Makefile
+--- amber11.orig/AmberTools/src/mdgx/Makefile 2011-04-14 15:30:17.000000000 +0300
++++ amber11/AmberTools/src/mdgx/Makefile 2011-05-20 12:44:38.000000000 +0300
+@@ -109,7 +109,7 @@
+
+ FFTW_LIBS = $(LIBDIR)/libfftw3.a
+
+-mdgx$(SFX) : $(MDGX_OBJS) $(FFTW_LIBS) $(NETCDFLIB)
++mdgx$(SFX) : $(MDGX_OBJS)
+ $(CC) $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) \
+ -o $@ $(MDGX_OBJS) $(FFTW_LIBS) $(NETCDFLIB) $(LM)
+
+diff -urN amber11.orig/AmberTools/src/pbsa/Makefile amber11/AmberTools/src/pbsa/Makefile
+--- amber11.orig/AmberTools/src/pbsa/Makefile 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/pbsa/Makefile 2011-05-19 22:27:40.000000000 +0300
+@@ -148,7 +148,7 @@
+ )
+
+ #---------------------------------------------------------------------------
+-pbsa$(SFX): $(OBJ) syslib netlib c9x-complex configured_serial
++pbsa$(SFX): $(OBJ) syslib configured_serial
+ $(FC) $(FFLAGS) $(AMBERFFLAGS) -o pbsa$(SFX) $(OBJ) \
+ ../lib/nxtsec.o ../lib/random.o \
+ $(FLIBSF) $(LDFLAGS) $(AMBERLDFLAGS)
+@@ -158,7 +158,7 @@
+ ../lib/nxtsec.o ../lib/random.o \
+ $(FLIBSF) $(LDFLAGS) $(AMBERLDFLAGS)
+
+-simplepbsa$(SFX): simplepbsa.o gopt.o libpbsa.a sfflib syslib netlib c9x-complex
++simplepbsa$(SFX): simplepbsa.o gopt.o libpbsa.a sfflib syslib
+ $(FC) $(FFLAGS) $(AMBERFFLAGS) -o simplepbsa$(SFX) simplepbsa.o gopt.o \
+ libpbsa.a $(LIBDIR)/libsff.a ../lib/nxtsec.o $(FLIBSF) \
+ $(LDFLAGS) $(AMBERLDFLAGS)
+@@ -194,15 +194,15 @@
+ sfflib:
+ cd ../sff && $(MAKE) install
+
+-netlib:
+- cd ../lapack && $(MAKE) $(LAPACK)
+- cd ../blas && $(MAKE) $(BLAS)
+- cd ../arpack && $(MAKE) install
+-
+-c9x-complex:
+- @if test $(C9XCOMPLEX) != "skip"; then \
+- cd ../c9x-complex && $(MAKE) libmc.a; \
+- fi
++#netlib:
++# cd ../lapack && $(MAKE) $(LAPACK)
++# cd ../blas && $(MAKE) $(BLAS)
++# cd ../arpack && $(MAKE) install
++
++#c9x-complex:
++# @if test $(C9XCOMPLEX) != "skip"; then \
++# cd ../c9x-complex && $(MAKE) libmc.a; \
++# fi
+
+ %.LIBPBSA.o: %.f
+ $(FPP) $(FPPFLAGS) $(AMBERFPPFLAGS) -DLIBPBSA $< > _$<
+diff -urN amber11.orig/AmberTools/src/ptraj/Makefile amber11/AmberTools/src/ptraj/Makefile
+--- amber11.orig/AmberTools/src/ptraj/Makefile 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/ptraj/Makefile 2011-05-19 23:38:36.000000000 +0300
+@@ -57,25 +57,25 @@
+ pubfft.o: pubfft.f
+ $(FC) -c $(FREEFORMAT_FLAG) $(FOPTFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o $@ $<
+
+-rdparm$(SFX): libs $(NETCDFLIB) $(OBJECTS)
++rdparm$(SFX): libs $(OBJECTS)
+ $(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
+ -o rdparm$(SFX) $(OBJECTS) $(LIBS) $(NETCDFLIB) $(LM)
+
+-ptraj$(SFX): libs netlib $(NETCDFLIB) $(OBJECTS)
++ptraj$(SFX): libs $(OBJECTS)
+ $(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
+ -o ptraj$(SFX) $(OBJECTS) $(LIBS) $(NETCDFLIB) $(LM)
+
+-ptraj.MPI$(SFX): libs netlib $(PNETCDFLIB) $(OBJECTS)
++ptraj.MPI$(SFX): libs $(PNETCDFLIB) $(OBJECTS)
+ $(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
+ -o ptraj.MPI$(SFX) $(OBJECTS) $(LIBS) $(PNETCDFLIB) $(LM)
+
+ libs:
+ cd pdb && $(MAKE)
+- cd ../arpack && $(MAKE)
++# cd ../arpack && $(MAKE)
+
+-netlib:
+- cd ../lapack && $(MAKE) $(LAPACK)
+- cd ../blas && $(MAKE) $(BLAS)
++#netlib:
++# cd ../lapack && $(MAKE) $(LAPACK)
++# cd ../blas && $(MAKE) $(BLAS)
+
+ clean:
+ cd pdb && $(MAKE) clean
+diff -urN amber11.orig/AmberTools/src/ptraj/netcdf_ptraj.h amber11/AmberTools/src/ptraj/netcdf_ptraj.h
+--- amber11.orig/AmberTools/src/ptraj/netcdf_ptraj.h 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/ptraj/netcdf_ptraj.h 2011-05-19 22:30:43.000000000 +0300
+@@ -4,7 +4,7 @@
+ # include "../../include/pnetcdf.h"
+ # define nc_strerror ncmpi_strerror
+ # else
+-# include "../../include/netcdf.h"
++# include <netcdf.h>
+ # endif
+ #endif
+
+diff -urN amber11.orig/AmberTools/src/ptraj/ptraj.h amber11/AmberTools/src/ptraj/ptraj.h
+--- amber11.orig/AmberTools/src/ptraj/ptraj.h 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/ptraj/ptraj.h 2011-06-04 13:25:01.000000000 +0300
+@@ -94,7 +94,7 @@
+ #define nc_strerror ncmpi_strerror
+ #include "../../include/pnetcdf.h"
+ #else
+-#include "../../include/netcdf.h"
++#include <netcdf.h>
+ #endif
+ #endif
+
+diff -urN amber11.orig/AmberTools/src/rism/Makefile amber11/AmberTools/src/rism/Makefile
+--- amber11.orig/AmberTools/src/rism/Makefile 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/rism/Makefile 2011-05-20 01:07:26.000000000 +0300
+@@ -49,7 +49,7 @@
+ mdiis_orig_c.o mdiis_blas_c.o mdiis_blas2_c.o mdiis_c.o \
+ fce_c.o erfcfun.o safemem.o blend.o timer_c.o
+
+-librism: $(LIBOBJ) $(FLIBS_FFTW2)
++librism: $(LIBOBJ)
+ $(AR) $(LIBDIR)/$@.a $(LIBOBJ)
+ $(RANLIB) $(LIBDIR)/$@.a
+
+diff -urN amber11.orig/AmberTools/src/sff/AmberNetcdf.c amber11/AmberTools/src/sff/AmberNetcdf.c
+--- amber11.orig/AmberTools/src/sff/AmberNetcdf.c 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/sff/AmberNetcdf.c 2011-05-20 10:49:06.000000000 +0300
+@@ -27,7 +27,7 @@
+ #endif
+
+ #ifdef BINTRAJ
+-#include "../../include/netcdf.h"
++#include <netcdf.h>
+
+ #define NCFRAME "frame"
+ #define NCSPATIAL "spatial"
+diff -urN amber11.orig/AmberTools/src/sff/Makefile amber11/AmberTools/src/sff/Makefile
+--- amber11.orig/AmberTools/src/sff/Makefile 2011-04-14 15:30:19.000000000 +0300
++++ amber11/AmberTools/src/sff/Makefile 2011-05-20 09:53:27.000000000 +0300
+@@ -1,7 +1,7 @@
+ include ../config.h
+
+ .c.o:
+- $(CC) -c -Dflex $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) $(RISMSFF) -o $@ $<
++ $(CC) -c -Dflex $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) $(RISMSFF) $(NETCDFLIB) -o $@ $<
+
+ OBJS = binpos.o conjgrad.o lmodC.o memutil.o nblist.o newton.o nmode.o \
+ prm.o rand2.o sasad.o sff.o time.o xminC.o AmberNetcdf.o \
+diff -urN amber11.orig/AmberTools/src/sqm/Makefile amber11/AmberTools/src/sqm/Makefile
+--- amber11.orig/AmberTools/src/sqm/Makefile 2011-04-14 15:30:20.000000000 +0300
++++ amber11/AmberTools/src/sqm/Makefile 2011-05-19 22:31:49.000000000 +0300
+@@ -77,7 +77,7 @@
+ install: sqm$(SFX)
+ mv sqm$(SFX) $(BINDIR)
+
+-sqm$(SFX): $(SQMOBJ) $(QMOBJ) netlib sys
++sqm$(SFX): $(SQMOBJ) $(QMOBJ) sys
+ $(FC) $(FFLAGS) $(AMBERFFLAGS) -o sqm$(SFX) $(SQMOBJ) $(QMOBJ) \
+ $(FLIBSF) ../lib/sys.a $(LDFLAGS) $(AMBERLDFLAGS)
+
+@@ -94,10 +94,10 @@
+ sys:
+ cd ../lib; $(MAKE) sys.a
+
+-netlib:
+- cd ../lapack; $(MAKE) $(LAPACK)
+- cd ../blas; $(MAKE) $(BLAS)
+- cd ../arpack && $(MAKE) install
++#netlib:
++# cd ../lapack; $(MAKE) $(LAPACK)
++# cd ../blas; $(MAKE) $(BLAS)
++# cd ../arpack && $(MAKE) install
+
+ clean:
+ /bin/rm -f *.o _*.f *.mod *.d sqm$(SFX)
diff --git a/sci-chemistry/ambertools/metadata.xml b/sci-chemistry/ambertools/metadata.xml
new file mode 100644
index 000000000000..13ef0bf5a17c
--- /dev/null
+++ b/sci-chemistry/ambertools/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/apbs/Manifest b/sci-chemistry/apbs/Manifest
new file mode 100644
index 000000000000..fef1437b89f5
--- /dev/null
+++ b/sci-chemistry/apbs/Manifest
@@ -0,0 +1 @@
+DIST apbs-1.4.1.zip 37999283 SHA256 1156c44fb65bb7c884801f3111ca1cdb1dfba6f5308226587db112aac4969027 SHA512 3a127af3940054e5a43b3c0c620507f4f9baa69049e5a0933d8e8825458ad2faba840392752de49fe68d91e2054fb1394cf87bb5bb1c0b48305368e2f404cf6a WHIRLPOOL 6729571f13c953ec0bcf90da73ef0c39cf769f1498a767d3280de3ffbeea18eda718373efca0468436c4b18357fe450865f661daba79eeb66778c572c43ff39a
diff --git a/sci-chemistry/apbs/apbs-1.4.1-r2.ebuild b/sci-chemistry/apbs/apbs-1.4.1-r2.ebuild
new file mode 100644
index 000000000000..cabbd1e45e92
--- /dev/null
+++ b/sci-chemistry/apbs/apbs-1.4.1-r2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=true
+
+inherit cmake-utils distutils-r1 flag-o-matic multilib toolchain-funcs
+
+GITHUB_REV="74fcb8676de69ed04ddab8976a8b05a6caaf4d65"
+
+DESCRIPTION="Evaluation of electrostatic properties of nanoscale biomolecular systems"
+HOMEPAGE="http://www.poissonboltzmann.org/apbs/"
+#SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+SRC_URI="https://github.com/Electrostatics/apbs-pdb2pqr/archive/${GITHUB_REV}.zip -> ${P}.zip"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc examples fast +fetk iapbs mpi openmp python tools"
+
+REQUIRED_USE="
+ iapbs? ( fetk )
+ mpi? ( !python )
+ python? ( tools fetk iapbs ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-cpp/eigen:3
+ dev-libs/maloc[mpi=]
+ virtual/blas
+ sys-libs/readline
+ fetk? (
+ sci-libs/fetk
+ sci-libs/amd
+ sci-libs/umfpack
+ sci-libs/superlu
+ )
+ mpi? ( virtual/mpi )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}"/${PN}-pdb2pqr-${GITHUB_REV}/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-multilib.patch
+ "${FILESDIR}"/${P}-manip.patch
+ "${FILESDIR}"/${P}-python.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags eigen3)
+
+ sed \
+ -e "s:-lblas:$($(tc-getPKG_CONFIG) --libs blas):g" \
+ -e "/TOOLS_PATH/d" \
+ -i CMakeLists.txt || die
+ use doc && MAKEOPTS+=" -j1"
+ if use python; then
+ unset PATCHES || die
+ cd tools/python && distutils-r1_src_prepare
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_RPATH=ON
+ -DTOOLS_PATH="${ED}"/usr
+ -DSYS_LIBPATHS="${EPREFIX}"/usr/$(get_libdir)
+ -DLIBRARY_INSTALL_PATH=$(get_libdir)
+ -DFETK_PATH="${EPREFIX}"/usr/
+ -DBUILD_SHARED_LIBS=ON
+ -DENABLE_QUIT=OFF
+ $(cmake-utils_use_build doc DOC)
+ $(cmake-utils_use_build tools TOOLS)
+ -DENABLE_BEM=OFF
+# ENABLE_BEM: Boundary element method using TABIPB
+ $(cmake-utils_use_enable debug DEBUG)
+ $(cmake-utils_use_enable debug VERBOSE_DEBUG)
+ $(cmake-utils_use_enable fast FAST)
+ $(cmake-utils_use_enable fetk FETK)
+ $(cmake-utils_use_enable mpi MPI)
+ $(cmake-utils_use_enable python PYTHON)
+# ENABLE_TINKER: Enable TINKER support
+ $(cmake-utils_use_enable iapbs iAPBS)
+# MAX_MEMORY: Set the maximum memory (in MB) to be used for a job
+ )
+ cmake-utils_src_configure
+ if use python; then
+ cd tools/python && distutils-r1_src_configure
+ fi
+}
+
+src_compile(){
+ cmake-utils_src_compile
+ if use python; then
+ append-ldflags -L"${S}"/lib
+ cd tools/python && distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ python_export_best
+ cd tests || die
+ LD_LIBRARY_PATH="${S}"/lib "${PYTHON}" apbs_tester.py -l log || die
+ grep -q 'FAILED' log && die "Tests failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ cmake-utils_src_install
+ local i
+ for i in "${ED}"/usr/bin/*; do
+ if [[ ! "${i}" =~ .*apbs$ ]]; then
+ mv "${i}" "${i}-apbs" || die
+ fi
+ done
+ if use python; then
+ cd tools/python && distutils-r1_src_install
+ rm -rf "${ED}"/usr/share/apbs/tools/python || die
+ fi
+}
diff --git a/sci-chemistry/apbs/files/apbs-1.4.1-manip.patch b/sci-chemistry/apbs/files/apbs-1.4.1-manip.patch
new file mode 100644
index 000000000000..378223397594
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.4.1-manip.patch
@@ -0,0 +1,50 @@
+ apbs/CMakeLists.txt | 2 +-
+ apbs/tools/CMakeLists.txt | 4 ----
+ apbs/tools/mesh/CMakeLists.txt | 4 ++--
+ 4 files changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/apbs/CMakeLists.txt b/apbs/CMakeLists.txt
+index 8917fc4..5152008 100644
+--- a/apbs/CMakeLists.txt
++++ b/apbs/CMakeLists.txt
+@@ -293,7 +293,7 @@ option(ENABLE_FETK "Enable the finite element solver" OFF)
+
+ if(ENABLE_FETK)
+ message(STATUS "Checking for fetk components")
+- set(FETK_ENALBED 1)
++ set(FETK_ENABLED 1)
+
+ list(APPEND APBS_LIBS "-lstdc++")
+ list(APPEND APBS_LIBS "-L${FETK_PATH}/lib")
+diff --git a/apbs/tools/manip/CMakeLists.txt b/apbs/tools/manip/CMakeLists.txt
+index 937dac7..5768cc5 100644
+--- a/apbs/tools/manip/CMakeLists.txt
++++ b/apbs/tools/manip/CMakeLists.txt
+@@ -4,9 +4,9 @@ set(LIBS "")
+ list(APPEND LIBS "apbs_generic")
+ list(APPEND LIBS "apbs_mg")
+ list(APPEND LIBS "apbs_pmgc")
+-if(FETK_ENALBED)
++if(FETK_ENABLED)
+ list(APPEND LIBS "apbs_fem")
+-endif(FETK_ENALBED)
++endif(FETK_ENABLED)
+
+ message(STATUS "libraries: ${LIBS}")
+
+diff --git a/apbs/tools/mesh/CMakeLists.txt b/apbs/tools/mesh/CMakeLists.txt
+index 1406377..6e6dfb9 100644
+--- a/apbs/tools/mesh/CMakeLists.txt
++++ b/apbs/tools/mesh/CMakeLists.txt
+@@ -4,9 +4,9 @@ set(LIBS "")
+ list(APPEND LIBS "apbs_generic")
+ list(APPEND LIBS "apbs_mg")
+ list(APPEND LIBS "apbs_pmgc")
+-if(FETK_ENALBED)
++if(FETK_ENABLED)
+ list(APPEND LIBS "apbs_fem")
+-endif(FETK_ENALBED)
++endif(FETK_ENABLED)
+
+ message(STATUS "libraries: ${LIBS}")
+
diff --git a/sci-chemistry/apbs/files/apbs-1.4.1-multilib.patch b/sci-chemistry/apbs/files/apbs-1.4.1-multilib.patch
new file mode 100644
index 000000000000..a4e2d1761cf4
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.4.1-multilib.patch
@@ -0,0 +1,92 @@
+ CMakeLists.txt | 18 +++++++++---------
+ src/CMakeLists.txt | 1 -
+ src/fem/CMakeLists.txt | 2 +-
+ src/pmgc/CMakeLists.txt | 2 +-
+ 4 files changed, 11 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 75ddbdd..c46f5e7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -61,7 +61,7 @@ set(LIBRARY_OUTPUT_PATH ${APBS_ROOT}/lib)
+ set(TOOLS_PATH ${APBS_ROOT}/tools)
+ set(APBS_BINARY ${EXECUTABLE_OUTPUT_PATH}/apbs)
+
+-set(LIBRARY_INSTALL_PATH lib)
++set(LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR})
+ set(HEADER_INSTALL_PATH include/apbs)
+ set(EXECUTABLE_INSTALL_PATH bin)
+ set(SHARE_INSTALL_PATH share/apbs)
+@@ -93,8 +93,6 @@ set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}")
+ list(APPEND CMAKE_INCLUDE_PATH /usr/include)
+ list(APPEND CMAKE_INCLUDE_PATH /usr/local/include)
+
+-set(APBS_LIBS "-L${APBS_ROOT}/lib -lapbs_geoflow")
+-
+ ################################################################################
+ # Enable ansi pedantic compiling #
+ ################################################################################
+@@ -193,9 +191,11 @@ if(ENABLE_BEM)
+ else()
+ set(TABI_LIBRARY_BASENAME ${CMAKE_STATIC_LIBRARY_PREFIX}${TABI}${CMAKE_STATIC_LIBRARY_SUFFIX})
+ endif()
+-
++
++ file(GLOB MODS ${LIBRARY_OUTPUT_PATH}/*.mod)
++
+ install(
+- FILES ${LIBRARY_OUTPUT_PATH}/${TABI_LIBRARY_BASENAME} ${LIBRARY_OUTPUT_PATH}/*.mod
++ FILES ${LIBRARY_OUTPUT_PATH}/${TABI_LIBRARY_BASENAME} ${MODS}
+ DESTINATION ${LIBRARY_INSTALL_PATH}
+ )
+ set(TABI_LIBRARY ${APBS_ROOT}/${LIBRARY_INSTALL_PATH}/${TABI_LIBRARY_BASENAME})
+@@ -210,7 +210,7 @@ if(ENABLE_BEM)
+ endif()
+ get_filename_component(LIBGFORTRANPATH ${LIBGFORTRANPATH} PATH)
+ find_path(LIBGFORTRAN_PATH ${LIBGFORTRAN_NAME} PATH ${LIBGFORTRANPATH})
+- list(APPEND APBS_LIBS "-L${APBS_ROOT}/${LIBRARY_INSTALL_PATH} -L${LIBGFORTRAN_PATH} -lgfortran -ltabipb" )
++ list(APPEND APBS_LIBS "-L${APBS_ROOT}/lib -L${LIBGFORTRAN_PATH} -lgfortran -ltabipb" )
+ endif() # ENABLE_BEM
+
+ find_file( # this should be find path...
+@@ -228,7 +228,7 @@ endif()
+
+
+ find_library(MALOC_LIBRARY "maloc"
+- PATHS ${FETK_PATH}/lib ${CONTRIB_PATH}
++ PATHS ${FETK_PATH}/${CMAKE_INSTALL_LIBDIR} ${CONTRIB_PATH}
+ DOC "The fetk/maloc library"
+ )
+ if(MALOC_LIBRARY)
+@@ -296,9 +296,9 @@ if(ENABLE_FETK)
+ set(FETK_ENALBED 1)
+
+ list(APPEND APBS_LIBS "-lstdc++")
+- list(APPEND APBS_LIBS "-L${FETK_PATH}/lib")
++ list(APPEND APBS_LIBS "-L${FETK_PATH}/${CMAKE_INSTALL_LIBDIR}")
+ list(APPEND APBS_LIBS -lamd -lpunc -lmc -lgamer -lsuperlu -lumfpack
+--lblas -lvf2c -ltetgen -ltriangle -lg2c -lreadline )
++-lblas -lvf2c -ltetgen -ltriangle -lreadline )
+
+ SET(HAVE_MC_H YES)
+ endif()
+diff --git a/src/fem/CMakeLists.txt b/src/fem/CMakeLists.txt
+index 5a950c2..dc37f48 100644
+--- a/src/fem/CMakeLists.txt
++++ b/src/fem/CMakeLists.txt
+@@ -12,4 +12,4 @@ add_items(
+ vpee.h
+ )
+
+-add_sublibrary(fem)
++add_sublibrary(fem apbs_geoflow)
+diff --git a/src/pmgc/CMakeLists.txt b/src/pmgc/CMakeLists.txt
+index 85b0c1e..97c95f0 100644
+--- a/src/pmgc/CMakeLists.txt
++++ b/src/pmgc/CMakeLists.txt
+@@ -42,4 +42,4 @@ add_items(
+ mgfasd.h
+ )
+
+-add_sublibrary(pmgc)
++add_sublibrary(pmgc apbs_geoflow)
diff --git a/sci-chemistry/apbs/files/apbs-1.4.1-python.patch b/sci-chemistry/apbs/files/apbs-1.4.1-python.patch
new file mode 100644
index 000000000000..db9f86ba120a
--- /dev/null
+++ b/sci-chemistry/apbs/files/apbs-1.4.1-python.patch
@@ -0,0 +1,122 @@
+ apbs/contrib/iapbs/src/apbs_driver.c | 6 +++---
+ apbs/src/CMakeLists.txt | 1 +
+ apbs/tools/CMakeLists.txt | 2 +-
+ apbs/tools/python/CMakeLists.txt | 1 +
+ apbs/tools/python/apbslib.c | 4 ++--
+ apbs/tools/python/apbslib.i | 4 ++--
+ apbs/tools/python/setup.py | 16 ++++++++++++++++
+ 7 files changed, 26 insertions(+), 8 deletions(-)
+
+diff --git a/apbs/contrib/iapbs/src/apbs_driver.c b/apbs/contrib/iapbs/src/apbs_driver.c
+index c9e443b..e1ad67f 100644
+--- a/apbs/contrib/iapbs/src/apbs_driver.c
++++ b/apbs/contrib/iapbs/src/apbs_driver.c
+@@ -595,7 +595,7 @@ int apbsdrv_(
+ printPBEPARM(pbeparm);
+
+ /* Refine mesh */
+- if (!preRefineFE(i, nosh, feparm, fetk)) {
++ if (!preRefineFE(i, feparm, fetk)) {
+ Vnm_tprint( 2, "Error pre-refining mesh!\n");
+ VJMPERR1(0);
+ }
+@@ -609,7 +609,7 @@ int apbsdrv_(
+ Vnm_tprint(1, " Beginning solve-estimate-refine cycle:\n");
+ for (isolve=0; isolve<feparm->maxsolve; isolve++) {
+ Vnm_tprint(1, " Solve #%d...\n", isolve);
+- if (!solveFE(i, nosh, pbeparm, feparm, fetk)) {
++ if (!solveFE(i, pbeparm, feparm, fetk)) {
+ Vnm_tprint(2, "ERROR SOLVING EQUATION!\n");
+ VJMPERR1(0);
+ }
+@@ -622,7 +622,7 @@ int apbsdrv_(
+ /* We're not going to refine if we've hit the max number
+ * of solves */
+ if (isolve < (feparm->maxsolve)-1) {
+- if (!postRefineFE(i, nosh, feparm, fetk)) break;
++ if (!postRefineFE(i, feparm, fetk)) break;
+ }
+ bytesTotal = Vmem_bytesTotal();
+ highWater = Vmem_highWaterTotal();
+diff --git a/apbs/src/CMakeLists.txt b/apbs/src/CMakeLists.txt
+index 44d20fa..2577343 100644
+--- a/apbs/src/CMakeLists.txt
++++ b/apbs/src/CMakeLists.txt
+@@ -68,6 +68,7 @@ configure_file(
+
+ if(ENABLE_iAPBS)
+ ADD_LIBRARY(apbs_routines routines.c routines.h)
++ target_link_libraries(apbs_routines apbs_mg apbs_fem)
+ INSTALL(TARGETS apbs_routines DESTINATION ${LIBRARY_INSTALL_PATH})
+ INSTALL(FILES apbscfg.h DESTINATION ${HEADER_INSTALL_PATH})
+ endif()
+diff --git a/apbs/tools/CMakeLists.txt b/apbs/tools/CMakeLists.txt
+index 1982a3c..4acbe68 100644
+--- a/apbs/tools/CMakeLists.txt
++++ b/apbs/tools/CMakeLists.txt
+@@ -4,5 +4,5 @@ add_subdirectory(mesh)
+ add_subdirectory(manip)
+
+ if(ENABLE_PYTHON)
+- add_subdirectory(manip)
++ add_subdirectory(python)
+ endif(ENABLE_PYTHON)
+diff --git a/apbs/tools/python/CMakeLists.txt b/apbs/tools/python/CMakeLists.txt
+new file mode 100644
+index 0000000..8b13789
+--- /dev/null
++++ b/apbs/tools/python/CMakeLists.txt
+@@ -0,0 +1 @@
++
+diff --git a/apbs/tools/python/apbslib.c b/apbs/tools/python/apbslib.c
+index fef5cc8..feaaa2c 100644
+--- a/apbs/tools/python/apbslib.c
++++ b/apbs/tools/python/apbslib.c
+@@ -2504,8 +2504,8 @@ static swig_module_info swig_module = {swig_types, 24, 0, 0, 0, 0};
+ #include "maloc/maloc.h"
+ #include "apbscfg.h"
+ #include "routines.h"
+-#include "apbs/valist.h"
+-#include "apbs/vatom.h"
++#include "generic/valist.h"
++#include "generic/vatom.h"
+
+
+ #include <limits.h>
+diff --git a/apbs/tools/python/apbslib.i b/apbs/tools/python/apbslib.i
+index 17fe521..44d05ea 100644
+--- a/apbs/tools/python/apbslib.i
++++ b/apbs/tools/python/apbslib.i
+@@ -15,8 +15,8 @@ Header files:
+ #include "maloc/maloc.h"
+ #include "apbscfg.h"
+ #include "routines.h"
+-#include "apbs/valist.h"
+-#include "apbs/vatom.h"
++#include "generic/valist.h"
++#include "generic/vatom.h"
+ %}
+
+ /*
+diff --git a/apbs/tools/python/setup.py b/apbs/tools/python/setup.py
+new file mode 100644
+index 0000000..4a20198
+--- /dev/null
++++ b/apbs/tools/python/setup.py
+@@ -0,0 +1,16 @@
++from distutils.core import setup, Extension
++setup(name='apbs',
++ version='1.4.1',
++ package_dir={'apbs': '', 'vgrid': 'vgrid'},
++ packages=['apbs', 'vgrid'],
++ py_modules=['apbslib', 'main', 'noinput'],
++ ext_modules=[
++ Extension(
++ '_apbslib',
++ ['apbslib.i'],
++ swig_opts=['-module', 'apbslib', '-I../include'],
++ include_dirs=["../../src"],
++ libraries=["apbs_generic", "apbs_routines"]
++ )
++ ],
++ )
diff --git a/sci-chemistry/apbs/metadata.xml b/sci-chemistry/apbs/metadata.xml
new file mode 100644
index 000000000000..f1b8467dd96e
--- /dev/null
+++ b/sci-chemistry/apbs/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ <description>Ebuild Crasher</description>
+ </maintainer>
+ <use>
+ <flag name="fetk">Include support for FeTK</flag>
+ <flag name="fast">APBS fast mode (experimental)</flag>
+ <flag name="iapbs">C/C++/Fortran interface</flag>
+ <flag name="tools">Install optional tools</flag>
+ </use>
+ <longdescription>
+APBS is a software package for modeling biomolecular solvation through solution
+of the Poisson-Boltzmann equation (PBE), one of the most popular continuum
+models for describing electrostatic interactions between molecular solutes in
+salty, aqueous media. Continuum electrostatics plays an important role in
+several areas of biomolecular simulation
+</longdescription>
+ <upstream>
+ <remote-id type="github">Electrostatics/apbs-pdb2pqr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/aqua/Manifest b/sci-chemistry/aqua/Manifest
new file mode 100644
index 000000000000..7f6594d70fe4
--- /dev/null
+++ b/sci-chemistry/aqua/Manifest
@@ -0,0 +1,2 @@
+DIST aqua-3.2-nmr_manual.tar.gz 632031 SHA256 89bbc2501831e547fec2fe755bbc0081f672e5e2c7adb83618699e6825f73996
+DIST aqua3.2.tar.gz 688408 SHA256 895291b1771f4db5b4a010ce797400a8c4d84095bf34d660dd3405223419242f
diff --git a/sci-chemistry/aqua/aqua-3.2-r2.ebuild b/sci-chemistry/aqua/aqua-3.2-r2.ebuild
new file mode 100644
index 000000000000..74fccddc5dd2
--- /dev/null
+++ b/sci-chemistry/aqua/aqua-3.2-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils fortran-2 toolchain-funcs
+
+DESCRIPTION="Program suite in this distribution calculates restraint violations"
+HOMEPAGE="http://www.biochem.ucl.ac.uk/~roman/procheck/procheck.html"
+SRC_URI="
+ ${PN}${PV}.tar.gz
+ doc? ( ${P}-nmr_manual.tar.gz )"
+
+SLOT="0"
+LICENSE="procheck"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="sci-chemistry/procheck"
+DEPEND=""
+
+RESTRICT="fetch"
+
+S="${WORKDIR}"/${PN}${PV}
+
+pkg_nofetch() {
+ elog "Please visit http://www.ebi.ac.uk/thornton-srv/software/PROCHECK/download.html"
+ elog "And follow the instruction for downloading ${PN}${PV}.tar.gz -> ${DISTDIR}/${PN}${PV}.tar.gz."
+ if use doc; then
+ elog "nmr_manual.tar.gz -> ${DISTDIR}/${P}-nmr_manual.tar.gz"
+ fi
+}
+
+src_prepare() {
+ sed \
+ -e 's:nawk:gawk:g' \
+ -e "s:/bin/gawk:${EPREFIX}/usr/bin/gawk:g" \
+ -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \
+ -i $(find . -type f) || die
+ epatch "${FILESDIR}"/${PV}-flags.patch
+}
+
+src_compile() {
+ pushd src > /dev/null
+ emake \
+ MYROOT="${WORKDIR}" \
+ CC="$(tc-getCC)" \
+ FC="$(tc-getFC)" \
+ CFLAGS="${CFLAGS} -I../sub/lib" \
+ FFLAGS="${FFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ exth
+ emake \
+ MYROOT="${WORKDIR}" \
+ CC="$(tc-getCC)" \
+ FC="$(tc-getFC)" \
+ CFLAGS="${CFLAGS} -I../sub/lib" \
+ FFLAGS="${FFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ popd
+}
+
+src_install() {
+ rm -f scripts/conv* || die
+ dobin bin/* scripts/*
+ dosym AquaWhat /usr/bin/qwhat
+ dosym AquaHow /usr/bin/qhow
+ dosym AquaPseudo /usr/bin/qpseudo
+ dosym AquaDist /usr/bin/qdist
+ dosym AquaCalc /usr/bin/qcalc
+ dosym AquaAssign /usr/bin/qassign
+ dosym AquaRedun /usr/bin/qredun
+ dosym AquaCompl /usr/bin/qcompl
+
+ dodoc HISTORY HOW_TO_USE NEW README doc/*
+ dohtml html/*
+
+ insinto /usr/share/${PN}
+ doins data/*
+ if use examples; then
+ doins -r exmpls
+ fi
+
+ if use doc; then
+ dohtml -r manual
+ fi
+
+ cat >> "${T}"/34aqua <<- EOF
+ AQUADATADIR="${EPREFIX}/usr/share/${PN}"
+ EOF
+ doenvd "${T}"/34aqua
+}
diff --git a/sci-chemistry/aqua/files/3.2-flags.patch b/sci-chemistry/aqua/files/3.2-flags.patch
new file mode 100644
index 000000000000..cd12fbb9a324
--- /dev/null
+++ b/sci-chemistry/aqua/files/3.2-flags.patch
@@ -0,0 +1,84 @@
+diff --git a/src/makefile b/src/makefile
+index 3113471..dd7a320 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -176,47 +176,46 @@ nrutil.h:
+ # Executable files
+
+ $(BIN)/AquaWhat: AquaWhat.o $(OBJECTS) $(R_OBJECTS) $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaWhat AquaWhat.o $(OBJECTS) $(R_OBJECTS) $(RNG_OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaWhat AquaWhat.o $(OBJECTS) $(R_OBJECTS) $(RNG_OBJECTS)
+
+ $(BIN)/AquaHow: AquaHow.o $(OBJECTS) $(R_OBJECTS) AquaFuncts_dr.o $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaHow AquaHow.o $(OBJECTS) $(R_OBJECTS) AquaFuncts_dr.o $(RNG_OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaHow AquaHow.o $(OBJECTS) $(R_OBJECTS) AquaFuncts_dr.o $(RNG_OBJECTS)
+
+ $(BIN)/AquaPseudo: AquaPseudo.o $(OBJECTS) $(R_OBJECTS)
+- $(CC) -o $(BIN)/AquaPseudo AquaPseudo.o $(OBJECTS) $(R_OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaPseudo AquaPseudo.o $(OBJECTS) $(R_OBJECTS)
+
+ $(BIN)/AquaDist: AquaDist.o $(OBJECTS)
+- $(CC) -o $(BIN)/AquaDist AquaDist.o $(OBJECTS) $(LDFLAGS) -lm
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaDist AquaDist.o $(OBJECTS) -lm
+
+ $(BIN)/AquaCalc: AquaCalc.o $(OBJECTS) $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaCalc AquaCalc.o $(OBJECTS) $(RNG_OBJECTS) $(LDFLAGS) -lm
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaCalc AquaCalc.o $(OBJECTS) $(RNG_OBJECTS) -lm
+
+ $(BIN)/AquaAssign: AquaAssign.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaAssign AquaAssign.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaAssign AquaAssign.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS)
+
+ $(BIN)/AquaCompl: AquaCompl.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaCompl AquaCompl.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS) $(LDFLAGS) -lm
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaCompl AquaCompl.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS) -lm
+
+ $(BIN)/AquaRedun: AquaRedun.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS)
+- $(CC) -o $(BIN)/AquaRedun AquaRedun.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaRedun AquaRedun.o AquaCommon.o $(OBJECTS) $(R_OBJECTS) nrutil.o AquaFuncts_dr.o $(RNG_OBJECTS)
+
+ $(BIN)/testnew: testnew.o $(OBJECTS)
+- $(CC) -o $(BIN)/testnew testnew.o $(OBJECTS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/testnew testnew.o $(OBJECTS)
+
+ $(BIN)/getproj: getproj.c
+- $(CC) -o $(BIN)/getproj -O getproj.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/getproj getproj.c
+
+ $(BIN)/AquaPlot: AquaPlot.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o
+- $(CC) -o $(BIN)/AquaPlot AquaPlot.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/AquaPlot AquaPlot.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o
+
+ $(BIN)/Qext: Qext.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o
+- $(CC) -o $(BIN)/Qext Qext.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $(BIN)/Qext Qext.o $(LIB)/MenuFuncts.o $(LIB)/Functs.o
+
+ $(BIN)/StarTest: StarTest.o
+- $(CC) -o $(BIN)/StarTest StarTest.o $(LDFLAGS) $(STARFLAGS) $(STARLIBS)
++ $(CC) $(LDFLAGS) -o $(BIN)/StarTest StarTest.o $(STARFLAGS) $(STARLIBS)
+
+ exth: exth.f
+- f77 -o exth -O2 exth.f
+- strip exth
++ $(FC) $(FFLAGS) -o exth -O2 exth.f
+
+
+ # Object files
+@@ -269,7 +268,7 @@ AquaCommon.o: AquaCommon.c AquaCommon.h nrutil.h \
+ $(CC) -c AquaCommon.c $(CFLAGS)
+
+ nrutil.o: nrutil.c nrutil.h
+- $(CC) -c nrutil.c -DANSI
++ $(CC) $(CFLAGS) -c nrutil.c -DANSI
+
+ AquaFuncts.o: AquaFuncts.c AquaFuncts.h AquaFuncts_cv.h AquaFuncts_io.h\
+ AquaStrucset.h AquaFiles.h\
+@@ -319,7 +318,7 @@ $(LIB)/MenuFuncts.o: $(LIB)/MenuFuncts.c $(LIB)/MenuTypes.h $(LIB)/MenuFuncts.h\
+ cd $(LIB); $(CC) -c MenuFuncts.c $(CFLAGS)
+
+ cv_subs.o: cv_subs.f
+- f77 -c cv_subs.f $(FFLAGS)
++ $(FC) -c cv_subs.f $(FFLAGS)
+
+ Qext.o: Qext.c Qext.h\
+ $(LIB)/MenuFuncts.h $(LIB)/Functs.h $(G_HEADERS)
diff --git a/sci-chemistry/aqua/metadata.xml b/sci-chemistry/aqua/metadata.xml
new file mode 100644
index 000000000000..1837bbc07a6e
--- /dev/null
+++ b/sci-chemistry/aqua/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/aria/Manifest b/sci-chemistry/aria/Manifest
new file mode 100644
index 000000000000..28b40aa5c0c8
--- /dev/null
+++ b/sci-chemistry/aria/Manifest
@@ -0,0 +1 @@
+DIST aria2.3.2_08.26.2013.tar.gz 1878602 SHA256 b9b892de2070a77812733faf4b6a1dbec4bba6dec80e5630088cab8b11cbfaf0 SHA512 a6d8c45218f5d494174587a5f8f1feec940ac8cc4cd7b707dac65b2378219ecf27967e70807e6cb7ae22a7d4aec7239af763f077ad7183c078b1991cac71bc3e WHIRLPOOL 59c0b79fab40201d903c484bf63e8339c235207306efc848965d260c02b00c9a408297df0f211cf45f30d13ec35175bf7d566bb5c6d59b944eb22d9aacf0384d
diff --git a/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild b/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild
new file mode 100644
index 000000000000..7c4026fb1070
--- /dev/null
+++ b/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit eutils python-single-r1 versionator
+
+MY_P="${PN}$(get_version_component_range 1-2 ${PV})"
+DATE="08.26.2013"
+
+DESCRIPTION="Automated NOE assignment and NMR structure calculation"
+HOMEPAGE="http://aria.pasteur.fr/"
+SRC_URI="http://aria.pasteur.fr/archives/${MY_P}.2_${DATE}.tar.gz"
+
+SLOT="0"
+LICENSE="cns"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-tcltk/tix
+ dev-lang/tk
+ >=dev-python/numpy-1.1[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP},tk]
+ >=sci-chemistry/cns-1.2.1-r7[aria,openmp]
+ >=sci-chemistry/ccpn-2.2[${PYTHON_USEDEP}]
+ sci-chemistry/clashlist
+ sci-chemistry/procheck
+ sci-libs/clashscore-db"
+DEPEND="${RDEPEND}"
+
+RESTRICT="fetch"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_nofetch(){
+ einfo "Go to http://aria.pasteur.fr/archives/aria2.3.2.tar.gz/view, download ${A}"
+ einfo "and place it in ${DISTDIR}"
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_test(){
+ export CCPNMR_TOP_DIR=$(python_get_sitedir)
+ export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+ ${PYTHON} check.py || die
+}
+
+src_install(){
+ python_moduleinto ${PN}
+ python_domodule src aria2.py
+ python_moduleinto ${PN}/cns
+ python_domodule cns/{protocols,toppar,src/helplib}
+
+ if use examples; then
+ insinto /usr/share/${P}/
+ doins -r examples
+ fi
+
+ # ENV
+ cat >> "${T}"/20aria <<- EOF
+ ARIA2="$(python_get_sitedir)/${PN}"
+ EOF
+
+ doenvd "${T}"/20aria
+
+ # Launch Wrapper
+ cat >> "${T}"/aria <<- EOF
+ #!/bin/sh
+ export CCPNMR_TOP_DIR="$(python_get_sitedir)"
+ export PYTHONPATH="$(python_get_sitedir)/ccpn/python"
+ exec "${PYTHON}" -O "\${ARIA2}"/aria2.py \$@
+ EOF
+
+ dobin "${T}"/aria
+ dosym aria /usr/bin/aria2
+
+ dodoc README
+ python_optimize "${D}/$(python_get_sitedir)"
+}
diff --git a/sci-chemistry/aria/files/aria-2.3.2-python.patch b/sci-chemistry/aria/files/aria-2.3.2-python.patch
new file mode 100644
index 000000000000..1f9ae1fcc5f6
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-python.patch
@@ -0,0 +1,30 @@
+ src/py/aria/legacy/QualityChecks/Descriptive.py | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/py/aria/legacy/QualityChecks/Descriptive.py b/src/py/aria/legacy/QualityChecks/Descriptive.py
+index ae5913c..550d20c 100644
+--- a/src/py/aria/legacy/QualityChecks/Descriptive.py
++++ b/src/py/aria/legacy/QualityChecks/Descriptive.py
+@@ -1,3 +1,6 @@
++from math import *
++from numpy import *
++
+ class Descriptive:
+ """
+ some basic statistics
+@@ -55,7 +58,6 @@ class Descriptive:
+
+ def getStdDev(self):
+ if( len(self.myData) == 0): return None
+- from math import *
+ if( (self.count - 1) > 0 ):
+ return sqrt( self.pseudoVariance/ (self.count - 1))
+ else:
+@@ -89,7 +91,6 @@ class Descriptive:
+ def getMedian(self):
+ if( len(self.myData) == 0): return None
+ if( self.median == None ):
+- from numpy import *
+ sort(self.myData)
+ if( self.count%2 == 1):
+ self.median = self.myData[(self.count-1)/2]
diff --git a/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch b/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch
new file mode 100644
index 000000000000..6a363d098632
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch
@@ -0,0 +1,139 @@
+ src/py/aria/exportToCcpn.py | 24 +++++++++++-------------
+ src/py/aria/importFromCcpn.py | 32 ++++++++++++--------------------
+ 2 files changed, 23 insertions(+), 33 deletions(-)
+
+diff --git a/src/py/aria/exportToCcpn.py b/src/py/aria/exportToCcpn.py
+index c742a88..aae7b7d 100644
+--- a/src/py/aria/exportToCcpn.py
++++ b/src/py/aria/exportToCcpn.py
+@@ -1,5 +1,5 @@
+ from ccpnmr.analysis.core.ConstraintBasic import makeNmrConstraintStore, makeStructureGeneration, getFixedResonance
+-from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims
++from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims, getThroughSpaceDataDims
+ from ccpnmr.analysis.core.AssignmentBasic import assignAtomsToRes, assignResToDim
+ from ccpnmr.analysis.core.PeakBasic import pickPeak, setManualPeakIntensity
+ from ccpnmr.analysis.core.MoleculeBasic import DEFAULT_ISOTOPES
+@@ -791,12 +791,13 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims = ariaDimDict.get(spectrum)
+ if not ariaDims:
+ ariaDims = [] #[0,1,2]
++ throughSpaceDataDims = getThroughSpaceDataDims(spectrum)
+
+ dataDims = spectrum.sortedDataDims()
+ if len(dataDims) == 3:
+ for dataDim in dataDims:
+ expDimRef = dataDim.findFirstDataDimRef().expDimRef
+- if '1H' in expDimRef.isotopeCodes: # 0 or 2
++ if dataDim in throughSpaceDataDims: # 0 or 2
+ if onebondDims.get(dataDim.dim):
+ if ppmX1 is None:
+ ariaDims.append(2)
+@@ -816,21 +817,18 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims.append(1)
+
+ else:
+- transfer = spectrum.experiment.findFirstExpTransfer(transferType='through-space') or \
+- spectrum.experiment.findFirstExpTransfer(transferType='NOESY')
+
++ i = 0
+ for dataDim in dataDims:
+- expDimRefs = [dataDimRef.expDimRef for dataDimRef in dataDim.dataDimRefs]
+- i = 0
+- for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef in expDimRefs:
+- ariaDims.append(i)
+- boundDim = onebondDims.get(dataDim.dim)
+- if boundDim:
+- ariaDims.append(i+1)
+-
++ if dataDim in throughSpaceDataDims:
++ ariaDims.append(i)
++ boundDim = onebondDims.get(dataDim.dim)
++ if boundDim:
++ ariaDims.append(i+1)
++
+ i += 2
+
++
+ ariaDimDict[spectrum] = ariaDims
+
+ if namesDict:
+diff --git a/src/py/aria/importFromCcpn.py b/src/py/aria/importFromCcpn.py
+index a65ae3e..f63ba16 100644
+--- a/src/py/aria/importFromCcpn.py
++++ b/src/py/aria/importFromCcpn.py
+@@ -165,7 +165,7 @@ def getStructureEnsembles(project, ccpChains):
+
+ return ensembles
+
+-def getNoesyPeakLists(project, molSystem=None):
++def getNoesyPeakLists(project, molSystem=None, excludeSimulated=True):
+ """Descrn: Get the NOE peak lists from a CCPN project. Can filter if appropriate to a given
+ molecular system if passed in.
+ Inputs: Implementation.Project, ccp.molecule.MolSystem.MolSystem
+@@ -196,19 +196,10 @@ def getNoesyPeakLists(project, molSystem=None):
+
+ for spectrum in experiment.dataSources:
+ if (spectrum.dataType == 'processed') and (spectrum.numDim > 1):
+-
+- isotopes = []
+- for dataDim in spectrum.dataDims:
+- for expDimRef in dataDim.expDim.expDimRefs:
+- if expDimRef.measurementType in ('shift','Shift'):
+- isotope = ','.join(expDimRef.isotopeCodes)
+- isotopes.append(isotope)
+- break
+-
+- if isotopes.count('1H') > 1:
+- for peakList in spectrum.peakLists:
+- if peakList.findFirstPeak():
+- peakLists.append(peakList)
++ for peakList in spectrum.sortedPeakLists():
++ if excludeSimulated and peakList.isSimulated:
++ continue
++ peakLists.append(peakList)
+
+
+ return peakLists
+@@ -490,7 +481,10 @@ def makeAriaChain(ccpChain):
+ # Does below work for DNA/RNA?
+
+ aria_settings = ChainSettings()
+- aria_settings['type'] = chainTypeMapping[ccpChain.molecule.molType]
++ # wb104: below changed 31 Oct 2011 to try and get around case when molType is None
++ #aria_settings['type'] = chainTypeMapping[ccpChain.molecule.molType]
++ molType = ccpChain.molecule.molType or 'protein'
++ aria_settings['type'] = chainTypeMapping[molType]
+
+ aria_chain = Chain(settings=aria_settings, segid=string_to_segid(ccpChain.code))
+
+@@ -952,8 +946,6 @@ def makeAriaSpectrum(peakList, ariaMolecule, filterRejected=True):
+ expDimRefDict = {}
+
+ for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef.isotopeCodes != ('1H',):
+- raise Exception('Not an H-H experiment')
+
+ onebondTransfer = expDimRef.findFirstExpTransfer(transferType='onebond')
+
+@@ -1095,7 +1087,7 @@ def getAriaAtomsFromResonance(resonance, ariaMolecule, cache={}):
+
+ # TJS modify to return just a list of atoms, rather than a list of list
+ ariaAtoms = []
+- for atom in atomSet.sortedAtoms():
++ for atom in atomSet.atoms:
+ ariaAtom = ariaResidue.atoms.get(atom.name)
+ if not ariaAtom:
+ messager.warning('Could not find ARIA Atom for CCPN atom %d%s %s' % (residue.seqCode,residue.ccpCode, atom.name))
+@@ -1256,9 +1248,9 @@ def getAriaDistanceRestraintsList(constraint_list, constraint_type, aria_mol):
+ restraint.setWeight(weight)
+
+
+- for constrItem in distConstr.sortedItems():
++ for constrItem in distConstr.items:
+
+- reso1, reso2 = constrItem.sortedResonances()
++ reso1, reso2 = constrItem.resonances
+
+ # TJS fix for mapping prochirals
+ # always use real resonnances where possible
diff --git a/sci-chemistry/aria/files/aria-2.3.2-through-space.patch b/sci-chemistry/aria/files/aria-2.3.2-through-space.patch
new file mode 100644
index 000000000000..bda76aa11c80
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-through-space.patch
@@ -0,0 +1,118 @@
+ src/py/aria/exportToCcpn.py | 24 +++++++++++-------------
+ src/py/aria/importFromCcpn.py | 25 +++++++------------------
+ 2 files changed, 18 insertions(+), 31 deletions(-)
+
+diff --git a/src/py/aria/exportToCcpn.py b/src/py/aria/exportToCcpn.py
+index c742a88..aae7b7d 100644
+--- a/src/py/aria/exportToCcpn.py
++++ b/src/py/aria/exportToCcpn.py
+@@ -1,5 +1,5 @@
+ from ccpnmr.analysis.core.ConstraintBasic import makeNmrConstraintStore, makeStructureGeneration, getFixedResonance
+-from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims
++from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims, getThroughSpaceDataDims
+ from ccpnmr.analysis.core.AssignmentBasic import assignAtomsToRes, assignResToDim
+ from ccpnmr.analysis.core.PeakBasic import pickPeak, setManualPeakIntensity
+ from ccpnmr.analysis.core.MoleculeBasic import DEFAULT_ISOTOPES
+@@ -791,12 +791,13 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims = ariaDimDict.get(spectrum)
+ if not ariaDims:
+ ariaDims = [] #[0,1,2]
++ throughSpaceDataDims = getThroughSpaceDataDims(spectrum)
+
+ dataDims = spectrum.sortedDataDims()
+ if len(dataDims) == 3:
+ for dataDim in dataDims:
+ expDimRef = dataDim.findFirstDataDimRef().expDimRef
+- if '1H' in expDimRef.isotopeCodes: # 0 or 2
++ if dataDim in throughSpaceDataDims: # 0 or 2
+ if onebondDims.get(dataDim.dim):
+ if ppmX1 is None:
+ ariaDims.append(2)
+@@ -816,21 +817,18 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims.append(1)
+
+ else:
+- transfer = spectrum.experiment.findFirstExpTransfer(transferType='through-space') or \
+- spectrum.experiment.findFirstExpTransfer(transferType='NOESY')
+
++ i = 0
+ for dataDim in dataDims:
+- expDimRefs = [dataDimRef.expDimRef for dataDimRef in dataDim.dataDimRefs]
+- i = 0
+- for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef in expDimRefs:
+- ariaDims.append(i)
+- boundDim = onebondDims.get(dataDim.dim)
+- if boundDim:
+- ariaDims.append(i+1)
+-
++ if dataDim in throughSpaceDataDims:
++ ariaDims.append(i)
++ boundDim = onebondDims.get(dataDim.dim)
++ if boundDim:
++ ariaDims.append(i+1)
++
+ i += 2
+
++
+ ariaDimDict[spectrum] = ariaDims
+
+ if namesDict:
+diff --git a/src/py/aria/importFromCcpn.py b/src/py/aria/importFromCcpn.py
+index a65ae3e..91ad123 100644
+--- a/src/py/aria/importFromCcpn.py
++++ b/src/py/aria/importFromCcpn.py
+@@ -196,19 +196,10 @@ def getNoesyPeakLists(project, molSystem=None):
+
+ for spectrum in experiment.dataSources:
+ if (spectrum.dataType == 'processed') and (spectrum.numDim > 1):
+-
+- isotopes = []
+- for dataDim in spectrum.dataDims:
+- for expDimRef in dataDim.expDim.expDimRefs:
+- if expDimRef.measurementType in ('shift','Shift'):
+- isotope = ','.join(expDimRef.isotopeCodes)
+- isotopes.append(isotope)
+- break
+-
+- if isotopes.count('1H') > 1:
+- for peakList in spectrum.peakLists:
+- if peakList.findFirstPeak():
+- peakLists.append(peakList)
++ for peakList in spectrum.sortedPeakLists():
++ if excludeSimulated and peakList.isSimulated:
++ continue
++ peakLists.append(peakList)
+
+
+ return peakLists
+@@ -952,8 +943,6 @@ def makeAriaSpectrum(peakList, ariaMolecule, filterRejected=True):
+ expDimRefDict = {}
+
+ for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef.isotopeCodes != ('1H',):
+- raise Exception('Not an H-H experiment')
+
+ onebondTransfer = expDimRef.findFirstExpTransfer(transferType='onebond')
+
+@@ -1095,7 +1084,7 @@ def getAriaAtomsFromResonance(resonance, ariaMolecule, cache={}):
+
+ # TJS modify to return just a list of atoms, rather than a list of list
+ ariaAtoms = []
+- for atom in atomSet.sortedAtoms():
++ for atom in atomSet.atoms:
+ ariaAtom = ariaResidue.atoms.get(atom.name)
+ if not ariaAtom:
+ messager.warning('Could not find ARIA Atom for CCPN atom %d%s %s' % (residue.seqCode,residue.ccpCode, atom.name))
+@@ -1256,9 +1245,9 @@ def getAriaDistanceRestraintsList(constraint_list, constraint_type, aria_mol):
+ restraint.setWeight(weight)
+
+
+- for constrItem in distConstr.sortedItems():
++ for constrItem in distConstr.items:
+
+- reso1, reso2 = constrItem.sortedResonances()
++ reso1, reso2 = constrItem.resonances
+
+ # TJS fix for mapping prochirals
+ # always use real resonnances where possible
diff --git a/sci-chemistry/aria/metadata.xml b/sci-chemistry/aria/metadata.xml
new file mode 100644
index 000000000000..ae9ec7c5f6a4
--- /dev/null
+++ b/sci-chemistry/aria/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/arp-warp-bin/Manifest b/sci-chemistry/arp-warp-bin/Manifest
new file mode 100644
index 000000000000..739b86dac839
--- /dev/null
+++ b/sci-chemistry/arp-warp-bin/Manifest
@@ -0,0 +1 @@
+DIST arp_warp_7.5.tar.gz 198643246 SHA256 d16fc6775905e56e5159f4a658f654b98d94f78143a2537ba67bffaed7ef1ad8 SHA512 351ed4bad863bac63005d128c693b7dde60c03ca5e8bd449ea602646f7f856c022070e542bcacae2793fbde88d67e7b5639bedeec55eeb191017a2ec19d03768 WHIRLPOOL d4ea42179a8a406508c82320567dc39ce419a2cba8b9e6ed05739dbbf0c9aba072b720c56987c4c94806ba2772f9c8787bde898f7c76543cc4702f00b7f16532
diff --git a/sci-chemistry/arp-warp-bin/arp-warp-bin-7.5.ebuild b/sci-chemistry/arp-warp-bin/arp-warp-bin-7.5.ebuild
new file mode 100644
index 000000000000..ef10d0ab3d5d
--- /dev/null
+++ b/sci-chemistry/arp-warp-bin/arp-warp-bin-7.5.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils prefix
+
+MY_P="arp_warp_${PV}"
+
+DESCRIPTION="Improvement and interpretation of crystallographic electron density maps"
+SRC_URI="${MY_P}.tar.gz"
+HOMEPAGE="http://www.embl-hamburg.de/ARP/"
+
+LICENSE="ArpWarp"
+SLOT="0"
+KEYWORDS="-* amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_x86_sse2"
+
+REQUIRED_USE="cpu_flags_x86_sse2"
+
+RDEPEND="
+ app-shells/tcsh
+ sci-chemistry/refmac
+ virtual/awk
+ virtual/jre
+ virtual/opengl
+ x11-libs/libX11"
+DEPEND=""
+
+RESTRICT="fetch"
+
+S="${WORKDIR}/${MY_P}"
+
+QA_PREBUILT="opt/arp-warp-bin/bin/*"
+
+pkg_nofetch(){
+ elog "Fill out the form at http://www.embl-hamburg.de/ARP/"
+ elog "and place ${A} in ${DISTDIR}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/7.3-setup.patch
+ eprefixify "${S}"/share/arpwarp_setup_base.*
+
+ sed -e '/exit/d' -i "${S}"/share/arpwarp_setup_base.* || die
+}
+
+src_install(){
+ m_type=$(uname -m)
+ os_type=$(uname)
+
+ exeinto /opt/${PN}/bin/bin-${m_type}-${os_type}
+ doexe "${S}"/bin/bin-${m_type}-${os_type}/* "${S}"/share/*{pl,sh}
+
+ insinto /opt/${PN}/bin/bin-${m_type}-${os_type}
+ doins "${S}"/share/*{gif,bmp,XYZ,bash,csh,dat,lib,tbl,llh,prm}
+
+ insinto /etc/profile.d/
+ newins "${S}"/share/arpwarp_setup_base.csh 90arpwarp_setup.csh
+ newins "${S}"/share/arpwarp_setup_base.bash 90arpwarp_setup.sh
+
+ dodoc "${S}"/README manual/UserGuide${PV}.pdf
+ dohtml -r "${S}"/manual/html/*
+}
+
+pkg_postinst(){
+ testcommand=$(echo 3 2 | awk '{printf"%3.1f",$1/$2}')
+ if [ $testcommand == "1,5" ];then
+ ewarn "*** ERROR ***"
+ ewarn " 3/2=" $testcommand
+ ewarn "Invalid decimal separator (must be ".")"
+ ewarn "You need to set this correctly!!!"
+ echo
+ ewarn "One way of setting the decimal separator is:"
+ ewarn "setenv LC_NUMERIC C' in your .cshrc file"
+ ewarn "\tor"
+ ewarn "export LC_NUMERIC=C' in your .bashrc file"
+ ewarn "Otherwise please consult your system manager"
+ fi
+}
diff --git a/sci-chemistry/arp-warp-bin/files/7.3-setup.patch b/sci-chemistry/arp-warp-bin/files/7.3-setup.patch
new file mode 100644
index 000000000000..faed9c1102fd
--- /dev/null
+++ b/sci-chemistry/arp-warp-bin/files/7.3-setup.patch
@@ -0,0 +1,30 @@
+diff --git a/share/arpwarp_setup_base.bash b/share/arpwarp_setup_base.bash
+index 29e769c..0b8a51e 100644
+--- a/share/arpwarp_setup_base.bash
++++ b/share/arpwarp_setup_base.bash
+@@ -13,10 +13,10 @@ else
+ identifier=${nameprocessor}'-'${namesystem}
+ fi
+ #
+-arpwarphome="$1X"
++arpwarphome="@GENTOO_PORTAGE_EPREFIX@/opt/arp-warp-bin"
+ #
+ export warpbin=${arpwarphome}/bin/bin-${identifier}
+-export warpdoc=${arpwarphome}/manual
++export warpdoc=@GENTOO_PORTAGE_EPREFIX@/usr/share/doc/arp-warp-bin-7.1/html/
+ export PATH=${warpbin}:${PATH}
+ #
+ # Checks for existence of $warpbin directory
+diff --git a/share/arpwarp_setup_base.csh b/share/arpwarp_setup_base.csh
+index 41b11e9..a4edcff 100644
+--- a/share/arpwarp_setup_base.csh
++++ b/share/arpwarp_setup_base.csh
+@@ -13,7 +13,7 @@ else
+ set identifier = ${nameprocessor}'-'${namesystem}
+ endif
+ #
+-set arpwarphome = '$1X'
++set arpwarphome = '@GENTOO_PORTAGE_EPREFIX@/opt/arp-warp-bin'
+ #
+ setenv warpbin ${arpwarphome}/bin/bin-${identifier}
+ #
diff --git a/sci-chemistry/arp-warp-bin/metadata.xml b/sci-chemistry/arp-warp-bin/metadata.xml
new file mode 100644
index 000000000000..51fdedab1b38
--- /dev/null
+++ b/sci-chemistry/arp-warp-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/autodock/Manifest b/sci-chemistry/autodock/Manifest
new file mode 100644
index 000000000000..422cb216787f
--- /dev/null
+++ b/sci-chemistry/autodock/Manifest
@@ -0,0 +1 @@
+DIST autodocksuite-4.2.6-src.tar.gz 35438010 SHA256 4b24ce4baf216a5e1a6a79bb664eeed684aed17cede64ff0061aa1bcc17874c4 SHA512 75b8878f948c4f6bc28adb442997192dad0c36bbede2fd698623903cb27b06b4df3ba038bfc70fc13b4bdee864fd2344f0f7208be2020da4e01a00b842b46bbb WHIRLPOOL 18230783d13c2d82ad6427711a48dec0c6695301a52dcf419cf4feefb0b5f41bac5de53824313e75d9040ac8623915ba266e764e92ecad9869d845053ec60b93
diff --git a/sci-chemistry/autodock/autodock-4.2.6.ebuild b/sci-chemistry/autodock/autodock-4.2.6.ebuild
new file mode 100644
index 000000000000..10d018292e93
--- /dev/null
+++ b/sci-chemistry/autodock/autodock-4.2.6.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils python-any-r1 versionator
+
+MY_PN="autodocksuite"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A suite of automated docking tools"
+HOMEPAGE="http://autodock.scripps.edu/"
+SRC_URI="http://autodock.scripps.edu/downloads/autodock-registration/tars/dist$(delete_all_version_separators)/${MY_P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples openmp test"
+
+RDEPEND=""
+DEPEND="test? ( ${PYTHON_DEPS} )"
+
+S="${WORKDIR}/src"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-buildsystem.patch
+)
+
+src_prepare() {
+ local i
+
+ epatch ${PATCHES[@]}
+
+ sed \
+ -e "s/\tcsh/\tsh/" \
+ -i auto{dock,grid}/Makefile.am || die
+ for i in autodock autogrid; do
+ pushd $i &>/dev/null
+ eautoreconf
+ popd &>/dev/null
+ done
+}
+
+src_configure() {
+ local i
+ for i in autodock autogrid; do
+ pushd $i &>/dev/null
+ econf $(use_enable openmp)
+ popd &>/dev/null
+ done
+}
+
+src_compile() {
+ emake -C autodock
+ emake -C autogrid
+}
+
+src_test() {
+ elog "Testing autodock"
+ cd "${S}/autodock/Tests" || die
+ cp ../*.dat . || die
+ ${EPYTHON} test_autodock4.py || die "AutoDock tests failed."
+ einfo "Testing autogrid"
+ cd "${S}/autogrid/Tests" || die
+ ${EPYTHON} test_autogrid4.py || die "AutoGrid tests failed."
+}
+
+src_install() {
+ if use openmp; then
+ newbin autodock/autodock4.omp ${PN}4
+ dobin autogrid/autogrid4
+ else
+ dobin autodock/autodock4 autogrid/autogrid4
+ fi
+
+ insinto /usr/share/${PN}
+ doins -r \
+ autodock/{AD4_parameters.dat,AD4_PARM99.dat} \
+ $(usex examples "autodoc/EXAMPLES" "")
+
+ DOCS=(
+ RELEASENOTES
+ autodock/{AUTHORS,README}
+ autodock/USERGUIDES/AutoDock4.{0,1,2}_UserGuide.doc
+ autodock/USERGUIDES/AutoDock4.2_UserGuide.pdf
+ )
+ einstalldocs
+}
+
+pkg_postinst() {
+ elog "The AutoDock development team requests all users to fill out the"
+ elog "registration form at:"
+ echo
+ elog "\thttp://autodock.scripps.edu/downloads/autodock-registration"
+ echo
+ elog "The number of unique users of AutoDock is used by Prof. Arthur J."
+ elog "Olson and the Scripps Research Institude to support grant"
+ elog "applications."
+}
diff --git a/sci-chemistry/autodock/files/4.0.1-gcc-4.3.patch b/sci-chemistry/autodock/files/4.0.1-gcc-4.3.patch
new file mode 100644
index 000000000000..b9eb3c409c64
--- /dev/null
+++ b/sci-chemistry/autodock/files/4.0.1-gcc-4.3.patch
@@ -0,0 +1,10 @@
+--- autodocksuite-4.0.1.orig/src/autogrid/check_size.cpp 2008-08-04 22:44:46.000000000 -0700
++++ autodocksuite-4.0.1/src/autogrid/check_size.cpp 2008-08-04 22:45:12.000000000 -0700
+@@ -27,6 +27,7 @@
+
+ #include <iostream>
+ #include <math.h>
++#include <cstdlib>
+ #include "autogrid.h"
+
+
diff --git a/sci-chemistry/autodock/files/autodock-4.2.6-buildsystem.patch b/sci-chemistry/autodock/files/autodock-4.2.6-buildsystem.patch
new file mode 100644
index 000000000000..ae44ffeb3159
--- /dev/null
+++ b/sci-chemistry/autodock/files/autodock-4.2.6-buildsystem.patch
@@ -0,0 +1,44 @@
+ src/autodock/Makefile.am | 6 +++---
+ src/autogrid/Makefile.am | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/autodock/Makefile.am b/src/autodock/Makefile.am
+index 799a3c4..911897b 100644
+--- a/src/autodock/Makefile.am
++++ b/src/autodock/Makefile.am
+@@ -459,7 +459,8 @@ endif
+
+ BUILT_SOURCES = $(autodock4_SOURCES) default_parameters.h
+
+-AM_CXXFLAGS = -O3 # Agressive optimization
++AM_CXXFLAGS =
++#AM_CXXFLAGS = -O3 # Agressive optimization
+ #AM_CXXFLAGS = -g # debug
+
+ # if gnu c++ compiler
+@@ -488,8 +489,7 @@ endif
+ AM_CPPFLAGS = -DNOSQRT \
+ -DUSE_DOUBLE \
+ -DUSE_8A_NBCUTOFF \
+- -DUSE_INT_AS_FOURBYTELONG \
+- -O3
++ -DUSE_INT_AS_FOURBYTELONG
+ # AM_LDFLAGS = -g # -g is MP debug
+
+
+diff --git a/src/autogrid/Makefile.am b/src/autogrid/Makefile.am
+index b531099..b78b380 100644
+--- a/src/autogrid/Makefile.am
++++ b/src/autogrid/Makefile.am
+@@ -94,9 +94,9 @@ autogrid4_SOURCES = main.cpp \
+ BUILT_SOURCES = default_parameters.h
+
+
+-AM_CFLAGS = -Wall -O3 # All warnings, Agressive optimization
++AM_CFLAGS = -Wall # All warnings, Agressive optimization
+
+-AM_CPPFLAGS = -Wall -O3 -I $(srcdir) -I$(srcdir)/../autodock # All warnings, Agressive optimization
++AM_CPPFLAGS = -Wall -I $(srcdir) -I$(srcdir)/../autodock # All warnings, Agressive optimization
+ AM_CPPFLAGS += -Wno-write-strings # increase compatibility with pre 4.x compilers for string handling
+ # M Pique - add USE_8A_NBCUTOFF
+ AM_CPPFLAGS += -DUSE_8A_NBCUTOFF
diff --git a/sci-chemistry/autodock/metadata.xml b/sci-chemistry/autodock/metadata.xml
new file mode 100644
index 000000000000..51fdedab1b38
--- /dev/null
+++ b/sci-chemistry/autodock/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/autodock_vina/Manifest b/sci-chemistry/autodock_vina/Manifest
new file mode 100644
index 000000000000..a2f7882e9d79
--- /dev/null
+++ b/sci-chemistry/autodock_vina/Manifest
@@ -0,0 +1 @@
+DIST autodock_vina_1_1_2.tgz 67366 SHA256 b86412d316960b1e4e319401719daf57ff009229d91654d623c3cf09339f6776 SHA512 f704af322ebc192117c49d0cf8a3f217105beccb7b47d6361665470894ef7a9f91fc4b5f07cc9aff56e497bfa80953e40e39090c8394a095c61597756e333ae9 WHIRLPOOL b68f3bb81fe957fddb6674f71e0c63d1425eb5b4de0615258545ba8e241b347380c8745ee47bd2ee2257f29916191773440e3dd4e9ce857b83a947074eae8d45
diff --git a/sci-chemistry/autodock_vina/autodock_vina-1.1.2.ebuild b/sci-chemistry/autodock_vina/autodock_vina-1.1.2.ebuild
new file mode 100644
index 000000000000..aea218f8faf9
--- /dev/null
+++ b/sci-chemistry/autodock_vina/autodock_vina-1.1.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic versionator
+
+MY_P="${PN}_$(replace_all_version_separators _)"
+
+DESCRIPTION="Program for drug discovery, molecular docking and virtual screening"
+HOMEPAGE="http://vina.scripps.edu/"
+SRC_URI="http://vina.scripps.edu/download/${MY_P}.tgz"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+LICENSE="Apache-2.0"
+IUSE="debug"
+
+RDEPEND="dev-libs/boost"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}/build/linux/release
+
+src_prepare() {
+ cd "${WORKDIR}"/${MY_P} || die
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${P}-boost-filesystem.patch
+}
+
+src_compile() {
+ local c_options
+
+ use debug || c_options="-DNDEBUG"
+
+ append-cxxflags -DBOOST_FILESYSTEM_VERSION=3
+
+ emake \
+ BASE="${EPREFIX}"/usr/ \
+ GPP="$(tc-getCXX)" \
+ C_OPTIONS="${c_options}"
+}
+
+src_install() {
+ dobin vina{,_split}
+}
diff --git a/sci-chemistry/autodock_vina/files/1.1.1-gentoo.patch b/sci-chemistry/autodock_vina/files/1.1.1-gentoo.patch
new file mode 100644
index 000000000000..356ae2ee547d
--- /dev/null
+++ b/sci-chemistry/autodock_vina/files/1.1.1-gentoo.patch
@@ -0,0 +1,68 @@
+diff --git a/build/linux/debug/Makefile b/build/linux/debug/Makefile
+index d2c2d3b..d1f02e5 100644
+--- a/build/linux/debug/Makefile
++++ b/build/linux/debug/Makefile
+@@ -1,6 +1,6 @@
+ BASE=/usr/local
+ BOOST_VERSION=1_41
+-C_PLATFORM=-static-libgcc -pthread
++C_PLATFORM=-pthread
+ GPP=/usr/bin/g++
+ C_OPTIONS= -g
+ BOOST_LIB_VERSION=
+diff --git a/build/linux/release/Makefile b/build/linux/release/Makefile
+index bfbcc1e..c9fd630 100644
+--- a/build/linux/release/Makefile
++++ b/build/linux/release/Makefile
+@@ -1,6 +1,6 @@
+ BASE=/usr/local
+ BOOST_VERSION=1_41
+-C_PLATFORM=-static-libgcc -pthread
++C_PLATFORM=-pthread
+ GPP=/usr/bin/g++
+ C_OPTIONS= -O3 -DNDEBUG
+ BOOST_LIB_VERSION=
+diff --git a/build/makefile_common b/build/makefile_common
+index 885935c..e72142d 100644
+--- a/build/makefile_common
++++ b/build/makefile_common
+@@ -1,30 +1,30 @@
+-BOOST_INCLUDE = $(BASE)/include/boost-${BOOST_VERSION}
++BOOST_INCLUDE = $(BASE)/include/boost
+
+ LIBOBJ = cache.o coords.o current_weights.o everything.o grid.o szv_grid.o manifold.o model.o monte_carlo.o mutate.o my_pid.o naive_non_cache.o non_cache.o parallel_mc.o parse_pdbqt.o pdb.o quasi_newton.o quaternion.o random.o ssd.o terms.o weighted_terms.o
+ MAINOBJ = main.o
+ SPLITOBJ = split.o
+
+-INCFLAGS = -I $(BOOST_INCLUDE)
++INCFLAGS = -I$(BOOST_INCLUDE)
+
+-CC = ${GPP} ${C_PLATFORM} -ansi -pedantic -Wno-long-long ${C_OPTIONS} $(INCFLAGS)
++CC = ${GPP} ${C_PLATFORM} ${C_OPTIONS} $(INCFLAGS)
+
+-LDFLAGS = -L$(BASE)/lib -L.
++LDFLAGS += -L.
+
+-LIBS = -l boost_system${BOOST_LIB_VERSION} -l boost_thread${BOOST_LIB_VERSION} -l boost_serialization${BOOST_LIB_VERSION} -l boost_filesystem${BOOST_LIB_VERSION} -l boost_program_options${BOOST_LIB_VERSION}#-l pthread
++LIBS = -lboost_system -lboost_thread -lboost_serialization -lboost_filesystem -lboost_program_options -lpthread
+
+ .SUFFIXES: .cpp .o
+
+ %.o : ../../../src/lib/%.cpp
+- $(CC) $(CFLAGS) -o $@ -c $<
++ $(CC) $(CXXFLAGS) -o $@ -c $<
+
+ %.o : ../../../src/design/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ %.o : ../../../src/main/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ %.o : ../../../src/split/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ all: vina vina_split
+
diff --git a/sci-chemistry/autodock_vina/files/1.1.2-gentoo.patch b/sci-chemistry/autodock_vina/files/1.1.2-gentoo.patch
new file mode 100644
index 000000000000..61ae8bec36f5
--- /dev/null
+++ b/sci-chemistry/autodock_vina/files/1.1.2-gentoo.patch
@@ -0,0 +1,72 @@
+ build/linux/debug/Makefile | 2 +-
+ build/linux/release/Makefile | 2 +-
+ build/makefile_common | 14 +++++++-------
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/build/linux/debug/Makefile b/build/linux/debug/Makefile
+index 6a41cfc..8097fb9 100644
+--- a/build/linux/debug/Makefile
++++ b/build/linux/debug/Makefile
+@@ -1,7 +1,7 @@
+ BASE=/usr/local
+ BOOST_VERSION=1_41
+ BOOST_INCLUDE = $(BASE)/include
+-C_PLATFORM=-static -pthread
++C_PLATFORM=-pthread
+ GPP=/usr/local/bin/g++
+ C_OPTIONS= -g
+ BOOST_LIB_VERSION=
+diff --git a/build/linux/release/Makefile b/build/linux/release/Makefile
+index 1de1063..ded8133 100644
+--- a/build/linux/release/Makefile
++++ b/build/linux/release/Makefile
+@@ -1,7 +1,7 @@
+ BASE=/usr/local
+ BOOST_VERSION=1_41
+ BOOST_INCLUDE = $(BASE)/include
+-C_PLATFORM=-static -pthread
++C_PLATFORM=-pthread
+ GPP=/usr/local/bin/g++
+ C_OPTIONS= -O3 -DNDEBUG
+ BOOST_LIB_VERSION=
+diff --git a/build/makefile_common b/build/makefile_common
+index a940329..96336e8 100644
+--- a/build/makefile_common
++++ b/build/makefile_common
+@@ -2,29 +2,29 @@ LIBOBJ = cache.o coords.o current_weights.o everything.o grid.o szv_grid.o manif
+ MAINOBJ = main.o
+ SPLITOBJ = split.o
+
+-INCFLAGS = -I $(BOOST_INCLUDE)
++INCFLAGS = -I$(BOOST_INCLUDE)
+
+ # -pedantic fails on Mac with Boost 1.41 (syntax problems in their headers)
+ #CC = ${GPP} ${C_PLATFORM} -ansi -pedantic -Wno-long-long ${C_OPTIONS} $(INCFLAGS)
+ CC = ${GPP} ${C_PLATFORM} -ansi -Wno-long-long ${C_OPTIONS} $(INCFLAGS)
+
+-LDFLAGS = -L$(BASE)/lib -L.
++LDFLAGS += -L.
+
+-LIBS = -l boost_system${BOOST_LIB_VERSION} -l boost_thread${BOOST_LIB_VERSION} -l boost_serialization${BOOST_LIB_VERSION} -l boost_filesystem${BOOST_LIB_VERSION} -l boost_program_options${BOOST_LIB_VERSION}#-l pthread
++LIBS = -lboost_system -lboost_thread -lboost_serialization -lboost_filesystem -lboost_program_options -lpthread
+
+ .SUFFIXES: .cpp .o
+
+ %.o : ../../../src/lib/%.cpp
+- $(CC) $(CFLAGS) -o $@ -c $<
++ $(CC) $(CXXFLAGS) -o $@ -c $<
+
+ %.o : ../../../src/design/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ %.o : ../../../src/main/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ %.o : ../../../src/split/%.cpp
+- $(CC) $(CFLAGS) -I ../../../src/lib -o $@ -c $<
++ $(CC) $(CXXFLAGS) -I ../../../src/lib -o $@ -c $<
+
+ all: vina vina_split
+
diff --git a/sci-chemistry/autodock_vina/files/autodock_vina-1.1.2-boost-filesystem.patch b/sci-chemistry/autodock_vina/files/autodock_vina-1.1.2-boost-filesystem.patch
new file mode 100644
index 000000000000..298aaa9ab993
--- /dev/null
+++ b/sci-chemistry/autodock_vina/files/autodock_vina-1.1.2-boost-filesystem.patch
@@ -0,0 +1,79 @@
+ src/main/main.cpp | 10 +++++++++-
+ src/split/split.cpp | 11 ++++++++++-
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/src/main/main.cpp b/src/main/main.cpp
+index f49c8f5..b566aa2 100644
+--- a/src/main/main.cpp
++++ b/src/main/main.cpp
+@@ -47,7 +47,7 @@
+ using boost::filesystem::path;
+
+ path make_path(const std::string& str) {
+- return path(str, boost::filesystem::native);
++ return path(str);
+ }
+
+ void doing(int verbosity, const std::string& str, tee& log) {
+@@ -661,7 +661,11 @@ Thank you!\n";
+ cpu, seed, verbosity, max_modes_sz, energy_range, log);
+ }
+ catch(file_error& e) {
++#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
++ std::cerr << "\n\nError: could not open \"" << e.name.string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
++#else
+ std::cerr << "\n\nError: could not open \"" << e.name.native_file_string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
++#endif
+ return 1;
+ }
+ catch(boost::filesystem::filesystem_error& e) {
+@@ -673,7 +677,11 @@ Thank you!\n";
+ return 1;
+ }
+ catch(parse_error& e) {
++#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
++ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.string() << "\": " << e.reason << '\n';
++#else
+ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.native_file_string() << "\": " << e.reason << '\n';
++#endif
+ return 1;
+ }
+ catch(std::bad_alloc&) {
+diff --git a/src/split/split.cpp b/src/split/split.cpp
+index 54c614b..bc5530e 100644
+--- a/src/split/split.cpp
++++ b/src/split/split.cpp
+@@ -38,7 +38,7 @@
+ using boost::filesystem::path;
+
+ path make_path(const std::string& str) {
+- return path(str, boost::filesystem::native);
++ return path(str);
+ }
+
+ std::string default_prefix(const std::string& input_name, const std::string& add) {
+@@ -208,7 +208,12 @@ Thank you!\n";
+ write_multimodel_pdbqt(tmp, ligand_prefix, flex_prefix);
+ }
+ catch(file_error& e) {
++
++#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
++ std::cerr << "\n\nError: could not open \"" << e.name.string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
++#else
+ std::cerr << "\n\nError: could not open \"" << e.name.native_file_string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
++#endif
+ return 1;
+ }
+ catch(boost::filesystem::filesystem_error& e) {
+@@ -220,7 +225,11 @@ Thank you!\n";
+ return 1;
+ }
+ catch(parse_error& e) {
++#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
++ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.string() << "\": " << e.reason << '\n';
++#else
+ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.native_file_string() << "\": " << e.reason << '\n';
++#endif
+ return 1;
+ }
+ catch(std::bad_alloc&) {
diff --git a/sci-chemistry/autodock_vina/metadata.xml b/sci-chemistry/autodock_vina/metadata.xml
new file mode 100644
index 000000000000..3f44e973345a
--- /dev/null
+++ b/sci-chemistry/autodock_vina/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+AutoDock Vina is a new open-source program for drug discovery, molecular
+docking and virtual screening, offering multi-core capability, high
+performance and enhanced accuracy and ease of use. [1]
+AutoDock Vina has been designed and implemented by Dr. Oleg Trott
+in the Molecular Graphics Lab at The Scripps Research Institute.
+If you used AutoDock Vina in your work, please cite:
+O. Trott, A. J. Olson, AutoDock Vina: improving the speed and accuracy
+of docking with a new scoring function, efficient optimization and
+multithreading
+Journal of Computational Chemistry 31 (2010) 455-461
+</longdescription>
+ <!--
+<use>
+ <flag name='flag'>Description of how USE='flag' affects this package</flag>
+ <flag name='userland_GNU'>Description of how USERLAND='GNU' affects this
+ package</flag>
+ <flag name='aspell'>Uses <pkg>app-text/aspell</pkg> for spell checking.
+ Requires an installed dictionary from <cat>app-dicts</cat></flag>
+</use>
+-->
+</pkgmetadata>
diff --git a/sci-chemistry/avogadro/Manifest b/sci-chemistry/avogadro/Manifest
new file mode 100644
index 000000000000..aad0cb8f1ba9
--- /dev/null
+++ b/sci-chemistry/avogadro/Manifest
@@ -0,0 +1,2 @@
+DIST avogadro-1.0.3.tar.bz2 4971989 SHA256 efb6fda223da3c027436f0c218a47ce804f7469c58b41134230e9ebad1c98468 SHA512 49e7b8ca43f0f52a65efc7bf9dc45670ae5a5de5d1aa6bf7b58b8368e816be30fe6529c45fa658d7337d4a69327bb0aa8799d8d4b4805860aace28011cc74210 WHIRLPOOL c835ac24b317a1fa310bf3ea75bae4002d01f364d4754e6a7d841594dcce321435c827d60e125d9410f05670a94c887cc250bf49759d02cde34a5839d2324c92
+DIST avogadro-1.1.0.tar.bz2 10741835 SHA256 6b4eaf57ae52bf43df9b103c77e6abae71e067053d5c99f82acbce9855ecceb0 SHA512 d621dd3ea9e9223d3a29c6b0c0eec89a935837d0c587fcaaa549f91274a76f78a8c60c2a68a67d2f3aa2e107826befb6658be601c46c5bc0760c95bf7284540a WHIRLPOOL c81e866e60b3383a58de515317c754e3982e716c27974ce43ca0c1209d24544949361a7f2f93a4a940d73fd7a18b184f68c7a1856fea89ae5eba75db74b1012d
diff --git a/sci-chemistry/avogadro/avogadro-1.0.3-r2.ebuild b/sci-chemistry/avogadro/avogadro-1.0.3-r2.ebuild
new file mode 100644
index 000000000000..ae73ee50ac4e
--- /dev/null
+++ b/sci-chemistry/avogadro/avogadro-1.0.3-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils python-single-r1
+
+DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL"
+HOMEPAGE="http://avogadro.openmolecules.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="+glsl python cpu_flags_x86_sse2"
+
+RDEPEND="
+ >=sci-chemistry/openbabel-2.2.3
+ >=dev-qt/qtgui-4.5.3:4
+ >=dev-qt/qtopengl-4.5.3:4
+ x11-libs/gl2ps
+ glsl? ( >=media-libs/glew-1.5.0 )
+ python? (
+ >=dev-libs/boost-1.35.0-r5[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/sip[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-cpp/eigen:2"
+
+PATCHES=(
+ "${FILESDIR}"/1.0.1-gl2ps.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_THREADGL=OFF
+ -DENABLE_RPATH=OFF
+ -DENABLE_UPDATE_CHECKER=OFF
+ -DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs"
+ -DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
+ $(cmake-utils_use_enable glsl)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use_enable python)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/sci-chemistry/avogadro/avogadro-1.1.0.ebuild b/sci-chemistry/avogadro/avogadro-1.1.0.ebuild
new file mode 100644
index 000000000000..0de1b83085b6
--- /dev/null
+++ b/sci-chemistry/avogadro/avogadro-1.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils python-single-r1
+
+DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL"
+HOMEPAGE="http://avogadro.openmolecules.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+glsl python cpu_flags_x86_sse2 test"
+
+RDEPEND="
+ >=sci-chemistry/openbabel-2.3.0
+ >=dev-qt/qtgui-4.5.3:4
+ >=dev-qt/qtopengl-4.5.3:4
+ x11-libs/gl2ps
+ glsl? ( >=media-libs/glew-1.5.0 )
+ python? (
+ >=dev-libs/boost-1.35.0-r5[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/sip[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ dev-cpp/eigen:2"
+
+# https://sourceforge.net/p/avogadro/bugs/653/
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-textrel.patch
+ "${FILESDIR}"/${P}-xlibs.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_THREADGL=OFF
+ -DENABLE_RPATH=OFF
+ -DENABLE_UPDATE_CHECKER=OFF
+ -DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs"
+ -DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
+ $(cmake-utils_use_enable glsl)
+ $(cmake-utils_use_enable test TESTS)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use_enable python)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/sci-chemistry/avogadro/files/1.0.1-gl2ps.patch b/sci-chemistry/avogadro/files/1.0.1-gl2ps.patch
new file mode 100644
index 000000000000..d8a0c0f758e1
--- /dev/null
+++ b/sci-chemistry/avogadro/files/1.0.1-gl2ps.patch
@@ -0,0 +1,39 @@
+diff --git a/avogadro/src/CMakeLists.txt b/avogadro/src/CMakeLists.txt
+index 75b6dfb..d87ac2c 100644
+--- a/avogadro/src/CMakeLists.txt
++++ b/avogadro/src/CMakeLists.txt
+@@ -45,7 +45,7 @@ endif(ENABLE_UPDATE_CHECKER)
+ FILE(GLOB projectDelegates_SRCS "projectdelegates/*.cpp")
+ set(avogadro_SRCS ${avogadro_SRCS} ${projectDelegates_SRCS})
+ # Add GL2PS to the executable
+-set(avogadro_SRCS ${avogadro_SRCS} "../gl2ps/gl2ps.c")
++#set(avogadro_SRCS ${avogadro_SRCS} "../gl2ps/gl2ps.c")
+
+ if( WIN32 )
+ set(avogadro_SRCS ${avogadro_SRCS} windows/avogadro.rc)
+diff --git a/avogadro/src/mainwindow.cpp b/avogadro/src/mainwindow.cpp
+index 66785fd..2933953 100644
+--- a/avogadro/src/mainwindow.cpp
++++ b/avogadro/src/mainwindow.cpp
+@@ -51,7 +51,7 @@
+ //#endif
+
+ // Include the GL2PS header
+-#include "../gl2ps/gl2ps.h"
++#include <gl2ps.h>
+
+ #include <avogadro/pluginmanager.h>
+
+diff --git a/libavogadro/src/CMakeLists.txt b/libavogadro/src/CMakeLists.txt
+index cce8ece..cc084fb 100644
+--- a/libavogadro/src/CMakeLists.txt
++++ b/libavogadro/src/CMakeLists.txt
+@@ -152,7 +152,7 @@ endforeach(headerFile ${libavogadro_HDRS})
+ add_library(avogadro SHARED ${libavogadro_SRCS} ${libavogadro_QM} ${pythontool_RC_SRCS})
+ set_target_properties(avogadro
+ PROPERTIES VERSION ${Avogadro_VERSION_FULL} SOVERSION 1 )
+-target_link_libraries(avogadro ${AVO_LINK_LIBRARIES})
++target_link_libraries(avogadro ${AVO_LINK_LIBRARIES} gl2ps)
+
+ install(TARGETS avogadro DESTINATION ${LIB_INSTALL_DIR})
+ install(FILES ${libavogadro_HDRS}
diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.0-textrel.patch b/sci-chemistry/avogadro/files/avogadro-1.1.0-textrel.patch
new file mode 100644
index 000000000000..6d4536ef7c9b
--- /dev/null
+++ b/sci-chemistry/avogadro/files/avogadro-1.1.0-textrel.patch
@@ -0,0 +1,29 @@
+ libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt | 2 +-
+ libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt b/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+index fb88316..2ddcfdf 100644
+--- a/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
++++ b/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+@@ -20,6 +20,6 @@ add_library(spglib STATIC ${spglib_SRCS})
+ set_target_properties(spglib PROPERTIES COMPILE_FLAGS "-w")
+
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^(i.86|x86|x86_64|ppc|ppc64)$")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
+ endif()
+diff --git a/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt b/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+index 0cd0c3e..9e89daf 100644
+--- a/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
++++ b/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+@@ -19,7 +19,7 @@ add_library(tubegen STATIC ${tubegen_SRCS})
+ set_target_properties(tubegen PROPERTIES COMPILE_FLAGS "-w")
+
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "^(i.86|x86|x86_64|ppc|ppc64)$")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
+ endif()
diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch b/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch
new file mode 100644
index 000000000000..74a5889ec8ae
--- /dev/null
+++ b/sci-chemistry/avogadro/files/avogadro-1.1.0-xlibs.patch
@@ -0,0 +1,16 @@
+ * Info: Using [gentoo] (https://bugs.gentoo.org/xmlrpc.cgi)
+ * Info: Getting attachment 403034
+ * Info: Viewing attachment: "X11.patch"
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 60ec98f..03443a7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -225,6 +225,7 @@ set(I18N_LANGUAGE "" CACHE STRING "Build i18n only for selected language")
+
+ find_package(Qt4 4.6.0 REQUIRED) # find and setup Qt4 for this project
+ find_package(OpenGL REQUIRED) # find and setup OpenGL
++find_package(X11 REQUIRED)
+ find_package(Linguist) # find and setup Linguist
+ if(NOT Linguist_FOUND)
+ message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations")
+
diff --git a/sci-chemistry/avogadro/metadata.xml b/sci-chemistry/avogadro/metadata.xml
new file mode 100644
index 000000000000..bacd1480b120
--- /dev/null
+++ b/sci-chemistry/avogadro/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <longdescription>
+ Avogadro is an advanced molecular editor designed for cross-platform use in
+ computational chemistry, molecular modeling, bioinformatics, materials
+ science, and related areas. It offers flexible rendering and a powerful
+ plugin architecture.
+ </longdescription>
+ <use>
+ <flag name="glsl">Enable glsl features via GLEW.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">avogadro</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/azara/Manifest b/sci-chemistry/azara/Manifest
new file mode 100644
index 000000000000..700d6abb6ece
--- /dev/null
+++ b/sci-chemistry/azara/Manifest
@@ -0,0 +1 @@
+DIST azara-2.8-src.tgz 638120 SHA256 1f9b86d368ca3b4818c88490c40b2055c7a6d1732e746e4c117e045a73269a98 SHA512 61a913b041f8ed7dade9d452ca0d99804ffcea0c678f23ad8357c1e7188996eecde9402201399306fcb32a504b17c3d61997f50ce57794f876c9f8d492ca500c WHIRLPOOL b7512fe29ad97830d2f96811e71c2ab74e9e71c62354f65a499484a1a57fbe8b74a8ecd27a0b72c48cf0ec5bb48c78148433e32f4f2a880c6317d516f3aa644a
diff --git a/sci-chemistry/azara/azara-2.8-r4.ebuild b/sci-chemistry/azara/azara-2.8-r4.ebuild
new file mode 100644
index 000000000000..2b5f3bd6f0b8
--- /dev/null
+++ b/sci-chemistry/azara/azara-2.8-r4.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
+
+inherit eutils python toolchain-funcs
+
+DESCRIPTION="A suite of programmes to process and view NMR data"
+HOMEPAGE="http://www.bio.cam.ac.uk/azara/"
+SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${PN}/${P}-src.tgz"
+
+LICENSE="AZARA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="python xpm X"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/motif:0
+ xpm? ( x11-libs/libXpm )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ cat > ENVIRONMENT <<- EOF
+ CC=$(tc-getCC)
+ CFLAGS = ${CFLAGS}
+ LFLAGS = ${LDFLAGS}
+ MATH_LIB = -lm
+ X11_INCLUDE_DIR = -I"${EPREFIX}/usr/X11R6/include"
+ MOTIF_INCLUDE_DIR = -I"${EPREFIX}/usr/include" -I../global
+ X11_LIB_DIR = -L"${EPREFIX}/usr/$(get_libdir)"
+ MOTIF_LIB_DIR = -L"${EPREFIX}/usr/$(get_libdir)"
+ X11_LIB = -lX11
+ MOTIF_LIB = -lXm -lXt
+ SHARED_FLAGS = -shared
+ ENDIAN_FLAG = -DBIG_ENDIAN_DATA -DWRITE_ENDIAN_PAR
+ PIC = -fPIC
+ EOF
+
+ use xpm && echo "XPMUSE=\"XPM_FLAG=-DUSE_XPM XPM_LIB=-lXpm\"" >> ENVIRONMENT
+
+ epatch \
+ "${FILESDIR}"/${PV}-prll.patch \
+ "${FILESDIR}"/${PV}-impl-dec.patch \
+ "${FILESDIR}"/${PV}-python.patch \
+ "${FILESDIR}"/${PV}-64bit.patch
+}
+
+src_compile() {
+ local mymake
+ local makeflags
+
+ mymake="${mymake} help nongui"
+ use X && mymake="${mymake} gui"
+
+ emake ${mymake} || die
+
+ compilation() {
+ emake DataRows_clean || die
+ emake \
+ PYTHON_INCLUDE_DIR="-I${EPREFIX}/$(python_get_includedir)" \
+ PYTHON_LIB="$(python_get_library -l)" \
+ DataRows || die
+ }
+ use python && python_execute_function compilation
+}
+
+src_install() {
+ rm bin/pythonAzara || die
+ if ! use X; then
+ rm bin/plot* || die
+ fi
+
+ dodoc CHANGES* README* || die
+ dohtml -r html/* || die
+
+ installation() {
+ insinto $(python_get_sitedir)
+ doins lib/DataRows.so || die
+ }
+ use python && python_execute_function installation
+
+ cd bin
+ dobin ${PN}|| die
+ rm ${PN}
+ for bin in *; do
+ newbin ${bin} ${bin}-${PN} || die "failed to install ${bin}"
+ done
+}
+
+pkg_postinst() {
+ einfo "Due to collision we moved all binary to *-${PN}"
+}
diff --git a/sci-chemistry/azara/azara-2.8-r5.ebuild b/sci-chemistry/azara/azara-2.8-r5.ebuild
new file mode 100644
index 000000000000..4b90f2ccbd2b
--- /dev/null
+++ b/sci-chemistry/azara/azara-2.8-r5.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 toolchain-funcs
+
+DESCRIPTION="A suite of programmes to process and view NMR data"
+HOMEPAGE="http://www.bio.cam.ac.uk/azara/"
+SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${PN}/${P}-src.tgz"
+
+LICENSE="AZARA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="xpm X"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/motif:0
+ xpm? ( x11-libs/libXpm )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ cat > ENVIRONMENT <<- EOF
+ CC=$(tc-getCC)
+ CFLAGS = ${CFLAGS}
+ LFLAGS = ${LDFLAGS}
+ MATH_LIB = -lm
+ X11_INCLUDE_DIR = -I"${EPREFIX}/usr/X11R6/include"
+ MOTIF_INCLUDE_DIR = -I"${EPREFIX}/usr/include" -I../global
+ X11_LIB_DIR = -L"${EPREFIX}/usr/$(get_libdir)"
+ MOTIF_LIB_DIR = -L"${EPREFIX}/usr/$(get_libdir)"
+ X11_LIB = -lX11
+ MOTIF_LIB = -lXm -lXt
+ SHARED_FLAGS = -shared
+ ENDIAN_FLAG = -DBIG_ENDIAN_DATA -DWRITE_ENDIAN_PAR
+ PIC = -fPIC
+ EOF
+
+ use xpm && echo "XPMUSE=\"XPM_FLAG=-DUSE_XPM XPM_LIB=-lXpm\"" >> ENVIRONMENT
+
+ epatch \
+ "${FILESDIR}"/${PV}-prll.patch \
+ "${FILESDIR}"/${PV}-impl-dec.patch \
+ "${FILESDIR}"/${PV}-python.patch \
+ "${FILESDIR}"/${PV}-64bit.patch
+}
+
+src_compile() {
+ local mymake
+ local makeflags
+
+ mymake="${mymake} help nongui"
+ use X && mymake="${mymake} gui"
+
+ emake ${mymake}
+
+ compilation() {
+ python_export PYTHON_CFLAGS PYTHON_LIBS
+ cd "${BUILD_DIR}" || die
+ emake DataRows_clean
+ emake \
+ PYTHON_INCLUDE_DIR="${PYTHON_CFLAGS}" \
+ PYTHON_LIB="${PYTHON_LIBS}" \
+ DataRows
+ }
+ python_copy_sources
+ python_foreach_impl compilation
+}
+
+src_install() {
+ rm bin/pythonAzara || die
+ if ! use X; then
+ rm bin/plot* || die
+ fi
+
+ dodoc CHANGES* README*
+ dohtml -r html/*
+
+ cd bin || die
+ dobin ${PN}
+ rm ${PN} || die
+ for bin in *; do
+ newbin ${bin} ${bin}-${PN}
+ done
+
+ installation() {
+ cd "${BUILD_DIR}" || die
+ python_domodule lib/DataRows.so
+ }
+ python_foreach_impl installation
+}
+
+pkg_postinst() {
+ einfo "Due to collision we moved all binary to *-${PN}"
+}
diff --git a/sci-chemistry/azara/files/2.8-64bit.patch b/sci-chemistry/azara/files/2.8-64bit.patch
new file mode 100644
index 000000000000..c65e075c1d30
--- /dev/null
+++ b/sci-chemistry/azara/files/2.8-64bit.patch
@@ -0,0 +1,85 @@
+diff --git a/global/par.c b/global/par.c
+index ac87c88..fecfe35 100644
+--- a/global/par.c
++++ b/global/par.c
+@@ -562,9 +562,9 @@ static Status get_varian_header(FILE *fp, String error_msg)
+ return OK;
+ }
+
+-static long get_varian_long(int offset)
++static int get_varian_int(int offset)
+ {
+- long x;
++ int x;
+
+ if (swapped)
+ {
+@@ -572,7 +572,7 @@ static long get_varian_long(int offset)
+ SWAP(varian_header[offset+1], varian_header[offset+2], char);
+ }
+
+- x = *((long *) (varian_header + offset));
++ x = *((int *) (varian_header + offset));
+
+ return x;
+ }
+@@ -591,7 +591,7 @@ static short get_varian_short(int offset)
+
+ static Status check_varian_header(String error_msg)
+ {
+- long nblocks, ntraces, np, ebytes, tbytes, /*bbytes,*/ d;
++ int nblocks, ntraces, np, ebytes, tbytes, /*bbytes,*/ d;
+ short status;
+ FILE *fp;
+
+@@ -605,17 +605,19 @@ static Status check_varian_header(String error_msg)
+ FCLOSE(fp);
+
+ /* numbers in parentheses are offsets into header */
+- nblocks = get_varian_long(0); /* number of blocks in file */
+- ntraces = get_varian_long(4); /* number of traces per block */
+- np = get_varian_long(8); /* number of elements per trace */
+- ebytes = get_varian_long(12); /* number of bytes per element */
+- tbytes = get_varian_long(16); /* number of bytes per trace */
+- /*bbytes = get_varian_long(20);*/ /* number of bytes per block */
++ nblocks = get_varian_int(0); /* number of blocks in file */
++ printf("nblocks = %d\n", nblocks);
++ ntraces = get_varian_int(4); /* number of traces per block */
++ printf("ntraces = %d\n", ntraces);
++ np = get_varian_int(8); /* number of elements per trace */
++ ebytes = get_varian_int(12); /* number of bytes per element */
++ tbytes = get_varian_int(16); /* number of bytes per trace */
++ /*bbytes = get_varian_int(20);*/ /* number of bytes per block */
+ /* short starting at 24 is software version */
+ status = get_varian_short(26); /* status of whole file */
+ /* long starting at 28 is number of block headers */
+
+- if (ntraces != 1L)
++ if (ntraces != 1)
+ RETURN_ERROR_MSG("can only process Varian data with #traces = 1");
+
+ if (np != npoints[0])
+@@ -646,12 +648,12 @@ static Status check_varian_header(String error_msg)
+
+ if (integer)
+ {
+- if (ebytes == 2L)
++ if (ebytes == 2)
+ {
+ if (status & (1<<2))
+ RETURN_ERROR_MSG("Varian header has inconsistent byte information");
+ }
+- else if (ebytes == 4L)
++ else if (ebytes == 4)
+ {
+ if (!(status & (1<<2)))
+ RETURN_ERROR_MSG("Varian header has inconsistent byte information");
+@@ -666,7 +668,7 @@ static Status check_varian_header(String error_msg)
+ }
+ else /* !integer, i.e. floating point */
+ {
+- if (ebytes != 4L)
++ if (ebytes != 4)
+ RETURN_ERROR_MSG("Varian header has inconsistent byte information");
+ }
+
diff --git a/sci-chemistry/azara/files/2.8-impl-dec.patch b/sci-chemistry/azara/files/2.8-impl-dec.patch
new file mode 100644
index 000000000000..62e8c7d6873b
--- /dev/null
+++ b/sci-chemistry/azara/files/2.8-impl-dec.patch
@@ -0,0 +1,226 @@
+diff --git a/DataRows/data_rows.c b/DataRows/data_rows.c
+index 054fa1f..a07eedc 100644
+--- a/DataRows/data_rows.c
++++ b/DataRows/data_rows.c
+@@ -1,4 +1,5 @@
+ #include "data_rows.h"
++#include "utility.h"
+
+ #include "par.h"
+
+diff --git a/DataRows/py_data_rows.c b/DataRows/py_data_rows.c
+index fc8b3c8..985e6c3 100644
+--- a/DataRows/py_data_rows.c
++++ b/DataRows/py_data_rows.c
+@@ -1,4 +1,6 @@
+ #include "Python.h" /* Python header files */
++#include "modsupport.h"
++#include "intobject.h"
+
+ #include "data_rows.h"
+
+diff --git a/connect/crosspeak.c b/connect/crosspeak.c
+index 0de57bf..7b016e1 100644
+--- a/connect/crosspeak.c
++++ b/connect/crosspeak.c
+@@ -1,4 +1,5 @@
+ #include "crosspeak.h"
++#include "utility.h"
+
+ #include "atom.h"
+ #include "table.h"
+diff --git a/connect/shift.c b/connect/shift.c
+index f54ba9f..a880001 100644
+--- a/connect/shift.c
++++ b/connect/shift.c
+@@ -1,4 +1,5 @@
+ #include "shift.h"
++#include "utility.h"
+
+ #include "atom.h"
+ #include "table.h"
+diff --git a/global/macros.h b/global/macros.h
+index 43fc43e..bb1d267 100644
+--- a/global/macros.h
++++ b/global/macros.h
+@@ -8,6 +8,7 @@
+ #include <math.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <ctype.h>
+
+ #ifdef WIN32
+ #include <ctype.h>
+diff --git a/global/parser.c b/global/parser.c
+index 007d926..0f19575 100644
+--- a/global/parser.c
++++ b/global/parser.c
+@@ -1,4 +1,5 @@
+ #include "parser.h"
++#include "utility.h"
+
+ #define MAX_NARGS 20
+
+diff --git a/peak/fitter.c b/peak/fitter.c
+index ba6b175..b58f573 100644
+--- a/peak/fitter.c
++++ b/peak/fitter.c
+@@ -1,4 +1,5 @@
+ #include "fitter.h"
++#include "data.h"
+
+ #include "nonlinear_model.h"
+
+diff --git a/peak/peak_fit.c b/peak/peak_fit.c
+index 92c69a8..5b9791f 100644
+--- a/peak/peak_fit.c
++++ b/peak/peak_fit.c
+@@ -6,6 +6,7 @@
+ #include "output.h"
+ #include "ref.h"
+ #include "script_fit.h"
++#include "fitter.h"
+
+ #define MEGAWORD (1024 * 1024)
+ #define DEFAULT_STORE (2 * MEGAWORD)
+diff --git a/plot1/draw.c b/plot1/draw.c
+index 4fdce96..a2a2e8a 100644
+--- a/plot1/draw.c
++++ b/plot1/draw.c
+@@ -1,4 +1,5 @@
+ #include "draw.h"
++#include "ticks.h"
+
+ #include "color.h"
+ #include "data.h"
+diff --git a/plot1/object.c b/plot1/object.c
+index 973897c..e043a53 100644
+--- a/plot1/object.c
++++ b/plot1/object.c
+@@ -1,4 +1,5 @@
+ #include "object.h"
++#include "script.h"
+
+ #include "color.h"
+ #include "parser.h"
+diff --git a/plot1/output_popup.c b/plot1/output_popup.c
+index 0794584..e73976e 100644
+--- a/plot1/output_popup.c
++++ b/plot1/output_popup.c
+@@ -1,4 +1,5 @@
+ #include "output_popup.h"
++#include "script.h"
+
+ #include "output.hlp"
+
+diff --git a/plot1/plots.c b/plot1/plots.c
+index 3790f5b..7ac58df 100644
+--- a/plot1/plots.c
++++ b/plot1/plots.c
+@@ -1,4 +1,5 @@
+ #include "plots.h"
++#include "script.h"
+
+ #include "data.h"
+ #include "input.h"
+diff --git a/plot1/region_popup.c b/plot1/region_popup.c
+index 68b3930..f049d29 100644
+--- a/plot1/region_popup.c
++++ b/plot1/region_popup.c
+@@ -1,4 +1,5 @@
+ #include "region_popup.h"
++#include "data.h"
+
+ #include "region.hlp"
+
+diff --git a/plot2/data_popup.c b/plot2/data_popup.c
+index 851b1d4..1c9026e 100644
+--- a/plot2/data_popup.c
++++ b/plot2/data_popup.c
+@@ -1,4 +1,5 @@
+ #include "data_popup.h"
++#include "rowcol_popup.h"
+
+ #include "data.hlp"
+
+diff --git a/plot2/extract_popup.c b/plot2/extract_popup.c
+index 416aab0..a7fcbf3 100644
+--- a/plot2/extract_popup.c
++++ b/plot2/extract_popup.c
+@@ -1,4 +1,5 @@
+ #include "extract_popup.h"
++#include "script.h"
+
+ #include "extract.hlp"
+
+diff --git a/plot2/levels_popup.c b/plot2/levels_popup.c
+index 197cf2c..e1ac22c 100644
+--- a/plot2/levels_popup.c
++++ b/plot2/levels_popup.c
+@@ -1,4 +1,5 @@
+ #include "levels_popup.h"
++#include "levels_func.h"
+
+ #include "levels.hlp"
+
+diff --git a/plot2/plot2.c b/plot2/plot2.c
+index 9ca91c3..0c10d5a 100644
+--- a/plot2/plot2.c
++++ b/plot2/plot2.c
+@@ -1,4 +1,6 @@
+ #include "plot2.h"
++#include "object_popup.h"
++#include "prop_popup.h"
+
+ #include "baseline_popup.h"
+ #include "callback.h"
+diff --git a/plot2/rowcol_popup.c b/plot2/rowcol_popup.c
+index e9f4843..6c50426 100644
+--- a/plot2/rowcol_popup.c
++++ b/plot2/rowcol_popup.c
+@@ -1,4 +1,5 @@
+ #include "rowcol_popup.h"
++#include "ref_popup.h"
+
+ #include "rowcol.hlp"
+
+diff --git a/plot2/script.c b/plot2/script.c
+index 2f55182..d7d886f 100644
+--- a/plot2/script.c
++++ b/plot2/script.c
+@@ -1,4 +1,5 @@
+ #include "script.h"
++#include "macros.h"
+
+ #include "param.h"
+ #include "stack.h"
+diff --git a/plot2/slice_popup.c b/plot2/slice_popup.c
+index b601834..1b1e686 100644
+--- a/plot2/slice_popup.c
++++ b/plot2/slice_popup.c
+@@ -1,4 +1,5 @@
+ #include "slice_popup.h"
++#include "rowcol_func.h"
+
+ #include "baseline.h"
+ #include "baseline_popup.h"
+diff --git a/process/files.c b/process/files.c
+index e09127e..d95d681 100644
+--- a/process/files.c
++++ b/process/files.c
+@@ -1,4 +1,5 @@
+ #include "files.h"
++#include "macros.h"
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff --git a/project/project.c b/project/project.c
+index 92b70e3..a3e6d94 100644
+--- a/project/project.c
++++ b/project/project.c
+@@ -1,4 +1,5 @@
+ #include "project.h"
++#include "utility.h"
+
+ #include "block.h"
+ #include "par.h"
diff --git a/sci-chemistry/azara/files/2.8-prll.patch b/sci-chemistry/azara/files/2.8-prll.patch
new file mode 100644
index 000000000000..4720bb659445
--- /dev/null
+++ b/sci-chemistry/azara/files/2.8-prll.patch
@@ -0,0 +1,387 @@
+diff --git a/DataRows/makefile b/DataRows/makefile
+index 587e710..4e0a312 100644
+--- a/DataRows/makefile
++++ b/DataRows/makefile
+@@ -28,7 +28,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-DataRows.so: locals globals
++DataRows.so: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) $(SHARED_FLAGS) -o $@ $(CFLAGS) $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS)
+diff --git a/azara/makefile b/azara/makefile
+index 3ba0cd9..f7b4ce5 100644
+--- a/azara/makefile
++++ b/azara/makefile
+@@ -12,7 +12,7 @@ LOCAL_OBJS = \
+ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/help.o
+
+-azara: locals globals
++azara: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/combine/makefile b/combine/makefile
+index a855236..7a83d8f 100644
+--- a/combine/makefile
++++ b/combine/makefile
+@@ -20,7 +20,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-combine: locals globals
++combine: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/connect/makefile b/connect/makefile
+index d75e7da..d238507 100644
+--- a/connect/makefile
++++ b/connect/makefile
+@@ -23,7 +23,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-connect: locals globals
++connect: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/contours/makefile b/contours/makefile
+index 5b832b8..49175dd 100644
+--- a/contours/makefile
++++ b/contours/makefile
+@@ -19,7 +19,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-contours: locals globals
++contours: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/deflate/makefile b/deflate/makefile
+index 4c4e02e..42d5c30 100644
+--- a/deflate/makefile
++++ b/deflate/makefile
+@@ -18,7 +18,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-deflate: locals globals
++deflate: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/extract/makefile b/extract/makefile
+index 3212cb9..fed874b 100644
+--- a/extract/makefile
++++ b/extract/makefile
+@@ -18,7 +18,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-extract: locals globals
++extract: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/global/makefile b/global/makefile
+index 364fa41..5272a31 100644
+--- a/global/makefile
++++ b/global/makefile
+@@ -42,6 +42,31 @@ LINPACK_OBJS = \
+ AZARA_OBJS = \
+ help.o
+
++all: \
++ azara_objects \
++ decay_objects \
++ simulate_objects \
++ viewer_objects \
++ components_objects \
++ shuffle_objects \
++ connect_objects \
++ slides_objects \
++ peak_find_objects \
++ peak_fit_objects \
++ plot1_objects \
++ reflate_objects \
++ deflate_objects \
++ combine_objects \
++ unblock_objects \
++ extract_objects \
++ project_objects \
++ contours_objects \
++ plot2_nog_objects \
++ plot2_objects \
++ process_objects \
++ python_objects \
++ integrate_objects
++
+ azara_objects: $(AZARA_OBJS)
+
+ DECAY_OBJS = \
+diff --git a/help/makefile b/help/makefile
+index 9e99a7c..59a86a3 100644
+--- a/help/makefile
++++ b/help/makefile
+@@ -39,7 +39,7 @@ globals:
+
+ .c.o:; $(CC) -c $(CFLAGS) $<
+
+-hlp:
++hlp: txt2hlp
+ $(TXT2HLP) azara
+ $(TXT2HLP) combine
+ $(TXT2HLP) connect
+@@ -78,7 +78,7 @@ hlp:
+ $(TXT2HLP) plot1/text
+ $(TXT2HLP) DataRows
+
+-html:
++html: txt2html
+ $(TXT2HTML) azara
+ $(TXT2HTML) combine
+ $(TXT2HTML) connect
+diff --git a/makefile b/makefile
+index 9965b07..f4383af 100644
+--- a/makefile
++++ b/makefile
+@@ -14,7 +14,7 @@ all: help nongui DataRows gui
+ help: \
+ help_program
+
+-nongui: \
++nongui: help \
+ process_program \
+ plot2_nog_program \
+ peak_program \
+@@ -29,63 +29,66 @@ nongui: \
+ connect_program \
+ azara_program
+
+-gui: \
++gui: help \
+ plot2_program \
+ plot1_program
+
+-DataRows: \
++DataRows: help \
+ DataRows
+
+-process_program:
+- cd process; $(MAKE)
++global:
++ $(MAKE) -C global
+
+-plot2_program:
+- cd plot2; $(MAKE) plot2
++process_program: global
++ $(MAKE) -C process
+
+-plot2_nog_program:
+- cd plot2; $(MAKE) plot2_nog
++plot2_program: global
++ $(MAKE) -C plot2
+
+-plot1_program:
+- cd plot1; $(MAKE)
++plot2_nog_program: global
++ $(MAKE) -C plot2 plot2_nog
+
+-peak_program:
+- cd peak; $(MAKE)
++plot1_program: global
++ $(MAKE) -C plot1
+
+-extract_program:
+- cd extract; $(MAKE)
++peak_program: global process_program
++ $(MAKE) -C peak
+
+-project_program:
+- cd project; $(MAKE)
++extract_program: global
++ $(MAKE) -C extract
+
+-unblock_program:
+- cd unblock; $(MAKE)
++project_program: global
++ $(MAKE) -C project
+
+-contours_program:
+- cd contours; $(MAKE)
++unblock_program: global
++ $(MAKE) -C unblock
+
+-combine_program:
+- cd combine; $(MAKE)
++contours_program: global
++ $(MAKE) -C contours
+
+-deflate_program:
+- cd deflate; $(MAKE)
++combine_program: global
++ $(MAKE) -C combine
+
+-reflate_program:
+- cd reflate; $(MAKE)
++deflate_program: global
++ $(MAKE) -C deflate
+
+-utility_program:
+- cd utility; $(MAKE)
++reflate_program: global
++ $(MAKE) -C reflate
+
+-connect_program:
+- cd connect; $(MAKE)
++utility_program: global
++ $(MAKE) -C utility
+
+-help_program:
+- cd help; $(MAKE)
++connect_program: global
++ $(MAKE) -C connect
+
+-azara_program:
+- cd azara; $(MAKE)
++help_program: global
++ $(MAKE) -C help
+
+-DataRows:
+- cd DataRows; $(MAKE)
++azara_program: global
++ $(MAKE) -C azara
++
++DataRows: global
++ $(MAKE) -C DataRows
+
+ clean: \
+ global_clean \
+@@ -227,3 +230,5 @@ azara_realclean:
+ DataRows_realclean:
+ cd DataRows; $(MAKE) realclean
+
++
++.PHONY: global process_program
+diff --git a/peak/makefile b/peak/makefile
+index f3c13b7..4211221 100644
+--- a/peak/makefile
++++ b/peak/makefile
+@@ -97,13 +97,13 @@ COMMAND_OBJS = \
+
+ all: peak_find peak_fit
+
+-peak_find: local_find global_find
++peak_find: $(LOCAL_FIND_OBJS) $(GLOBAL_FIND_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_FIND_OBJS) \
+ $(GLOBAL_FIND_OBJS) \
+ $(LIB) $(MATH_LIB)
+
+-peak_fit: local_fit global_fit commands
++peak_fit: $(LOCAL_FIT_OBJS) $(GLOBAL_FIT_OBJS) $(COMMAND_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_FIT_OBJS) \
+ $(GLOBAL_FIT_OBJS) \
+diff --git a/plot1/makefile b/plot1/makefile
+index d1dce2d..e729443 100644
+--- a/plot1/makefile
++++ b/plot1/makefile
+@@ -95,7 +95,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/utility.o \
+ $(GLOBAL_DIR)/window.o
+
+-plot1: locals globals
++plot1: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+@@ -110,7 +110,7 @@ locals:
+ globals:
+ cd $(GLOBAL_DIR); $(MAKE) plot1_objects
+
+-.c.o:; $(CC) $(X11_INCLUDE_DIR) $(MOTIF_INCLUDE_DIR) -c $(CFLAGS) $<
++.c.o:; $(CC) $(X11_INCLUDE_DIR) $(MOTIF_INCLUDE_DIR) -c $(CFLAGS) -I../plot2 $<
+
+ clean:
+ rm -f *.o
+diff --git a/plot2/makefile b/plot2/makefile
+index a6b7b4a..98e286e 100644
+--- a/plot2/makefile
++++ b/plot2/makefile
+@@ -129,7 +129,7 @@ GLOBAL_PLOT2_NOG_OBJS = \
+
+ all: plot2 plot2_nog
+
+-plot2: local_plot2 global_plot2
++plot2: $(LOCAL_PLOT2_OBJS) $(GLOBAL_PLOT2_OBJS)
+ $(CC) -o $@ $(CFLAGS) $(LFLAGS) \
+ $(LOCAL_PLOT2_OBJS) \
+ $(GLOBAL_PLOT2_OBJS) \
+@@ -137,7 +137,7 @@ plot2: local_plot2 global_plot2
+ $(LIB) $(MATH_LIB) \
+ $(MOTIF_LIB) $(X11_LIB) $(XPM_LIB)
+
+-plot2_nog: local_plot2_nog global_plot2_nog
++plot2_nog: $(LOCAL_PLOT2_NOG_OBJS) $(GLOBAL_PLOT2_NOG_OBJS)
+ $(CC) -o $@ $(CFLAGS) $(LFLAGS) \
+ $(LOCAL_PLOT2_NOG_OBJS) \
+ $(GLOBAL_PLOT2_NOG_OBJS) \
+diff --git a/process/makefile b/process/makefile
+index 22ceeed..72d587b 100644
+--- a/process/makefile
++++ b/process/makefile
+@@ -72,7 +72,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/utility.o \
+ $(LINPACK_OBJS)
+
+-process: locals globals
++process: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/project/makefile b/project/makefile
+index 78143fc..ed0f296 100644
+--- a/project/makefile
++++ b/project/makefile
+@@ -18,7 +18,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-project: locals globals
++project: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/reflate/makefile b/reflate/makefile
+index 079a3fc..01ec311 100644
+--- a/reflate/makefile
++++ b/reflate/makefile
+@@ -18,7 +18,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-reflate: locals globals
++reflate: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
+diff --git a/unblock/makefile b/unblock/makefile
+index 510dc9e..d9a0f2b 100644
+--- a/unblock/makefile
++++ b/unblock/makefile
+@@ -18,7 +18,7 @@ GLOBAL_OBJS = \
+ $(GLOBAL_DIR)/ref.o \
+ $(GLOBAL_DIR)/utility.o
+
+-unblock: locals globals
++unblock: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) -o $@ $(LFLAGS) \
+ $(LOCAL_OBJS) \
+ $(GLOBAL_OBJS) \
diff --git a/sci-chemistry/azara/files/2.8-python.patch b/sci-chemistry/azara/files/2.8-python.patch
new file mode 100644
index 000000000000..9834c77a77dc
--- /dev/null
+++ b/sci-chemistry/azara/files/2.8-python.patch
@@ -0,0 +1,44 @@
+diff --git a/DataRows/makefile b/DataRows/makefile
+index 4e0a312..ce261ab 100644
+--- a/DataRows/makefile
++++ b/DataRows/makefile
+@@ -22,16 +22,17 @@ LOCAL_OBJS = \
+ data_rows.o
+
+ GLOBAL_OBJS = \
+- $(GLOBAL_DIR)/block_io.o \
+- $(GLOBAL_DIR)/par.o \
+- $(GLOBAL_DIR)/parse.o \
+- $(GLOBAL_DIR)/ref.o \
+- $(GLOBAL_DIR)/utility.o
++ block_io.o \
++ par.o \
++ parse.o \
++ ref.o \
++ utility.o
+
+ DataRows.so: $(LOCAL_OBJS) $(GLOBAL_OBJS)
+ $(CC) $(SHARED_FLAGS) -o $@ $(CFLAGS) $(LFLAGS) \
+ $(LOCAL_OBJS) \
+- $(GLOBAL_OBJS)
++ $(GLOBAL_OBJS) \
++ $(PYTHON_LIB)
+
+ local_objects: $(LOCAL_OBJS)
+
+@@ -42,9 +43,13 @@ globals:
+ cd $(GLOBAL_DIR); $(MAKE) python_objects
+
+ py_data_rows.o: py_data_rows.c
+- $(CC) -c $(CFLAGS) $(PYTHON_INCLUDE_DIR) $<
++ $(CC) -c $(CFLAGS) $(PIC) $(PYTHON_INCLUDE_DIR) $<
+
+-.c.o:; $(CC) -c $(CFLAGS) $<
++data_rows.o: data_rows.c
++ $(CC) -c $(CFLAGS) $(PIC) $<
++
++%.o: $(GLOBAL_DIR)/%.c
++ $(CC) -c $(CFLAGS) $(PIC) $<
+
+ clean:
+ rm -f *.o
diff --git a/sci-chemistry/azara/metadata.xml b/sci-chemistry/azara/metadata.xml
new file mode 100644
index 000000000000..c0432fefe855
--- /dev/null
+++ b/sci-chemistry/azara/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher (jlec)</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/babel/Manifest b/sci-chemistry/babel/Manifest
new file mode 100644
index 000000000000..c710a51eca7e
--- /dev/null
+++ b/sci-chemistry/babel/Manifest
@@ -0,0 +1 @@
+DIST babel-1.6.tar.Z 242341 SHA256 132a800cfe0c15b47391c809481a7ca174bbd1402aac7486e0973da0fd4db948 SHA512 60336f695b8ee3ec87433b003da38d55365162bbe87244cb175eabec6c0a470c475dac66f85f24525a61b16fa933bdc3eea5ddd0452b6573bcb046ab774b3229 WHIRLPOOL f6dee4fe6409aed0dfae3f672c826ccdb45f0f5d743421faf6622e1258435caf7d9259ece83ab711754a7964bca0c21af42ed179af23b056329d8b800bd95e80
diff --git a/sci-chemistry/babel/babel-1.6-r1.ebuild b/sci-chemistry/babel/babel-1.6-r1.ebuild
new file mode 100644
index 000000000000..1905b34846f0
--- /dev/null
+++ b/sci-chemistry/babel/babel-1.6-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Interconvert file formats used in molecular modeling"
+HOMEPAGE="http://smog.com/chem/babel/"
+SRC_URI="http://smog.com/chem/babel/files/${P}.tar.Z"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+RESTRICT="mirror bindist"
+
+#Doesn't really seem to depend on anything (?)
+DEPEND="!sci-chemistry/openbabel"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc32.diff \
+ "${FILESDIR}"/${P}-makefile.patch
+ tc-export CC
+}
+
+src_install () {
+ emake DESTDIR="${D}"/usr/bin install
+
+ insinto /usr/share/${PN}
+ doins *.lis
+
+ doenvd "${FILESDIR}"/10babel
+ dodoc README.1ST
+}
diff --git a/sci-chemistry/babel/files/10babel b/sci-chemistry/babel/files/10babel
new file mode 100644
index 000000000000..69f3397638dd
--- /dev/null
+++ b/sci-chemistry/babel/files/10babel
@@ -0,0 +1 @@
+BABEL_DIR=/usr/share/babel
diff --git a/sci-chemistry/babel/files/babel-1.6-gcc32.diff b/sci-chemistry/babel/files/babel-1.6-gcc32.diff
new file mode 100644
index 000000000000..ba0964af5352
--- /dev/null
+++ b/sci-chemistry/babel/files/babel-1.6-gcc32.diff
@@ -0,0 +1,28 @@
+--- block.c.orig Sun Sep 15 04:51:13 2002
++++ block.c Sun Sep 15 04:58:04 2002
+@@ -99,7 +99,12 @@
+ void *array;
+
+ /* calc how much space we are gonna need */
++#ifdef __va_copy
++ __va_copy (ap, initap);
++#else
+ ap = initap;
++#endif
++
+ size = 0;
+ for(i=0; types[i] != '\0'; i++)
+ {
+@@ -116,7 +121,12 @@
+ /* set up the ptrs if we can alloc the memory */
+ if(*handle != NULL)
+ {
++#ifdef __va_copy
++ __va_copy (ap, initap);
++#else
+ ap = initap;
++#endif
++
+ ptr = 0;
+ for(i=0; types[i] != '\0'; i++)
+ {
diff --git a/sci-chemistry/babel/files/babel-1.6-gentoo.diff b/sci-chemistry/babel/files/babel-1.6-gentoo.diff
new file mode 100644
index 000000000000..77e2cb47ef03
--- /dev/null
+++ b/sci-chemistry/babel/files/babel-1.6-gentoo.diff
@@ -0,0 +1,28 @@
+--- Makefile.orig Tue Oct 23 00:20:54 2001
++++ Makefile Tue Oct 23 00:33:36 2001
+@@ -1,11 +1,15 @@
+-CFLAGS = -O
++#Commented out to pull CFLAGS from make.conf
++#CFLAGS = -O
+
+ LIBFLAGS = -O -DLIBRARY
+
+-CC = cc
++#Probably not necessary to specify gcc
++CC = gcc
+
+ PROGRAM = babel
+
++DEST = ${DESTDIR}/$(PROGRAM)
++
+ LDFLAGS =
+
+ LIBS =
+@@ -334,6 +338,7 @@
+ index:; ctags -wx $(HDRS) $(SRCS)
+
+ install: $(PROGRAM)
++ install -d ${DESTDIR}
+ install -s $(PROGRAM) $(DEST)
+
+ print:; $(PRINT) $(HDRS) $(SRCS)
diff --git a/sci-chemistry/babel/files/babel-1.6-makefile.patch b/sci-chemistry/babel/files/babel-1.6-makefile.patch
new file mode 100644
index 000000000000..33b158d1b2cf
--- /dev/null
+++ b/sci-chemistry/babel/files/babel-1.6-makefile.patch
@@ -0,0 +1,33 @@
+diff -Naur babel-1.6/Makefile babel-1.6.new/Makefile
+--- babel-1.6/Makefile 1997-01-21 10:53:05.000000000 -0500
++++ babel-1.6.new/Makefile 2008-10-19 10:41:42.000000000 -0400
+@@ -1,12 +1,16 @@
+-CFLAGS = -O
++#Commented out to pull CFLAGS from make.conf
++#CFLAGS = -O
+
+ LIBFLAGS = -O -DLIBRARY
+
+-CC = cc
++#Probably not necessary to specify gcc
++#CC = gcc
+
+ PROGRAM = babel
+
+-LDFLAGS =
++DEST = ${DESTDIR}/$(PROGRAM)
++
++#LDFLAGS =
+
+ LIBS =
+
+@@ -334,7 +338,8 @@
+ index:; ctags -wx $(HDRS) $(SRCS)
+
+ install: $(PROGRAM)
+- install -s $(PROGRAM) $(DEST)
++ install -d ${DESTDIR}
++ install $(PROGRAM) $(DEST)
+
+ print:; $(PRINT) $(HDRS) $(SRCS)
+
diff --git a/sci-chemistry/babel/metadata.xml b/sci-chemistry/babel/metadata.xml
new file mode 100644
index 000000000000..e42d0af60f42
--- /dev/null
+++ b/sci-chemistry/babel/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/balbes/Manifest b/sci-chemistry/balbes/Manifest
new file mode 100644
index 000000000000..ac3f2cd87d87
--- /dev/null
+++ b/sci-chemistry/balbes/Manifest
@@ -0,0 +1,2 @@
+DIST balbes-1.0.0_p100317.tar.gz 506464 SHA256 c5bf6c2086e1a3d7d380e5501c0cffdb91cbf77c74d2951dd345273f21921d0c
+DIST ccp4-6.1.3-core-src.tar.gz 242134076 SHA256 1e529c660e7f390ec0feca9d45caa00a2813d23156c10a2747c427117293c324
diff --git a/sci-chemistry/balbes/balbes-1.0.0_p100317-r2.ebuild b/sci-chemistry/balbes/balbes-1.0.0_p100317-r2.ebuild
new file mode 100644
index 000000000000..5334207c0229
--- /dev/null
+++ b/sci-chemistry/balbes/balbes-1.0.0_p100317-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+CCP4VER="6.1.3"
+PYTHON_DEPEND="2"
+
+inherit eutils fortran-2 python toolchain-funcs
+
+DESCRIPTION="Automated molecular replacement (MR) pipeline"
+HOMEPAGE="http://www.ysbl.york.ac.uk/~fei/balbes/index.html"
+SRC_URI="
+ mirror://gentoo/${P}.tar.gz
+ ftp://ftp.ccp4.ac.uk/ccp4/${CCP4VER}/ccp4-${CCP4VER}-core-src.tar.gz"
+
+SLOT="0"
+LICENSE="ccp4"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# bundled PyXML is modified and cannot be replaced
+
+COMMON_DEPEND="sci-libs/ccp4-libs"
+RDEPEND="${COMMON_DEPEND}
+ ~sci-libs/balbes-db-${CCP4VER}
+ !<=sci-chemistry/ccp4-apps-6.1.3-r1"
+DEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}"/src
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ tar xvzf "${DISTDIR}"/ccp4-${CCP4VER}-core-src.tar.gz \
+ ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/bin_py \
+ ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/PyXML-0.8.4
+ python_convert_shebangs 2 "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/bin_py/balbes
+}
+
+src_prepare() {
+ mkdir "${WORKDIR}"/bin || die
+ epatch "${FILESDIR}"/${PV}-makefile.patch
+ cd "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/
+ epatch "${FILESDIR}"/pyxml-0.8.4-python-2.6.patch
+}
+
+src_compile() {
+ emake \
+ BLANC_FORT="$(tc-getFC) ${FFLAGS}" || die
+ cd "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/PyXML-0.8.4
+ find build -delete
+ $(PYTHON) setup.py build
+ find xml/xslt test -delete
+}
+
+src_install() {
+ insinto /usr/share/balbes/BALBES_0.0.1/
+ doins -r \
+ "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/bin_py \
+ "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/PyXML-0.8.4 || die
+ dobin \
+ "${WORKDIR}"/bin/* \
+ "${WORKDIR}"/ccp4-${CCP4VER}/share/balbes/BALBES_0.0.1/bin_py/balbes \
+ || die
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/balbes/BALBES_0.0.1/{bin_py,PyXML-0.8.4}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/balbes/BALBES_0.0.1/{bin_py,PyXML-0.8.4}
+}
diff --git a/sci-chemistry/balbes/files/1.0.0_p100317-makefile.patch b/sci-chemistry/balbes/files/1.0.0_p100317-makefile.patch
new file mode 100644
index 000000000000..da17240642d7
--- /dev/null
+++ b/sci-chemistry/balbes/files/1.0.0_p100317-makefile.patch
@@ -0,0 +1,107 @@
+diff --git a/makefile b/makefile
+index baaceb5..85a7baf 100755
+--- a/makefile
++++ b/makefile
+@@ -70,6 +70,15 @@ OBJDB_G = get_pdb_list.o
+
+ #OBJDB_Z = blanc2mtz.o libutils.o
+
++# incomplete targets:
++# dimer_search_db domain_search_db domain align3
++all: search_db get_structure_db manage_db search_dm dom2ch \
++ save_si get_pdb_list_db update_db \
++ update_dom_db bl2mtz check_file_db fobs2cif sol_check \
++ get_trns p2s check_cell alt_sg \
++ align cell_list create_bins \
++ get_pdb_list_db get_ch get_nm get_mod
++
+ search_db: sdb_l
+
+ get_structure_db: tdb_l
+@@ -201,58 +210,58 @@ save_seg_id.o: save_seg_id.f
+ $(BLANC_FORT) -c save_seg_id.f
+
+ sdb_l: $(OBJDB_S)
+- $(BLANC_FORT) -o ../bin/search_DB $(OBJDB_S)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/search_DB $(OBJDB_S)
+ tdb_l: $(OBJDB_T)
+- $(BLANC_FORT) -o ../bin/get_structure_DB $(OBJDB_T)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_structure_DB $(OBJDB_T)
+ mdb_l: $(OBJDB_M)
+- $(BLANC_FORT) -o ../bin/manage_DB $(OBJDB_M)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/manage_DB $(OBJDB_M)
+ mdm_l: $(OBJDB_MD)
+- $(BLANC_FORT) -o ../bin/search_DOM $(OBJDB_MD)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/search_DOM $(OBJDB_MD)
+ d2c_l: $(OBJDB_A)
+- $(BLANC_FORT) -o ../bin/domain2chain $(OBJDB_A)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/domain2chain $(OBJDB_A)
+ upd_l: $(OBJDB_U)
+- $(BLANC_FORT) -o ../bin/update_DB $(OBJDB_U)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/update_DB $(OBJDB_U)
+ dom_l: $(OBJDB_V)
+- $(BLANC_FORT) -o ../bin/update_domain_DB $(OBJDB_V)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/update_domain_DB $(OBJDB_V)
+ ddb_l: $(OBJDB_D)
+- $(BLANC_FORT) -o ../bin/dimer_search $(OBJDB_D)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/dimer_search $(OBJDB_D)
+ dmdb_l: $(OBJDB_N)
+- $(BLANC_FORT) -o ../bin/domain_search $(OBJDB_N)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/domain_search $(OBJDB_N)
+ gdb_l: $(OBJDB_G)
+- $(BLANC_FORT) -o ../bin/get_pdb_list $(OBJDB_G)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_pdb_list $(OBJDB_G)
+ b2m_l: blanc2mtz.o libutils.o
+- $(BLANC_FORT) -o ../bin/blanc2mtz blanc2mtz.o libutils.o $(CLIB)/libccp4f.a $(CLIB)/libccp4c.a
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/blanc2mtz blanc2mtz.o libutils.o -lccp4f -lccp4c
+ f2c_l: f2cif.o libutils.o
+- $(BLANC_FORT) -o ../bin/f2cif f2cif.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/f2cif f2cif.o libutils.o
+ chf_l: check_file_DB.o libutils.o
+- $(BLANC_FORT) -o ../bin/check_file_DB check_file_DB.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/check_file_DB check_file_DB.o libutils.o
+ chc_l: check_cell_sg.o libutils.o
+- $(BLANC_FORT) -o ../bin/check_cell_sg check_cell_sg.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/check_cell_sg check_cell_sg.o libutils.o
+ asl_l: alt_sg_list.o libutils.o
+- $(BLANC_FORT) -o ../bin/alt_sg_list alt_sg_list.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/alt_sg_list alt_sg_list.o libutils.o
+ sc_l: $(OBJDB_C)
+- $(BLANC_FORT) -o ../bin/solution_check $(OBJDB_C)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/solution_check $(OBJDB_C)
+ gt_l: $(OBJDB_R)
+- $(BLANC_FORT) -o ../bin/get_trans $(OBJDB_R)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_trans $(OBJDB_R)
+ dmn_l: domain.o libutils.o
+- $(BLANC_FORT) -o ../bin/domain domain.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/domain domain.o libutils.o
+ pack: pdb_pack.o libutils.o
+- $(BLANC_FORT) -o ../bin/pdb_pack pdb_pack.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/pdb_pack pdb_pack.o libutils.o
+ p2s_l: $(OBJDB_P)
+- $(BLANC_FORT) -o ../bin/pdb2s $(OBJDB_P)
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/pdb2s $(OBJDB_P)
+ aln_l: align_DB.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/align_DB align_DB.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/align_DB align_DB.o DB_subr.o libutils.o
+ aln3_l: align_DB_new.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/align_DB_new align_DB_new.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/align_DB_new align_DB_new.o DB_subr.o libutils.o
+ cell_l: create_cell_list.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/create_cell_list create_cell_list.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/create_cell_list create_cell_list.o DB_subr.o libutils.o
+ getch_l: get_chain.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/get_chain get_chain.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_chain get_chain.o DB_subr.o libutils.o
+ getnmr_l: get_nmr.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/get_nmr get_nmr.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_nmr get_nmr.o DB_subr.o libutils.o
+ getmod_l: get_model.o libutils.o
+- $(BLANC_FORT) -o ../bin/get_model get_model.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/get_model get_model.o libutils.o
+ crb_l: create_binaries.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/create_binaries create_binaries.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/create_binaries create_binaries.o DB_subr.o libutils.o
+ save_si_l: save_seg_id.o DB_subr.o libutils.o
+- $(BLANC_FORT) -o ../bin/save_seg_id save_seg_id.o DB_subr.o libutils.o
++ $(BLANC_FORT) ${LDFLAGS} -o ../bin/save_seg_id save_seg_id.o DB_subr.o libutils.o
diff --git a/sci-chemistry/balbes/files/pyxml-0.8.4-python-2.6.patch b/sci-chemistry/balbes/files/pyxml-0.8.4-python-2.6.patch
new file mode 100644
index 000000000000..d29b0b6a9eb2
--- /dev/null
+++ b/sci-chemistry/balbes/files/pyxml-0.8.4-python-2.6.patch
@@ -0,0 +1,28 @@
+diff -rupN PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py
+--- PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2008-12-15 16:54:36.000000000 +0900
++++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2008-12-15 16:57:02.000000000 +0900
+@@ -24,8 +24,8 @@ class ParsedAbbreviatedAbsoluteLocationP
+ self._rel = rel
+ nt = ParsedNodeTest.ParsedNodeTest('node', '')
+ ppl = ParsedPredicateList.ParsedPredicateList([])
+- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+- self._step = ParsedStep.ParsedStep(as, nt, ppl)
++ as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
++ self._step = ParsedStep.ParsedStep(as_, nt, ppl)
+ return
+
+ def evaluate(self, context):
+diff -rupN PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py
+--- PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py 2008-12-15 16:54:36.000000000 +0900
++++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py 2008-12-15 16:58:58.000000000 +0900
+@@ -28,8 +28,8 @@ class ParsedAbbreviatedRelativeLocationP
+ self._right = right
+ nt = ParsedNodeTest.ParsedNodeTest('node','')
+ ppl = ParsedPredicateList.ParsedPredicateList([])
+- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+- self._middle = ParsedStep.ParsedStep(as, nt, ppl)
++ as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
++ self._middle = ParsedStep.ParsedStep(as_, nt, ppl)
+
+ def evaluate(self, context):
+ res = []
diff --git a/sci-chemistry/balbes/metadata.xml b/sci-chemistry/balbes/metadata.xml
new file mode 100644
index 000000000000..4bb6be5e5d0c
--- /dev/null
+++ b/sci-chemistry/balbes/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ BALBES is a system for solving protein structures using x-ray
+ crystalographic data. Molecular Replacement(MR) is its core
+ scientific method. BALBES aims to integrate all components,
+ necessary for finding a solution structure by MR, into one system.
+ It consists of a database, scientific programs and a python
+ pipeline. The system is automated so that it needs no user's
+ intervention when running complicated combination of jobs such
+ as model searching, molecular replacement and refinement.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-chemistry/ball/Manifest b/sci-chemistry/ball/Manifest
new file mode 100644
index 000000000000..f7919da9098f
--- /dev/null
+++ b/sci-chemistry/ball/Manifest
@@ -0,0 +1 @@
+DIST BALL-1.4.2.tar.xz 16080664 SHA256 053931b2e050d7d5bceaa21ad3617a1ad0af00f94de56076ce02d544383cbf91 SHA512 c719af4ef2dc1076818d59b72350b704fbffea06bd44737519fb50d88da113ea509333d407f2330aa59bf1c4e6b81adfd3d28e05459f66d7c9707f8d85db7a87 WHIRLPOOL ba7ae340833ea5703d047a9dbc0ce50d9b9dc2b0047a0c6d9f9a17946956c684a09e0860f25c7214a2aa0adee9beb1d01eac38b0ab08259a2934f97cbef91379
diff --git a/sci-chemistry/ball/ball-1.4.2.ebuild b/sci-chemistry/ball/ball-1.4.2.ebuild
new file mode 100644
index 000000000000..bc1005204c0b
--- /dev/null
+++ b/sci-chemistry/ball/ball-1.4.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="Biochemical Algorithms Library"
+HOMEPAGE="http://www.ball-project.org/"
+SRC_URI="http://www.ball-project.org/Downloads/v${PV}/BALL-${PV}.tar.xz"
+
+SLOT="0"
+LICENSE="LGPL-2 GPL-3"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cuda mpi +python sql test +threads +webkit"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-cpp/eigen:3
+ dev-libs/boost
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qttest:4
+ dev-qt/qtwebkit:4
+ media-libs/glew
+ sci-libs/fftw:3.0[threads?]
+ sci-libs/gsl
+ sci-libs/libsvm
+ sci-mathematics/lpsolve
+ virtual/opengl
+ x11-libs/libX11
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ mpi? ( virtual/mpi )
+ python? ( ${PYTHON_DEPS} )
+ sql? ( dev-qt/qtsql:4 )
+ webkit? ( dev-qt/qtwebkit:4 )"
+DEPEND="${RDEPEND}
+ dev-python/sip
+ sys-devel/bison
+ virtual/yacc"
+
+S="${WORKDIR}"/BALL-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.1-multilib.patch
+ "${FILESDIR}"/${PN}-1.4.1-missing-signed.patch
+ "${FILESDIR}"/${P}-PDBFile-Fix-compilation-with-gcc-4.8.patch
+ "${FILESDIR}"/${P}-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch
+ "${FILESDIR}"/${PN}-1.4.1-BondOrder.xml.patch
+ "${FILESDIR}"/${P}-Fix-compilation-of-sipModularWidget.patch
+ "${FILESDIR}"/${P}-underlinking.patch
+ )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use threads FFTW_THREADS)
+ $(cmake-utils_use cuda MT_ENABLE_CUDA)
+ $(cmake-utils_use mpi MT_ENABLE_MPI)
+ $(cmake-utils_use sql BALL_HAS_QTSQL)
+ $(cmake-utils_use_use webkit USE_QTWEBKIT)
+ $(cmake-utils_use python BALL_PYTHON_SUPPORT)
+ )
+ cmake-utils_src_configure
+ local i
+ for i in "${S}"/data/*; do
+ ln -sf "${i}" "${BUILD_DIR}"/source/TEST/ || die
+ ln -sf "${i}" "${S}"/source/TEST/ || die
+ done
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use test && cmake-utils_src_make build_tests
+}
diff --git a/sci-chemistry/ball/files/ball-1.4.1-BondOrder.xml.patch b/sci-chemistry/ball/files/ball-1.4.1-BondOrder.xml.patch
new file mode 100644
index 000000000000..51e592806999
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.1-BondOrder.xml.patch
@@ -0,0 +1,30 @@
+ source/STRUCTURE/assignBondOrderProcessor.C | 2 +-
+ source/TEST/AssignBondOrderProcessor_test.C | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source/STRUCTURE/assignBondOrderProcessor.C b/source/STRUCTURE/assignBondOrderProcessor.C
+index f8acc4f..035fffc 100644
+--- a/source/STRUCTURE/assignBondOrderProcessor.C
++++ b/source/STRUCTURE/assignBondOrderProcessor.C
+@@ -100,7 +100,7 @@ namespace BALL
+ const bool AssignBondOrderProcessor::Default::KEKULIZE_RINGS = true;
+
+ const char* AssignBondOrderProcessor::Option::INIFile = "iniFile";
+- const String AssignBondOrderProcessor::Default::INIFile = "/bond_lengths/BondOrder.xml";
++ const String AssignBondOrderProcessor::Default::INIFile = "bond_lengths/BondOrder.xml";
+
+ const char* AssignBondOrderProcessor::Option::MAX_BOND_ORDER = "max_bond_order";
+ const int AssignBondOrderProcessor::Default::MAX_BOND_ORDER = 3;
+diff --git a/source/TEST/AssignBondOrderProcessor_test.C b/source/TEST/AssignBondOrderProcessor_test.C
+index 6dfafcc..3405ef5 100644
+--- a/source/TEST/AssignBondOrderProcessor_test.C
++++ b/source/TEST/AssignBondOrderProcessor_test.C
+@@ -1834,7 +1834,7 @@ CHECK(Option::INIFile)
+ // There is really not much we can test here, so we just execute the processor
+ // to have a chance of catching bugs with valgrind if they sneak in
+ AssignBondOrderProcessor abop;
+- abop.options.set(AssignBondOrderProcessor::Option::INIFile, "/bond_lengths/BondOrderGAFF.xml");
++ abop.options.set(AssignBondOrderProcessor::Option::INIFile, "bond_lengths/BondOrderGAFF.xml");
+
+ System sys40;
+ MOL2File mol40(BALL_TEST_DATA_PATH(AssignBondOrderProcessor_test_C4_input.mol2), std::ios::in);
diff --git a/sci-chemistry/ball/files/ball-1.4.1-missing-signed.patch b/sci-chemistry/ball/files/ball-1.4.1-missing-signed.patch
new file mode 100644
index 000000000000..6868871b3dc4
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.1-missing-signed.patch
@@ -0,0 +1,26 @@
+Index: ball/include/BALL/DATATYPE/hashGrid.h
+===================================================================
+--- ball.orig/include/BALL/DATATYPE/hashGrid.h 2011-12-09 13:49:26.000000000 +0100
++++ ball/include/BALL/DATATYPE/hashGrid.h 2011-12-09 13:51:09.000000000 +0100
+@@ -37,7 +37,7 @@
+ {
+ namespace __private
+ {
+- extern const char BALL_EXPORT neighbour_table_[27][3];
++ extern const signed char BALL_EXPORT neighbour_table_[27][3];
+ }
+
+ template <typename Item> class HashGrid3;
+Index: ball/source/DATATYPE/hashGrid.C
+===================================================================
+--- ball.orig/source/DATATYPE/hashGrid.C 2011-12-09 13:49:26.000000000 +0100
++++ ball/source/DATATYPE/hashGrid.C 2011-12-09 13:50:49.000000000 +0100
+@@ -9,7 +9,7 @@
+ {
+ namespace __private
+ {
+- const char neighbour_table_[27][3] =
++ const signed char neighbour_table_[27][3] =
+ {
+ { 0, 0, 0 }, { 0, 0, -1 }, { 0, 0, 1 },
+ { 0, -1, -1 }, { 0, -1, 0 }, { 0, -1, 1 },
diff --git a/sci-chemistry/ball/files/ball-1.4.1-multilib.patch b/sci-chemistry/ball/files/ball-1.4.1-multilib.patch
new file mode 100644
index 000000000000..317c4029c678
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.1-multilib.patch
@@ -0,0 +1,39 @@
+From 5b8f4e58b4e54bcdfa6f287e01f91d9dfd4e5a14 Mon Sep 17 00:00:00 2001
+From: Justin Lecher <jlec@gentoo.org>
+Date: Sun, 25 Mar 2012 14:12:21 +0200
+Subject: [PATCH] Correct path for multilib installation.
+
+Libraries should go into lib64 not lib on native 64bit. Therefore we can use the LIBDIR detected by cmake.
+---
+ CMakeLists.txt | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 940ebf4..7eb3db4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -426,8 +426,8 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
+ ## These variables are used in all install-targets
+ IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ SET(BALL_RUNTIME_INSTALL_DIRECTORY "bin")
+- SET(BALL_LIBRARY_INSTALL_DIRECTORY "lib")
+- SET(BALL_ARCHIVE_INSTALL_DIRECTORY "lib")
++ SET(BALL_LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
++ SET(BALL_ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
+ SET(BALL_HEADER_INSTALL_DIRECTORY ".")
+ SET(BALL_DATA_INSTALL_DIRECTORY "share/BALL")
+ SET(BALL_DOCUMENTATION_INSTALL_DIRECTORY "share/BALL/doc")
+@@ -435,8 +435,8 @@ IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ SET(BALL_PYTHON_INSTALL_DIRECTORY "bin")
+ SET(BALL_PLUGIN_INSTALL_DIRECTORY "bin")
+ ELSE()
+- SET(BALL_PYTHON_INSTALL_DIRECTORY "lib")
+- SET(BALL_PLUGIN_INSTALL_DIRECTORY "lib")
++ SET(BALL_PYTHON_INSTALL_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
++ SET(BALL_PLUGIN_INSTALL_DIRECTORY ${CMAKE_INSTALL_LIBDIR})
+ ENDIF()
+ ELSE()
+ SET(BALL_BUNDLE_INSTALL_DIRECTORY "Applications")
+--
+1.7.8.5
+
diff --git a/sci-chemistry/ball/files/ball-1.4.2-Fix-compilation-of-sipModularWidget.patch b/sci-chemistry/ball/files/ball-1.4.2-Fix-compilation-of-sipModularWidget.patch
new file mode 100644
index 000000000000..3ec2f6e983a8
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-Fix-compilation-of-sipModularWidget.patch
@@ -0,0 +1,40 @@
+From da49802f8620562f91ac2c947520dccd223ee26b Mon Sep 17 00:00:00 2001
+From: Andreas Hildebrandt <andreas.hildebrandt@uni-mainz.de>
+Date: Wed, 15 Jan 2014 17:42:01 +0100
+Subject: [PATCH] Fix compilation of sipModularWidget
+
+---
+ source/PYTHON/EXTENSIONS/VIEW/modularWidget.sip | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/source/PYTHON/EXTENSIONS/VIEW/modularWidget.sip b/source/PYTHON/EXTENSIONS/VIEW/modularWidget.sip
+index 522b0ed..7b8ba3e 100644
+--- a/source/PYTHON/EXTENSIONS/VIEW/modularWidget.sip
++++ b/source/PYTHON/EXTENSIONS/VIEW/modularWidget.sip
+@@ -22,18 +22,18 @@ class ModularWidget
+ static Size countInstances();
+ static ModularWidget* getInstance(Position);
+
+- ModularWidget(const char* = "<ModularWidget>") throw();
+- ModularWidget(const ModularWidget&) throw();
++ ModularWidget(const char* = "<ModularWidget>");
++ ModularWidget(const ModularWidget&);
+ ~ModularWidget() throw();
+
+- virtual void destroy() throw();
+- virtual void clear() throw();
++// virtual void destroy();
++ virtual void clear();
+
+ static void registerWidget(ModularWidget*) throw(NullPointer);
+ // virtual void initializeWidget(MainControl&);
+ // virtual void finalizeWidget(MainControl&);
+ virtual void checkMenu(MainControl&) throw();
+-// virtual void initializePreferencesTab(Preferences&) throw();
++// virtual void initializePreferencesTab(Preferences&);
+ // virtual void finalizePreferencesTab(Preferences&) throw();
+ virtual void applyPreferences() throw();
+ virtual void fetchPreferences(INIFile&) throw();
+--
+1.9.1
+
diff --git a/sci-chemistry/ball/files/ball-1.4.2-PDBFile-Fix-compilation-with-gcc-4.8.patch b/sci-chemistry/ball/files/ball-1.4.2-PDBFile-Fix-compilation-with-gcc-4.8.patch
new file mode 100644
index 000000000000..f6b8ff45fa7f
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-PDBFile-Fix-compilation-with-gcc-4.8.patch
@@ -0,0 +1,28 @@
+From e7cc50705bed20e160bd4b637b23f57270f580a8 Mon Sep 17 00:00:00 2001
+From: Daniel Stoeckel <dstoeckel@bioinf.uni-sb.de>
+Date: Sat, 6 Apr 2013 01:06:55 +0200
+Subject: [PATCH] PDBFile:Fix compilation with gcc 4.8
+
+Apparently the automatic conversion from boost::shared_ptr<CrystalInfo>
+to boost::shared_ptr<PersistentObject> is no longer supported.
+Just change the type of the pointer and work around this issue.
+---
+ source/FORMAT/PDBFileDetails.C | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/FORMAT/PDBFileDetails.C b/source/FORMAT/PDBFileDetails.C
+index 97c2572..aedc5db 100644
+--- a/source/FORMAT/PDBFileDetails.C
++++ b/source/FORMAT/PDBFileDetails.C
+@@ -901,7 +901,7 @@ namespace BALL
+ {
+ if (!(current_protein_->hasProperty("CRYSTALINFO")))
+ {
+- boost::shared_ptr<CrystalInfo> temp_ptr(new CrystalInfo());
++ boost::shared_ptr<PersistentObject> temp_ptr(new CrystalInfo());
+ current_protein_->setProperty(NamedProperty("CRYSTALINFO", temp_ptr));
+ }
+
+--
+1.9.1
+
diff --git a/sci-chemistry/ball/files/ball-1.4.2-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch b/sci-chemistry/ball/files/ball-1.4.2-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch
new file mode 100644
index 000000000000..615a92290805
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch
@@ -0,0 +1,44 @@
+From 1e76c9cb1920e9176b725269985c7eb43126d188 Mon Sep 17 00:00:00 2001
+From: Luis de la Garza <delagarza@informatik.uni-tuebingen.de>
+Date: Fri, 22 Nov 2013 15:18:55 +0100
+Subject: [PATCH] QT4_EXTRACT_OPTIONS CMake macro changed in CMake 2.8.12;
+ fixed BALLMacros.cmake
+
+---
+ cmake/BALLMacros.cmake | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/BALLMacros.cmake b/cmake/BALLMacros.cmake
+index f81ab89..0ac1b87 100644
+--- a/cmake/BALLMacros.cmake
++++ b/cmake/BALLMacros.cmake
+@@ -6,16 +6,22 @@
+ ### minor modifications (marked with ## BALL ###)
+ ###
+ MACRO(QT4_WRAP_UI_BALL outfiles )
+- QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
+-
+- ### BALL ###
++ # since 2.8.12 qt4_extract_options has an additional argument
++ # copied fix from OpenMS
++ IF(${CMAKE_VERSION} VERSION_LESS "2.8.12")
++ QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
++ ELSE()
++ QT4_EXTRACT_OPTIONS(ui_files ui_options ui_target ${ARGN})
++ ENDIF()
++
++ ### BALL ###
+ # create output directory (will not exist for out-of-source builds)
+ FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/BALL/VIEW/UIC/)
+
+ FOREACH (it ${ui_files})
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+- ### BALL ###
++ ### BALL ###
+ SET(outfile ${PROJECT_BINARY_DIR}/include/BALL/VIEW/UIC/ui_${outfile}.h)
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ COMMAND ${QT_UIC_EXECUTABLE}
+--
+1.9.1
+
diff --git a/sci-chemistry/ball/files/ball-1.4.2-underlinking.patch b/sci-chemistry/ball/files/ball-1.4.2-underlinking.patch
new file mode 100644
index 000000000000..825f41978c13
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-underlinking.patch
@@ -0,0 +1,16 @@
+ source/APPLICATIONS/BALLVIEW/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/APPLICATIONS/BALLVIEW/CMakeLists.txt b/source/APPLICATIONS/BALLVIEW/CMakeLists.txt
+index 6d16212..f94ce76 100644
+--- a/source/APPLICATIONS/BALLVIEW/CMakeLists.txt
++++ b/source/APPLICATIONS/BALLVIEW/CMakeLists.txt
+@@ -85,7 +85,7 @@ IF (UNIX)
+ LIST(APPEND BALLVIEW_SUPPORT_LIBRARIES "pthread")
+ ENDIF ()
+
+-TARGET_LINK_LIBRARIES(BALLView BALL VIEW ${BALLVIEW_SUPPORT_LIBRARIES})
++TARGET_LINK_LIBRARIES(BALLView BALL VIEW ${BALLVIEW_SUPPORT_LIBRARIES} X11)
+
+ #Setup the translations
+ INCLUDE(${CMAKE_SOURCE_DIR}/cmake/BALLViewTranslations.cmake)
diff --git a/sci-chemistry/ball/metadata.xml b/sci-chemistry/ball/metadata.xml
new file mode 100644
index 000000000000..066e13dd4a53
--- /dev/null
+++ b/sci-chemistry/ball/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Rapid Software Prototyping can significantly reduce development times in the
+field of Computational Molecular Biology and Molecular Modeling.
+BALL (Biochemical Algorithms Library) is an application framework in C++ that
+has been specifically designed for this purpose. It provides an extensive set
+of data structures as well as classes for Molecular Mechanics, advanced
+solvation methods, comparison and analysis of protein structures, file
+import/export, and visualization .
+
+BALL has been carefully designed to be robust, easy to use, and open to
+extensions. Especially its extensibility which results from an object-oriented
+and generic programming approach distinguishes it from other software packages.
+BALL is well suited to serve as a public repository for reliable data
+structures and algorithms.
+
+Based on BALL we have developed a stand-alone tool for molecular visualization,
+BALLView . BALLView makes the broad functionality available through an
+integrated user-friendly GUI.
+</longdescription>
+ <use>
+ <flag name="sql">Include SQL database support</flag>
+ <flag name="cuda">Include cuda support</flag>
+ <flag name="webkit">Uses <pkg>dev-qt/qtwebkit</pkg> for drawing</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-chemistry/bkchem/Manifest b/sci-chemistry/bkchem/Manifest
new file mode 100644
index 000000000000..8073e9e6a720
--- /dev/null
+++ b/sci-chemistry/bkchem/Manifest
@@ -0,0 +1 @@
+DIST bkchem-0.14.0-pre2.tar.gz 998916 SHA256 65b93128932959b394eff8e5a8018a19b30d26ee1ae44345e8bb87167303ed26 SHA512 7fc3bbd7bfe27bc91cf69a98c347a3fb92f4ea25b45a13debd0646a6b02d7a40c5729ae1b2a9ac33c1049d6b90e38355c3cd80e06660a0a2fcc5dafb3514ef20 WHIRLPOOL 732bc45913248aa3df5929933f2072d09d90a46cdc3b3e22f1849adf391d7fd62704e71a98e24649bd74e1ebe96b30d7d398dadabffc0fcd114d8c13922241c6
diff --git a/sci-chemistry/bkchem/bkchem-0.14.0_pre2-r1.ebuild b/sci-chemistry/bkchem/bkchem-0.14.0_pre2-r1.ebuild
new file mode 100644
index 000000000000..c5aa86e917a0
--- /dev/null
+++ b/sci-chemistry/bkchem/bkchem-0.14.0_pre2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+PYTHON_REQ_USE="tk"
+
+inherit distutils-r1 eutils versionator
+
+MY_P="${PN}-$(replace_version_separator 3 -)"
+
+DESCRIPTION="Chemical drawing program"
+HOMEPAGE="http://bkchem.zirael.org/"
+SRC_URI="http://bkchem.zirael.org/download/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+IUSE="cairo"
+
+DEPEND="cairo? ( dev-python/pycairo[svg,${PYTHON_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-nolauncher.patch
+)
+
+python_install() {
+ distutils-r1_python_install "--strip=${ED}/_${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ python_foreach_impl python_newscript ${PN}/${PN}.py ${PN}
+ make_desktop_entry bkchem BKChem "${EPREFIX}"/usr/share/${PN}/images/${PN}.png Science
+}
diff --git a/sci-chemistry/bkchem/files/0.14.0_pre1-piddle-Fix-assertions.patch b/sci-chemistry/bkchem/files/0.14.0_pre1-piddle-Fix-assertions.patch
new file mode 100644
index 000000000000..6270e59d5320
--- /dev/null
+++ b/sci-chemistry/bkchem/files/0.14.0_pre1-piddle-Fix-assertions.patch
@@ -0,0 +1,48 @@
+diff --git a/bkchem/plugins/piddle/pdfgen.py b/bkchem/plugins/piddle/pdfgen.py
+index 5213672..4c056c7 100644
+--- a/bkchem/plugins/piddle/pdfgen.py
++++ b/bkchem/plugins/piddle/pdfgen.py
+@@ -639,7 +639,7 @@ class Canvas:
+
+ #use a flate filter and Ascii Base 85 to compress
+ raw = myimage.tostring()
+- assert(len(raw) == imgwidth * imgheight, "Wrong amount of data for image")
++ assert len(raw) == imgwidth * imgheight, "Wrong amount of data for image"
+ compressed = zlib.compress(raw) #this bit is very fast...
+ encoded = pdfutils._AsciiBase85Encode(compressed) #...sadly this isn't
+
+diff --git a/bkchem/plugins/piddle/pdfutils.py b/bkchem/plugins/piddle/pdfutils.py
+index ebde677..4a7675d 100644
+--- a/bkchem/plugins/piddle/pdfutils.py
++++ b/bkchem/plugins/piddle/pdfutils.py
+@@ -27,7 +27,7 @@ def cacheImageFile(filename):
+ code.append('ID')
+ #use a flate filter and Ascii Base 85
+ raw = img.tostring()
+- assert(len(raw) == imgwidth * imgheight, "Wrong amount of data for image")
++ assert len(raw) == imgwidth * imgheight, "Wrong amount of data for image"
+ compressed = zlib.compress(raw) #this bit is very fast...
+ encoded = _AsciiBase85Encode(compressed) #...sadly this isn't
+
+diff --git a/bkchem/plugins/piddle/piddlePS.py b/bkchem/plugins/piddle/piddlePS.py
+index 4d3c327..3afa361 100644
+--- a/bkchem/plugins/piddle/piddlePS.py
++++ b/bkchem/plugins/piddle/piddlePS.py
+@@ -866,7 +866,7 @@ translate
+ # piddlePDF again
+
+ rawimage = myimage.tostring()
+- assert(len(rawimage) == imgwidth*imgheight, 'Wrong amount of data for image')
++ assert len(rawimage) == imgwidth*imgheight, 'Wrong amount of data for image'
+ #compressed = zlib.compress(rawimage) # no zlib at moment
+ hex_encoded = self._AsciiHexEncode(rawimage)
+
+@@ -957,7 +957,7 @@ translate
+ 'image'])
+ # after image operator just need to dump image dat to file as hexstring
+ rawimage = myimage.tostring()
+- assert(len(rawimage) == imwidth*imheight, 'Wrong amount of data for image')
++ assert len(rawimage) == imwidth*imheight, 'Wrong amount of data for image'
+ #compressed = zlib.compress(rawimage) # no zlib at moment
+ hex_encoded = self._AsciiHexEncode(rawimage)
+
diff --git a/sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch b/sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch
new file mode 100644
index 000000000000..202c47a9c74f
--- /dev/null
+++ b/sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch
@@ -0,0 +1,106 @@
+ bkchem/bkchem.py | 24 +++++++++++++-----------
+ setup.py | 23 -----------------------
+ 2 files changed, 13 insertions(+), 34 deletions(-)
+
+diff --git a/bkchem/bkchem.py b/bkchem/bkchem.py
+index b336b9c..bcb68b0 100644
+--- a/bkchem/bkchem.py
++++ b/bkchem/bkchem.py
+@@ -1,3 +1,4 @@
++#!/usr/bin/env python2
+ #--------------------------------------------------------------------------
+ # This file is part of BKChem - a chemical drawing program
+ # Copyright (C) 2002-2009 Beda Kosata <beda@zirael.org>
+@@ -18,18 +19,19 @@
+ #--------------------------------------------------------------------------
+
+
+-"""this is just a starter of the application"""
++#"""this is just a starter of the application"""
+
+ ## support for loading from outside of bkchem dir
+
+-import os_support, sys
++from bkchem import os_support
++import sys
+ sys.path.insert( 1, os_support.get_module_path())
+
+
+ ### now starting for real
+
+-from singleton_store import Store
+-import pref_manager
++from bkchem.singleton_store import Store
++from bkchem import pref_manager
+
+ # at first preference manager
+ Store.pm = pref_manager.pref_manager(
+@@ -78,13 +80,13 @@ else:
+
+
+
+-import config
++from bkchem import config
+
+ if not config.debug:
+ # checking of important modules availability
+ # import modules
+- import import_checker
+- import messages
++ from bkchem import import_checker
++ from bkchem import messages
+
+ # we need sets from the 2.3 version
+ if not import_checker.python_version_ok:
+@@ -103,16 +105,16 @@ if not config.debug:
+
+
+ #import Tkinter
+-from main import BKChem
+-from splash import Splash
+-from singleton_store import Store
++from bkchem.main import BKChem
++from bkchem.splash import Splash
++from bkchem.singleton_store import Store
+
+ myapp = BKChem()
+ myapp.withdraw()
+
+ if __name__ == '__main__':
+
+- import messages
++ from bkchem import messages
+ enc = sys.getfilesystemencoding()
+ if not enc:
+ enc = sys.getdefaultencoding()
+diff --git a/setup.py b/setup.py
+index d4b2a21..2319216 100755
+--- a/setup.py
++++ b/setup.py
+@@ -91,26 +91,3 @@ if len( sys.argv) > 1 and sys.argv[1] == 'install' and '--help' not in sys.argv:
+ print "file %s created" % config_name
+
+
+- # the executable
+- if not os.path.isdir( bin_dir):
+- try:
+- os.mkdir( bin_dir)
+- except:
+- print "ERROR: could not create directory %s" % bin_dir
+- sys.exit( 201)
+- exec_name = os.path.join( bin_dir, 'bkchem')
+- try:
+- file = open( exec_name, 'w')
+- except:
+- print "ERROR: couldn't open the file %s for write" % exec_name
+- sys.exit( 201)
+- file.write( "#!/bin/sh\n")
+- file.write( 'python %s "$@"\n' % strip_path( os.path.join( py_dir, "bkchem", "bkchem.py")))
+- file.close()
+- print "file %s created" % exec_name
+- try:
+- os.chmod( os.path.join( bin_dir, 'bkchem'), 5+5*8+7*8*8)
+- except:
+- print "ERROR: failed to make %s executable" % exec_name
+- sys.exit( 201)
+- print "file %s made executable" % exec_name
diff --git a/sci-chemistry/bkchem/metadata.xml b/sci-chemistry/bkchem/metadata.xml
new file mode 100644
index 000000000000..ae9ec7c5f6a4
--- /dev/null
+++ b/sci-chemistry/bkchem/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/bodr/Manifest b/sci-chemistry/bodr/Manifest
new file mode 100644
index 000000000000..53b218466c9e
--- /dev/null
+++ b/sci-chemistry/bodr/Manifest
@@ -0,0 +1,2 @@
+DIST bodr-10.tar.bz2 225671 SHA256 738a0f0e263cdc088581d0a67a0ea16ec586ceb424704d0ff73bdb5da5d4ee81 SHA512 a3e0e7195914938d8824127aa4777c4054c302ef7811d82d1e012d9be5d7a13d7f2225d4216f4a30ae7dbf70eb3b0b38571c3ee0dbe1d97af15f04171dd51bec WHIRLPOOL e61db3427f6f994a1a628eec12c1a41cf8d9cdbd1a16814a267363ffe4fa320f3fb9b03f8188c746899774631dc5d0398830b8d779d225f3317158809c182c3e
+DIST bodr-9.tar.bz2 210548 SHA256 a7ed30ecc385ff9fe9b2af84710574ac12febea081b5123db6d6337a4a7a4b60 SHA512 5bcdd682729e11a0bc48f9306262e03fa2a3ca3a805633c2b40d7f94608ce6e2e778cc89ed0c57ec3bf6105c2f759204e158ac6f29c9e6ee3aa37190f8f0d772 WHIRLPOOL 78061c24718a4ce5c5694e369d3c97eb90826b2c3b3f694ba9a0f405173ef0efdc565583373b26c96582c853e1606314ee2c5ab3e5cc8e889c0625358f87291b
diff --git a/sci-chemistry/bodr/bodr-10.ebuild b/sci-chemistry/bodr/bodr-10.ebuild
new file mode 100644
index 000000000000..7958b8c319da
--- /dev/null
+++ b/sci-chemistry/bodr/bodr-10.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The Blue Obelisk Data Repository listing element and isotope properties"
+HOMEPAGE="http://sourceforge.net/projects/bodr"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE=""
+
+DEPEND="dev-libs/libxslt"
+RDEPEND=""
+
+DOCS=( "THANKS" "AUTHORS" "README" "ChangeLog" )
+
+src_prepare(){
+ sed -i -e "s/COPYING//g" Makefile.* || die
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
diff --git a/sci-chemistry/bodr/bodr-9-r1.ebuild b/sci-chemistry/bodr/bodr-9-r1.ebuild
new file mode 100644
index 000000000000..7958b8c319da
--- /dev/null
+++ b/sci-chemistry/bodr/bodr-9-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The Blue Obelisk Data Repository listing element and isotope properties"
+HOMEPAGE="http://sourceforge.net/projects/bodr"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos"
+IUSE=""
+
+DEPEND="dev-libs/libxslt"
+RDEPEND=""
+
+DOCS=( "THANKS" "AUTHORS" "README" "ChangeLog" )
+
+src_prepare(){
+ sed -i -e "s/COPYING//g" Makefile.* || die
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
diff --git a/sci-chemistry/bodr/metadata.xml b/sci-chemistry/bodr/metadata.xml
new file mode 100644
index 000000000000..a30a888d000f
--- /dev/null
+++ b/sci-chemistry/bodr/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <longdescription>
+ Blue Obelisk Data Repository (BODR) is a shared data repository. It lists
+ many important chemoinformatics data such as elemental properties, atomic
+ radii, etc. including references to original literature. Software developers
+ can use this repository on online webpages or in chemistry software for
+ free.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bodr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/burrow-owl/Manifest b/sci-chemistry/burrow-owl/Manifest
new file mode 100644
index 000000000000..8b584ea4ad29
--- /dev/null
+++ b/sci-chemistry/burrow-owl/Manifest
@@ -0,0 +1,2 @@
+DIST burrow-demos.tar 80896000 SHA256 f93e957889adab0521c6e3234f117cf984b7bb18ba6641a3edbdd30202db4b96 SHA512 76948846b4bff2f5c0814e41ee1745122580d6e28f8de217edbf42c4530bc64fb093dc9c96e9c0c083098755c525300b563ee1368caa12be791b2bea7015ee6b WHIRLPOOL 88ca227d8e808814187630c9568e927620a0dc4fb0eba4131ab14cae842aa778fda6294b32e8ec0e23224fca3b5a2a65609ed7f97a34691267439a557bfa0c42
+DIST burrow-owl-1.5.1.tar.gz 1408249 SHA256 76a4ab0746b1b945e0177d441f7ced8042063d4ff2c9171343ea20ddc19a9bbb SHA512 38b428c8b40cdca6caabc7ed9d247118dbf67b537afaec3af14909353d6b138fdf98a33dee6241ce5224631e16c4dbce11b9aadcfe01fecf92f1aae692ce71e1 WHIRLPOOL e165b0508b28e03a47c77ee72ea0d2347ef9088fe33df9788935e3ec0906efd511f77eebe27d74ed79a913f420cde015a39faebdc3195edc1d279ac0d607d39b
diff --git a/sci-chemistry/burrow-owl/burrow-owl-1.5.1.ebuild b/sci-chemistry/burrow-owl/burrow-owl-1.5.1.ebuild
new file mode 100644
index 000000000000..76018815c9cd
--- /dev/null
+++ b/sci-chemistry/burrow-owl/burrow-owl-1.5.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils virtualx
+
+DESCRIPTION="Visualize multidimensional nuclear magnetic resonance (NMR) spectra"
+HOMEPAGE="http://burrow-owl.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ examples? ( mirror://sourceforge/${PN}/burrow-demos.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples static-libs"
+
+RDEPEND="
+ dev-libs/g-wrap
+ dev-libs/glib:2
+ dev-scheme/guile[networking,regex]
+ dev-scheme/guile-cairo
+ dev-scheme/guile-gnome-platform
+ sci-libs/starparse
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ dev-util/indent
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_with doc doxygen doxygen)
+ )
+ autotools-utils_src_configure
+}
+
+src_test () {
+ cd "${AUTOTOOLS_BUILD_DIR}" || die
+ virtualmake -C test-suite check
+}
+
+src_install() {
+ use doc && HTML_DOCS=( "${AUTOTOOLS_BUILD_DIR}/doc/api/html/." )
+ autotools-utils_src_install
+
+ use examples && \
+ insinto /usr/share/${PN} && \
+ doins -r "${WORKDIR}"/burrow-demos/*
+}
diff --git a/sci-chemistry/burrow-owl/files/1.4-glibc-2.12.patch b/sci-chemistry/burrow-owl/files/1.4-glibc-2.12.patch
new file mode 100644
index 000000000000..cca640a6347d
--- /dev/null
+++ b/sci-chemistry/burrow-owl/files/1.4-glibc-2.12.patch
@@ -0,0 +1,38 @@
+Fix build with GLIBC-2.12
+
+http://bugs.gentoo.org/show_bug.cgi?id=333843
+
+--- src/Makefile.am
++++ src/Makefile.am
+@@ -82,8 +82,8 @@
+ painter.h \
+ ticket.c \
+ ticket.h \
+-endian.c \
+-endian.h \
++bo_endian.c \
++bo_endian.h \
+ version.c \
+ version.h
+
+--- src/hosbackingfile.c
++++ src/hosbackingfile.c
+@@ -18,6 +18,7 @@
+ */
+
+ #include "hosbackingfile.h"
++#include "bo_endian.h"
+
+ #define DEFAULT_BUF_SIZE 512
+
+--- src/nih.c
++++ src/nih.c
+@@ -24,7 +24,7 @@
+ #include "hosdimensionblock.h"
+ #include "hosbackingblock.h"
+ #include "hosbackingfile.h"
+-#include "endian.h"
++#include "bo_endian.h"
+
+ /* --- header contents ----
+ *
diff --git a/sci-chemistry/burrow-owl/files/1.4-include.patch b/sci-chemistry/burrow-owl/files/1.4-include.patch
new file mode 100644
index 000000000000..3dc4cbdf8000
--- /dev/null
+++ b/sci-chemistry/burrow-owl/files/1.4-include.patch
@@ -0,0 +1,12 @@
+diff --git a/src/gw/spectrum-spec.scm b/src/gw/spectrum-spec.scm
+index 253464c..605796c 100644
+--- a/src/gw/spectrum-spec.scm
++++ b/src/gw/spectrum-spec.scm
+@@ -30,6 +30,7 @@
+ "#include <painter_gdk.h>\n"
+ "#include <burrow/nih.h>\n"
+ "#include <hosbackingsim.h>\n"
++ "#include <guile-cairo/guile-cairo-smob-types.h>\n"
+ "\n"))
+
+ ; couple of disabled sources
diff --git a/sci-chemistry/burrow-owl/files/burrow-owl-1.5-prll.patch b/sci-chemistry/burrow-owl/files/burrow-owl-1.5-prll.patch
new file mode 100644
index 000000000000..340ccd2366e5
--- /dev/null
+++ b/sci-chemistry/burrow-owl/files/burrow-owl-1.5-prll.patch
@@ -0,0 +1,20 @@
+ burrow/canvas/gw/Makefile.am | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/burrow/canvas/gw/Makefile.am b/burrow/canvas/gw/Makefile.am
+index da50ee3..2ed89bc 100644
+--- a/burrow/canvas/gw/Makefile.am
++++ b/burrow/canvas/gw/Makefile.am
+@@ -31,9 +31,11 @@ H2DEF=@top_srcdir@/utils/h2def.py
+ canvas.defs: $(HEADERS_1)
+ $(H2DEF) --all $(HEADERS_1) > $@
+
+-canvas-gw.c canvas-gw.h canvas-gw.scm: canvas.defs
++canvas-gw.c canvas-gw.h: canvas.defs
+ GUILE_LOAD_PATH=@srcdir@:@builddir@:@GUILE_GNOME_MODULE_DIR@:@G_WRAP_MODULE_DIR@:$$GUILE_LOAD_PATH $(GUILE) -s @srcdir@/run-g-wrap.scm
+
++BUILT_SOURCES=canvas-gw.c canvas-gw.h canvas.defs
++
+ INCLUDES=@GTK_CFLAGS@ @G_WRAP_CFLAGS@ @GUILE_GNOME_CFLAGS@ @GUILE_CAIRO_CFLAGS@ @GUILE_CFLAGS@ -I$(headers_dir) -I@top_srcdir@
+
+ moduledir=$(datadir)/guile/burrow
diff --git a/sci-chemistry/burrow-owl/metadata.xml b/sci-chemistry/burrow-owl/metadata.xml
new file mode 100644
index 000000000000..9849d77b1370
--- /dev/null
+++ b/sci-chemistry/burrow-owl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <upstream>
+ <remote-id type="sourceforge">burrow-owl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/cara-bin/Manifest b/sci-chemistry/cara-bin/Manifest
new file mode 100644
index 000000000000..12c0fa6dee54
--- /dev/null
+++ b/sci-chemistry/cara-bin/Manifest
@@ -0,0 +1,2 @@
+DIST Start1.2.cara.xz 43124 SHA256 c28321b051902bc020ea04a46b33ceb19b1b3d902264956474c90798f2d60d25 SHA512 26874d634491558dc593a0ec32e83d5cfceedc69bbf901f4d25d6b9515b84aebffbf495d1ac34b3664b8b5822954edf62c5b88dcca6bcfcb152715caa88f5f03 WHIRLPOOL 034e8b73354e7244e4fcc21c03da7b99c02019ebef1e0754dd9cb8249fe68b82be1e78db9848912fc48c8625b0f2acf0f41242d83949a117f0b8a648a930445e
+DIST cara_1.8.4_linux.gz 6677463 SHA256 5ba34cc8b0782e1791186cde5a02ec036665769df7f5c559db27377b6f3cc6d6 SHA512 e264cfbef640f267132dfd48b940203a319c8f34de71c5b786c6bfc2ab561bdf3fbd79516d619ca52b2aca64a2887f770fabfabedb76433c5f78aa02c65f898f WHIRLPOOL 5619c70bc31dfb328a72233c8fc3e3d8dcfdccc3db4e5a67430f0ebe8a0a474f998abb2a0ec56f4a3c2e6e4b95e324ec3c667864c81cb3531a1e162439c780da
diff --git a/sci-chemistry/cara-bin/cara-bin-1.8.4-r1.ebuild b/sci-chemistry/cara-bin/cara-bin-1.8.4-r1.ebuild
new file mode 100644
index 000000000000..d17c035cd3bc
--- /dev/null
+++ b/sci-chemistry/cara-bin/cara-bin-1.8.4-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="${PN%%-bin}"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Analysis of NMR spectra and Computer Aided Resonance Assignment"
+SRC_URI="
+ http://www.cara.nmr-software.org/downloads/${MY_P}_linux.gz
+ http://dev.gentoo.org/~jlec/distfiles//Start1.2.cara.xz"
+HOMEPAGE="http://www.nmr.ch"
+
+LICENSE="CARA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="lua"
+
+RDEPEND="
+ !prefix? (
+ >=media-libs/fontconfig-2.10.92[abi_x86_32(-)]
+ >=media-libs/freetype-2.5.0.1[abi_x86_32(-)]
+ >=x11-libs/libICE-1.0.8-r1[abi_x86_32(-)]
+ >=x11-libs/libSM-1.2.1-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXcursor-1.1.14[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXi-1.7.2[abi_x86_32(-)]
+ >=x11-libs/libXrandr-1.4.2[abi_x86_32(-)]
+ >=x11-libs/libXrender-0.9.8[abi_x86_32(-)]
+ )
+ virtual/libstdc++
+ lua? ( dev-lang/lua )"
+DEPEND=""
+
+RESTRICT="mirror"
+
+QA_PREBUILT="opt/cara/*"
+
+S="${WORKDIR}"
+
+src_install() {
+ exeinto /opt/cara
+ doexe ${MY_P}_linux
+ dosym ../cara/${MY_P}_linux /opt/bin/cara
+ dodoc Start1.2.cara
+}
diff --git a/sci-chemistry/cara-bin/metadata.xml b/sci-chemistry/cara-bin/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/sci-chemistry/cara-bin/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/ccp4-apps/Manifest b/sci-chemistry/ccp4-apps/Manifest
new file mode 100644
index 000000000000..e56aec5512a2
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/Manifest
@@ -0,0 +1,2 @@
+DIST 6.1.3-oasis4.0.patch.bz2 946 SHA256 12d7c5965e0c46b0f482514d9083d6be94d65eeb14ba29c17d507d5f9669f84b SHA512 7c7bf4ef90550708bf41b1831dbe71c38418b46455adb3d42ec609d287894ac9260d9671f1759f71c713ced72fa004b9808391ea6874007ac8b7d7637f349d32 WHIRLPOOL a2bc27e1e054e1717c387f3800533fa490c03d1d18d3fe3cff4676f0ec47799a1681a206e01013c1b8f8e41162303446a824b86effeef2ed73f059feb07fb820
+DIST ccp4-6.1.3-core-src.tar.gz 242134076 SHA256 1e529c660e7f390ec0feca9d45caa00a2813d23156c10a2747c427117293c324 SHA512 413eba806107ebcdbd93e9122275463709133d9b2a9ce44ae57a6c2350465a47ba66ad9875237aead74f5d422c0104f58f728ab37a757b10d82cde92af444c20 WHIRLPOOL faebf8ee7920013bc3d0e83565207dca1f31ba0b5c92fe1eae4b740f70ff2031d95787fa0d545b09c853d25657c08973527e43de02fddc086988123ca2a6339c
diff --git a/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r13.ebuild b/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r13.ebuild
new file mode 100644
index 000000000000..854cc48db0cf
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/ccp4-apps-6.1.3-r13.ebuild
@@ -0,0 +1,395 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils fortran-2 flag-o-matic gnuconfig python-single-r1 toolchain-funcs
+
+MY_P="${PN/-apps}-${PV}"
+
+#UPDATE="04_03_09"
+#PATCHDATE="090511"
+
+PATCH_TOT="0"
+
+DESCRIPTION="Protein X-ray crystallography toolkit"
+HOMEPAGE="http://www.ccp4.ac.uk/"
+SRC="ftp://ftp.ccp4.ac.uk/ccp4"
+SRC_URI="
+ ${SRC}/${PV}/${MY_P}-core-src.tar.gz
+ http://dev.gentoo.org/~jlec/distfiles/${PV}-oasis4.0.patch.bz2"
+# patch tarball from upstream
+ [[ -n ${UPDATE} ]] && SRC_URI="${SRC_URI} ${SRC}/${PV}/updates/${P}-src-patch-${UPDATE}.tar.gz"
+# patches created by us
+ [[ -n ${PATCHDATE} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/science-dist/${PV}-${PATCHDATE}-updates.patch.bz2"
+
+for i in $(seq $PATCH_TOT); do
+ NAME="PATCH${i}[1]"
+ SRC_URI="${SRC_URI}
+ ${SRC}/${PV}/patches/${!NAME}"
+done
+
+LICENSE="ccp4"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="examples X"
+
+X11DEPS="
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt
+ x11-libs/libxdl_view"
+
+TKDEPS="
+ >=dev-lang/tk-8.3:0=
+ >=dev-tcltk/blt-2.4
+ dev-tcltk/iwidgets
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ >=dev-tcltk/tdom-0.8
+ dev-tcltk/tktreectrl"
+
+SCILIBS="
+ ~sci-libs/ccp4-libs-${PV}
+ >=sci-libs/ccp4-libs-${PV}-r7
+ sci-libs/clipper
+ sci-libs/fftw:2.1
+ sci-libs/mmdb:0
+ sci-libs/ssm
+ virtual/blas
+ virtual/lapack"
+
+SCIAPPS="
+ sci-chemistry/pdb-extract
+ sci-chemistry/pymol
+ sci-chemistry/rasmol
+ >=sci-chemistry/oasis-4.0-r1"
+
+RDEPEND="
+ ${TKDEPS}
+ ${SCILIBS}
+ app-shells/tcsh
+ dev-python/pyxml
+ dev-libs/libxml2:2
+ dev-libs/libjwc_c
+ dev-libs/libjwc_f
+ dev-libs/boehm-gc
+ !app-office/sc
+ !<sci-chemistry/ccp4-6.1.3
+ X? ( ${X11DEPS} )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/imake
+ x11-proto/inputproto
+ x11-proto/xextproto
+ )"
+PDEPEND="${SCIAPPS}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ tc-export PKG_CONFIG
+ einfo "Applying upstream patches ..."
+ for patch in $(seq $PATCH_TOT); do
+ base="PATCH${patch}"
+ dir=$(eval echo \${${base}[0]})
+ p=$(eval echo \${${base}[1]})
+ pushd "${dir}" >& /dev/null
+ ccp_patch "${DISTDIR}/${p}"
+ popd >& /dev/null
+ done
+ einfo "Done."
+ echo
+
+ [[ -n ${PATCHDATE} ]] && epatch "${WORKDIR}"/${PV}-${PATCHDATE}-updates.patch
+
+ einfo "Applying Gentoo patches ..."
+
+ # it tries to create libdir, bindir etc on live system in configure
+ ccp_patch "${FILESDIR}"/${PV}-dont-make-dirs-in-configure.patch
+
+ # We already have sci-chemistry/rasmol
+ # Also remember to create the bindir.
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-double-and-make-bindir.patch
+
+ # libraries come from sci-libs/ccp4-libs
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-libs.patch
+
+ # We have seperate ebuilds for those
+ for bin in molref xia scala imosflm balbes; do
+ ccp_patch "${FILESDIR}"/${PV}-dont-build-${bin}.patch
+ done
+
+ # don't configure what is not build
+ ccp_patch "${FILESDIR}"/${PV}-dont-configure.patch
+
+ # Set python paths correctly
+ ccp_patch "${FILESDIR}"/${PV}-pythonpath.patch
+
+ # Set python paths correctly
+ ccp_patch "${FILESDIR}"/${PV}-pisa.patch
+
+ # Set python paths correctly
+ ccp_patch "${FILESDIR}"/${PV}-clipper-template.patch
+
+ # Fix upstreams code
+ ccp_patch "${FILESDIR}"/${PV}-impl-dec.patch
+
+ # Not renaming, but unbundling libs
+ ccp_patch "${FILESDIR}"/${PV}-rename-rapper-ng.patch
+
+ # Use pkg-config to detect BLAS/LAPCK
+ ccp_patch "${FILESDIR}"/${PV}-lapack.patch
+
+ # unbundle libs
+ ccp_patch "${FILESDIR}"/${PV}-unbundle.patch
+
+ # tcl-8.6
+ ccp_patch "${FILESDIR}"/${P}-tcl8.6.patch
+
+ # Update things for oasis 4 usage
+ epatch "${WORKDIR}"/${PV}-oasis4.0.patch
+ sed 's: oasis : :g' -i src/Makefile.in || die
+
+ einfo "Done." # done applying Gentoo patches
+ echo
+
+ find ./lib/src/mmdb ./lib/ssm ./lib/clipper ./lib/fftw lib/lapack -delete
+
+ sed \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e 's:-Wl,-rpath,$CLIB::g' \
+ -e 's: -rpath $CLIB::g' \
+ -e 's: -I${srcdir}/include/cpp_c_headers::g' \
+ -e 's:sleep 1:sleep .2:g' \
+ -e 's:\\$(XCIF_LIB):-L$srcdir/lib/ccif -lccif:g' \
+ -e 's:\\$(XLAPACK_LIB):${XLAPACK_LIB}:g' \
+ -e 's:\\$(CXX_LIBS):\${CXX_LIBS}:g' \
+ -e 's:\\$(XLDFLAGS):\${XLDFLAGS}:g' \
+ -i configure || die
+
+ sed \
+ -e '/o crunch2/s:$: ${XLAPACK_LIB}:g' \
+ -i src/Makefile* || die
+
+ find "${S}" -name "Makefile.*" \
+ -exec sed -e 's|_FLAGS-|_FLAGS:-|g' -e "s:\(eval \$([[:alnum:]]*)\):\1 \$(GENTOOLDFLAGS):g" -i '{}' \;
+
+ # Don't build refmac, sfcheck, balbes, molrep binaries; available from the standalone version
+ sed -i -e "/^REFMACTARGETS/s:^.*:REFMACTARGETS="":g" configure || die
+
+ # Rapper bundles libxml2 and boehm-gc. Don't build, use or install those.
+ pushd src/rapper 2>/dev/null
+ eautoreconf
+ popd 2>/dev/null
+
+ gnuconfig_update
+
+ python_fix_shebang -f .
+}
+
+src_configure() {
+ # Build system is broken if we set LDFLAGS
+ export GENTOOLDFLAGS="${LDFLAGS}"
+ unset LDFLAGS
+
+ # These are broken with ./src/procheck/ps.f
+ filter-flags "-floop-*"
+
+ # GENTOO_OSNAME can be one of:
+ # irix irix64 sunos sunos64 aix hpux osf1 linux freebsd
+ # linux_compaq_compilers linux_intel_compilers generic Darwin
+ # ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers
+ if [[ "$(tc-getFC)" = "ifort" ]]; then
+ if use ia64; then
+ GENTOO_OSNAME="ia64_linux_intel"
+ else
+ # Should be valid for x86, maybe amd64
+ GENTOO_OSNAME="linux_intel_compilers"
+ fi
+ else
+ # Should be valid for x86 and amd64, at least
+ GENTOO_OSNAME="linux"
+ fi
+
+ # Sets up env
+ ln -s \
+ ccp4.setup-bash \
+ "${S}"/include/ccp4.setup
+
+ # We agree to the license by emerging this, set in LICENSE
+ sed -i \
+ -e "s~^\(^agreed=\).*~\1yes~g" \
+ "${S}"/configure || die
+
+ # Fix up variables -- need to reset CCP4_MASTER at install-time
+ sed -i \
+ -e "s~^\(setenv CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
+ -e "s~^\(export CCP4_MASTER.*\)/.*~\1${WORKDIR}~g" \
+ -e "s~^\(.*export CBIN=.*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
+ -e "s~^\(.*setenv CBIN .*\)\$CCP4.*~\1\$CCP4/libexec/ccp4/bin/~g" \
+ -e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1${EPREFIX}/usr/bin~g" \
+ "${S}"/include/ccp4.setup* || die
+
+ # Set up variables for build
+ source "${S}"/include/ccp4.setup-sh
+
+ export CC=$(tc-getCC)
+ export CXX=$(tc-getCXX)
+ export COPTIM=${CFLAGS}
+ export CXXOPTIM=${CXXFLAGS}
+ # Default to -O2 if FFLAGS is unset
+ export FC=$(tc-getFC)
+ export FOPTIM=${FFLAGS:- -O2}
+ export BINSORT_SCR="${T}"
+ export CCP4_MASTER="${WORKDIR}"
+ export CCP4I_TCLTK="${EPREFIX}/usr/bin"
+ export MAKE="make ${MAKEOPTS} ${EXTRA_EMAKE}"
+
+ # Can't use econf, configure rejects unknown options like --prefix
+ ./configure \
+ $(use_enable X x) \
+ --with-shared-libs \
+ --with-fftw="${EPREFIX}/usr" \
+ --with-warnings \
+ --disable-pdb_extract \
+ --disable-cctbx \
+ --disable-phaser \
+ --disable-diffractionImg \
+ --disable-clipper \
+ --disable-ssm \
+ --disable-mosflm \
+ --disable-mrbump \
+ --tmpdir="${TMPDIR}" \
+ ${GENTOO_OSNAME} || die "configure failed"
+
+ # We do this manually, since disabling the clipper libraries also
+ # disables the clipper programs
+ pushd src/clipper_progs 2>/dev/null
+ econf \
+ --prefix="${S}" \
+ --bindir="${ED}"/usr/libexec/ccp4/bin \
+ --with-ccp4="${S}" \
+ --with-clipper="${EPREFIX}/usr" \
+ --with-fftw="${EPREFIX}/usr" \
+ --with-mmdb="${EPREFIX}/usr" \
+ CXX=$(tc-getCXX)
+ popd 2>/dev/null
+}
+
+src_compile() {
+ # fsplit is required for the programs
+ pushd lib/src 2>/dev/null
+ emake fsplit -j1 || die
+ popd 2>/dev/null
+
+ # We do this manually, since disabling the clipper libraries also
+ # disables the clipper programs
+ pushd src/clipper_progs 2>/dev/null
+ emake || die
+ popd 2>/dev/null
+
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ # Set up variables for build
+ source "${S}"/include/ccp4.setup-sh
+
+ # if we don't make this, a ton of programs fail to install
+ mkdir "${S}"/bin || die
+
+ # We do this manually, since disabling the clipper libraries also
+ # disables the clipper programs
+ pushd "${S}"/src/clipper_progs 2>/dev/null
+ emake install || die
+ popd 2>/dev/null
+
+ einstall || die "install failed"
+
+ # Collision with sci-chemistry/mrbump
+ rm -f "${S}"/bin/{mrbump,pydbviewer} || die
+
+ # Bins
+ exeinto /usr/libexec/ccp4/bin/
+ doexe "${S}"/bin/* || die
+
+ # Libs
+ for file in "${S}"/lib/*; do
+ if [[ -d ${file} ]]; then
+ continue
+ elif [[ -x ${file} ]]; then
+ dolib.so ${file} || die
+ else
+ insinto /usr/$(get_libdir)
+ doins ${file} || die
+ fi
+ done
+
+ rm -f "${S}"/include/ccp4.setup*
+
+ # smartie -- log parsing
+ insinto /usr/share/ccp4
+ doins -r "${S}"/share/smartie || die
+
+ # Install docs and examples
+ local _man
+ pushd "${S}"/man/cat1 > /dev/null
+ for _man in *; do
+ newman ${_man} ${_man%??}-ccp4${_man:${#_man}-2:2}
+ done
+ popd > /dev/null
+
+ mv "${S}"/manual/README "${S}"/manual/README-manual
+ dodoc manual/* README CHANGES doc/* examples/README || die
+
+ rm "${ED}"/usr/share/doc/${PF}/GNUmakefile.*
+ rm "${ED}"/usr/share/doc/${PF}/COPYING.*
+
+ dohtml -r "${S}"/html/*
+
+ if use examples; then
+ for i in data rnase toxd; do
+ docinto examples/${i}
+ dodoc "${S}"/examples/${i}/*
+ done
+
+ docinto examples/tutorial
+ dohtml -r "${S}"/examples/tutorial/html examples/tutorial/tut.css
+ for i in data results; do
+ docinto examples/tutorial/${i}
+ dodoc "${S}"/examples/tutorial/${i}/*
+ done
+
+ for i in non-runnable runnable; do
+ docinto examples/unix/${i}
+ dodoc "${S}"/examples/unix/${i}/*
+ done
+ fi
+ # Needed for ccp4i docs to work
+ dosym ../../share/doc/${PF}/examples /usr/$(get_libdir)/ccp4/examples || die
+ dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/ccp4/html || die
+
+ cat >> "${T}"/baubles <<- EOF
+ #!${EPREFIX}/bin/bash
+ exec "${EPYTHON}" "\${CCP4}/share/ccp4/smartie/baubles.py"
+ EOF
+
+ exeinto /usr/libexec/ccp4/bin/
+ doexe "${T}"/baubles || die
+}
+
+# Epatch wrapper for bulk patching
+ccp_patch() {
+ EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1}
+}
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-clipper-template.patch b/sci-chemistry/ccp4-apps/files/6.1.3-clipper-template.patch
new file mode 100644
index 000000000000..433a78dbd23b
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-clipper-template.patch
@@ -0,0 +1,70 @@
+--- src/clipper_progs/src/intensity_target.h.orig 2010-01-21 11:27:13.236795886 -0600
++++ src/clipper_progs/src/intensity_target.h 2010-01-21 11:31:33.450686927 -0600
+@@ -70,9 +70,31 @@
+ {
+ public:
+ //! constructor: takes the datalist against which to calc target
+- TargetFn_scaleLogI1I2( const HKL_data<T1>& hkl_data1_, const HKL_data<T2>& hkl_data2_ );
++ TargetFn_scaleLogI1I2( const HKL_data<T1>& hkl_data1_, const HKL_data<T2>& hkl_data2_ )
++ {
++ hkl_data1 = &hkl_data1_;
++ hkl_data2 = &hkl_data2_;
++ }
+ //! return the value and derivatives of the target function
+- Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& intensityh ) const;
++ Rderiv rderiv( const HKL_info::HKL_reference_index& ih, const ftype& intensityh ) const
++ {
++ Rderiv result;
++ result.r = result.dr = result.dr2 = 0.0;
++ const T1& it1 = (*hkl_data1)[ih];
++ const T2& it2 = (*hkl_data2)[ih];
++ if ( !it1.missing() && !it2.missing() )
++ if ( it1.I() > 1.0e-6 && it2.I() > 1.0e-6 ) {
++ const ftype eps = ih.hkl_class().epsilon();
++ const ftype i1 = it1.I() / eps;
++ const ftype i2 = it2.I() / eps;
++ const ftype w = sqrt( i1 * i2 );
++ const ftype d = intensityh + log(i1) - log(i2);
++ result.r = w * d * d;
++ result.dr = 2.0 * w * d;
++ result.dr2 = 2.0 * w;
++ }
++ return result;
++ }
+ //! the type of the function: optionally used to improve convergence
+ FNtype type() const { return QUADRATIC; }
+ private:
+@@ -109,33 +131,4 @@
+ return result;
+ }
+
+- // Log I1-I2 scaling
+-
+- template<class T1, class T2> TargetFn_scaleLogI1I2<T1,T2>::TargetFn_scaleLogI1I2( const HKL_data<T1>& hkl_data1_, const HKL_data<T2>& hkl_data2_ )
+- {
+- hkl_data1 = &hkl_data1_;
+- hkl_data2 = &hkl_data2_;
+- }
+-
+- template<class T1, class T2> TargetFn_base::Rderiv TargetFn_scaleLogI1I2<T1,T2>::rderiv( const HKL_info::HKL_reference_index& ih, const ftype& intensityh ) const
+- {
+- Rderiv result;
+- result.r = result.dr = result.dr2 = 0.0;
+- const T1& it1 = (*hkl_data1)[ih];
+- const T2& it2 = (*hkl_data2)[ih];
+- if ( !it1.missing() && !it2.missing() )
+- if ( it1.I() > 1.0e-6 && it2.I() > 1.0e-6 ) {
+- const ftype eps = ih.hkl_class().epsilon();
+- const ftype i1 = it1.I() / eps;
+- const ftype i2 = it2.I() / eps;
+- const ftype w = sqrt( i1 * i2 );
+- const ftype d = intensityh + log(i1) - log(i2);
+- result.r = w * d * d;
+- result.dr = 2.0 * w * d;
+- result.dr2 = 2.0 * w;
+- }
+- return result;
+- }
+-
+-
+ #endif
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-balbes.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-balbes.patch
new file mode 100644
index 000000000000..f1df3e5e19f9
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-balbes.patch
@@ -0,0 +1,14 @@
+diff --git a/share/Makefile.in b/share/Makefile.in
+index 2d4f20b..4500993 100755
+--- a/share/Makefile.in
++++ b/share/Makefile.in
+@@ -18,9 +18,6 @@ install :
+ for i in $(MRBUMP_TARGETS); do \
+ test -s $(MRBUMP_BINDIR)/$$i && $(INSTALL_PROGRAM) $(MRBUMP_BINDIR)/$$i $(bindir)/$$i || true ;\
+ done
+- for i in $(BALBES_TARGETS); do \
+- test -s $(BALBES_BINDIR)/$$i && $(INSTALL_PROGRAM) $(BALBES_BINDIR)/$$i $(bindir)/$$i || true ;\
+- done
+
+ clean : ; -rm -f core *.o *~ a.out
+
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-double-and-make-bindir.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-double-and-make-bindir.patch
new file mode 100644
index 000000000000..e62ae12adfbe
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-double-and-make-bindir.patch
@@ -0,0 +1,24 @@
+--- ccp4-6.1.1/x-windows/Makefile.in 2008-08-11 19:20:01.000000000 +0200
++++ ccp4-6.1.1/x-windows/Makefile.in.new 2009-02-27 14:32:25.000000000 +0100
+@@ -35,7 +35,7 @@
+ #
+ # all
+ #
+-all : xdlview libjwc_c libjwc_f rotgen_ hklview xjiffy rasmol2 ipmosflm
++all : rotgen_ hklview xjiffy
+ #
+ # xdl_view
+ #
+@@ -157,11 +157,10 @@
+ #
+ install_obj = hklview rotgen ipmosflm
+ install: all
++ mkdir -p $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/hklview $(bindir)
+ cd $(srcdir)/XCCPJIFFY ; $(MAKE) bindir=$(bindir) libdir=$(libdir) install
+- $(INSTALL_PROGRAM) $(rasmol_dir)/rasmol $(bindir)
+ cd $(rotgen_dir); $(MAKE) install
+- $(INSTALL_PROGRAM) $(mosflm_dir)/bin/ipmosflm $(bindir)
+ #
+ # clean
+ #
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-imosflm.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-imosflm.patch
new file mode 100644
index 000000000000..f645643e1c67
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-imosflm.patch
@@ -0,0 +1,11 @@
+--- ccp4i/Makefile.in 2009-06-19 15:08:53.000000000 +0200
++++ ccp4i/Makefile.in.new 2009-08-04 21:10:14.000000000 +0200
+@@ -9,7 +9,7 @@
+ SHELL = /bin/sh
+ DESTDIR = $(prefix)
+ CCP4I_BINDIR = $(top_srcdir)/ccp4i/bin
+-CCP4I_TARGETS = ccp4i imosflm loggraph crank mapslicer
++CCP4I_TARGETS = ccp4i loggraph crank mapslicer
+
+ install :
+ for i in $(CCP4I_TARGETS); do \
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-libs.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-libs.patch
new file mode 100644
index 000000000000..1d1323005540
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-libs.patch
@@ -0,0 +1,35 @@
+--- Makefile.in 2009-06-19 15:13:29.000000000 +0200
++++ Makefile.in.new 2009-08-02 23:06:41.000000000 +0200
+@@ -2,7 +2,7 @@
+ # $Id$
+
+ SHELL = /bin/sh
+-DIRS = $(fftwdir) $(clipperdir) $(diffimdir) $(lapackdir) $(ccifdir) lib/src $(ssmdir) src lib/data unsupported/src x-windows share ccp4i $(prereleasedir)
++DIRS = src lib/data unsupported/src x-windows share ccp4i $(prereleasedir)
+ # this is for the benefit of makes that don't pass variable values in
+ # recursive invocations, so that you can override these values on the
+ # command line at the top level
+@@ -69,19 +69,19 @@
+ $(MAKE) -i $(MFLAGS) $(MVARS) install; else true; fi ; \
+ $(MAKE) install
+
+-srcdir : FORCE libdir
++srcdir : FORCE
+ if test -d src; then cd src; $(MAKE) $(MFLAGS) $(MVARS); else true; fi
+
+ supported : srcdir
+
+-unsupported : FORCE libdir
++unsupported : FORCE
+ if test -d unsupported/src; then cd unsupported/src; \
+ $(MAKE) $(MFLAGS) $(MVARS); else true; fi
+
+-datadir : FORCE libdir
++datadir : FORCE
+ cd lib/data; $(MAKE) $(MFLAGS) $(MVARS)
+
+-xwindir : FORCE libdir
++xwindir : FORCE
+ if test -f x-windows/Makefile; then cd x-windows; \
+ $(MAKE) -i $(MFLAGS) ; else true; fi
+
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-molref.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-molref.patch
new file mode 100644
index 000000000000..f16b0ecb938c
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-molref.patch
@@ -0,0 +1,19 @@
+--- src/pisa/Makefile.am 2007-07-10 10:56:05.000000000 +0200
++++ src/pisa/Makefile.am.new 2009-06-11 21:16:51.000000000 +0200
+@@ -1,4 +1,4 @@
+-SUBDIRS = molref pisastore sbase
++SUBDIRS = pisastore sbase
+
+ pkgdatadir = $(datadir)/pisa
+
+--- src/pisa/Makefile.in 2009-06-12 21:12:08.000000000 +0200
++++ src/pisa/Makefile.in.new 2009-06-12 21:41:52.000000000 +0200
+@@ -82,7 +82,7 @@
+ am__quote = @am__quote@
+ install_sh = @install_sh@
+ pisa_LDFLAGS = @pisa_LDFLAGS@
+-SUBDIRS = molref pisastore sbase
++SUBDIRS = pisastore sbase
+
+ dist_pkgdata_DATA = pisa.cfg
+
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-scala.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-scala.patch
new file mode 100644
index 000000000000..af4fd8219c4f
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-scala.patch
@@ -0,0 +1,42 @@
+--- ./src/Makefile.in 2009-03-20 15:06:41.000000000 +0100
++++ ./src/Makefile.in.new 2009-07-31 23:46:13.000000000 +0200
+@@ -50,7 +50,7 @@
+
+ # these live in subdirectories and have more than one dependency:
+ OTHERS = rsps anglen secstr proclean pplot gfac2pdb tplot mplot probplot rmsdev nb \
+- scala dm dmmulti stereo mapmask maprot ncsmask \
++ dm dmmulti stereo mapmask maprot ncsmask \
+ sftools tlsanl tlsextract topp toplist dyndom sc combat mlphare fffear ffjoin \
+ anisoanl $(REFMACTARGETS) dtrek2scala crunch2 pmf doser mat2symop symop2mat
+
+@@ -637,7 +637,7 @@
+
+ ### scala, mapmask, maprot, ncsmask, combat
+
+-scala mapmask maprot ncsmask combat sc dyndom: # dependencies below
++mapmask maprot ncsmask combat sc dyndom: # dependencies below
+ @$(SETFLAGS) pwd=`pwd` ; rm -f $@; \
+ cd $(srcdir)/$@_; \
+ echo $(FC) $${$@_FLAGS-"$(FFLAGS)"} -c -o $$pwd/$@.o `pwd`/$@.f ;\
+@@ -1002,21 +1002,6 @@
+ proclean: $(srcdir)/procheck/clean.f $(srcdir)/procheck/brkcln.par
+ rmsdev: $(srcdir)/procheck/rmsdev.f $(srcdir)/procheck/rmsdev.inc
+
+-scaladir = $(srcdir)/scala_
+-scala : $(scaladir)/scala.f $(scaladir)/column.fh $(scaladir)/orient.fh \
+- $(scaladir)/params.fh $(scaladir)/rfile.fh $(scaladir)/scales.fh \
+- $(scaladir)/nbtchc.fh $(scaladir)/parameter.fh $(scaladir)/refcon.fh \
+- $(scaladir)/rundef.fh $(scaladir)/sdfacc.fh $(scaladir)/flags.fh \
+- $(scaladir)/inout.fh $(scaladir)/dump.fh $(scaladir)/tie.fh \
+- $(scaladir)/outcon.fh $(scaladir)/version.fh $(scaladir)/anomtc.fh \
+- $(scaladir)/axes.fh $(scaladir)/bigarg.fh \
+- $(scaladir)/errors.fh $(scaladir)/flow.fh $(scaladir)/glocon.fh \
+- $(scaladir)/means.fh $(scaladir)/refflg.fh $(scaladir)/stats.fh \
+- $(scaladir)/symmty.fh $(scaladir)/sharvest.fh $(scaladir)/chtml.fh \
+- $(scaladir)/htmbuf.fh $(scaladir)/sphhrm.fh $(scaladir)/crlncf.fh \
+- $(scaladir)/datasets.fh $(scaladir)/dts_storage.fh \
+- $(scaladir)/sclinimeans.fh $(scaladir)/timecor.fh
+-
+ freemask.o: $(dmdir)/freemask.f $(dmdir)/crystal.fh $(dmdir)/cycl.fh \
+ $(dmdir)/dmheader.fh $(dmdir)/io.fh $(dmdir)/output.fh \
+ $(dmdir)/params.fh $(dmdir)/uvwdata.fh
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-xia.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-xia.patch
new file mode 100644
index 000000000000..3af4af503fa6
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-build-xia.patch
@@ -0,0 +1,14 @@
+--- src/Makefile.in 2009-07-05 16:50:25.000000000 +0200
++++ src/Makefile.in.new 2009-07-05 19:38:06.000000000 +0200
+@@ -50,9 +50,9 @@
+
+ # these live in subdirectories and have more than one dependency:
+ OTHERS = rsps anglen secstr proclean pplot gfac2pdb tplot mplot probplot rmsdev nb \
+- scala dm dmmulti stereo mapmask maprot ncsmask chef \
++ scala dm dmmulti stereo mapmask maprot ncsmask \
+ sftools tlsanl tlsextract topp toplist dyndom sc combat mlphare fffear ffjoin \
+- anisoanl $(REFMACTARGETS) dtrek2scala crunch2 pmf doser mat2symop symop2mat
++ anisoanl $(REFMACTARGETS) dtrek2scala crunch2 pmf
+
+ # targets built from .c sources:
+ CSIMPLE = pltdev binsort
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-configure.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-configure.patch
new file mode 100644
index 000000000000..1e59578473ff
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-configure.patch
@@ -0,0 +1,111 @@
+--- configure 2009-08-07 12:11:28.000000000 +0200
++++ configure.new.nolib 2009-08-17 22:30:39.000000000 +0200
+@@ -3113,41 +3113,6 @@
+ RX_L="$configdir/lib/rxdispencer/rx"
+ export RX_H RX_L
+ fi
+- echo
+- echo "Running separate configure for CCIF library."
+- echo
+- cd lib/ccif
+- echo "Updating modification times for configuration files"
+- echo "Please wait..."
+- for i in configure.in aclocal.m4 configure Makefile.in; do
+- touch $i && sleep 1
+- done
+- echo "...done."
+-
+- if [ "X$LIBFOPTIM" != "X" ]; then
+- FOPTIM_save=$FOPTIM
+- FOPTIM=$LIBFOPTIM
+- FFLAGS="${FOPTIM} ${XFFLAGS}"
+- fi
+- if [ "X$LIBCOPTIM" != "X" ]; then
+- COPTIM_save=$COPTIM
+- COPTIM=$LIBCOPTIM
+- CFLAGS="${COPTIM} ${XCFLAGS}"
+- fi
+- ( touch /tmp/$$.cache_file 2>/dev/null && \
+- cat /dev/null > /tmp/$$.cache_file && \
+- ./configure $xopts --libdir=${libdir} --srcdir=${srcdir}/lib/ccif --cache-file=/tmp/$$.cache_file ) || \
+- ./configure $xopts --libdir=${libdir} --srcdir=${srcdir}/lib/ccif
+- rm -f /tmp/$$.cache_file
+- if [ "X$LIBFOPTIM" != "X" ]; then
+- FOPTIM=$FOPTIM_save
+- FFLAGS="${FOPTIM} ${XFFLAGS}"
+- fi
+- if [ "X$LIBCOPTIM" != "X" ]; then
+- COPTIM=$COPTIM_save
+- CFLAGS="${COPTIM} ${XCFLAGS}"
+- fi
+- cd ../..
+ echo
+ echo "Returning to main configure."
+ echo
+@@ -5094,53 +5059,6 @@
+ echo "configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}"
+ ./configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}
+ echo
+- echo "CCP4 configure: Running separate configure for libjwc_c library."
+- echo
+- cd ${srcdir}/${xwindir}/libjwc/libjwc_c
+- echo "Updating modification times for configuration files in libjwc_c"
+- echo "Please wait..."
+- for i in configure.in Makefile.am aclocal.m4 configure Makefile.in ltconfig ltmain.sh; do
+- touch $i && sleep 1
+- done
+- echo "...done."
+- echo
+- echo "configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}"
+- ( touch /tmp/$$.cache_file 2>/dev/null && \
+- cat /dev/null > /tmp/$$.cache_file && \
+- ./configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \
+- ./configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}
+- rm -f /tmp/$$.cache_file
+- echo
+- echo "CCP4 configure: Running separate configure for libjwc_f library."
+- echo
+- cd ${srcdir}/${xwindir}/libjwc/libjwc_f
+- # for g77 3.1 some builds do not have no-common for system libs,
+- # so disable for now
+- echo "Updating modification times for configuration files in libjwc_f"
+- echo "Please wait..."
+- for i in configure.in Makefile.am aclocal.m4 configure Makefile.in ltconfig ltmain.sh; do
+- touch $i && sleep 1
+- done
+- echo "...done."
+- echo
+- # for g77 3.1 some builds do not have no-common for system libs,
+- # so disable for now
+- case $system in
+- Darwin* )
+- echo "configure --disable-shared --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}"
+- ( touch /tmp/$$.cache_file 2>/dev/null && \
+- cat /dev/null > /tmp/$$.cache_file && \
+- ./configure --disable-shared --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \
+- ./configure --disable-shared --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}
+- ;;
+- * )
+- echo "configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}"
+- ( touch /tmp/$$.cache_file 2>/dev/null && \
+- cat /dev/null > /tmp/$$.cache_file && \
+- ./configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \
+- ./configure $xopts --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}
+- esac
+- rm -f /tmp/$$.cache_file
+
+ if test "$non_shared" = yes; then
+ #this is a bit of a cheat/fudge but that's life!
+@@ -5210,12 +5128,6 @@
+ fi
+
+ echo
+- echo "CCP4 configure: Running separate configure for Mosflm"
+- echo
+- cd ${srcdir}/${mosflmdir}
+- echo "configure $xopts --with-ccp4-prefix=${prefix} --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}"
+- ./configure $xopts --with-ccp4-prefix=${prefix} --exec_prefix=${prefix} --prefix=${prefix} --bindir=${bindir} --libdir=${libdir}
+- echo
+ cd ../..
+ echo "Returning to main configure."
+ echo
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-dont-make-dirs-in-configure.patch b/sci-chemistry/ccp4-apps/files/6.1.3-dont-make-dirs-in-configure.patch
new file mode 100644
index 000000000000..583697cea0a1
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-dont-make-dirs-in-configure.patch
@@ -0,0 +1,87 @@
+--- ccp4-6.0.99e.orig/configure 2008-07-31 10:37:22.000000000 -0700
++++ ccp4-6.0.99e/configure 2008-07-31 10:39:18.000000000 -0700
+@@ -643,45 +643,45 @@
+ # echo "! Beware -- the $system installation isn't properly tested." ; }
+ syswarn='echo; echo "! Beware -- the $system installation is not properly tested."'
+
+-if test -z "$onlylibs" ; then
+- for i in CCP4_SCR BINSORT_SCR; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the value of $i."
+- badvar=1
+- fi
+- done
+-
+- for i in libdir bindir includedir; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the argument of --$i."
+- badvar=1
+- fi
+- done
+-
+- for i in $dotsrc $dotunsupp $dotunsuppsrc $dotdeprec $dotdeprecsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
+- if test -d $i || mkdir $i; then :
+- else
+- eval echo "! No directory $i and can\'t create it."
+- badvar=1
+- fi
+- done
+-else
+- # Kludge to fool the "Makefile" target in the top-level CCP4
+- # Makefile into not trying to remake src/Makefile.in
+- for i in $srcdir/src $srcdir/lib/src ; do
+- if test -d $i || mkdir $i; then
+- if ! test -f $i/Makefile.in ; then
+- echo
+- echo "onlylibs: making dummy file $i/Makefile.in"
+- touch $i/Makefile.in
+- fi
+- fi
+- done
+-fi
++#if test -z "$onlylibs" ; then
++# for i in CCP4_SCR BINSORT_SCR; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the value of $i."
++# badvar=1
++# fi
++# done
++#
++# for i in libdir bindir includedir; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the argument of --$i."
++# badvar=1
++# fi
++# done
++#
++# for i in $dotsrc $dotunsupp $dotunsuppsrc $dotdeprec $dotdeprecsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
++# if test -d $i || mkdir $i; then :
++# else
++# eval echo "! No directory $i and can\'t create it."
++# badvar=1
++# fi
++# done
++#else
++# # Kludge to fool the "Makefile" target in the top-level CCP4
++# # Makefile into not trying to remake src/Makefile.in
++# for i in $srcdir/src $srcdir/lib/src ; do
++# if test -d $i || mkdir $i; then
++# if ! test -f $i/Makefile.in ; then
++# echo
++# echo "onlylibs: making dummy file $i/Makefile.in"
++# touch $i/Makefile.in
++# fi
++# fi
++# done
++#fi
+
+ ### sanity checks
+
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-impl-dec.patch b/sci-chemistry/ccp4-apps/files/6.1.3-impl-dec.patch
new file mode 100644
index 000000000000..db8236063043
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-impl-dec.patch
@@ -0,0 +1,152 @@
+diff --git a/lib/DiffractionImage/Bruker/FRM_LIB.c b/lib/DiffractionImage/Bruker/FRM_LIB.c
+index bfda882..f821e04 100755
+--- a/lib/DiffractionImage/Bruker/FRM_LIB.c
++++ b/lib/DiffractionImage/Bruker/FRM_LIB.c
+@@ -38,6 +38,8 @@ FRM_LIB: Routines for reading, writing, and handling frame files.
+ #include "sys/types.h" /* _open, etc. */
+ #include "sys/stat.h" /* _open, etc. */
+
++#include <unistd.h>
++
+ #ifndef _MSC_VER
+ int min(int a, int b)
+ {
+diff --git a/lib/DiffractionImage/MAR/mar300_header.c b/lib/DiffractionImage/MAR/mar300_header.c
+index 1a933de..1c40c32 100755
+--- a/lib/DiffractionImage/MAR/mar300_header.c
++++ b/lib/DiffractionImage/MAR/mar300_header.c
+@@ -23,6 +23,9 @@
+ */
+ #include "mar300_header.h"
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ /*
+ * Local functions
+ */
+diff --git a/lib/DiffractionImage/MAR/mar345_header.c b/lib/DiffractionImage/MAR/mar345_header.c
+index a8351ea..16d0f7b 100755
+--- a/lib/DiffractionImage/MAR/mar345_header.c
++++ b/lib/DiffractionImage/MAR/mar345_header.c
+@@ -32,6 +32,9 @@
+ */
+ #include "mar345_header.h"
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ /*
+ * Definitions
+ */
+diff --git a/lib/DiffractionImage/MAR/nb_header.c b/lib/DiffractionImage/MAR/nb_header.c
+index 07f2741..6364ca4 100755
+--- a/lib/DiffractionImage/MAR/nb_header.c
++++ b/lib/DiffractionImage/MAR/nb_header.c
+@@ -20,6 +20,8 @@
+ #include <io.h>
+ #endif
+
++#include <sys/types.h>
++#include <unistd.h>
+ /*
+ * mar software include files
+ */
+diff --git a/lib/DiffractionImage/MAR/swap.c b/lib/DiffractionImage/MAR/swap.c
+index 443bb8c..0d96b3f 100755
+--- a/lib/DiffractionImage/MAR/swap.c
++++ b/lib/DiffractionImage/MAR/swap.c
+@@ -10,6 +10,9 @@
+ *
+ **********************************************************************/
+
++#define _XOPEN_SOURCE
++#include <unistd.h>
++
+ void swaplong();
+ void swapshort();
+
+diff --git a/lib/ccif/f_interface.c b/lib/ccif/f_interface.c
+index 0f6a6b7..a09dc48 100755
+--- a/lib/ccif/f_interface.c
++++ b/lib/ccif/f_interface.c
+@@ -25,6 +25,7 @@
+ ********************************************************************/
+
+ #include "stdpccts.h"
++#include <sys/mman.h>
+
+ /* This file is terribly organised, and badly needs re-doing. There is probably
+ * scope for splitting this into three modules:
+diff --git a/lib/src/ccp4_general_f.c b/lib/src/ccp4_general_f.c
+index 8b5d04f..74ee3f7 100755
+--- a/lib/src/ccp4_general_f.c
++++ b/lib/src/ccp4_general_f.c
+@@ -26,6 +26,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <time.h>
+ #include "ccp4_errno.h"
+ #include "ccp4_fortran.h"
+ #include "ccp4_parser.h"
+diff --git a/lib/src/ccp4_program.c b/lib/src/ccp4_program.c
+index 3e83d4d..bb3e975 100755
+--- a/lib/src/ccp4_program.c
++++ b/lib/src/ccp4_program.c
+@@ -25,6 +25,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+ #include "ccp4_program.h"
+ #include "ccp4_parser.h"
+ #include "ccp4_utils.h"
+diff --git a/lib/src/fsplit.c b/lib/src/fsplit.c
+index ee8af24..c6fb3cd 100755
+--- a/lib/src/fsplit.c
++++ b/lib/src/fsplit.c
+@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)fsplit.c 5.5 (Berkeley) 3/12/91";
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+
+ /*
+ * usage: fsplit [-e efile] ... [file]
+diff --git a/src/clipper_progs/src/pirate/compress42.c b/src/clipper_progs/src/pirate/compress42.c
+index ea52e96..30dbd56 100755
+--- a/src/clipper_progs/src/pirate/compress42.c
++++ b/src/clipper_progs/src/pirate/compress42.c
+@@ -142,6 +142,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
++#include <unistd.h>
+
+ #ifdef DIRENT
+ # include <dirent.h>
+diff --git a/src/mtz2cif_/mtz2cif.c b/src/mtz2cif_/mtz2cif.c
+index e224430..c7b82f4 100755
+--- a/src/mtz2cif_/mtz2cif.c
++++ b/src/mtz2cif_/mtz2cif.c
+@@ -28,6 +28,7 @@
+ #include "cmtzlib.h"
+ #include "ccp4_parser.h"
+ #include "ccp4_general.h"
++#include "ccp4_program.h"
+ #include "csymlib.h"
+ #include "mtz2cif_lib.h"
+
+diff --git a/x-windows/XCCPJIFFY/xplot84driver.c b/x-windows/XCCPJIFFY/xplot84driver.c
+index 67e0bf1..76526ab 100755
+--- a/x-windows/XCCPJIFFY/xplot84driver.c
++++ b/x-windows/XCCPJIFFY/xplot84driver.c
+@@ -11,6 +11,7 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
++#include <stdlib.h>
+
+ #include <X11/StringDefs.h>
+ #include <X11/Intrinsic.h>
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-lapack.patch b/sci-chemistry/ccp4-apps/files/6.1.3-lapack.patch
new file mode 100644
index 000000000000..62892db01147
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-lapack.patch
@@ -0,0 +1,597 @@
+diff --git a/configure b/configure
+index 833f483..bcfa62d 100755
+--- a/configure
++++ b/configure
+@@ -3226,574 +3226,14 @@ else
+ echo
+ echo "Warning: this option has not been extensively tested!"
+ echo "Please report problems to ccp4@ccp4.ac.uk"
+- # Search for vendor LAPACK/BLAS first
+- if test ! "$with_netlib_lapack" ; then
+- # Initialise variables to blank
+- lapackdir=
+- XLAPACK_LIB=
+- # Possible directories to check for vendor or pre-existing LAPACK or
+- # BLAS - add to these if you want to test others
+- trydirs="`echo $LD_LIBRARY_PATH |sed -e s/:/\ /g` /lib /usr/lib /usr/local/lib"
+- # Possible library names
+- # These are the names like xxxx where the library will be libxxxx.a
+- # or libxxxx.so
+- echo
+- echo "Guessing names for native/vendor LAPACK and/or BLAS libraries"
+- echo "on this system"
+- case $system in
+- linux | linux64 | linux32 )
+- # linux users will usually have them in /usr/lib but don't call it
+- trylapack="lapack"
+- tryblas="blas"
+- # if code is non_shared then this can lead to problems. both blas and lapack
+- # need to be resolved even if they are not called!
+- if test "$non_shared" = yes; then
+- echo "You are compiling linux non_shared. This sometimes causes problems "
+- echo " so checking for requirements."
+- echo "Checking: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+- PROGRAM TESTLINK
+-C A bit of scala code to test the linking
+- real bf(3), bnorm
+-c
+- integer maxbmt
+- parameter (maxbmt = 2)
+- double precision B(maxbmt,maxbmt), eigval(maxbmt),
+- $ eigvec(maxbmt,maxbmt), w(5*maxbmt)
+- integer m, ia, ix, istat
+-c
+- B(1,1) = 1.00
+- B(1,2) = 1.00
+- B(2,1) = 1.00
+- B(2,2) = 1.00
+-c
+- m = maxbmt
+- ia = maxbmt
+- ix = maxbmt
+- call dsyev('N', 'L', m, B, ia, eigval, w, 5*maxbmt, istat)
+- end
+-EOF
+- #firstly test without -lblas
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack"
+- echo $test_compile
+- if { (eval $test_compile >& /dev/null ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "... only -llapack needed"
+- XLAPACK_LIB="-llapack"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="lapack"
+- noblas=yes
+- trylapack=
+- tryblas=
+- else
+- echo "more than just -llapack needed...."
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas"
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "...-llapack and -lblas were needed"
+- XLAPACK_LIB="-llapack -lblas"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="lapack blas"
+- noblas=no
+- trylapack=
+- tryblas=
+- else
+- echo "....could not find either lapack or blas."
+- fi
+- fi
+- fi
+- # add 64 bit libs
+- case $system in
+- linux64 ) trydirs="/usr/lib64 ${trydirs}" ;;
+- esac
+-
+- ;;
+- osf1)
+- # OSF1 has dxml (old version) and cxml
+- # which should have both lapack and blas
+- trylapack="dxml cxml"
+- tryblas=
+- trydirs="${trydirs} /usr/shlib"
+- ;;
+- irix)
+- # Additional search paths for IRIX
+- trydirs="${trydirs} /usr/lib32"
+- # SCSL should have both LAPACK and BLAS
+- trylapack="scs"
+- tryblas="blas"
+- ;;
+- irix64)
+- # Additional search paths for IRIX64
+- trydirs="${trydirs} /usr/lib64"
+- # SCSL should have both LAPACK and BLAS
+- trylapack="scs"
+- tryblas="blas"
+- # Extra compiler flags?
+- #XLAPACKFLAGS="-OPT:IEEE_NaN_inf=ON"
+- ;;
+- aix)
+- # Additional search paths for AIX
+- trydirs="${trydirs}"
+- # AIX might have ESSL library - blas only I think
+- trylapack=
+- tryblas="essl"
+- ;;
+- hpux)
+- # Additional search paths for HPUX
+- trydirs="${trydirs} /opt/fortran/lib /opt/fortran/lib/pa2.0 /opt/mlib/lib/pa2.0"
+- # HPUX should have both LAPACK (part of mlib) and BLAS
+- trylapack="lapack"
+- tryblas="blas"
+- # Extra compiler flags?
+- # +U77 required for ETIME function - this is already in XFFLAGS
+- #XLAPACKFLAGS="+U77"
+- ;;
+-
+- sunos | sunos64)
+- # Sun has libraries with BLAS and LAPACK invoked using
+- # -xlic_lib=sunperf
+- trylapack=
+- tryblas=
+- echo "SunOs can use the Sun Performance Library (if installed)"
+- echo "which has both BLAS and LAPACK 3.0"
+- echo
+- echo "Looking for a valid library to use..."
+- echo
+- # Loop over the possible library names
+- try_libs="sunperf"
+- for testlib in $try_libs
+- do
+- if test ! "$XLAPACK_LIB" ; then
+- # Try running a test compile to see if this a valid library
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -dalign -xlic_lib=$testlib"
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "... -xlic_lib=$testlib is okay"
+- XLAPACK_LIB="-dalign -xlic_lib=$testlib"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="$testlib"
+- noblas=yes
+- else
+- # Compilation failed
+- echo "... cannot use -xlic_lib=$testlib"
+- fi
+- # End of test for testlib
+- fi
+- # End of loop over possible lib names
+- done
+- # Report if no suitable library was found
+- if test ! "$XLAPACK_LIB" ; then
+- echo
+- echo "No suitable LAPACK library was found."
+- echo "This may be because the Sun Performance Library is not"
+- echo "installed on your system"
+- echo "Contact your system administrator or Sun vendor"
+- fi
+- ;;
+- Darwin | Darwin32 | Darwin64 )
+- # Darwin has libraries with BLAS and LAPACK invoked using
+- # -framework vecLib
+- echo "Darwin can use the vecLib Library (if installed)"
+- echo "which has both BLAS and LAPACK 3.0"
+- echo
+- # This is a special case so try running a test compile
+- echo "Checking: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -framework vecLib"
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "... -framework vecLib is okay"
+- XLAPACK_LIB="-framework vecLib"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="vecLib"
+- noblas=yes
+- else
+-#alternative linking for vecLib libraries
+- case `uname -sr` in
+- *Darwin\ 7.* ) test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -lcc_dynamic -Wl,-framework -Wl,vecLib" ;;
+- * ) test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -Wl,-framework -Wl,vecLib" ;;
+- esac
+-
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "... -framework vecLib is okay"
+- XLAPACK_LIB="-Wl,-framework -Wl,vecLib"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="-Wl,-framework -Wl,vecLib"
+- noblas=yes
+- else
+- # Compilation failed
+- echo "... cannot use -framework vecLib"
+- echo
+- fi
+- fi
+- trylapack=
+- tryblas=
+-# try the fink installation
+- trydirs="${trydirs} /sw"
+- ;;
+- Darwin_ibm_compilers )
+- # Darwin has libraries with BLAS and LAPACK invoked using
+- # -framework vecLib
+- echo "Darwin can use the vecLib Library (if installed)"
+- echo "which has both BLAS and LAPACK 3.0"
+- echo
+- # This is a special case so try running a test compile
+- echo "Checking: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- case `uname -sr` in
+- Darwin\ 8* )
+- XLAPACK_LIB="-L/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A -lLAPACK -lBLAS"
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f $XLAPACK_LIB"
+- ;;
+- Darwin\ 7* )
+- XLAPACK_LIB="-L/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A -lLAPACK -lBLAS"
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -lcc_dynamic $XLAPACK_LIB"
+- ;;
+- *)
+- XLAPACK_LIB="/System/Library/Frameworks/vecLib.Framework/Versions/Current/VecLib"
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f $XLAPACK_LIB"
+- esac
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- echo "... -framework vecLib is okay"
+- # Set the next two variables so that configure
+- # doesn't try to build netlib libraries
+- LAPACKLIB="vecLib"
+- noblas=yes
+- else
+- # Compilation failed
+- XLAPACK_LIB=""
+- echo "... cannot use -framework vecLib"
+- echo
+- fi
+- trylapack=
+- tryblas=
+-# try the fink installation
+- trydirs="${trydirs} /sw"
+- ;;
+-
+- Darwin_intel_compilers)
+- # Darwin has libraries with BLAS and LAPACK invoked using
+- # -F vecLib
+- echo "Darwin can use the vecLib Library (if installed)"
+- echo "which has both BLAS and LAPACK 3.0"
+- echo
+- # This is a special case so try running a test compile
+- echo "Checking: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -Wl,-framework -Wl,vecLib"
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- # Compilation was okay
+- # doesn't try to build netlib libraries
+- XLAPACK_LIB="-F /System/Library/Frameworks -Qoption,ld,-framework -Qoption,ld,vecLib"
+- LAPACKLIB="vecLib"
+- noblas=yes
+- else
+- # Compilation failed
+- echo "... cannot use -framework vecLib"
+- echo
+- fi
+- trylapack=
+- tryblas=
+-# try the fink installation
+- trydirs="${trydirs} /sw"
+- ;;
+-
+-# linux_ia64_sgi_altix)
+-# SGI Japan
+- ia64_linux_intel)
+- # Additional search paths for Linux/IA64
+- trydirs="${trydirs} /opt/scsl/lib /usr/lib /usr/local/lib"
+- # SCSL and MKL should have both LAPACK and BLAS
+- trylapack="mkl_lapack scs lapack"
+- tryblas="mkl scs blas"
+- ;;
+- linux_ibm_compilers )
+- trylapack="lapack"
+- tryblas="blas"
+- ;;
+- linux64_ibm_compilers )
+- trydirs="/usr/lib64 ${trydirs}"
+- trylapack="lapack"
+- tryblas="blas"
+- ;;
+- linux_intel_compilers )
+- trydirs="/usr/lib64 ${trydirs}"
+- trylapack="mkl_lapack lapack"
+- tryblas="mkl blas"
+- ;;
+- *)
+- echo "The guesses for this system may not be correct - please"
+- echo "e-mail ccp4@ccp4.ac.uk if you have any extra information"
+- echo
+- # Default guess is just libblas
+- trylapack="lapack"
+- tryblas="blas"
+- ;;
+- esac
+- #
+- # Search for LAPACK libraries
+- #
+- # Write out what the guesses are
+- if test "$trylapack" ; then
+- echo "Possible LAPACK library names for this system:"
+- for libname in $trylapack
+- do
+- echo " lib$libname"
+- done
+- # Possible library name extensions
+- tryexts="a so dylib"
+- # Now loop over all the possibilities and see if anything
+- # turns up
+- echo
+- echo "Searching for libraries with LAPACK and BLAS:"
+- for testdir in $trydirs
+- do
+- for testlib in $trylapack
+- do
+- for ext in $tryexts
+- do
+- if test ! "$LAPACKLIB"; then
+- if test -s "$testdir/lib$testlib.$ext" ; then
+- echo "...found LAPACK library: $testdir/lib$testlib.$ext"
+- # Now try and link to a test program
+- # This is really for IRIX where libraries can be
+- # o32 or n32
+- echo " Testing: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
+- echo $test_compile
+- if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+- have_lapack=yes
+- else
+-# cover clapack option
+- echo $test_ccompile
+- if { (eval $test_ccompile ) 2>&1; } && test -s testlink ; then
+- have_lapack=yes
+- fi
+- fi
+- if test x$have_lapack = xyes ; then
+- # This one is okay
+- LAPACKLIB="$testlib"
+- LAPACKDIR="$testdir"
+- echo "Link ok - using lib$LAPACKLIB from $LAPACKDIR"
+- #
+- XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB"
+- #
+- # Test to see if we need BLAS too
+- # Do this by trying to compile a test program
+- # Use the LSAME test for now
+- echo
+- echo " * Checking whether we need a separate BLAS library *"
+- echo " Testing: try linking library against test program"
+- cd lib/lapack/test
+- if test -f testlsame ; then
+- rm -f testsame testlsame.o
+- fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS"
+- echo $test_compile
+- if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
+- have_blas=yes
+- else
+-#cblas route
+- echo $test_ccompile
+- if { ( eval $test_ccompile) 2>&1;} && test -s testlsame ; then
+- have_blas=yes
+- fi
+- fi
+- if test x$have_blas = xyes ; then
+- echo "Test program okay - additional separate BLAS not required"
+- noblas=yes
+- else
+- echo "Test program failed - need a separate BLAS library"
+- fi
+- cd ../../..
+- else
+- # Keep looking
+- echo " link failed - cannot use lib$testlib"
+- fi
+- fi
+- fi
+- done
+- done
+- if test ! "$LAPACKLIB"; then
+- echo "...nothing in $testdir"
+- fi
+- done
+- fi
+-
+- # If LAPACKLIB hasn't been set at this point then no LAPACK library
+- # was found
+- if test ! "$LAPACKLIB" ; then
+- echo
+- echo "No pre-existing LAPACK library found - NetLib LAPACK will be built instead"
+- make_lapack=lapacklib
+- fi
+- # Look for possible BLAS
+- if test ! "$noblas" ; then
+- if test "$tryblas" ; then
+- echo
+- echo "Possible BLAS library names for this system:"
+- for libname in $tryblas
+- do
+- echo " lib$libname"
+- done
+- # Possible library name extensions
+- tryexts="a so"
+- # Now loop over all the possibilities and see if anything
+- # turns up
+- echo
+- echo "Searching for libraries with BLAS:"
+- for testdir in $trydirs
+- do
+- for testlib in $tryblas
+- do
+- for ext in $tryexts
+- do
+- if test ! "$BLASLIB"; then
+- if test -s "$testdir/lib$testlib.$ext" ; then
+- echo "...found BLAS library: $testdir/lib$testlib.$ext"
+- # Now try and link to a test program
+- # This is really for IRIX where libraries can be
+- # o32 or n32
+- echo " Testing: try to link library against test program"
+- if test -f testlink.f || test -f testlink ; then
+- rm -f testlink*
+- fi
+- cat > testlink.f <<EOF
+-c Test fortran program to link against library
+- PROGRAM TESTLINK
+- IMPLICIT NONE
+- INTEGER A
+- A = 1
+- STOP
+- END
+-EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
+- echo $test_compile
+- if { ( eval $test_compile) 2>&1;} && test -s testlink ; then
+- have_blas=yes
+- else
+- echo $test_ccompile
+- if { ( eval $test_compile) 2>&1;} && test -s testlink ; then
+- have_blas=yes
+- fi
+- fi
+- if test x$have_blas = xyes ; then
+- # This one is okay
+- BLASLIB="$testlib"
+- BLASDIR="$testdir"
+- BLASEXT="$ext"
+- echo "Link ok - using lib$BLASLIB from $BLASDIR"
+- XLAPACK_LIB="$XLAPACK_LIB -L$BLASDIR -l$BLASLIB"
+- else
+- # Keep looking
+- echo " link failed - cannot use lib$testlib"
+- fi
+- fi
+- fi
+- done
+- done
+- if test ! "$BLASLIB"; then
+- echo "...nothing in $testdir"
+- fi
+- done
+- fi
+- # Do we need to build BLAS too?
+- if test ! "$BLASLIB" ; then
+- echo
+- echo "No pre-existing BLAS library was found - NetLib BLAS will be built instead"
+- echo "This may result in poorer performance of the LAPACK routines"
+- make_blas=blaslib
+- BLASLIB=blas
+- BLASDIR="$srcdir/lib/lapack"
+- BLASEXT="a"
+- fi
+- fi
++ # gentoo is clever
++ make_blas=
++ make_lapack=
++ BLASLIB=$(${PKG_CONFIG} --libs blas)
++ LAPACKLIB=$(${PKG_CONFIG} --libs lapack)
++ XLAPACK_LIB="${BLASLIB} ${LAPACKLIB}"
++ XFFLAGS_LAPACK="$(${PKG_CONFIG} --cflags lapack blas)"
+ # Otherwise force building of NetLib BLAS and LAPACK libs
+- else
+- echo
+- echo "! Force building of NetLib BLAS and LAPACK..."
+- make_blas=blaslib
+- make_lapack=lapacklib
+- BLASLIB=blas
+- BLASDIR="$srcdir/lib/lapack"
+- BLASEXT="a"
+- fi
+ # need to know if we the lapack library was linked using the C or
+ # fortran linker
+ if test -f testlink.f || test -f testlink || test -f testlink.c ; then
+@@ -3916,8 +3356,8 @@ RANLIB = ${RANLIB}
+ INSTALL_DATA = ${INSTALL_DATA}
+ libdir = $libdir
+ #
+-BLASLIB = lib${BLASLIB}.${BLASEXT}
+-LAPACKLIB = liblapack.a
++BLASLIB = ${BLASLIB}
++LAPACKLIB = ${LAPACKLIB}
+ #
+ # These variables define targets in the main Makefile
+ blaslib = ${make_blas}
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-pisa.patch b/sci-chemistry/ccp4-apps/files/6.1.3-pisa.patch
new file mode 100644
index 000000000000..9d8fefe965e5
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-pisa.patch
@@ -0,0 +1,23 @@
+diff --git a/src/pisa/sbase/Makefile.am b/src/pisa/sbase/Makefile.am
+index 053e83a..4ff3394 100755
+--- a/src/pisa/sbase/Makefile.am
++++ b/src/pisa/sbase/Makefile.am
+@@ -1,4 +1,4 @@
+-pkgdatadir = $(datadir)/sbase
++pkgdatadir = $(datadir)/pisa/sbase
+ dist_pkgdata_DATA = \
+ graph.sbase index.sbase struct.sbase
+
+diff --git a/src/pisa/sbase/Makefile.in b/src/pisa/sbase/Makefile.in
+index faa3f7f..8630bd7 100755
+--- a/src/pisa/sbase/Makefile.in
++++ b/src/pisa/sbase/Makefile.in
+@@ -62,7 +62,7 @@ POST_UNINSTALL = :
+ EXEEXT = @EXEEXT@
+ OBJEXT = @OBJEXT@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+-pkgdatadir = $(datadir)/sbase
++pkgdatadir = $(datadir)/pisa/sbase
+ AMTAR = @AMTAR@
+ AR_FLAGS = @AR_FLAGS@
+ AWK = @AWK@
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-pythonpath.patch b/sci-chemistry/ccp4-apps/files/6.1.3-pythonpath.patch
new file mode 100644
index 000000000000..7a012be6ef02
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-pythonpath.patch
@@ -0,0 +1,65 @@
+diff --git a/ccp4-6.1.2/include/ccp4.setup-bash b/ccp4-6.1.2/include/ccp4.setup-bash
+index 9848101..cea8ae6 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-bash
++++ b/ccp4-6.1.2/include/ccp4.setup-bash
+@@ -188,9 +188,9 @@ fi
+ #Python path for the subprocess fixed module
+
+ if [ $ccp4_first_in_path -eq 1 ]; then
+- setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
++ setenv PYTHONPATH ${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
++ setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ fi
+
+ ### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+diff --git a/ccp4-6.1.2/include/ccp4.setup-csh b/ccp4-6.1.2/include/ccp4.setup-csh
+index 42f0820..93c2cf3 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-csh
++++ b/ccp4-6.1.2/include/ccp4.setup-csh
+@@ -180,9 +180,9 @@ endif
+ #Python path for the subprocess fixed module
+ if (${?PYTHONPATH}) then
+ if ($ccp4_first_in_path) then
+- setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
++ setenv PYTHONPATH ${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
++ setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ endif
+ else
+ setenv PYTHONPATH ${CCP4}/share/python
+diff --git a/ccp4-6.1.2/include/ccp4.setup-sh b/ccp4-6.1.2/include/ccp4.setup-sh
+index 4396ebf..a0455bd 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-sh
++++ b/ccp4-6.1.2/include/ccp4.setup-sh
+@@ -228,9 +228,9 @@ test -r $CCP4/include/ccp4.msg && cat $CCP4/include/ccp4.msg
+ #Python path for the subprocess fixed module
+
+ if test $ccp4_first_in_path -eq 1; then
+- export PYTHONPATH=${CCP4}/share/python:${PYTHONPATH}
++ export PYTHONPATH=${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ else
+- export PYTHONPATH=${PYTHONPATH}:${CCP4}/share/python
++ export PYTHONPATH=${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ fi
+
+ ################### THE REST SHOULDN'T NEED EDITING #####################
+diff --git a/ccp4-6.1.2/include/ccp4.setup-zsh b/ccp4-6.1.2/include/ccp4.setup-zsh
+index 0e5c2ce..53523f3 100755
+--- a/ccp4-6.1.2/include/ccp4.setup-zsh
++++ b/ccp4-6.1.2/include/ccp4.setup-zsh
+@@ -157,10 +157,10 @@ export CLASSPATH
+ #Python path for the subprocess fixed module
+
+ if ($ccp4_first_in_path) then
+- PYTHONPATH=${CCP4}/share/python:${PYTHONPATH}
++ PYTHONPATH=${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python:${PYTHONPATH}
+ export PYTHONPATH
+ else
+- PYTHONPATH=${PYTHONPATH}:${CCP4}/share/python
++ PYTHONPATH=${PYTHONPATH}:${CCP4}/share/ccp4/smartie:${CCP4I_TOP}/python
+ export PYTHONPATH
+ fi
+
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-rename-rapper-ng.patch b/sci-chemistry/ccp4-apps/files/6.1.3-rename-rapper-ng.patch
new file mode 100644
index 000000000000..a5144cfa5d33
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-rename-rapper-ng.patch
@@ -0,0 +1,60 @@
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 70781f3..b2dcc25 100755
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -760,7 +760,7 @@ chainsawobjs = chainsaw.o
+ pdbcur : $(pdbcurobjs)
+ @$(SETFLAGS) ; rm -f pdbcur; eval $(CXX) $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -o pdbcur $(pdbcurobjs) $(LDCXXFLAGS)
+ ncont : $(ncontobjs)
+- @$(SETFLAGS) ; rm -f ncont; eval $(CXX) $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -o ncont $(ncontobjs) $(LDCXXFLAGS)
++ @$(SETFLAGS) ; rm -f ncont; eval $(CXX) $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -o ncont $(ncontobjs) $(LDCXXFLAGS) -lmmdb
+ coord_format : $(coord_formatobjs)
+ @$(SETFLAGS) xxx=1 ; \
+ rm -f coord_format; \
+diff --git a/src/rapper/LOOP/Makefile.am b/src/rapper/LOOP/Makefile.am
+index 85f212e..2608c6d 100755
+--- a/src/rapper/LOOP/Makefile.am
++++ b/src/rapper/LOOP/Makefile.am
+@@ -15,12 +15,12 @@ params.cpp typed_value.cpp misc.cpp residue.cpp atom.cpp psa.cpp edm_sidechains.
+ hash_table.cpp surface.cpp parse.cpp band.cpp edensity.cpp read_map.cpp iterator.cpp \
+ residue_range.cpp pop_search_frags.cpp saxs.cpp lib_choral.cpp pdf.cpp WeightedDistribMean.cpp
+
+-rapper_LDADD = ../gc7.0/libgc.la ../libxml2/libxml2.la
++rapper_LDADD = @GC_LIBS@ @LIBXML_LIBS@
+
+ pkgdatadir = $(datadir)/rapper
+ dist_pkgdata_DATA = params.xml
+
+-INCLUDES = -I. -I../gc7.0/include -I../libxml2/include
++INCLUDES = -I. @LIBXML_CFLAGS@ @GC_CFLAGS@
+ #SUBDIRS = \
+ #@PYTHON_USE_TRUE@ python
+
+diff --git a/src/rapper/Makefile.am b/src/rapper/Makefile.am
+index e78b10d..486b931 100755
+--- a/src/rapper/Makefile.am
++++ b/src/rapper/Makefile.am
+@@ -1,3 +1,3 @@
+-SUBDIRS = libxml2 gc7.0 LOOP data
++SUBDIRS = LOOP data
+
+ EXTRA_DIST =
+diff --git a/src/rapper/configure.ac b/src/rapper/configure.ac
+index 5e4ef69..268a579 100755
+--- a/src/rapper/configure.ac
++++ b/src/rapper/configure.ac
+@@ -48,6 +48,13 @@ AM_CONDITIONAL(AMDEP, test "x$enable_dependency_tracking" != xno)
+
+ AC_SUBST(rapper_LDFLAGS)
+
+-AC_CONFIG_SUBDIRS([gc7.0 libxml2])
++PKG_CHECK_MODULES([LIBXML],[libxml-2.0])
++AC_SUBST([LIBXML_CFLAGS])
++AC_SUBST([LIBXML_LIBS])
++
++PKG_CHECK_MODULES([GC],[bdw-gc])
++AC_SUBST([GC_CFLAGS])
++AC_SUBST([GC_LIBS])
++
+ #AC_OUTPUT(Makefile LOOP/Makefile LOOP/python/Makefile data/Makefile)
+ AC_OUTPUT(Makefile LOOP/Makefile data/Makefile)
diff --git a/sci-chemistry/ccp4-apps/files/6.1.3-unbundle.patch b/sci-chemistry/ccp4-apps/files/6.1.3-unbundle.patch
new file mode 100644
index 000000000000..107cfd740238
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/6.1.3-unbundle.patch
@@ -0,0 +1,131 @@
+ src/Makefile.in | 14 +++++-----
+ src/pisa/configure.ac | 67 +++++++++----------------------------------------
+ 2 files changed, 19 insertions(+), 62 deletions(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 70781f3..b11db04 100755
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -778,8 +778,8 @@ chainsaw : $(chainsawobjs)
+ eval $(CXX) $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -o chainsaw $(chainsawobjs) $(LDCXXFLAGS)
+ pdbcur.o pcur_funcs.o ncont.o coord_format.o pdb_merge.o chainsaw.o: # dependencies at end
+ @$(SETFLAGS) xxx=1 ; \
+- echo $(CXX) -I$(mmdb_appdir) -I$(incdir) -I$(incdir)/mmdb $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(mmdb_appdir)/`basename $@ .o`.cpp ;
+- eval $(CXX) -I$(mmdb_appdir) -I$(incdir) -I$(incdir)/mmdb $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(mmdb_appdir)/`basename $@ .o`.cpp
++ echo $(CXX) -I$(mmdb_appdir) -I$(incdir) `pkg-config --cflags mmdb` $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(mmdb_appdir)/`basename $@ .o`.cpp ;
++ eval $(CXX) -I$(mmdb_appdir) -I$(incdir) `pkg-config --cflags mmdb` $${mmdb_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(mmdb_appdir)/`basename $@ .o`.cpp
+
+ ### bp3, afro, gcx
+
+@@ -813,8 +813,8 @@ gcx : libbp3 $(gcxobjs)
+
+ $(libbp3objs) $(bp3objs) $(afroobjs) $(gcxobjs) : # dependencies at end
+ @$(SETFLAGS) xxx=1 ; \
+- echo $(CXX) -I$(bp3dir) -I$(incdir) -I$(incdir)/mmdb $${bp3_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(bp3dir)/`basename $@ .o`.C ; \
+- eval $(CXX) -I$(bp3dir) -I$(incdir) -I$(incdir)/mmdb $${bp3_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(bp3dir)/`basename $@ .o`.C
++ echo $(CXX) -I$(bp3dir) -I$(incdir) `pkg-config --cflags mmdb` $${bp3_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(bp3dir)/`basename $@ .o`.C ; \
++ eval $(CXX) -I$(bp3dir) -I$(incdir) `pkg-config --cflags mmdb` $${bp3_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(bp3dir)/`basename $@ .o`.C
+
+ ### crunch2 pmf
+
+@@ -853,7 +853,7 @@ cif2xml : $(cif2xmlobjs)
+ cross_validate : $(cross_validateobjs)
+ @$(SETFLAGS); rm -f cross_validate; eval $(CXX) $${harvest_app_FLAGS-"$(CXXFLAGS)"} -o cross_validate $(cross_validateobjs) $(LDCXXFLAGS)
+ cif2xml.o cross_validate.o : # dependencies at end
+- @$(SETFLAGS); eval $(CXX) -I$(harvest_appdir) -I$(incdir) -I$(incdir)/mmdb $${harvest_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(harvest_appdir)/`basename $@ .o`.cpp
++ @$(SETFLAGS); eval $(CXX) -I$(harvest_appdir) -I$(incdir) `pkg-config --cflags mmdb` $${harvest_app_FLAGS-"$(CXXFLAGS)"} -c -o $@ $(harvest_appdir)/`basename $@ .o`.cpp
+
+ pdb_extractdir = $(srcdir)/harvest_app_/pdb_extract
+ pdb_extract_suite :
+@@ -873,8 +873,8 @@ $(dev_tools_ctargets) :
+ $(dev_tools_cxxtargets) :
+ @$(SETFLAGS) xxx=1; \
+ rm -f $@; \
+- echo $(CXX) $${dev_tools_FLAGS-"$(CXXFLAGS)"} -o $@ $(dev_toolsdir)/$@.cpp -I$(incdir) -I$(incdir)/mmdb $(LDCXXFLAGS) ;\
+- eval $(CXX) $${dev_tools_FLAGS-"$(CXXFLAGS)"} -o $@ $(dev_toolsdir)/$@.cpp -I$(incdir) -I$(incdir)/mmdb $(LDCXXFLAGS)
++ echo $(CXX) $${dev_tools_FLAGS-"$(CXXFLAGS)"} -o $@ $(dev_toolsdir)/$@.cpp -I$(incdir) `pkg-config --cflags mmdb` $(LDCXXFLAGS) ;\
++ eval $(CXX) $${dev_tools_FLAGS-"$(CXXFLAGS)"} -o $@ $(dev_toolsdir)/$@.cpp -I$(incdir) `pkg-config --cflags mmdb` $(LDCXXFLAGS)
+
+ ### mlphare
+ mlphare:
+diff --git a/src/pisa/configure.ac b/src/pisa/configure.ac
+index 81afdda..044b6f8 100755
+--- a/src/pisa/configure.ac
++++ b/src/pisa/configure.ac
+@@ -31,64 +31,21 @@ AC_CHECK_FUNCS([floor pow rint sqrt])
+ # test for function in m
+ AC_CHECK_LIB([m], [sqrt])
+
+-dnl Optional: Check for MMDB.
+-AM_PATH_MMDB(,
+- [ if test "x$mmdb_prefix" != x ; then
+- if test "x$ac_MMDB_CXXFLAGS" != x && test "x$ac_MMDB_LDOPTS" = x ; then
+- case "$ac_MMDB_CXXFLAGS" in
+- *src/mmdb )
+- ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#src/mmdb#src#g`
+- ;;
+- *include/mmdb )
+- ac_MMDB_LDOPTS=`echo "$ac_MMDB_CXXFLAGS" | sed s#include/mmdb#lib#g`
+- ;;
+- *)
+- esac
+- MMDB_CXXFLAGS="$ac_MMDB_CXXFLAGS"
+- MMDB_LIBS=`echo "$ac_MMDB_LDOPTS -lmmdb" | sed s#-I#-L#`
+- AC_MSG_WARN([assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS])
+- else
+- MMDB_CXXFLAGS="-I$mmdb_prefix/src -I$mmdb_prefix/src/mmdb -I$mmdb_prefix/include -I$mmdb_prefix/include/mmdb"
+- MMDB_LIBS="-L$mmdb_prefix/src -L$mmdb_prefix/lib -lmmdb"
+- AC_MSG_WARN([assuming library $MMDB_LIBS headers $MMDB_CXXFLAGS])
+- fi
+- else
+- AC_MSG_ERROR([mmdb not found])
+- fi
+- ]
+-)
++PKG_CHECK_MODULES([MMDB],[mmdb])
++PKG_CHECK_MODULES([SSM],[ssm])
++
++MMDB_CXXFLAGS=${MMDB_CFLAGS}
++
++AC_SUBST([MMDB_CFLAGS])
++AC_SUBST([MMDB_CXXFLAGS])
++AC_SUBST([SSM_CFLAGS])
++
++AC_SUBST([MMDB_LIBS])
++AC_SUBST([SSM_LIBS])
+
+-ac_saved_CXXFLAGS=$CXXFLAGS
+-ac_saved_LIBS=$LIBS
+ CXXFLAGS="$CXXFLAGS $MMDB_CXXFLAGS"
+ LIBS="$MMDB_LIBS $LIBS"
+-AM_PATH_SSM(,
+- [ if test "x$ssm_prefix" != x ; then
+- if test "x$ac_SSM_CXXFLAGS" != x && test "x$ac_SSM_LDOPTS" = x ; then
+- case "$ac_SSM_CXXFLAGS" in
+- *lib/ssm )
+- ac_SSM_LDOPTS=`echo "$ac_SSM_CXXFLAGS" | sed s#lib/ssm#lib#g`
+- ;;
+- *include/ssm )
+- ac_SSM_LDOPTS=`echo "$ac_SSM_CXXFLAGS" | sed s#include/ssm#lib#g`
+- ;;
+- *)
+- esac
+- SSM_CXXFLAGS="$ac_SSM_CXXFLAGS"
+- SSM_LIBS=`echo "$ac_SSM_LDOPTS -lssm" | sed s#-I#-L#`
+- AC_MSG_WARN([assuming library $SSM_LIBS headers $SSM_CXXFLAGS])
+- else
+- SSM_CXXFLAGS="-I$ssm_prefix/include/ssm -I$ssm_prefix/lib/ssm"
+- SSM_LIBS="-L$ssm_prefix/lib -L$ssm_prefix/lib/ssm -lssm"
+- AC_MSG_WARN([assuming library $SSM_LIBS headers $SSM_CXXFLAGS])
+- fi
+- else
+- AC_MSG_ERROR([ssm not found])
+- fi
+- ]
+-)
+-CXXFLAGS=$ac_saved_CXXFLAGS
+-LIBS=$ac_saved_LIBS
++
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ #
diff --git a/sci-chemistry/ccp4-apps/files/ccp4-apps-6.1.3-tcl8.6.patch b/sci-chemistry/ccp4-apps/files/ccp4-apps-6.1.3-tcl8.6.patch
new file mode 100644
index 000000000000..4b98545eec83
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/files/ccp4-apps-6.1.3-tcl8.6.patch
@@ -0,0 +1,130 @@
+ src/ccp4mapwish_/c_src/ccp4mapwish_canvas.c | 34 ++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/ccp4mapwish_/c_src/ccp4mapwish_canvas.c b/src/ccp4mapwish_/c_src/ccp4mapwish_canvas.c
+index 2c9f02f..98d814a 100755
+--- a/src/ccp4mapwish_/c_src/ccp4mapwish_canvas.c
++++ b/src/ccp4mapwish_/c_src/ccp4mapwish_canvas.c
+@@ -297,7 +297,7 @@ int canvas_draw_line(char *canvas, int npts, float *x, float *y, char *tags,
+ puts("canvas_draw_line: about to evaluate the command...");
+ }
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_draw_line: error from Tcl_Eval: %s",interp->result);
++ printf("canvas_draw_line: error from Tcl_Eval: %s",Tcl_GetStringResult(interp));
+ return 0;
+ }
+ if (CCP4MAPWISH_CANVAS_DIAG)
+@@ -432,7 +432,7 @@ int canvas_draw_rectangle(char *canvas, int npts, float *x, float *y,
+ puts("canvas_draw_rectangle: about to evaluate the command...");
+ }
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_draw_rectangle: error from Tcl_Eval: %s",interp->result);
++ printf("canvas_draw_rectangle: error from Tcl_Eval: %s",Tcl_GetStringResult(interp));
+ printf("canvas_draw_rectangle:\ncanvas = \"%s\"\ntags = \"%s\"\ncolor = \"%s\"\nunits = \"%c\"\n",canvas,tags,color,units);
+ return 0;
+ }
+@@ -536,7 +536,7 @@ int canvas_draw_label(char *canvas, char *text, float x, float y,
+ /* Execute the command which draws the label */
+ if (CCP4MAPWISH_CANVAS_DIAG) printf("canvas_draw_label: command is: %s\n",command);
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_draw_label: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_draw_label: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+@@ -617,7 +617,7 @@ int canvas_scale_canvas(char *canvas, char *tag, float scale)
+ /* Execute the command which scales the canvas */
+ if (CCP4MAPWISH_CANVAS_DIAG) printf("canvas_scale_canvas: command is: %s\n",command);
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_scale_canvas: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_scale_canvas: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+@@ -706,7 +706,7 @@ int canvas_shift_canvas(char *canvas)
+ /* Execute the command which resizes the canvas */
+ if (CCP4MAPWISH_CANVAS_DIAG) printf("canvas_shift_canvas: command is: %s\n",command);
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_shift_canvas: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_shift_canvas: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+@@ -789,7 +789,7 @@ int canvas_shift_element(char *canvas, char *tag, int shiftx, int shifty)
+ /* Execute the command which resizes the canvas */
+ if (CCP4MAPWISH_CANVAS_DIAG) printf("canvas_shift_canvas: command is: %s\n",command);
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_shift_element: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_shift_element: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+@@ -861,7 +861,7 @@ int canvas_delete(char *canvas, char *tag)
+ /* Execute the command which deletes the tagged items */
+ if (CCP4MAPWISH_CANVAS_DIAG) printf("canvas_delete: command is: %s\n",command);
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_scale_canvas: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_scale_canvas: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+@@ -892,15 +892,15 @@ int canvas_exists(char *canvas)
+
+ sprintf(tmpstr,"winfo exists %s",canvas);
+ if (Tcl_Eval(interp,tmpstr) != TCL_OK) {
+- printf("canvas_exists: error from Tcl_Eval: %s",interp->result);
++ printf("canvas_exists: error from Tcl_Eval: %s",Tcl_GetStringResult(interp));
+ return 0;
+ }
+ /* Extract a long int using strtol
+ If no conversion takes place then "endptr" will be equal
+ to "result" */
+- istatus = (int) strtol(interp->result,&endptr,10);
+- if (strcmp(interp->result,endptr) == 0) {
+- printf("canvas_exists: bad return status from winfo command \"%s\"\n",interp->result);
++ istatus = (int) strtol(Tcl_GetStringResult(interp),&endptr,10);
++ if (strcmp(Tcl_GetStringResult(interp),endptr) == 0) {
++ printf("canvas_exists: bad return status from winfo command \"%s\"\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+ if (!istatus) {
+@@ -930,13 +930,13 @@ float canvas_get_tk_scaling(char *canvas, char units)
+
+ /* Execute the tk scaling command */
+ if (Tcl_Eval(interp,"tk scaling") != TCL_OK) {
+- printf("canvas_get_tk_scaling: error from Tcl_Eval: %s",interp->result);
++ printf("canvas_get_tk_scaling: error from Tcl_Eval: %s",Tcl_GetStringResult(interp));
+ return (float) 0.0;
+ }
+
+ /* Extract a float from the result */
+- tkscale = ((float) strtod(interp->result,&endptr));
+- if (strcmp(interp->result,endptr) == 0) {
++ tkscale = ((float) strtod(Tcl_GetStringResult(interp),&endptr));
++ if (strcmp(Tcl_GetStringResult(interp),endptr) == 0) {
+ printf("canvas_get_tk_scaling: couldn't extract scale factor\n");
+ return (float) 0.0;
+ }
+@@ -1021,19 +1021,19 @@ int canvas_get_limits(char *canvas, int limits[4])
+
+ /* Evaluate the command */
+ if (Tcl_Eval(interp,command) != TCL_OK) {
+- printf("canvas_get_limits: error from Tcl_Eval: %s\n",interp->result);
++ printf("canvas_get_limits: error from Tcl_Eval: %s\n",Tcl_GetStringResult(interp));
+ return 0;
+ }
+
+ /* Process the result - it should consist of 4 integers */
+ /* Use strtok which can split the string based on tokens
+ set by the programmer - in this case a space */
+- if (!interp->result) {
++ if (!Tcl_GetStringResult(interp)) {
+ puts("canvas_get_limits: failed to fetch canvas limits");
+ return TCL_ERROR;
+ }
+ i = 0;
+- p = strtok(interp->result," ");
++ p = strtok(Tcl_GetStringResult(interp)," ");
+ if (p == NULL) {
+ return 0;
+ }
diff --git a/sci-chemistry/ccp4-apps/metadata.xml b/sci-chemistry/ccp4-apps/metadata.xml
new file mode 100644
index 000000000000..51fdedab1b38
--- /dev/null
+++ b/sci-chemistry/ccp4-apps/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/ccp4/ccp4-6.1.3-r1.ebuild b/sci-chemistry/ccp4/ccp4-6.1.3-r1.ebuild
new file mode 100644
index 000000000000..eea4a408b472
--- /dev/null
+++ b/sci-chemistry/ccp4/ccp4-6.1.3-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit fortran-2
+
+DESCRIPTION="Protein X-ray crystallography toolkit -- meta package"
+HOMEPAGE="http://www.ccp4.ac.uk/"
+SRC_URI=""
+
+LICENSE="ccp4"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="X arpwarp +balbes"
+
+RDEPEND="
+ ~sci-chemistry/ccp4-apps-${PV}[X?]
+ !<=sci-chemistry/ccp4-apps-${PV}-r2
+ >=sci-chemistry/molrep-11.0.00-r1
+ >=sci-chemistry/mosflm-7.0.6-r2
+ sci-chemistry/mrbump[X?]
+ >=sci-chemistry/oasis-4.0-r1
+ >=sci-chemistry/pdb-extract-3.004-r2
+ >=sci-chemistry/refmac-5.5.0110-r1
+ >=sci-chemistry/scala-3.3.18-r1
+ >=sci-chemistry/sfcheck-7.03.18-r1
+ sci-chemistry/xia2
+ arpwarp? ( sci-chemistry/arp-warp-bin )
+ balbes? ( sci-chemistry/balbes )
+ X? (
+ ~sci-chemistry/ccp4i-${PV}
+ sci-chemistry/imosflm
+ sci-chemistry/pymol
+ sci-chemistry/rasmol
+ )"
+DEPEND=""
diff --git a/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch b/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch
new file mode 100644
index 000000000000..1420419ffab0
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.1-dont-make-dirs-in-configure.patch
@@ -0,0 +1,87 @@
+--- ccp4-6.0.1.orig/configure 2006-06-10 17:30:02.000000000 -0700
++++ ccp4-6.0.1/configure 2006-06-10 17:45:43.000000000 -0700
+@@ -623,45 +623,45 @@
+ # echo "! Beware -- the $system installation isn't properly tested." ; }
+ syswarn='echo; echo "! Beware -- the $system installation is not properly tested."'
+
+-if test -z "$onlylibs" ; then
+- for i in CCP4_SCR BINSORT_SCR; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the value of $i."
+- badvar=1
+- fi
+- done
+-
+- for i in libdir bindir; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the argument of --$i."
+- badvar=1
+- fi
+- done
+-
+- for i in $dotsrc $dotunsupp $dotunsuppsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
+- if test -d $i || mkdir $i; then :
+- else
+- eval echo "! No directory $i and can\'t create it."
+- badvar=1
+- fi
+- done
+-else
+- # Kludge to fool the "Makefile" target in the top-level CCP4
+- # Makefile into not trying to remake src/Makefile.in
+- for i in $srcdir/src $srcdir/lib/src ; do
+- if test -d $i || mkdir $i; then
+- if ! test -f $i/Makefile.in ; then
+- echo
+- echo "onlylibs: making dummy file $i/Makefile.in"
+- touch $i/Makefile.in
+- fi
+- fi
+- done
+-fi
++#if test -z "$onlylibs" ; then
++# for i in CCP4_SCR BINSORT_SCR; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the value of $i."
++# badvar=1
++# fi
++# done
++#
++# for i in libdir bindir; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the argument of --$i."
++# badvar=1
++# fi
++# done
++#
++# for i in $dotsrc $dotunsupp $dotunsuppsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
++# if test -d $i || mkdir $i; then :
++# else
++# eval echo "! No directory $i and can\'t create it."
++# badvar=1
++# fi
++# done
++#else
++# # Kludge to fool the "Makefile" target in the top-level CCP4
++# # Makefile into not trying to remake src/Makefile.in
++# for i in $srcdir/src $srcdir/lib/src ; do
++# if test -d $i || mkdir $i; then
++# if ! test -f $i/Makefile.in ; then
++# echo
++# echo "onlylibs: making dummy file $i/Makefile.in"
++# touch $i/Makefile.in
++# fi
++# fi
++# done
++#fi
+
+ ### sanity checks
+
diff --git a/sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch b/sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch
new file mode 100644
index 000000000000..a77d9494a05c
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.1-ppc-double-define-gerror.patch
@@ -0,0 +1,11 @@
+--- ccp4-6.0.1.orig/lib/src/library_f.c 2006-06-12 07:06:22.000000000 -0700
++++ ccp4-6.0.1/lib/src/library_f.c 2006-06-12 07:21:56.000000000 -0700
+@@ -716,7 +716,7 @@
+
+ #endif /* end of apple xlf support */
+
+-#if ( defined (__linux__) && defined (_CALL_SYSV) )
++#if ( defined (__linux__) && defined (_CALL_SYSV) && ! defined(G95) && ! defined (GFORTRAN) )
+ /* linuxppc xlf support */
+ void gerror_ (str, Lstr)
+ char *str;
diff --git a/sci-chemistry/ccp4/files/6.0.2-dont-make-dirs-in-configure.patch b/sci-chemistry/ccp4/files/6.0.2-dont-make-dirs-in-configure.patch
new file mode 100644
index 000000000000..1420419ffab0
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.2-dont-make-dirs-in-configure.patch
@@ -0,0 +1,87 @@
+--- ccp4-6.0.1.orig/configure 2006-06-10 17:30:02.000000000 -0700
++++ ccp4-6.0.1/configure 2006-06-10 17:45:43.000000000 -0700
+@@ -623,45 +623,45 @@
+ # echo "! Beware -- the $system installation isn't properly tested." ; }
+ syswarn='echo; echo "! Beware -- the $system installation is not properly tested."'
+
+-if test -z "$onlylibs" ; then
+- for i in CCP4_SCR BINSORT_SCR; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the value of $i."
+- badvar=1
+- fi
+- done
+-
+- for i in libdir bindir; do
+- if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
+- else
+- eval echo "! No directory \$$i and can\'t create it."
+- echo " Check the argument of --$i."
+- badvar=1
+- fi
+- done
+-
+- for i in $dotsrc $dotunsupp $dotunsuppsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
+- if test -d $i || mkdir $i; then :
+- else
+- eval echo "! No directory $i and can\'t create it."
+- badvar=1
+- fi
+- done
+-else
+- # Kludge to fool the "Makefile" target in the top-level CCP4
+- # Makefile into not trying to remake src/Makefile.in
+- for i in $srcdir/src $srcdir/lib/src ; do
+- if test -d $i || mkdir $i; then
+- if ! test -f $i/Makefile.in ; then
+- echo
+- echo "onlylibs: making dummy file $i/Makefile.in"
+- touch $i/Makefile.in
+- fi
+- fi
+- done
+-fi
++#if test -z "$onlylibs" ; then
++# for i in CCP4_SCR BINSORT_SCR; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the value of $i."
++# badvar=1
++# fi
++# done
++#
++# for i in libdir bindir; do
++# if ( eval test -d \$$i || eval mkdir -p \$$i ) ; then :
++# else
++# eval echo "! No directory \$$i and can\'t create it."
++# echo " Check the argument of --$i."
++# badvar=1
++# fi
++# done
++#
++# for i in $dotsrc $dotunsupp $dotunsuppsrc ./lib ./lib/src ./lib/data ./ccp4i/etc/unix $mosflmdir/lib $mosflmdir/bin $mosflmdir/cbf/lib ; do
++# if test -d $i || mkdir $i; then :
++# else
++# eval echo "! No directory $i and can\'t create it."
++# badvar=1
++# fi
++# done
++#else
++# # Kludge to fool the "Makefile" target in the top-level CCP4
++# # Makefile into not trying to remake src/Makefile.in
++# for i in $srcdir/src $srcdir/lib/src ; do
++# if test -d $i || mkdir $i; then
++# if ! test -f $i/Makefile.in ; then
++# echo
++# echo "onlylibs: making dummy file $i/Makefile.in"
++# touch $i/Makefile.in
++# fi
++# fi
++# done
++#fi
+
+ ### sanity checks
+
diff --git a/sci-chemistry/ccp4/files/6.0.2-gcc-4.1.2-idate-fix.patch b/sci-chemistry/ccp4/files/6.0.2-gcc-4.1.2-idate-fix.patch
new file mode 100644
index 000000000000..c118cc53baff
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.2-gcc-4.1.2-idate-fix.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/show_bug.cgi?id=175630
+JTRiley
+
+--- ccp4-6.0.2.orig/src/refmac5_/make_unix_ccp4.f 2005-09-06 07:29:56.000000000 -0400
++++ ccp4-6.0.2.new/src/refmac5_/make_unix_ccp4.f 2007-05-02 20:03:46.000000000 -0400
+@@ -97,7 +97,7 @@
+
+ READ(CID,'(I2,1X,I2,1X,I2,2X)') IH(4),IH(3),IH(2)
+
+- CALL IDATE(IMON,IDAY,IYR)
++ CALL UIDATE(IMON,IDAY,IYR)
+ IF(IYR.GE.99) THEN
+ IYR=IYR+1900
+ ELSE
diff --git a/sci-chemistry/ccp4/files/6.0.2-ppc-double-define-gerror.patch b/sci-chemistry/ccp4/files/6.0.2-ppc-double-define-gerror.patch
new file mode 100644
index 000000000000..a77d9494a05c
--- /dev/null
+++ b/sci-chemistry/ccp4/files/6.0.2-ppc-double-define-gerror.patch
@@ -0,0 +1,11 @@
+--- ccp4-6.0.1.orig/lib/src/library_f.c 2006-06-12 07:06:22.000000000 -0700
++++ ccp4-6.0.1/lib/src/library_f.c 2006-06-12 07:21:56.000000000 -0700
+@@ -716,7 +716,7 @@
+
+ #endif /* end of apple xlf support */
+
+-#if ( defined (__linux__) && defined (_CALL_SYSV) )
++#if ( defined (__linux__) && defined (_CALL_SYSV) && ! defined(G95) && ! defined (GFORTRAN) )
+ /* linuxppc xlf support */
+ void gerror_ (str, Lstr)
+ char *str;
diff --git a/sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch b/sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch
new file mode 100644
index 000000000000..106db895b775
--- /dev/null
+++ b/sci-chemistry/ccp4/files/ccp4i-default-to-firefox.patch
@@ -0,0 +1,13 @@
+--- ccp4-5.99.5.orig/ccp4i/etc/configure.def.dist 2006-01-06 17:54:17.000000000 -0800
++++ ccp4-5.99.5/ccp4i/etc/configure.def.dist 2006-01-06 17:54:47.000000000 -0800
+@@ -54,8 +54,8 @@
+ MESSAGE _text ""
+ BLT_LIBRARY _text ""
+ MENU_LENGTH _positiveint 25
+-HYPERTEXT_VIEWER _text netscape
+-START_NETSCAPE _text netscape
++HYPERTEXT_VIEWER _text firefox
++START_NETSCAPE _text firefox
+ O_MAPMAN _text mapman
+ MAPMAN_MAXSIZE _positiveint 4194304
+ QUANTA_MBKALL _text mbkall
diff --git a/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch b/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch
new file mode 100644
index 000000000000..02a2aa6d8877
--- /dev/null
+++ b/sci-chemistry/ccp4/files/check-blas-lapack-pthread.patch
@@ -0,0 +1,103 @@
+--- ccp4-5.99.5.orig/configure 2006-01-17 00:35:36.000000000 -0800
++++ ccp4-5.99.5/configure 2006-01-17 10:44:39.000000000 -0800
+@@ -2410,12 +2410,12 @@
+ end
+ EOF
+ #firslty test without -lblas
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lpthread"
+ echo $test_compile
+ if { (eval $test_compile >& /dev/null ) 2>&1; } && test -s testlink ; then
+ # Compilation was okay
+- echo "... only -llapack needed"
+- XLAPACK_LIB="-llapack"
++ echo "... only -llapack -lpthread needed"
++ XLAPACK_LIB="-llapack -lpthread"
+ # Set the next two variables so that configure
+ # doesn't try to build netlib libraries
+ LAPACKLIB="lapack"
+@@ -2424,12 +2424,12 @@
+ tryblas=
+ else
+ echo "more than just -llapack needed...."
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -llapack -lblas -lpthread"
+ echo $test_compile
+ if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+ # Compilation was okay
+- echo "...-llapack and -lblas were needed"
+- XLAPACK_LIB="-llapack -lblas"
++ echo "...-llapack, -lpthread and -lblas were needed"
++ XLAPACK_LIB="-llapack -lpthread -lblas"
+ # Set the next two variables so that configure
+ # doesn't try to build netlib libraries
+ LAPACKLIB="lapack blas"
+@@ -2720,8 +2720,8 @@
+ STOP
+ END
+ EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { (eval $test_compile ) 2>&1; } && test -s testlink ; then
+ have_lapack=yes
+@@ -2738,7 +2738,7 @@
+ LAPACKDIR="$testdir"
+ echo "Link ok - using lib$LAPACKLIB from $LAPACKDIR"
+ #
+- XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB"
++ XLAPACK_LIB="-L$LAPACKDIR -l$LAPACKLIB -lpthread"
+ #
+ # Test to see if we need BLAS too
+ # Do this by trying to compile a test program
+@@ -2750,8 +2750,8 @@
+ if test -f testlsame ; then
+ rm -f testsame testlsame.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$LAPACKDIR -l$LAPACKLIB $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
+ have_blas=yes
+@@ -2830,8 +2830,8 @@
+ STOP
+ END
+ EOF
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib"
+- test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib -lpthread"
++ test_ccompile="$FC $FOPTIM $XFFLAGS -o testlink testlink.f -L$testdir -l$testlib $XLDFLAGS -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlink ; then
+ have_blas=yes
+@@ -3033,7 +3033,7 @@
+ if test -f testlsame ; then
+ rm -f testsame testlsame.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testlsame lsametst.f -L$BLASDIR -l$BLASLIB -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testlsame ; then
+ echo "Found LSAME in lib$BLASLIB"
+@@ -3046,7 +3046,7 @@
+ if test -f testxerbla ; then
+ rm -f testxerbla testxerbla.o
+ fi
+- test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB"
++ test_compile="$FC $FOPTIM $XFFLAGS -o testxerbla xerblatst.f -L$BLASDIR -l$BLASLIB -lpthread"
+ echo $test_compile
+ if { ( eval $test_compile) 2>&1;} && test -s testxerbla ; then
+ # Found lsame
+@@ -3080,7 +3080,7 @@
+ cd ../..
+ #
+ lapackdir=lib/lapack
+- XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB"
++ XLAPACK_LIB="-L$srcdir/lib/lapack -llapack -L$BLASDIR -l$BLASLIB -lpthread"
+ # netlib lapack is in fortran, so we may need the fortran libraries when
+ # we are linking using the C or C++ compilers
+ case $system in
diff --git a/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch b/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch
new file mode 100644
index 000000000000..3bf5a0652247
--- /dev/null
+++ b/sci-chemistry/ccp4/files/clipper-find-mccp4-includes.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5/lib/clipper/configure.orig 2006-01-07 16:54:13.000000000 -0800
++++ ccp4-5.99.5/lib/clipper/configure 2006-01-07 16:54:31.000000000 -0800
+@@ -21751,7 +21751,7 @@
+
+ if test "x$mccp4_prefix" != x; then
+ # ie. mccp4=thing was given (thing is what we're checking for)
+- ac_MCCP4_CXXFLAGS="-I$mccp4_prefix/include"
++ ac_MCCP4_CXXFLAGS="-I$mccp4_prefix/include -I$mccp4_prefix/include/mccp4"
+ ac_MCCP4_LDOPTS="-L$mccp4_prefix/lib -lmccp4"
+ else
+ # treat as standard lib/include
diff --git a/sci-chemistry/ccp4/files/create-mosflm-bindir.patch b/sci-chemistry/ccp4/files/create-mosflm-bindir.patch
new file mode 100644
index 000000000000..34d6197572fc
--- /dev/null
+++ b/sci-chemistry/ccp4/files/create-mosflm-bindir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Makefile.in 2006-01-06 12:31:02.000000000 -0800
++++ ccp4-5.99.5/x-windows/Makefile.in 2006-01-06 12:31:30.000000000 -0800
+@@ -158,6 +158,7 @@
+ install_obj = ipdisp.exe hklview xdldataman xdlmapman \
+ rotgen ipmosflm
+ install: all
++ mkdir -p $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/ipdisp.exe $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/ipdisp/ipdisp $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/hklview $(bindir)
diff --git a/sci-chemistry/ccp4/files/dont-build-rasmol.patch b/sci-chemistry/ccp4/files/dont-build-rasmol.patch
new file mode 100644
index 000000000000..8da54fd26de8
--- /dev/null
+++ b/sci-chemistry/ccp4/files/dont-build-rasmol.patch
@@ -0,0 +1,19 @@
+--- ccp4-5.99.5.orig/x-windows/Makefile.in 2005-12-05 03:06:57.000000000 -0800
++++ ccp4-5.99.5/x-windows/Makefile.in 2005-12-05 03:07:23.000000000 -0800
+@@ -35,7 +35,7 @@
+ #
+ # all
+ #
+-all : xdlview libjwc_c libjwc_f rotgen_ hklview ipdisp.exe xdlgjk xjiffy rasmol2 ipmosflm
++all : xdlview libjwc_c libjwc_f rotgen_ hklview ipdisp.exe xdlgjk xjiffy ipmosflm
+ #
+ # xdl_view
+ #
+@@ -161,7 +161,6 @@
+ $(INSTALL_PROGRAM) $(srcdir)/xdldataman $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/xdlmapman $(bindir)
+ cd $(srcdir)/XCCPJIFFY ; $(MAKE) install
+- $(INSTALL_PROGRAM) $(rasmol_dir)/rasmol $(bindir)
+ cd $(rotgen_dir); $(MAKE) install
+ $(INSTALL_PROGRAM) $(mosflm_dir)/bin/ipmosflm $(bindir)
+ cd $(xdlview_dir); $(MAKE) install
diff --git a/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch b/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch
new file mode 100644
index 000000000000..7813141b2ec2
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-ipmosflm-dir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/mosflm/Makefile.in 2006-01-06 00:04:12.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/mosflm/Makefile.in 2006-01-06 00:04:41.000000000 -0800
+@@ -37,6 +37,7 @@
+ ${F77} ${FFLAGS} -o $@ $<
+
+ ipmosflm: ${OBJS}
++ mkdir -p ${DPSBIN}
+ ${FLINK} ${FFLAGS} ${OBJS} ${LOCALLIBS} ${LIBS} \
+ -o ${DPSBIN}/ipmosflm ${LDFLAGS}
+
diff --git a/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch
new file mode 100644
index 000000000000..ae4b7633b105
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-cbf-libdir.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/cbf/Makefile.in 2006-01-05 23:42:19.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/cbf/Makefile.in 2006-01-05 23:43:35.000000000 -0800
+@@ -132,7 +132,7 @@
+ #
+ # CBF library
+ #
+-$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP)
++$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
+ $(AR) cr $@ *.o
+ $(RANLIB) $@
diff --git a/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch
new file mode 100644
index 000000000000..97607b689672
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-index-libdir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/index/Makefile.in 2006-01-05 23:15:09.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/index/Makefile.in 2006-01-05 23:15:30.000000000 -0800
+@@ -76,6 +76,7 @@
+
+ # local version of libdps_index.a
+ ${LIB}/dps_index.a: ${IOBJS} ${HOBJS}
++ mkdir -p ${LIB}
+ ar ru ${LIB}/dps_index.a ${IOBJS} ${HOBJS}
+
+ ${LIB}/libpeak.a:
diff --git a/sci-chemistry/ccp4/files/make-mosflm-libdir.patch b/sci-chemistry/ccp4/files/make-mosflm-libdir.patch
new file mode 100644
index 000000000000..eac1b9f1721e
--- /dev/null
+++ b/sci-chemistry/ccp4/files/make-mosflm-libdir.patch
@@ -0,0 +1,10 @@
+--- ccp4-5.99.5.orig/x-windows/Mosflm/src/dps/index/Makefile.in 2006-01-05 22:48:47.000000000 -0800
++++ ccp4-5.99.5/x-windows/Mosflm/src/dps/index/Makefile.in 2006-01-05 22:49:02.000000000 -0800
+@@ -42,6 +42,7 @@
+ $(LOCALLIBS) $(LIBS)
+
+ index: $(IOBJS)
++ mkdir -p $(LIBDIR)
+ ${AR} $(AR_FLAGS) $(LIBDIR)/libdps_index.a $(IOBJS)
+ chmod 644 $(LIBDIR)/libdps_index.a
+
diff --git a/sci-chemistry/ccp4/files/pass-clipper-enablevals.patch b/sci-chemistry/ccp4/files/pass-clipper-enablevals.patch
new file mode 100644
index 000000000000..3e1a8b0e6be8
--- /dev/null
+++ b/sci-chemistry/ccp4/files/pass-clipper-enablevals.patch
@@ -0,0 +1,11 @@
+--- ccp4-5.99.5.orig/configure 2006-01-06 11:45:43.000000000 -0800
++++ ccp4-5.99.5/configure 2006-01-06 11:46:53.000000000 -0800
+@@ -3210,7 +3210,7 @@
+ #ccp4 setup
+ xopts="${xopts} --with-ccp4=${srcdir}"
+ #interface setup
+- xopts="${xopts} --enable-mmdb --enable-cif --enable-ccp4 --enable-minimol"
++ xopts="${xopts} --enable-mmdb --enable-cif --enable-ccp4 --enable-minimol --enable-mmdbold --enable-mtz --with-mccp4=/usr"
+ echo
+ echo "********* CLIPPER CONFIGURATION ***********"
+ echo
diff --git a/sci-chemistry/ccp4/metadata.xml b/sci-chemistry/ccp4/metadata.xml
new file mode 100644
index 000000000000..d37774eb9ada
--- /dev/null
+++ b/sci-chemistry/ccp4/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <use>
+ <flag name="balbes">Install sci-chemistry/balbes</flag>
+ <flag name="arpwarp">Add binary arp-warp for molecular replacement</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-chemistry/ccp4i/Manifest b/sci-chemistry/ccp4i/Manifest
new file mode 100644
index 000000000000..e082cb44f7fb
--- /dev/null
+++ b/sci-chemistry/ccp4i/Manifest
@@ -0,0 +1,3 @@
+DIST 6.1.3-oasis4.0.patch.bz2 946 SHA256 12d7c5965e0c46b0f482514d9083d6be94d65eeb14ba29c17d507d5f9669f84b SHA512 7c7bf4ef90550708bf41b1831dbe71c38418b46455adb3d42ec609d287894ac9260d9671f1759f71c713ced72fa004b9808391ea6874007ac8b7d7637f349d32 WHIRLPOOL a2bc27e1e054e1717c387f3800533fa490c03d1d18d3fe3cff4676f0ec47799a1681a206e01013c1b8f8e41162303446a824b86effeef2ed73f059feb07fb820
+DIST ccp4-6.1.3-core-src.tar.gz 242134076 SHA256 1e529c660e7f390ec0feca9d45caa00a2813d23156c10a2747c427117293c324 SHA512 413eba806107ebcdbd93e9122275463709133d9b2a9ce44ae57a6c2350465a47ba66ad9875237aead74f5d422c0104f58f728ab37a757b10d82cde92af444c20 WHIRLPOOL faebf8ee7920013bc3d0e83565207dca1f31ba0b5c92fe1eae4b740f70ff2031d95787fa0d545b09c853d25657c08973527e43de02fddc086988123ca2a6339c
+DIST ccp4i-6.1.3-arpwarp.patch.bz2 58498 SHA256 297e6f75354f3a1932302f7039bf449484c95eb41b8634ae96d93c754b47c687 SHA512 0bf18d9768b722c553e79eed04de316f6b0b4695f7678e1d850d5e22735ecc79cdb961ea76b6482457fff232892b81ce191cd48fa588ded8058184a871dffb65 WHIRLPOOL f24625941e31e951f13c94cf31e2ca061840b016aa3fd038d29710d9ca400d364467dc3fa1e42a55944d63ac7e42a0a6baa39a596c55b18610eeb552d232d1b8
diff --git a/sci-chemistry/ccp4i/ccp4i-6.1.3-r4.ebuild b/sci-chemistry/ccp4i/ccp4i-6.1.3-r4.ebuild
new file mode 100644
index 000000000000..f5ac55ef17fa
--- /dev/null
+++ b/sci-chemistry/ccp4i/ccp4i-6.1.3-r4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-single-r1 virtualx
+
+MY_PN="${PN%i}"
+MY_P="${MY_PN}-${PV}"
+
+#UPDATE="04_03_09"
+#PATCHDATE="090511"
+
+SRC="ftp://ftp.ccp4.ac.uk/ccp4"
+
+DESCRIPTION="Protein X-ray crystallography toolkit -- graphical interface"
+HOMEPAGE="http://www.ccp4.ac.uk/"
+SRC_URI="
+ ${SRC}/${PV}/${MY_P}-core-src.tar.gz
+ mirror://gentoo/${P}-arpwarp.patch.bz2
+ http://dev.gentoo.org/~jlec/distfiles/${PV}-oasis4.0.patch.bz2"
+[[ -n ${UPDATE} ]] && SRC_URI="${SRC_URI} ${SRC}/${PV}/updates/${P}-src-patch-${UPDATE}.tar.gz"
+[[ -n ${PATCHDATE} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/science-dist/${PV}-${PATCHDATE}-updates.patch.bz2"
+
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+LICENSE="ccp4"
+IUSE=""
+
+RDEPEND="
+ app-shells/tcsh
+ media-gfx/graphviz
+ >=dev-lang/tk-8.3:0
+ >=dev-tcltk/blt-2.4
+ sci-libs/ccp4-libs"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-fix-baubles.patch
+ "${WORKDIR}"/${P}-arpwarp.patch
+ )
+
+src_prepare() {
+ epatch ${PATCHES[@]}
+
+ [[ ! -z ${PATCHDATE} ]] && epatch "${WORKDIR}"/${PV}-${PATCHDATE}-updates.patch
+
+ epatch "${WORKDIR}"/${PV}-oasis4.0.patch
+ python_fix_shebang ccp4i/ share/dbccp4i/
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ # rm imosflm stuff
+ rm -rf "${S}"/ccp4i/{bin/imosflm,imosflm} || die
+
+ rm -rf "${S}"/ccp4i/{bin,etc}/WINDOWS || die
+
+ # This is installed by mrbump
+ rm -rf "${S}"/ccp4i/{tasks/{dbviewer.tcl,mrbump.*},templates/mrbump.com,scripts/mrbump.script} || die
+
+ # CCP4Interface - GUI
+ insinto /usr/$(get_libdir)/ccp4
+ doins -r "${S}"/ccp4i
+ exeinto /usr/$(get_libdir)/ccp4/ccp4i/bin
+ doexe "${S}"/ccp4i/bin/*
+ dosym ../$(get_libdir)/ccp4/ccp4i/bin/ccp4i /usr/bin/ccp4i
+
+ dodir /usr/$(get_libdir)/ccp4/ccp4i/unix
+
+ # dbccp4i
+ insinto /usr/share/ccp4
+ doins -r "${S}"/share/dbccp4i
+}
+
+pkg_postinst() {
+ _ccp4-setup() {
+ source "${EPREFIX}/etc/profile"
+ export USER=root
+ bash "${EPREFIX}"/usr/$(get_libdir)/ccp4/ccp4i/bin/ccp4i -h > /dev/null
+ }
+ VIRTUALX_COMMAND="_ccp4-setup" virtualmake
+ echo ""
+ elog "ccp4i needs some enviromental settings. So please"
+ elog "\t source ${EPREFIX}/etc/profile"
+ echo ""
+}
diff --git a/sci-chemistry/ccp4i/files/6.1.3-fix-baubles.patch b/sci-chemistry/ccp4i/files/6.1.3-fix-baubles.patch
new file mode 100644
index 000000000000..2c5f659b8018
--- /dev/null
+++ b/sci-chemistry/ccp4i/files/6.1.3-fix-baubles.patch
@@ -0,0 +1,22 @@
+--- ccp4i/etc/configure.def.dist 2009-01-09 16:45:08.000000000 +0100
++++ ccp4i/etc/configure.def.dist.new 2009-07-07 23:17:26.000000000 +0200
+@@ -53,8 +53,8 @@
+ RUN_IMOSFLM _text "ccp4iwish [file join [GetEnvPath CCP4I_TOP] imosflm imosflm.tcl] project [GetCurrentProjectDir [GetCurrentProject]]"
+ RUN_CCP4MG _text "ccp4mg"
+ RUN_COOT _text "coot"
+-RUN_BAUBLES _text "python [file join [GetEnvPath CCP4] share smartie baubles.py]"
+-RUN_DBVIEWER _text "wish [file join [GetEnvPath CCP4] share dbccp4i application viewer.tcl]"
++RUN_BAUBLES _text "python [file join [GetEnvPath CCP4] share ccp4 smartie baubles.py]"
++RUN_DBVIEWER _text "wish [file join [GetEnvPath DBCCP4I_TOP] application viewer.tcl]"
+ ENABLE_BUBBLE_HELP _logical 1
+ DISABLE_TASKS _logical 1
+ CCP4_SETUP_COMMAND _text setup_ccp4
+@@ -62,7 +62,7 @@
+ BLT_LIBRARY _text ""
+ MENU_LENGTH _positiveint 25
+ HYPERTEXT_VIEWER _text firefox
+-START_NETSCAPE _text netscape
++START_NETSCAPE _text firefox
+ O_MAPMAN _text mapman
+ MAPMAN_MAXSIZE _positiveint 4194304
+ QUANTA_MBKALL _text mbkall
diff --git a/sci-chemistry/ccp4i/files/6.1.3-rename-rapper.patch b/sci-chemistry/ccp4i/files/6.1.3-rename-rapper.patch
new file mode 100644
index 000000000000..9f5cfb4b635f
--- /dev/null
+++ b/sci-chemistry/ccp4i/files/6.1.3-rename-rapper.patch
@@ -0,0 +1,61 @@
+diff --git a/ccp4i/scripts/check.script b/ccp4i/scripts/check.script
+index def44bc..dd4bb7e 100755
+--- a/ccp4i/scripts/check.script
++++ b/ccp4i/scripts/check.script
+@@ -24,7 +24,7 @@
+ if $RUN_RAMPAGE {
+
+ # Generate command line
+- set cmd "[BinPath rapper]"
++ set cmd "[BinPath rappermc]"
+
+ set rapperdatadir [FileJoin [GetEnvPath CCP4] share rapper]
+ set paramsfile [FileJoin $rapperdatadir params.xml]
+diff --git a/ccp4i/scripts/rapper.script b/ccp4i/scripts/rapper.script
+index cdae1e2..faae226 100755
+--- a/ccp4i/scripts/rapper.script
++++ b/ccp4i/scripts/rapper.script
+@@ -17,7 +17,7 @@
+
+ #set up command line
+
+-set cmd "[BinPath rapper]"
++set cmd "[BinPath rappermc]"
+
+ set rapperdatadir [FileJoin [GetEnvPath CCP4] share rapper]
+ set paramsfile [FileJoin [GetEnvPath CCP4] share rapper params.xml]
+@@ -180,7 +180,7 @@ append outfiles " $XYZOUT PROJECT"
+
+ # Run RAPPER to join loop back to framework and out put to defined pdb file
+ # Also need to sort out multimodel files join - FIX ME
+-set cmd2 "[BinPath rapper]"
++set cmd2 "[BinPath rappermc]"
+ append cmd2 " $paramsfile joinpdb "
+ append cmd2 " --pdb2 \"$root\-loop.pdb\" "
+ append cmd2 " --pdb \"$root\-framework.pdb\" "
+diff --git a/ccp4i/tasks/check.tcl b/ccp4i/tasks/check.tcl
+index ae88ff2..ee3307b 100755
+--- a/ccp4i/tasks/check.tcl
++++ b/ccp4i/tasks/check.tcl
+@@ -46,7 +46,7 @@ proc check_run { arrayname } {
+ # Check for Rampage program. If it is not found, we switch off the option.
+ # If it was the only option, script will fail with next check.
+ if { $array(RUN_RAMPAGE) == 1 } {
+- if { [FindExecutable "rapper"] == "" } {
++ if { [FindExecutable "rappermc"] == "" } {
+ WarningMessage "Input Error: Rapper_Rampage program not found in system path."
+ set array(RUN_RAMPAGE) 0
+ }
+diff --git a/ccp4i/tasks/rapper.tcl b/ccp4i/tasks/rapper.tcl
+index e299057..8843a3f 100755
+--- a/ccp4i/tasks/rapper.tcl
++++ b/ccp4i/tasks/rapper.tcl
+@@ -28,7 +28,7 @@ proc rapper_run { arrayname } {
+ # Check for RAPPER program. If it is not found, we switch off the option.
+ # If it was the only option, script will fail with next check.
+ if { [regexp MODEL $build_type ] && $prog_type == "RAPPER"} {
+- if { [FindExecutable "rapper"] == "" } {
++ if { [FindExecutable "rappermc"] == "" } {
+ WarningMessage "Input Error: RAPPER program not found in system path."
+ set build_type 0
+ }
diff --git a/sci-chemistry/ccp4i/files/6.1.3-rename-superpose.patch b/sci-chemistry/ccp4i/files/6.1.3-rename-superpose.patch
new file mode 100644
index 000000000000..74cd2b946601
--- /dev/null
+++ b/sci-chemistry/ccp4i/files/6.1.3-rename-superpose.patch
@@ -0,0 +1,26 @@
+diff --git a/ccp4i/scripts/superpose.script b/ccp4i/scripts/superpose.script
+index 3483c97..5027536 100755
+--- a/ccp4i/scripts/superpose.script
++++ b/ccp4i/scripts/superpose.script
+@@ -21,7 +21,7 @@
+
+ if { [regexp SSM $SUPERPOSE_MODE ] } {
+
+- set cmd "[BinPath superpose] \"$XYZIN2\" -s $SSM_MOVING \"$XYZIN1\" -s $SSM_FIXED \"$XYZOUT_LOCAL\""
++ set cmd "[BinPath superpose-ccp4] \"$XYZIN2\" -s $SSM_MOVING \"$XYZIN1\" -s $SSM_FIXED \"$XYZOUT_LOCAL\""
+ set status [Execute $cmd "" program_status report ]
+
+ } elseif { [regexp TOP $SUPERPOSE_MODE ] } {
+diff --git a/ccp4i/tasks/superpose.tcl b/ccp4i/tasks/superpose.tcl
+index 748bf6e..c92122a 100755
+--- a/ccp4i/tasks/superpose.tcl
++++ b/ccp4i/tasks/superpose.tcl
+@@ -100,7 +100,7 @@ proc superpose_run { arrayname } {
+ # If user is match equivalent named residues/atoms then fit in the match fields
+ switch [GetValue $arrayname SUPERPOSE_MODE] \
+ SSM {
+- if { ![file exists [FindExecutable superpose]] } {
++ if { ![file exists [FindExecutable superpose-ccp4]] } {
+ WarningMessage "The program \"superpose\" is not on your path.
+ Check your installation for \"superpose\" program and \"ssm\" library."
+ return 0
diff --git a/sci-chemistry/ccp4i/files/6.1.3-rename-truncate.patch b/sci-chemistry/ccp4i/files/6.1.3-rename-truncate.patch
new file mode 100644
index 000000000000..9af60b7c5152
--- /dev/null
+++ b/sci-chemistry/ccp4i/files/6.1.3-rename-truncate.patch
@@ -0,0 +1,91 @@
+diff --git a/ccp4i/crank/plugins/prep/crank_prep.tcl b/ccp4i/crank/plugins/prep/crank_prep.tcl
+index 7d05905..d01f1dc 100755
+--- a/ccp4i/crank/plugins/prep/crank_prep.tcl
++++ b/ccp4i/crank/plugins/prep/crank_prep.tcl
+@@ -226,7 +226,7 @@ proc run_truncate { i j } {
+ set script "$script\n$labout"
+ set script "$script\nEND\n"
+
+- set run_command "truncate $command << \"$script\""
++ set run_command "ftruncate $command << \"$script\""
+ puts $run_command
+ catch {eval exec $run_command } output
+ puts $output
+diff --git a/ccp4i/scripts/dtrek2mtz.script b/ccp4i/scripts/dtrek2mtz.script
+index e74aa0d..a2a1adb 100755
+--- a/ccp4i/scripts/dtrek2mtz.script
++++ b/ccp4i/scripts/dtrek2mtz.script
+@@ -36,7 +36,7 @@
+ set HKL_TRUNCATE [GetTmpFileName -ext mtz]
+
+ CreateComScript truncate truncate_script
+- set cmd "[BinPath truncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
++ set cmd "[BinPath ftruncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
+ set status [Execute $cmd $truncate_script program_status report]
+
+ HandleHarvestFile $HARVEST_MODE $HARVEST_PNAME $HARVEST_DNAME truncate
+diff --git a/ccp4i/scripts/import.script b/ccp4i/scripts/import.script
+index 90cba83..1c90c33 100755
+--- a/ccp4i/scripts/import.script
++++ b/ccp4i/scripts/import.script
+@@ -144,7 +144,7 @@ if { $FORMAT == "MTZ" } {
+
+ set truncatemtz [GetTmpFileName -ext mtz ]
+ CreateComScript truncate truncate_script
+- set cmd "[BinPath truncate] HKLIN \"$tmpmtz\" HKLOUT \"$truncatemtz\""
++ set cmd "[BinPath ftruncate] HKLIN \"$tmpmtz\" HKLOUT \"$truncatemtz\""
+ set status [Execute $cmd $truncate_script program_status report]
+
+
+diff --git a/ccp4i/scripts/import_scaled.script b/ccp4i/scripts/import_scaled.script
+index dcc619b..7250513 100755
+--- a/ccp4i/scripts/import_scaled.script
++++ b/ccp4i/scripts/import_scaled.script
+@@ -62,7 +62,7 @@
+
+ } else {
+ CreateComScript truncate truncate_script
+- set cmd "[BinPath truncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
++ set cmd "[BinPath ftruncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
+ set status [Execute $cmd $truncate_script program_status report]
+
+ HandleHarvestFile $HARVEST_MODE $HARVEST_PNAME $HARVEST_DNAME truncate
+diff --git a/ccp4i/scripts/scala.script b/ccp4i/scripts/scala.script
+index 6940ccd..bde10d6 100755
+--- a/ccp4i/scripts/scala.script
++++ b/ccp4i/scripts/scala.script
+@@ -275,7 +275,7 @@ END"
+
+ } else {
+ CreateComScript truncate truncate_script
+- set cmd "[BinPath truncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
++ set cmd "[BinPath ftruncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
+ set status [Execute $cmd $truncate_script $LOG_FILE program_status report ]
+ }
+
+diff --git a/ccp4i/scripts/scalepack2mtz.script b/ccp4i/scripts/scalepack2mtz.script
+index 986e06c..a1947a6 100755
+--- a/ccp4i/scripts/scalepack2mtz.script
++++ b/ccp4i/scripts/scalepack2mtz.script
+@@ -35,7 +35,7 @@
+
+ set HKL_TRUNCATE [GetTmpFileName -ext mtz]
+ CreateComScript truncate truncate_script
+- set cmd "[BinPath truncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
++ set cmd "[BinPath ftruncate] HKLIN \"$HKLTMP\" HKLOUT \"$HKL_TRUNCATE\""
+ set status [Execute $cmd $truncate_script program_status report]
+
+ HandleHarvestFile $HARVEST_MODE $HARVEST_PNAME $HARVEST_DNAME truncate
+diff --git a/ccp4i/scripts/truncate.script b/ccp4i/scripts/truncate.script
+index e0e09ce..2d448a2 100755
+--- a/ccp4i/scripts/truncate.script
++++ b/ccp4i/scripts/truncate.script
+@@ -45,7 +45,7 @@
+
+ CreateComScript truncate truncate_script
+
+- set cmd "[BinPath truncate] HKLIN \"$HKLIN\""
++ set cmd "[BinPath ftruncate] HKLIN \"$HKLIN\""
+ if { ![StringSame $INPUT_DATA AMPLITUDES] } {
+ append cmd " HKLOUT \"$HKL_TRUNCATE\""
+ }
diff --git a/sci-chemistry/ccp4i/metadata.xml b/sci-chemistry/ccp4i/metadata.xml
new file mode 100644
index 000000000000..51fdedab1b38
--- /dev/null
+++ b/sci-chemistry/ccp4i/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest
new file mode 100644
index 000000000000..73f83f19c7b2
--- /dev/null
+++ b/sci-chemistry/ccpn/Manifest
@@ -0,0 +1,6 @@
+DIST analysis2.4.1.tar.gz 36088236 SHA256 1cb089dcc739e8536d938a68536f556094f5d728907b251fe337758ba5bef106 SHA512 db44468c360d51815614fe0055505001c0a7a722f980c2c049c00524672bdfd4a507134ce1d68b29ebf622ffe94e0c9bb9685fea5b3441790b997a64f78c0dc1 WHIRLPOOL b53fc0438a878a8f8ce0244f5c1ce9edb616665149a699364e3bcd38c5db548c22b80ef67b4183ad5321b71b69a3b85aecc7d912893bba947700003a411651ac
+DIST analysis2.4.2.tar.gz 36390919 SHA256 14941131033cbd4b0b13d6d4fe3f9253360a7c2ace8ece9194be00c1fe4b2903 SHA512 694faefd3c085b559b6bb4729141a9ab885334f578bfbb0ebf260366dbca38c31738d5f5af50b5c7ea16b304b27adf80411082859796a5afeec630c36d56bd8b WHIRLPOOL 4499dcb074d445bfc972f9dea43e6f3e3c28722d513dce0fec4e1b2b5dab8be098f53f82565d86a4e7935f0595ef303465668230aa61021cf88e13cce8606214
+DIST ccpn-update-2.4.1-150226.patch.xz 10732 SHA256 74e8723d310d336cd4215ed4e9a1a1c0b2c0efdb4c03aaacba7ecd0575b38287 SHA512 60eb4acf6179f80207a72076ff5d5d733d3c3e804c1ce0a48701dd6e923146af49cd6759a529c8125f4b26eb3f8f83b35acc0c48b88a3e3034b25b5438a04feb WHIRLPOOL 3a2357d4fcb086206d45edd5b9cc807313b5f62be2f2a70e8f011f5521cf8729371b8c7149837c4ea1f6f059e26a49c1d20492f338a844e15f38ccf543faf6e1
+DIST ccpn-update-2.4.2-150325.patch.xz 2096 SHA256 d33676fd93aaa5814aa43179f221df69f4bae9b8ec98ce5b6cc57ce6aacab732 SHA512 c544e0a4a93d0e3275a22d07d21bf3bb5ed90cf041f40bf08fbc687b431640ad5c56180eadd4b43e4023b08ef42afe5a874423becc6f9313a0b1f642a4b97873 WHIRLPOOL f2e9780eb3216185cc6b89ca490e14c2de1130393eda4308fc71e6a2eb0460fc97f83ab3c92fb6a488a1926ba2f3099c7ae5f0a4bd216f8ffa24bfd87e360838
+DIST ccpn-update-2.4.2-150413.patch.xz 3132 SHA256 c0796e1f739f799003304c8b8d23ea0ee42b2e0a6dd59b292cb2a1167b5725f5 SHA512 99893ca009ff76b015017b29cfd97e0ae935ed2d62aa5a99d52dd9a5f22cf0d369e5019273fe3c3811c28b32568721fb64f71c5927eb57d0cc91dcea44b0288d WHIRLPOOL 48a355ef4824d41517d618178be4cd4efc42a6f5e190bac88348041504da0807aa1b34bafbc3937d7f6fc3b5b52fe469431fb6ce9df40bb1c56d7faad88cfe51
+DIST ccpn-update-2.4.2-150421.patch.xz 3788 SHA256 df8f7dd81281f3f7ddd266b8bd90a089f61a9e8f0cda3bcba8b495a6f4be6238 SHA512 0e8a10b6d9721b52574cd2fe0413dca0fac32a948eb31d3db6e2c4d4f7d85c341e8d53d70954341792ea598a37ec87e4392a615e1c2f6f8bbfc0e42a750be648 WHIRLPOOL 2673ac33b2eca1a3fb873567784f1d77937e7ec6aec3ab7eef6065f9322513326993786bd3865a50c50c58e05bf874ba25df02d15083f50aef9acb404ca4e1ef
diff --git a/sci-chemistry/ccpn/ccpn-2.4.1_p150226.ebuild b/sci-chemistry/ccpn/ccpn-2.4.1_p150226.ebuild
new file mode 100644
index 000000000000..6768d790f140
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.4.1_p150226.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ssl,tk"
+
+inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+[[ -n ${PATCHSET} ]] \
+ && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+opengl"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/tk:0=[threads]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-tcltk/tix
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
+ sci-biology/psipred
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/2.3.1-parallel.patch
+
+ append-lfs-flags
+
+ sed \
+ -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
+ -e "s:weights_s:weights:g" \
+ -i python/ccpnmr/analysis/wrappers/Psipred.py || die
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS=""
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s|/usr|${EPREFIX}/usr|g" \
+ -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
+ -e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \
+ -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
+ -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
+ -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
+ -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
+ -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
+ -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
+ -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
+ -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
+ -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
+ -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TK_LIB =\).*|\1 -ltk|g" \
+ -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \
+ -e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \
+ c/environment_default.txt > c/environment.txt || die
+
+ sed \
+ -e 's:ln -s:cp -f:g' \
+ -i $(find python -name linkSharedObjs) || die
+}
+
+src_compile() {
+ emake -C c all
+ emake -C c links
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type f -delete || die
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s|gentoo_sitedir|$(python_get_sitedir)|g" \
+ -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
+ -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
+ -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
+ -e "s|gentoopython|${EPYTHON}|g" \
+ -e "s|gentoousr|${EPREFIX}/usr|g" \
+ -e "s|//|/|g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper}
+ done
+
+ local in_path=$(python_get_sitedir)/${PN}
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's|#from __future__|from __future__|g' \
+ -i ${i} || die
+ done
+
+ dodir ${in_path#${EPREFIX}}/c
+
+ ebegin "Installing main files"
+ python_moduleinto ${PN}
+ python_domodule python
+ eend
+
+ ebegin "Adjusting permissions"
+ for _file in $(find "${ED}" -type f -name "*so"); do
+ chmod 755 ${_file}
+ done
+ eend
+ python_optimize
+}
diff --git a/sci-chemistry/ccpn/ccpn-2.4.2.ebuild b/sci-chemistry/ccpn/ccpn-2.4.2.ebuild
new file mode 100644
index 000000000000..b97807a88f38
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.4.2.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ssl,tk"
+
+inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
+
+#PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+[[ -n ${PATCHSET} ]] \
+ && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+opengl"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/tk:0=[threads]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-tcltk/tix
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
+ sci-biology/psipred
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/2.3.1-parallel.patch
+
+ append-lfs-flags
+
+ sed \
+ -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
+ -e "s:weights_s:weights:g" \
+ -i python/ccpnmr/analysis/wrappers/Psipred.py || die
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS=""
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s|/usr|${EPREFIX}/usr|g" \
+ -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
+ -e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \
+ -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
+ -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
+ -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
+ -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
+ -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
+ -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
+ -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
+ -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
+ -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
+ -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TK_LIB =\).*|\1 -ltk|g" \
+ -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \
+ -e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \
+ c/environment_default.txt > c/environment.txt || die
+
+ sed \
+ -e 's:ln -s:cp -f:g' \
+ -i $(find python -name linkSharedObjs) || die
+}
+
+src_compile() {
+ emake -C c all
+ emake -C c links
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type f -delete || die
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s|gentoo_sitedir|$(python_get_sitedir)|g" \
+ -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
+ -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
+ -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
+ -e "s|gentoopython|${EPYTHON}|g" \
+ -e "s|gentoousr|${EPREFIX}/usr|g" \
+ -e "s|//|/|g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper}
+ done
+
+ local in_path=$(python_get_sitedir)/${PN}
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's|#from __future__|from __future__|g' \
+ -i ${i} || die
+ done
+
+ dodir ${in_path#${EPREFIX}}/c
+
+ ebegin "Installing main files"
+ python_moduleinto ${PN}
+ python_domodule python
+ eend
+
+ ebegin "Adjusting permissions"
+ for _file in $(find "${ED}" -type f -name "*so"); do
+ chmod 755 ${_file}
+ done
+ eend
+ python_optimize
+}
diff --git a/sci-chemistry/ccpn/ccpn-2.4.2_p150325.ebuild b/sci-chemistry/ccpn/ccpn-2.4.2_p150325.ebuild
new file mode 100644
index 000000000000..6768d790f140
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.4.2_p150325.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ssl,tk"
+
+inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+[[ -n ${PATCHSET} ]] \
+ && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+opengl"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/tk:0=[threads]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-tcltk/tix
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
+ sci-biology/psipred
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/2.3.1-parallel.patch
+
+ append-lfs-flags
+
+ sed \
+ -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
+ -e "s:weights_s:weights:g" \
+ -i python/ccpnmr/analysis/wrappers/Psipred.py || die
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS=""
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s|/usr|${EPREFIX}/usr|g" \
+ -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
+ -e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \
+ -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
+ -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
+ -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
+ -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
+ -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
+ -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
+ -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
+ -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
+ -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
+ -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TK_LIB =\).*|\1 -ltk|g" \
+ -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \
+ -e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \
+ c/environment_default.txt > c/environment.txt || die
+
+ sed \
+ -e 's:ln -s:cp -f:g' \
+ -i $(find python -name linkSharedObjs) || die
+}
+
+src_compile() {
+ emake -C c all
+ emake -C c links
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type f -delete || die
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s|gentoo_sitedir|$(python_get_sitedir)|g" \
+ -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
+ -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
+ -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
+ -e "s|gentoopython|${EPYTHON}|g" \
+ -e "s|gentoousr|${EPREFIX}/usr|g" \
+ -e "s|//|/|g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper}
+ done
+
+ local in_path=$(python_get_sitedir)/${PN}
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's|#from __future__|from __future__|g' \
+ -i ${i} || die
+ done
+
+ dodir ${in_path#${EPREFIX}}/c
+
+ ebegin "Installing main files"
+ python_moduleinto ${PN}
+ python_domodule python
+ eend
+
+ ebegin "Adjusting permissions"
+ for _file in $(find "${ED}" -type f -name "*so"); do
+ chmod 755 ${_file}
+ done
+ eend
+ python_optimize
+}
diff --git a/sci-chemistry/ccpn/ccpn-2.4.2_p150413.ebuild b/sci-chemistry/ccpn/ccpn-2.4.2_p150413.ebuild
new file mode 100644
index 000000000000..6768d790f140
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.4.2_p150413.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ssl,tk"
+
+inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+[[ -n ${PATCHSET} ]] \
+ && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+opengl"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/tk:0=[threads]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-tcltk/tix
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
+ sci-biology/psipred
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/2.3.1-parallel.patch
+
+ append-lfs-flags
+
+ sed \
+ -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
+ -e "s:weights_s:weights:g" \
+ -i python/ccpnmr/analysis/wrappers/Psipred.py || die
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS=""
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s|/usr|${EPREFIX}/usr|g" \
+ -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
+ -e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \
+ -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
+ -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
+ -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
+ -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
+ -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
+ -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
+ -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
+ -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
+ -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
+ -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TK_LIB =\).*|\1 -ltk|g" \
+ -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \
+ -e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \
+ c/environment_default.txt > c/environment.txt || die
+
+ sed \
+ -e 's:ln -s:cp -f:g' \
+ -i $(find python -name linkSharedObjs) || die
+}
+
+src_compile() {
+ emake -C c all
+ emake -C c links
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type f -delete || die
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s|gentoo_sitedir|$(python_get_sitedir)|g" \
+ -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
+ -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
+ -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
+ -e "s|gentoopython|${EPYTHON}|g" \
+ -e "s|gentoousr|${EPREFIX}/usr|g" \
+ -e "s|//|/|g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper}
+ done
+
+ local in_path=$(python_get_sitedir)/${PN}
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's|#from __future__|from __future__|g' \
+ -i ${i} || die
+ done
+
+ dodir ${in_path#${EPREFIX}}/c
+
+ ebegin "Installing main files"
+ python_moduleinto ${PN}
+ python_domodule python
+ eend
+
+ ebegin "Adjusting permissions"
+ for _file in $(find "${ED}" -type f -name "*so"); do
+ chmod 755 ${_file}
+ done
+ eend
+ python_optimize
+}
diff --git a/sci-chemistry/ccpn/ccpn-2.4.2_p150421.ebuild b/sci-chemistry/ccpn/ccpn-2.4.2_p150421.ebuild
new file mode 100644
index 000000000000..6768d790f140
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.4.2_p150421.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ssl,tk"
+
+inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+[[ -n ${PATCHSET} ]] \
+ && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+opengl"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-lang/tk:0=[threads]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-tcltk/tix
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
+ sci-biology/psipred
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/2.3.1-parallel.patch
+
+ append-lfs-flags
+
+ sed \
+ -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
+ -e "s:weights_s:weights:g" \
+ -i python/ccpnmr/analysis/wrappers/Psipred.py || die
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS=""
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s|/usr|${EPREFIX}/usr|g" \
+ -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
+ -e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \
+ -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
+ -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
+ -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
+ -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
+ -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
+ -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
+ -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
+ -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
+ -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
+ -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(TK_LIB =\).*|\1 -ltk|g" \
+ -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
+ -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \
+ -e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \
+ c/environment_default.txt > c/environment.txt || die
+
+ sed \
+ -e 's:ln -s:cp -f:g' \
+ -i $(find python -name linkSharedObjs) || die
+}
+
+src_compile() {
+ emake -C c all
+ emake -C c links
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type f -delete || die
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s|gentoo_sitedir|$(python_get_sitedir)|g" \
+ -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
+ -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
+ -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
+ -e "s|gentoopython|${EPYTHON}|g" \
+ -e "s|gentoousr|${EPREFIX}/usr|g" \
+ -e "s|//|/|g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper}
+ done
+
+ local in_path=$(python_get_sitedir)/${PN}
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's|#from __future__|from __future__|g' \
+ -i ${i} || die
+ done
+
+ dodir ${in_path#${EPREFIX}}/c
+
+ ebegin "Installing main files"
+ python_moduleinto ${PN}
+ python_domodule python
+ eend
+
+ ebegin "Adjusting permissions"
+ for _file in $(find "${ED}" -type f -name "*so"); do
+ chmod 755 ${_file}
+ done
+ eend
+ python_optimize
+}
diff --git a/sci-chemistry/ccpn/files/2.3.1-parallel.patch b/sci-chemistry/ccpn/files/2.3.1-parallel.patch
new file mode 100644
index 000000000000..fcf44707e082
--- /dev/null
+++ b/sci-chemistry/ccpn/files/2.3.1-parallel.patch
@@ -0,0 +1,38 @@
+diff --git a/ccpnmr2.3/c/Makefile b/ccpnmr2.3/c/Makefile
+index 01fb25a..8e8e1fe 100644
+--- a/ccpnmr2.3/c/Makefile
++++ b/ccpnmr2.3/c/Makefile
+@@ -5,22 +5,22 @@ all: compile
+ compile: global structure analysis clouds dynamics bayes
+
+ global:
+- cd memops/global && $(MAKE)
++ $(MAKE) -C memops/global
+
+-structure:
+- cd ccp/structure && $(MAKE)
++structure: global
++ $(MAKE) -C ccp/structure
+
+-analysis:
+- cd ccpnmr/analysis && $(MAKE)
++analysis: global
++ $(MAKE) -C ccpnmr/analysis
+
+-clouds:
+- cd ccpnmr/clouds && $(MAKE)
++clouds: global
++ $(MAKE) -C ccpnmr/clouds
+
+-dynamics:
+- cd ccpnmr/dynamics && $(MAKE)
++dynamics: global
++ $(MAKE) -C ccpnmr/dynamics
+
+-bayes:
+- cd other/cambridge/bayes && $(MAKE)
++bayes: global
++ $(MAKE) -C other/cambridge/bayes
+
+ clean: global_clean structure_clean analysis_clean clouds_clean dynamics_clean bayes_clean
+
diff --git a/sci-chemistry/ccpn/files/analysis b/sci-chemistry/ccpn/files/analysis
new file mode 100644
index 000000000000..828ed4e64ae9
--- /dev/null
+++ b/sci-chemistry/ccpn/files/analysis
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -i -O ${CCPNMR_TOP_DIR}/ccpn/python/ccpnmr/analysis/AnalysisGui.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/files/dangle b/sci-chemistry/ccpn/files/dangle
new file mode 100644
index 000000000000..6d8a42e615de
--- /dev/null
+++ b/sci-chemistry/ccpn/files/dangle
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/cambridge/dangle/DangleGui.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/files/dataShifter b/sci-chemistry/ccpn/files/dataShifter
new file mode 100644
index 000000000000..c083960f2f60
--- /dev/null
+++ b/sci-chemistry/ccpn/files/dataShifter
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/ccpnmr/format/gui/DataShifter.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/files/depositionFileImporter b/sci-chemistry/ccpn/files/depositionFileImporter
new file mode 100644
index 000000000000..09505ccc4925
--- /dev/null
+++ b/sci-chemistry/ccpn/files/depositionFileImporter
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/pdbe/deposition/dataFileImport/dataFileImportGui.py $@
diff --git a/sci-chemistry/ccpn/files/eci b/sci-chemistry/ccpn/files/eci
new file mode 100644
index 000000000000..54d913348718
--- /dev/null
+++ b/sci-chemistry/ccpn/files/eci
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/ccpnmr/eci/EntryCompletionGui.py $*
diff --git a/sci-chemistry/ccpn/files/extendNmr b/sci-chemistry/ccpn/files/extendNmr
new file mode 100644
index 000000000000..a2fe4c997c7c
--- /dev/null
+++ b/sci-chemistry/ccpn/files/extendNmr
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O -i -O ${CCPNMR_TOP_DIR}/ccpn/python/extendNmr/ExtendNmrGui.py $@
diff --git a/sci-chemistry/ccpn/files/formatConverter b/sci-chemistry/ccpn/files/formatConverter
new file mode 100644
index 000000000000..6cb273612352
--- /dev/null
+++ b/sci-chemistry/ccpn/files/formatConverter
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/ccpnmr/format/gui/FormatConverter.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/files/pipe2azara b/sci-chemistry/ccpn/files/pipe2azara
new file mode 100644
index 000000000000..5a3710a134a7
--- /dev/null
+++ b/sci-chemistry/ccpn/files/pipe2azara
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/ccp/format/spectra/params/NmrPipeData.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/files/talosn.patch b/sci-chemistry/ccpn/files/talosn.patch
new file mode 100644
index 000000000000..e19a0ab19783
--- /dev/null
+++ b/sci-chemistry/ccpn/files/talosn.patch
@@ -0,0 +1,16 @@
+ ccpnmr2.3/python/ccpnmr/format/general/Constants.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ccpnmr2.3/python/ccpnmr/format/general/Constants.py b/ccpnmr2.3/python/ccpnmr/format/general/Constants.py
+index d10553e..fb732db 100644
+--- a/ccpnmr2.3/python/ccpnmr/format/general/Constants.py
++++ b/ccpnmr2.3/python/ccpnmr/format/general/Constants.py
+@@ -865,7 +865,7 @@ IoSetupList = [
+ 'cyana': ['dihedrals.aco',1,1, [['SelectionList','version','Cyana version:',['2.0','2.1'],None]],
+ [['SelectionList','version','Cyana version:',['2.0','2.1'],None]]],
+ 'nmrStar': ['nmrStar.str',1,0, [],[]],
+- 'talos': ['dihedral.tab',1,0, [['MultiSelectionList','validClasses','Classes for valid constraint:',['Good','New','Warn','None'],None],
++ 'talos': ['dihedral.tab',1,0, [['MultiSelectionList','validClasses','Classes for valid constraint:',['Good','New','Warn','Dyn', 'Strong', 'Generous', 'None'],None],
+ ['IntEntry','validCount','Count variable lower limit for valid constraint:',0,None],
+ ['FloatEntry','multiplyDeviation','Multiplication factor to convert deviation in constraint range:',2.0,None]],
+ []]},
diff --git a/sci-chemistry/ccpn/files/xeasy2azara b/sci-chemistry/ccpn/files/xeasy2azara
new file mode 100644
index 000000000000..7b73714c2fa5
--- /dev/null
+++ b/sci-chemistry/ccpn/files/xeasy2azara
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export CCPNMR_TOP_DIR=gentoo_sitedir
+export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+export TCL_LIBRARY=gentootcl
+export TK_LIBRARY=gentootk
+export PSIPRED_DIR=gentoousr
+gentoopython -O ${CCPNMR_TOP_DIR}/ccpn/python/ccp/format/spectra/params/XeasyData.py $1 $2 $3 $4 $5 $6
diff --git a/sci-chemistry/ccpn/metadata.xml b/sci-chemistry/ccpn/metadata.xml
new file mode 100644
index 000000000000..ae9ec7c5f6a4
--- /dev/null
+++ b/sci-chemistry/ccpn/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/chemical-mime-data/Manifest b/sci-chemistry/chemical-mime-data/Manifest
new file mode 100644
index 000000000000..d8db80c30926
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/Manifest
@@ -0,0 +1 @@
+DIST chemical-mime-data-0.1.94.tar.bz2 146077 SHA256 4907cdf60e9edca0a453f6f24e9179ae9da085b67168e932ba44a4280316bff1 SHA512 7f3d967149f27ab1de53c948dc055959e661e1be9d778e3d56d06bea95769da7770ab5fb66afab6607747ef91ffb1dbbcf921e5f06e3303351781968594b5f00 WHIRLPOOL 2e601b37ca22cc1d2b77b5d82713e756dea380fcb0a01c517513be0271162df6e19e7cc7dbc0af8f25e579bb809e0768cc2ee394124c91c296ed0d4c38cfa213
diff --git a/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r1.ebuild b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r1.ebuild
new file mode 100644
index 000000000000..c63c806baa7c
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils fdo-mime
+
+DESCRIPTION="A collection of data files to add support for chemical MIME types"
+HOMEPAGE="http://chemical-mime.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN/-data/}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/pkgconfig
+ x11-misc/shared-mime-info
+ dev-util/intltool
+ dev-util/desktop-file-utils
+ dev-libs/libxslt
+ media-gfx/imagemagick[xml]
+ gnome-base/gnome-mime-data"
+
+RDEPEND=""
+
+src_configure() {
+ econf --disable-update-database --htmldir=/usr/share/doc/${PF}/html
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ ewarn "You can ignore any 'Unknown media type in type' warnings."
+}
diff --git a/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r2.ebuild b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r2.ebuild
new file mode 100644
index 000000000000..851bd6b2bec4
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils fdo-mime
+
+DESCRIPTION="A collection of data files to add support for chemical MIME types"
+HOMEPAGE="http://chemical-mime.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN/-data/}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ gnome-base/gnome-mime-data
+ x11-misc/shared-mime-info"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ dev-util/desktop-file-utils
+ dev-libs/libxslt
+ media-gfx/imagemagick[xml]
+ media-gfx/inkscape
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-turbomole.patch
+ "${FILESDIR}"/${P}-pigz.patch
+ "${FILESDIR}"/${P}-namespace-svg.patch
+ )
+
+src_prepare() {
+ # needed for convert/inkscape #464782
+ export XDG_CONFIG_HOME=$HOME/.config
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-update-database
+ --htmldir=/usr/share/doc/${PF}/html
+ )
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ ewarn "You can ignore any 'Unknown media type in type' warnings."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ ewarn "You can ignore any 'Unknown media type in type' warnings."
+}
diff --git a/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94.ebuild b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94.ebuild
new file mode 100644
index 000000000000..c965d2f88027
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils fdo-mime
+
+DESCRIPTION="A collection of data files to add support for chemical MIME types"
+HOMEPAGE="http://chemical-mime.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN/-data/}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="virtual/pkgconfig
+ x11-misc/shared-mime-info
+ dev-util/intltool
+ dev-util/desktop-file-utils
+ dev-libs/libxslt
+ media-gfx/imagemagick[xml]
+ gnome-base/gnome-mime-data"
+
+RDEPEND=""
+
+src_configure() {
+ econf --disable-update-database --htmldir=/usr/share/doc/${PN}/html
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ ewarn "You can ignore any 'Unknown media type in type' warnings."
+}
diff --git a/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-namespace-svg.patch b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-namespace-svg.patch
new file mode 100644
index 000000000000..9860261af403
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-namespace-svg.patch
@@ -0,0 +1,16 @@
+ icons/hicolor/gnome-mime-chemical.svg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/icons/hicolor/gnome-mime-chemical.svg b/icons/hicolor/gnome-mime-chemical.svg
+index 1a8d428..804514c 100644
+--- a/icons/hicolor/gnome-mime-chemical.svg
++++ b/icons/hicolor/gnome-mime-chemical.svg
+@@ -5,7 +5,7 @@
+ <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+ <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+ ]>
+-<svg xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
++<svg xmlns:svg="&ns_svg;" xmlns:xlink="&ns_xlink;" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ width="128" height="128" viewBox="0 0 128 128" overflow="visible" enable-background="new 0 0 128 128" xml:space="preserve">
+ <g id="Layer_1">
+ <g>
diff --git a/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-pigz.patch b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-pigz.patch
new file mode 100644
index 000000000000..8b5ccfbc3fd9
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-pigz.patch
@@ -0,0 +1,16 @@
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 96e03ab..ba0847a 100644
+--- a/icons/hicolor/Makefile.am
++++ b/icons/hicolor/Makefile.am
+@@ -21,7 +21,7 @@ icon_sizes = 16 22 24 32 36 48 64 72 96 128 192
+ if BOOL_HICOLOR_THEME
+
+ .svg.svgz:
+- gzip $< -c > $@
++ gzip -c $< > $@
+ for size in $(icon_sizes) ; do \
+ if test "x$(RSVG)" != "x" ; then \
+ $(RSVG) -w $${size} -h $${size} -f png $< $*_$${size}.png ; \
diff --git a/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-turbomole.patch b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-turbomole.patch
new file mode 100644
index 000000000000..852d6b0605be
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-turbomole.patch
@@ -0,0 +1,57 @@
+diff -up chemical-mime-data-0.1.94/src/chemical-mime-database.xml.in.turbomole chemical-mime-data-0.1.94/src/chemical-mime-database.xml.in
+--- chemical-mime-data-0.1.94/src/chemical-mime-database.xml.in.turbomole 2009-08-10 09:37:06.000000000 +0200
++++ chemical-mime-data-0.1.94/src/chemical-mime-database.xml.in 2009-08-10 09:40:57.000000000 +0200
+@@ -1290,7 +1290,7 @@
+ <specification url="http://ca.expasy.org/sprot/userman.html"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-basis" support="no">
++ <mime-type type="chemical/x-turbomole-basis" support="yes">
+ <_comment>Turbomole Basis Set File</_comment>
+ <glob pattern="basis"/>
+ <sub-class-of type="text/plain"/>
+@@ -1304,7 +1304,7 @@
+ <specification url="http://www.cosmologic.de/data/DOK_HTML/"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-control" support="no">
++ <mime-type type="chemical/x-turbomole-control" support="yes">
+ <_comment>Turbomole Control File</_comment>
+ <glob pattern="control"/>
+ <sub-class-of type="text/plain"/>
+@@ -1320,7 +1320,7 @@
+ <specification url="http://www.cosmologic.de/data/DOK_HTML/node230.html"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-coord" support="no">
++ <mime-type type="chemical/x-turbomole-coord" support="yes">
+ <_comment>Turbomole Coordinate File</_comment>
+ <glob pattern="coord"/>
+ <glob pattern="*.tmol"/>
+@@ -1335,7 +1335,7 @@
+ <specification url="http://www.cosmologic.de/data/DOK_HTML/"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-grad" support="no">
++ <mime-type type="chemical/x-turbomole-grad" support="yes">
+ <_comment>Turbomole Gradient File</_comment>
+ <glob pattern="gradient"/>
+ <sub-class-of type="text/plain"/>
+@@ -1383,7 +1383,7 @@
+ <specification url="http://www.cosmologic.de/data/DOK_HTML/"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-scfmo" support="no">
++ <mime-type type="chemical/x-turbomole-scfmo" support="yes">
+ <_comment>Turbomole SCF Molecular Orbital File</_comment>
+ <acronym>MO</acronym>
+ <expanded-acronym>Molecular Orbital</expanded-acronym>
+@@ -1401,7 +1401,7 @@
+ <specification url="http://www.cosmologic.de/data/DOK_HTML/"/>
+ </mime-type>
+
+- <mime-type type="chemical/x-turbomole-vibrational" support="no">
++ <mime-type type="chemical/x-turbomole-vibrational" support="yes">
+ <_comment>Turbomole Vibrational Data File</_comment>
+ <glob pattern="???"/>
+ <sub-class-of type="text/plain"/>
diff --git a/sci-chemistry/chemical-mime-data/metadata.xml b/sci-chemistry/chemical-mime-data/metadata.xml
new file mode 100644
index 000000000000..941ce487e86e
--- /dev/null
+++ b/sci-chemistry/chemical-mime-data/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>je_fro@gentoo.org</email>
+ <name>Jeff Gardner</name>
+ </maintainer>
+ <longdescription lang="en">
+A collection of data files to add support for chemical MIME types.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">chemical-mime</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/chemtool/Manifest b/sci-chemistry/chemtool/Manifest
new file mode 100644
index 000000000000..a364d0afdaea
--- /dev/null
+++ b/sci-chemistry/chemtool/Manifest
@@ -0,0 +1,2 @@
+DIST chemtool-1.6.13.tar.gz 838868 SHA256 31a07683f55305c3e0c4d7af3bc3d1d3a9a2eff4d836455fe1e382962f0aa0c8 SHA512 6c248321f73b6eab4ad21e810639a1f0b14cc30db9c9fdc8fe66ee218bd88ead5e74f1f047f5badcb91b515827c2eddc64b28ead380d9b14ab5b76777e7134dd WHIRLPOOL c7158a75480e9b98eb2ed5c16d73c4d5e5fa05375009ac1778b7e9bf0e9a2ef9092032557d46ea506a6503c0799676998a6fcb80063ed56a7ae8d360c1f273bc
+DIST chemtool-1.6.14.tar.gz 817735 SHA256 86161a0461386b334a5ffb17cdf094a491941884678272f45749813514ddafcb SHA512 066c83c61aced3134b081767e788143a047889a2fee4b6535c2b0a3166bccc73d75981e1cf35b7bcaa5b8fe2e0227b28693b659decd82f7783cb4082ac6ed2bd WHIRLPOOL 41a2bd4662c06307a94281e6a54d4e129b407bc597c7d08c8a9f976332cb727f3e195d1d85429716ac22a34ea1dae03b724167bbb5444c03dcb24131cc20ae1d
diff --git a/sci-chemistry/chemtool/chemtool-1.6.13.ebuild b/sci-chemistry/chemtool/chemtool-1.6.13.ebuild
new file mode 100644
index 000000000000..2ab2dc197a0b
--- /dev/null
+++ b/sci-chemistry/chemtool/chemtool-1.6.13.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils eutils
+
+DESCRIPTION="A GTK program for drawing organic molecules"
+HOMEPAGE="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/"
+SRC_URI="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="emf gnome nls"
+
+RDEPEND="
+ dev-libs/glib:2
+ media-gfx/transfig
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+ emf? ( media-libs/libemf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-no-underlinking.patch
+ )
+
+src_configure() {
+ local myeconfargs=(
+ --without-kdedir
+ $(use_with gnome gnomedir /usr)
+ $(use_enable emf)
+ --enable-undo
+ --enable-menu
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ insinto /usr/share/${PN}/examples
+ doins "${S}"/examples/*
+ if ! use nls; then rm -rf "${ED}"/usr/share/locale || die; fi
+
+ insinto /usr/share/pixmaps
+ doins chemtool.xpm
+ make_desktop_entry ${PN} Chemtool ${PN} "Education;Science;Chemistry"
+}
diff --git a/sci-chemistry/chemtool/chemtool-1.6.14.ebuild b/sci-chemistry/chemtool/chemtool-1.6.14.ebuild
new file mode 100644
index 000000000000..b77cb79569e4
--- /dev/null
+++ b/sci-chemistry/chemtool/chemtool-1.6.14.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils eutils
+
+DESCRIPTION="A GTK program for drawing organic molecules"
+HOMEPAGE="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/"
+SRC_URI="http://ruby.chemie.uni-freiburg.de/~martin/chemtool/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="emf gnome nls"
+
+RDEPEND="
+ dev-libs/glib:2
+ media-gfx/transfig
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+ emf? ( media-libs/libemf )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/1.6.13-no-underlinking.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --without-kdedir
+ $(use_with gnome gnomedir /usr)
+ $(use_enable emf)
+ --enable-undo
+ --enable-menu
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ insinto /usr/share/${PN}/examples
+ doins "${S}"/examples/*
+ if ! use nls; then rm -rf "${ED}"/usr/share/locale || die; fi
+
+ insinto /usr/share/pixmaps
+ doins chemtool.xpm
+ make_desktop_entry ${PN} Chemtool ${PN} "Education;Science;Chemistry"
+}
diff --git a/sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch b/sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch
new file mode 100644
index 000000000000..5d2fe36d6bf1
--- /dev/null
+++ b/sci-chemistry/chemtool/files/1.6.13-no-underlinking.patch
@@ -0,0 +1,78 @@
+ Makefile.am | 6 ++++--
+ configure.ac | 24 ++++--------------------
+ 2 files changed, 8 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 99dbf8c..931ba16 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -22,10 +22,12 @@ localedir = $(datadir)/locale
+ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+ # Make sure the gettext.h include file is found.
+-AM_CPPFLAGS = -I. -I$(srcdir) @GTK_CFLAGS@
++AM_CPPFLAGS = -I. -I$(srcdir) @GTK_CFLAGS@ @EMFINCL@
+
+ # Link time dependencies.
+-LDADD = @LIBINTL@ @GTK_LIBS@ @EMFLIBS@
++LDADD = @LIBINTL@ @GTK_LIBS@ @EMFLIBS@ -lX11
++
++AM_CFLAGS = -DGTK2
+
+ # Additional files to be distributed.
+ EXTRA_DIST = autogen.sh autoclean.sh
+diff --git a/configure.ac b/configure.ac
+index 6d8c45a..c5fab42 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,32 +32,14 @@ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+ AC_MSG_CHECKING([for GTK version and compile options ])
+
+-if test x$PKG_CONFIG = xno -o x$enable_gtk1 = xyes ; then
+-AM_PATH_GTK(1.0.2, , exit 1)
+-else
+-if $PKG_CONFIG gtk+-2.0 --cflags ; then
+- GTK_CFLAGS="-DGTK2 `$PKG_CONFIG gtk+-2.0 --cflags` "
+- GTK_LIBS=`$PKG_CONFIG gtk+-2.0 --libs`
+-dnl use_gtk2=yes
+- AC_DEFINE([GTK2], [1], [the GTK2 library])
+- enable_stockgtk=yes
+-else
+-if $PKG_CONFIG --cflags gtk+ ; then
+- GTK_CFLAGS=`$PKG_CONFIG gtk+ --cflags`
+- GTK_LIBS=`$PKG_CONFIG gtk+ --libs`
+-dnl use_gtk2=no
+-fi
+-fi
+-fi
+-
+-dnl AC_MSG_RESULT using GTK2 : $use_gtk2
++PKG_CHECK_MODULES([GTK],[gtk+-2.0])
+
+ dnl Checks for header files.
+ AC_PATH_XTRA
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+
+-LDFLAGS="$X_LIBS"
++LDFLAGS+="$X_LIBS"
+ AC_CHECK_LIB([X11],[XOpenDisplay])
+ dnl just an ugly hack to work around the more aggressive header checks
+ dnl in recent autoconf. Not sure if we should really rely on include
+@@ -184,6 +166,7 @@ if test x$enable_emf = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([EMF], [1], [use optional libEMF instead of fig2dev for EMF output])
+ EMFLIBS="-lEMF -lstdc++"
++ EMFINCL="-I${includedir}libEMF"
+ else
+ AC_MSG_RESULT(no)
+ EMFLIBS=""
+@@ -221,6 +204,7 @@ AC_SUBST(localedir)
+ AC_SUBST(kdemimedir)
+ AC_SUBST(gnomemimedir)
+ AC_SUBST(EMFLIBS)
++AC_SUBST(EMFINCL)
+ AC_SUBST(MYGTKSRCS)
+ AC_SUBST(MYGTKOBJS)
+ AC_SUBST(GTK_CFLAGS)
diff --git a/sci-chemistry/chemtool/metadata.xml b/sci-chemistry/chemtool/metadata.xml
new file mode 100644
index 000000000000..26c258873424
--- /dev/null
+++ b/sci-chemistry/chemtool/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <use>
+ <flag name="emf">EMF export support</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-chemistry/clashlist/Manifest b/sci-chemistry/clashlist/Manifest
new file mode 100644
index 000000000000..3c71b7792037
--- /dev/null
+++ b/sci-chemistry/clashlist/Manifest
@@ -0,0 +1 @@
+DIST molprobity-3.17.tgz 26429898 SHA256 2e70814efb4f566a522762a626f69669c09285cbb6fc26444eb947fde9b30f25 SHA512 a6e986f285ff7e8d167e2d1c935a55b080446c9809d352c95e2ffa32265892b59cd1611730e75ca88aa28387495d3ebd84226e1a9cdd33f0b27b1a8a1b6a469f WHIRLPOOL 3981522eeacaa589530e7d268cda786bebeaf676f7fa5c26508798022126bd1a1c8ea193f65e3c5c739fb3b516b26c3cf24ac0e7898e764a9cffab6637dcd5a9
diff --git a/sci-chemistry/clashlist/clashlist-3.17-r1.ebuild b/sci-chemistry/clashlist/clashlist-3.17-r1.ebuild
new file mode 100644
index 000000000000..7aedd7743f6b
--- /dev/null
+++ b/sci-chemistry/clashlist/clashlist-3.17-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Build lists of van der Waals clashes from an input PDB file"
+HOMEPAGE="http://kinemage.biochem.duke.edu/software/index.php"
+SRC_URI="mirror://gentoo/molprobity-${PV}.tgz"
+
+SLOT="0"
+LICENSE="richardson"
+KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ >=sci-chemistry/cluster-1.3.081231-r1
+ sci-chemistry/probe"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ sed \
+ -e 's: cluster : molprobity-cluster :g' \
+ -i molprobity3/bin/clashlist || die
+}
+
+src_install() {
+ dobin molprobity3/bin/clashlist
+}
diff --git a/sci-chemistry/clashlist/clashlist-3.17.ebuild b/sci-chemistry/clashlist/clashlist-3.17.ebuild
new file mode 100644
index 000000000000..513a1e024746
--- /dev/null
+++ b/sci-chemistry/clashlist/clashlist-3.17.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Build lists of van der Waals clashes from an input PDB file"
+HOMEPAGE="http://kinemage.biochem.duke.edu/software/index.php"
+SRC_URI="mirror://gentoo/molprobity-${PV}.tgz"
+
+SLOT="0"
+LICENSE="richardson"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ <=sci-chemistry/cluster-1.3.081231
+ sci-chemistry/probe"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_install() {
+ dobin molprobity3/bin/clashlist
+}
diff --git a/sci-chemistry/clashlist/metadata.xml b/sci-chemistry/clashlist/metadata.xml
new file mode 100644
index 000000000000..c96b852229d5
--- /dev/null
+++ b/sci-chemistry/clashlist/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Clashlist is a simple UNIX script which uses the awk facility along with
+the programs Probe and Cluster to build lists of van der Waals clashes
+from an input PDB-format molecular data file (with H atoms). These lists
+are organized such that collections of interacting residues are grouped
+together, sorted by the worst clash. For the purposes of this analysis,
+a clash is defined as a van der Waals overlap &gt;= 0.4 A.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-chemistry/cluster/Manifest b/sci-chemistry/cluster/Manifest
new file mode 100644
index 000000000000..1a7bcd779934
--- /dev/null
+++ b/sci-chemistry/cluster/Manifest
@@ -0,0 +1 @@
+DIST cluster.1.3.081231.src.tgz 8860 SHA256 4e0986d5ff124936b5fff4b6f8989dd04be11180d6552fddc34b2c10dfcc870f SHA512 af5851ef467458d45ee5f2309c6344ae16145ac371a1b9d0a3d8b5769a18b98877cf7cb65b85f71108d927b0e6c363e06b85a67e7cb2e5e0b41af375cb2db7ac WHIRLPOOL 2f02de20b323792360b28d5a42d233d06be529414e29796a39a439651fee9e8ba73bdd05033907ac7434890bfa2a31aaf57ab98bbe59964d06a2d63646833f5f
diff --git a/sci-chemistry/cluster/cluster-1.3.081231-r1.ebuild b/sci-chemistry/cluster/cluster-1.3.081231-r1.ebuild
new file mode 100644
index 000000000000..801d4209627a
--- /dev/null
+++ b/sci-chemistry/cluster/cluster-1.3.081231-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Build lists of collections of interacting items"
+HOMEPAGE="http://kinemage.biochem.duke.edu/software/index.php"
+SRC_URI="http://kinemage.biochem.duke.edu/downloads/software/${PN}/${PN}.${PV}.src.tgz"
+
+SLOT="0"
+LICENSE="richardson"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}"/${PN}1.3src
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-ldflags.patch \
+ "${FILESDIR}"/${PV}-includes.patch
+ tc-export CXX
+}
+
+src_install() {
+ newbin ${PN} molprobity-${PN}
+ dodoc README.cluster
+}
diff --git a/sci-chemistry/cluster/cluster-1.3.081231.ebuild b/sci-chemistry/cluster/cluster-1.3.081231.ebuild
new file mode 100644
index 000000000000..abb875d7f2d0
--- /dev/null
+++ b/sci-chemistry/cluster/cluster-1.3.081231.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Build lists of collections of interacting items"
+HOMEPAGE="http://kinemage.biochem.duke.edu/software/index.php"
+SRC_URI="http://kinemage.biochem.duke.edu/downloads/software/${PN}/${PN}.${PV}.src.tgz"
+
+SLOT="0"
+LICENSE="richardson"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}"/${PN}1.3src
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-ldflags.patch \
+ "${FILESDIR}"/${PV}-includes.patch
+ tc-export CXX
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README.cluster
+}
diff --git a/sci-chemistry/cluster/files/1.3.081231-includes.patch b/sci-chemistry/cluster/files/1.3.081231-includes.patch
new file mode 100644
index 000000000000..a5586a540a4f
--- /dev/null
+++ b/sci-chemistry/cluster/files/1.3.081231-includes.patch
@@ -0,0 +1,12 @@
+diff --git a/cluster.cpp b/cluster.cpp
+index 0a8c3c1..1384949 100644
+--- a/cluster.cpp
++++ b/cluster.cpp
+@@ -24,6 +24,7 @@
+ #include <iostream>
+ #include <vector>
+ #include <string>
++#include <cstring>
+
+ #include <iostream>
+ #include <fstream>
diff --git a/sci-chemistry/cluster/files/1.3.081231-ldflags.patch b/sci-chemistry/cluster/files/1.3.081231-ldflags.patch
new file mode 100644
index 000000000000..1b99f6d662f2
--- /dev/null
+++ b/sci-chemistry/cluster/files/1.3.081231-ldflags.patch
@@ -0,0 +1,41 @@
+ Makefile | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7892054..929564b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,27 +3,27 @@ PROG_FLGS = -D BOOLPREDEFINED
+
+ SRCS = cluster.cpp DisjointSets.cpp utility.cpp
+
+-CFLAGS = $(OPT) $(DEBUG) $(PROG_FLGS)
++CXXFLAGS += $(OPT) $(DEBUG) $(PROG_FLGS)
+
+ LFLAGS =
+
+ OBJLIST = cluster.o DisjointSets.o utility.o
+
+-CXX = g++
++CXX ?= g++
+
+ .cpp.o:
+- $(CXX) -c $*.cpp $(CFLAGS)
++ $(CXX) $(CXXFLAGS) -c $*.cpp
+
+-OPT = -O3
++OPT =
+ DEBUG = $(CXXDEBUGFLAGS)
+
+ all: cluster
+
+ cluster: $(OBJLIST)
+- $(CXX) -o $@ $(OBJLIST) $(LFLAGS)
++ $(CXX) $(LDFLAGS) -o $@ $(OBJLIST)
+
+ depend:
+- makedepend -- $(CFLAGS) -- $(SRCS)
++ makedepend -- $(CXXFLAGS) -- $(SRCS)
+
+ clean:
+ @rm -rf *.o *.ckp ii_files
diff --git a/sci-chemistry/cluster/metadata.xml b/sci-chemistry/cluster/metadata.xml
new file mode 100644
index 000000000000..76f6a5d9e463
--- /dev/null
+++ b/sci-chemistry/cluster/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+Cluster is a simple UNIX C++ program to build lists of collections
+of interacting items from records containing interacting pairs
+and larger fragments.
+
+It reads in lines consisting of two or more names and output
+connected clusters of names. Each line of output is
+prefixed with a cluster number, the size of the cluster
+and an optional name string.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-chemistry/cns/Manifest b/sci-chemistry/cns/Manifest
new file mode 100644
index 000000000000..d0d2b7b0dc55
--- /dev/null
+++ b/sci-chemistry/cns/Manifest
@@ -0,0 +1,4 @@
+DIST aria2.3.1.tar.gz 1833973 SHA256 cc45ed2d66182cf0ee197a7cf3bc7edd8d5043d95cdcd19e1cec9aeb82c2fdbc SHA512 79a2cd89e2120acecb04f286a153dbf52c16500e8956c9dad49b1e1ed94a7b2449c7b044bae6f87e0d2b452a1467a2c02de74f0fa85b0eae66042386e2f5e2d5 WHIRLPOOL 2ff003322601b42bec0d2431e2f1f85819b3982f8da612ff778bb404e51f0fcbca3faa6998e9c0635f9e73899609bb1e273420cac182952aa744364c20299723
+DIST aria2.3.2.tar.gz 1836270 SHA256 30727ea8bdc2e3b44e5970545008fcfa07fa59aa28b76824956a2aa71daa9615 SHA512 009a1d0079f5cc162dc732749ddd2b33297268f0d988b2f37bda4ed50c7764ceef7ae5b56b322c7ac79427a4a2a92d1239199891445cb5e2b3d0908ed670e2aa WHIRLPOOL f18af5b751e79c92e04f4dc12b6b806a1c505b269559a2342bdd6280b790f9f0df9bb4afe366af03beaf09af0128c6b68c39bc66603d51ad24914c78b2579cf3
+DIST cns_solve_1.21_all-mp.tar.gz 32748040 SHA256 7ab464e20932eb024ba6378738da77a4a03642d63b0ca9772b612a7cf27baec1 SHA512 383324d771570b501e388fba9bf20789f483a3a4044eb3334c7a7e7835e0c345b784e0d344b22d20a10fe1c33ed21c9013adb1af5912808af480b96abe275857 WHIRLPOOL fecd0b2dfba43e5525a9fcc8543a55867602b376744848ddafd4c132bcdfc32225780f543742fa225b5e0f0ce658c1029a9ca8b80d5ee3f2491b6d63e8ad91b0
+DIST cns_solve_1.3_all.tar.gz 64167735 SHA256 2ee368022c5ecabf66ce7d32059d93cd7d885ad2d684a094b87c64f6b3dfea0d SHA512 4fe73820e96999bb33a59ff6da979794628552f49bc03cdebcb9439b57e6042b92190e04bb7e4079157adf06a6facc5c16b8ae91621bd24a4b35ee382e53ae37 WHIRLPOOL b3cd14ab7a8a29a44f6e6c3cbc22ee2c665eb8c8565969337b24deffb2a1fd007fae11c5eb73ac38ddf9a38e850948e3b2df2548931722a2a383d5e8c72607a1
diff --git a/sci-chemistry/cns/cns-1.2.1-r8.ebuild b/sci-chemistry/cns/cns-1.2.1-r8.ebuild
new file mode 100644
index 000000000000..d9cc723f98b3
--- /dev/null
+++ b/sci-chemistry/cns/cns-1.2.1-r8.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs versionator flag-o-matic
+
+MY_PN="${PN}_solve"
+MY_PV="$(delete_version_separator 2)"
+MY_P="${MY_PN}_${MY_PV}"
+
+DESCRIPTION="Crystallography and NMR System"
+HOMEPAGE="http://cns.csb.yale.edu/"
+SRC_URI="
+ ${MY_P}_all-mp.tar.gz
+ aria? ( aria2.3.2.tar.gz )"
+
+SLOT="0"
+LICENSE="cns"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="aria openmp"
+
+RDEPEND="app-shells/tcsh"
+DEPEND="${RDEPEND}"
+
+FORTRAN_NEED_OPENMP=1
+
+S="${WORKDIR}/${MY_P}"
+
+RESTRICT="fetch test"
+
+pkg_nofetch() {
+ elog "Fill out the form at http://cns.csb.yale.edu/cns_request/"
+ use aria && elog "and http://aria.pasteur.fr/"
+ elog "and place these files:"
+ elog ${A}
+ elog "in ${DISTDIR}."
+}
+
+get_fcomp() {
+ case $(tc-getFC) in
+ *gfortran* )
+ FCOMP="gfortran" ;;
+ ifort )
+ FCOMP="ifc" ;;
+ * )
+ FCOMP=$(tc-getFC) ;;
+ esac
+}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ get_fcomp
+}
+
+get_bitness() {
+ echo > "${T}"/test.c
+ $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o
+ case $(file "${T}"/test.o) in
+ *64-bit*|*ppc64*|*x86_64*) export _bitness="64";;
+ *32-bit*|*ppc*|*i386*) export _bitness="32";;
+ *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
+ esac
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-parallel.patch
+
+ get_bitness
+
+ if use aria; then
+ pushd "${WORKDIR}"/aria* >& /dev/null
+ # Update the cns sources in aria for version 1.2.1
+ epatch "${FILESDIR}"/1.2.1-aria2.3.patch
+
+ # Update the code with aria specific things
+ cp -rf cns/src/* "${S}"/source/ || die
+ popd >& /dev/null
+ fi
+
+ # the code uses Intel-compiler-specific directives
+ if [[ $(tc-getFC) =~ gfortran ]]; then
+ epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch
+ use openmp && \
+ append-flags -fopenmp && append-ldflags -fopenmp
+ COMP="gfortran"
+ [[ ${_bitness} == 64 ]] && \
+ append-fflags -fdefault-integer-8
+ elif [[ $(tc-getFC) == if* ]]; then
+ epatch "${FILESDIR}"/${PV}-ifort.patch
+ use openmp && \
+ append-flags -openmp && append-ldflags -openmp
+ COMP="ifort"
+ [[ ${_bitness} == 64 ]] && append-fflags -i8
+ fi
+
+ [[ ${_bitness} == 64 ]] && \
+ append-cflags "-DINTEGER='long long int'"
+
+ # Set up location for the build directory
+ # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION
+ cp "${FILESDIR}"/cns_solve_env_sh "${T}"/ || die
+ sed \
+ -e "s:_CNSsolve_location_:${S}:g" \
+ -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \
+ -i "${S}"/cns_solve_env || die
+ sed \
+ -e "s:_CNSsolve_location_:${S}:g" \
+ -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \
+ -i "${T}"/cns_solve_env_sh || die
+
+ einfo "Fixing shebangs..."
+ find "${S}" -type f \
+ -exec sed "s:/bin/csh:${EPREFIX}/bin/csh:g" -i '{}' + || die
+}
+
+src_compile() {
+ local GLOBALS
+ local MALIGN
+ if [[ $(tc-getFC) =~ g77 ]]; then
+ GLOBALS="-fno-globals"
+ MALIGN='\$(CNS_MALIGN_I86)'
+ fi
+
+ # Set up the compiler to use
+ ln -s Makefile.header instlib/machine/unsupported/g77-unix/Makefile.header.${FCOMP} || die
+
+ # make install really means build, since it's expected to be used in-place
+ # -j1 doesn't mean we do no respect MAKEOPTS!
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ F77=$(tc-getFC) \
+ LD=$(tc-getFC) \
+ CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \
+ LDFLAGS="${LDFLAGS}" \
+ F77OPT="${FCFLAGS} ${MALIGN}" \
+ F77STD="${GLOBALS}" \
+ OMPLIB="${OMPLIB}" \
+ compiler="${COMP}" \
+ install
+}
+
+src_test() {
+ # We need to force on g77 manually, because we can't get aliases working
+ # when we source in a -c
+ einfo "Running tests ..."
+ csh -c \
+ "export CNS_G77=ON; source ${S}/cns_solve_env; make run_tests" \
+ || die "tests failed"
+ einfo "Displaying test results ..."
+ cat "${S}"/*_g77/test/*.diff-test
+}
+
+src_install() {
+ # Install to locations resembling FHS
+ sed \
+ -e "s:${S}:usr:g" \
+ -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT ${EPREFIX}/usr:g" \
+ -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/cns:g" \
+ -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \
+ -e "s:CNS_LIB \$CNS_SOLVE/libraries:CNS_LIB \$CNS_DATA/libraries:g" \
+ -e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \
+ -e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \
+ -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \
+ -e "/^g77on/d" \
+ -i "${S}"/cns_solve_env || die
+ # I don't entirely understand why the sh version requires a leading /
+ # for CNS_SOLVE and CNS_ROOT, but it does
+ sed \
+ -e "s:${S}:/usr:g" \
+ -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=${EPREFIX}/usr:g" \
+ -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/cns:g" \
+ -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \
+ -e "s:CNS_LIB=\$CNS_SOLVE/libraries:CNS_LIB=\$CNS_DATA/libraries:g" \
+ -e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \
+ -e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \
+ -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \
+ -e "/^g77on/d" \
+ -e "/^g77off/d" \
+ -i "${T}"/cns_solve_env_sh || die
+
+ # Get rid of setup stuff we don't need in the installed script
+ sed \
+ -e "83,$ d" \
+ -e "37,46 d" \
+ -i "${S}"/cns_solve_env || die
+ sed \
+ -e "84,$ d" \
+ -e "39,50 d" \
+ -i "${T}"/cns_solve_env_sh || die
+
+ newbin "${S}"/*linux*/bin/cns_solve* cns_solve
+
+ # Can be run by either cns_solve or cns
+ dosym cns_solve /usr/bin/cns
+
+ # Don't want to install this
+ rm -f "${S}"/*linux*/utils/Makefile || die
+
+ dobin "${S}"/*linux*/utils/*
+
+ sed \
+ -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \
+ -i "${S}"/bin/cns_web || die
+
+ dobin "${S}"/bin/cns_{edit,header,transfer,web}
+
+ insinto /usr/share/cns
+ doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib
+ doins "${S}"/bin/cns_info
+
+ insinto /etc/profile.d
+ newins "${S}"/cns_solve_env cns_solve_env.csh
+ newins "${T}"/cns_solve_env_sh cns_solve_env.sh
+
+ dohtml \
+ -A iq,cgi,csh,cv,def,fm,gif,hkl,inp,jpeg,lib,link,list,mask,mtf,param,pdb,pdf,pl,ps,sc,sca,sdb,seq,tbl,top \
+ -f all_cns_info_template,omac,def \
+ -r doc/html/*
+ # Conflits with app-text/dos2unix
+ rm -f "${D}"/usr/bin/dos2unix || die
+}
+
+pkg_postinst() {
+ if use openmp; then
+ elog "Set OMP_NUM_THREADS to the number of threads you want."
+ elog "If you get segfaults on large structures, set the GOMP_STACKSIZE"
+ elog "variable if using gcc (16384 should be good)."
+ fi
+}
diff --git a/sci-chemistry/cns/cns-1.3_p7-r1.ebuild b/sci-chemistry/cns/cns-1.3_p7-r1.ebuild
new file mode 100644
index 000000000000..724c62f7e98c
--- /dev/null
+++ b/sci-chemistry/cns/cns-1.3_p7-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs versionator flag-o-matic
+
+MY_PN="${PN}_solve"
+MY_PV="$(delete_version_separator 2)"
+MY_P="${MY_PN}_${MY_PV}"
+
+DESCRIPTION="Crystallography and NMR System"
+HOMEPAGE="http://cns.csb.yale.edu/"
+SRC_URI="
+ ${MY_P/p7}_all.tar.gz
+ aria? ( aria2.3.1.tar.gz )"
+
+SLOT="0"
+LICENSE="cns"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="aria openmp"
+
+RDEPEND="app-shells/tcsh"
+DEPEND="${RDEPEND}"
+
+FORTRAN_NEED_OPENMP=1
+
+S="${WORKDIR}/${MY_P/p7}"
+
+RESTRICT="fetch"
+
+pkg_nofetch() {
+ elog "Fill out the form at http://cns.csb.yale.edu/cns_request/"
+ use aria && elog "and http://aria.pasteur.fr/"
+ elog "and place these files:"
+ elog ${A}
+ elog "in ${DISTDIR}."
+}
+
+get_fcomp() {
+ case $(tc-getFC) in
+ *gfortran* )
+ FCOMP="gfortran" ;;
+ ifort )
+ FCOMP="ifc" ;;
+ * )
+ FCOMP=$(tc-getFC) ;;
+ esac
+}
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ get_fcomp
+}
+
+get_bitness() {
+ echo > "${T}"/test.c
+ $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o
+ case $(file "${T}"/test.o) in
+ *64-bit*|*ppc64*|*x86_64*) export _bitness="64";;
+ *32-bit*|*ppc*|*i386*) export _bitness="32";;
+ *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";;
+ esac
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-delete.patch
+
+ get_bitness
+
+ if use aria; then
+ pushd "${WORKDIR}"/aria* >& /dev/null
+ # Update the cns sources in aria for version 1.2.1
+ epatch "${FILESDIR}"/1.2.1-aria2.3.patch
+
+ # Update the code with aria specific things
+ cp -rf cns/src/* "${S}"/source/ || die
+ popd >& /dev/null
+ fi
+
+ # the code uses Intel-compiler-specific directives
+ if [[ $(tc-getFC) =~ gfortran ]]; then
+ use openmp && \
+ append-flags -fopenmp && append-ldflags -fopenmp
+ COMP="gfortran"
+ [[ ${_bitness} == 64 ]] && \
+ append-fflags -fdefault-integer-8
+ elif [[ $(tc-getFC) == if* ]]; then
+ use openmp && \
+ append-flags -openmp && append-ldflags -openmp
+ COMP="ifort"
+ [[ ${_bitness} == 64 ]] && append-fflags -i8
+ fi
+
+ [[ ${_bitness} == 64 ]] && \
+ append-cflags "-DINTEGER='long long int'"
+
+ # Set up location for the build directory
+ # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION
+ cp "${FILESDIR}"/cns_solve_env_sh-${PV} "${T}"/cns_solve_env_sh || die
+ sed \
+ -e "s:_CNSsolve_location_:${S}:g" \
+ -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \
+ -i "${S}"/cns_solve_env || die
+ sed \
+ -e "s:_CNSsolve_location_:${S}:g" \
+ -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \
+ -e "s:setenv OMP_STACKSIZE 256m:export OMP_STACKSIZE=256m:g" \
+ -e "s:^limit:^ulimit:g" \
+ -i "${T}"/cns_solve_env_sh || die
+
+ ebegin "Fixing shebangs..."
+ find "${S}" -type f \
+ -exec sed "s:/bin/csh:${EPREFIX}/bin/csh:g" -i '{}' + || die
+ find . -name "Makefile*" \
+ -exec \
+ sed \
+ -e "s:^SHELL=/bin/sh:SHELL=${EPREFIX}/bin/sh:g" \
+ -e "s:/bin/ls:ls:g" \
+ -e "s:/bin/rm:rm:g" \
+ -i '{}' + || die
+ eend
+}
+
+src_compile() {
+ local GLOBALS
+ local MALIGN
+
+ # Set up the compiler to use
+ ln -s Makefile.header instlib/machine/unsupported/g77-unix/Makefile.header.${FCOMP} || die
+
+ # make install really means build, since it's expected to be used in-place
+ # -j1 doesn't mean we do no respect MAKEOPTS!
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ F77=$(tc-getFC) \
+ LD=$(tc-getFC) \
+ CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \
+ CXXFLAGS="${CXXFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \
+ LDFLAGS="${LDFLAGS}" \
+ F77OPT="${FCFLAGS} ${MALIGN}" \
+ F77STD="${GLOBALS}" \
+ OMPLIB="${OMPLIB}" \
+ compiler="${COMP}" \
+ install
+}
+
+src_test() {
+ # We need to force on g77 manually, because we can't get aliases working
+ # when we source in a -c
+ einfo "Running tests ..."
+ sh -c \
+ "export CNS_G77=ON; source ${T}/cns_solve_env_sh; make run_tests" \
+ || die "tests failed"
+ einfo "Displaying test results ..."
+ cat "${S}"/*_g77/test/*.diff-test
+}
+
+src_install() {
+ cat >> "${T}"/66cns <<- EOF
+ CNS_SOLVE="${EPREFIX}/usr"
+ CNS_ROOT="${EPREFIX}/usr"
+ CNS_DATA="${EPREFIX}/usr/share/cns"
+ CNS_DOC="${EPREFIX}/usr/share/doc/cns-1.3"
+ CNS_LIB="${EPREFIX}/usr/share/cns/libraries"
+ CNS_MODULE="${EPREFIX}/usr/share/cns/modules"
+ CNS_TOPPAR="${EPREFIX}/usr/share/cns/libraries/toppar"
+ CNS_CONFDB="${EPREFIX}/usr/share/cns/libraries/confdb"
+ CNS_XTALLIB="${EPREFIX}/usr/share/cns/libraries/xtal"
+ CNS_NMRLIB="${EPREFIX}/usr/share/cns/libraries/nmr"
+ CNS_XRAYLIB="${EPREFIX}/usr/share/cns/libraries/xray"
+ CNS_XTALMODULE="${EPREFIX}/usr/share/cns/modules/xtal"
+ CNS_NMRMODULE="${EPREFIX}/usr/share/cns/modules/nmr"
+ CNS_HELPLIB="${EPREFIX}/usr/share/cns/helplib"
+ EOF
+
+ doenvd "${T}"/66cns || die
+
+ # Don't want to install this
+ rm -f "${S}"/*linux*/utils/Makefile || die
+
+ sed \
+ -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \
+ -i "${S}"/bin/cns_web || die
+
+ newbin "${S}"/*linux*/bin/cns_solve* cns_solve
+
+ # Can be run by either cns_solve or cns
+ dosym cns_solve /usr/bin/cns
+
+ dobin \
+ "${S}"/*linux*/utils/* \
+ "${S}"/bin/cns_{edit,header,import_cif,transfer,web}
+
+ insinto /usr/share/cns
+ doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib "${S}"/bin/cns_info
+
+ dohtml \
+ -A iq,cgi,csh,cv,def,fm,gif,hkl,inp,jpeg,lib,link,list,mask,mtf,param,pdb,pdf,pl,ps,sc,sca,sdb,seq,tbl,top \
+ -f all_cns_info_template,omac,def \
+ -r doc/html/*
+ # Conflits with app-text/dos2unix
+ rm -f "${D}"/usr/bin/dos2unix || die
+}
+
+pkg_postinst() {
+ if use openmp; then
+ elog "Set OMP_NUM_THREADS to the number of threads you want."
+ elog "If you get segfaults on large structures, set the GOMP_STACKSIZE"
+ elog "variable if using gcc (16384 should be good)."
+ fi
+}
diff --git a/sci-chemistry/cns/files/1.2.1-allow-gcc-openmp.patch b/sci-chemistry/cns/files/1.2.1-allow-gcc-openmp.patch
new file mode 100644
index 000000000000..42b9b0572231
--- /dev/null
+++ b/sci-chemistry/cns/files/1.2.1-allow-gcc-openmp.patch
@@ -0,0 +1,20 @@
+--- source/xfft.f.orig 2008-08-03 00:36:52.000000000 -0700
++++ source/xfft.f 2008-08-03 00:37:06.000000000 -0700
+@@ -514,7 +514,7 @@
+ LOGICAL QHERM
+ DOUBLE PRECISION XRCELL(9), MAPR
+ C local
+-!$ integer omp_get_max_threads, kmp_get_stacksize
++!$ integer omp_get_max_threads
+ LOGICAL DONE
+ DOUBLE PRECISION ZERO
+ PARAMETER (ZERO=0.0D0)
+@@ -537,7 +537,7 @@
+ NBPP=1
+ ! The following command is only relevant for the ifort compiler (if -openmp option is used).
+ ! If your compiler is not ifort, and gives an error, just comment the next line out:
+-!$ if (kmp_get_stacksize().lt.2**23) call kmp_set_stacksize(2**23)
++! if (kmp_get_stacksize().lt.2**23) call kmp_set_stacksize(2**23)
+ ! Explanation: the default KMP_STACKSIZE of ifort is 2**21 bytes (2Mb) for 32bit,
+ ! and 2**22 bytes (4Mb) for 64bit.
+ ! This may be low for big structures, which leads to segmentation faults!
diff --git a/sci-chemistry/cns/files/1.2.1-aria2.3.patch b/sci-chemistry/cns/files/1.2.1-aria2.3.patch
new file mode 100644
index 000000000000..8c6939d8eb92
--- /dev/null
+++ b/sci-chemistry/cns/files/1.2.1-aria2.3.patch
@@ -0,0 +1,22 @@
+diff --git a/cns/src/cns.f b/cns/src/cns.f
+index a3c2cbe..51a34f8 100644
+--- a/cns/src/cns.f
++++ b/cns/src/cns.f
+@@ -470,6 +470,7 @@ C local
+ INTEGER HNLEN, TMP, PTRSZ, STLEN
+ CHARACTER*(1) CNSPTMP
+ CHARACTER*(4) ST
++!$ integer omp_get_max_threads
+ C
+ C write header
+ WRITE(6,'(10X,A)')
+@@ -526,6 +527,9 @@ C
+ WRITE(6,'(10X,7A)')
+ & ' Running on machine: ',HOSTNM(1:HNLEN),
+ & ' (',SYSNM(1:TMP),',',ST(1:STLEN),'-bit)'
++!$ write(6,'(31x,a,i3,a)') 'with',omp_get_max_threads(),
++!$ & ' threads'
++!$C (to change use setenv OMP_NUM_THREADS x)
+ C
+ CALL GETNAM(USERNM,12,TMP)
+ WRITE(6,'(10X,2A)')
diff --git a/sci-chemistry/cns/files/1.2.1-gentoo.patch b/sci-chemistry/cns/files/1.2.1-gentoo.patch
new file mode 100644
index 000000000000..2b47bfcc7d86
--- /dev/null
+++ b/sci-chemistry/cns/files/1.2.1-gentoo.patch
@@ -0,0 +1,63 @@
+--- cns_solve_1.21/instlib/source/Makefile.proto 2000-09-07 20:35:33.000000000 +0200
++++ cns_solve_1.21/instlib/source/Makefile.proto.new 2009-07-14 09:18:37.000000000 +0200
+@@ -11,6 +11,8 @@
+
+ SHELL=/bin/sh
+
++cns_string=`date "+%y%m%d%H%M"`
++
+ # commands
+ RM = /bin/rm
+
+@@ -25,26 +27,20 @@
+
+ # rule for the fortran routines
+ $(OBJS):
+- @ echo "compiling: $(@:.o=.f)"; \
+- $(F77) -c $(F77FLAGS) $(@:.o=.f)
++ $(F77) -c $(F77FLAGS) $(@:.o=.f)
+
+ # rule for the dynamic memory allocation C routines
+ dmemory.o: dmemory.c
+- @ echo ; echo "compiling: $?"
+- @ $(CC) -c $(CCFLAGS) $?
++ $(CC) -c $(CCFLAGS) $?
+
+ # rule for the machine specific C routines
+ machine_c.o: machine_c.c
+- @ echo ; echo "compiling: $?"
+- @ $(CC) -c $(CCFLAGS) $?
++ $(CC) -c $(CCFLAGS) $?
+
+ # rule for the executable itself
+ ../bin/cns_solve: $(DEPENDS)
+- @ echo ; echo "linking: cns_solve"; echo
+- @ cns_string=`date "+%y%m%d%H%M"`; \
+- $(LD) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \
+- $(LDFLAGS) \
+- $(CNS_FFTDIR) $(CNS_FFTLIB); \
++ $(LD) $(LDFLAGS) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \
++ $(CNS_FFTDIR) $(CNS_FFTLIB); \
+ if [ -x cns_solve-$$cns_string.exe ]; \
+ then echo "created executable file cns_solve-$$cns_string.exe"; \
+ echo ""; cd ../bin; $(RM) -f cns_solve; $(RM) -f cns; \
+--- cns_solve_1.21/instlib/utils/Makefile 2004-08-30 00:40:35.000000000 +0200
++++ cns_solve_1.21/instlib/utils/Makefile.new 2009-07-14 09:50:27.000000000 +0200
+@@ -22,14 +22,14 @@
+ make clean
+
+ .f:
+- $(F77) -o $@ $(F77FLAGS) $(@).f $(F77LINK)
++ $(F77) $(LDFLAGS) -o $@ $(F77FLAGS) $(@).f $(F77LINK)
+
+ .c:
+- $(CC) -o $@ $(CCFLAGS) $(@).c $(CCLINK)
++ $(CC) $(LDFLAGS) -o $@ $(CCFLAGS) $(@).c $(CCLINK)
+
+ .l:
+ lex $(@).l
+- $(CC) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB)
++ $(CC) $(LDFLAGS) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB)
+
+ relink:
+ @ cd $(CNS_INST)/utils; touch x; rm -f x `ls * | grep -v Makefile`
diff --git a/sci-chemistry/cns/files/1.2.1-ifort.patch b/sci-chemistry/cns/files/1.2.1-ifort.patch
new file mode 100644
index 000000000000..ba44bebd1b68
--- /dev/null
+++ b/sci-chemistry/cns/files/1.2.1-ifort.patch
@@ -0,0 +1,126 @@
+diff --git a/source/angledb.f b/source/angledb.f
+index 28ad657..eaa847d 100644
+--- a/source/angledb.f
++++ b/source/angledb.f
+@@ -1416,10 +1416,10 @@ C include files
+ C local variables
+ INTEGER COUNT, SPTR, OLDCLASS, OLDMAXANGLEDBS
+ INTEGER THETYPE, CURPSIS, CURPHIS
+- INTEGER CLASSINDEX
++ INTEGER CLASINDEX
+ DOUBLE PRECISION K1, CUTOFF
+ CHARACTER*4 THENAME
+- CHARACTER*20 CLASSNAME
++ CHARACTER*20 CLASNAME
+ C begin
+ C
+ IF (ANGLEDBFLAG) THEN
+@@ -1450,10 +1450,10 @@ C
+ ELSE IF (WD(1:4).EQ.'CLAS') THEN
+ OLDCLASS = CURANGLEDBCLASS
+ CALL NEXTWD('class name =')
+- CLASSNAME = WD(1:20)
++ CLASNAME = WD(1:20)
+ ANGLEDBMODE = NEW
+ DO COUNT = 1, NANGLEDBCLASSES
+- IF (ANGDBCLASSNAMES(COUNT).EQ.CLASSNAME) THEN
++ IF (ANGDBCLASSNAMES(COUNT).EQ.CLASNAME) THEN
+ ANGLEDBMODE = UPDATE
+ CURANGLEDBCLASS = COUNT
+ END IF
+@@ -1472,7 +1472,7 @@ C
+ END IF
+ NANGLEDBCLASSES = NANGLEDBCLASSES + 1
+ CURANGLEDBCLASS = NANGLEDBCLASSES
+- ANGDBCLASSNAMES(CURANGLEDBCLASS) = CLASSNAME
++ ANGDBCLASSNAMES(CURANGLEDBCLASS) = CLASNAME
+ ANGLEDBASSNDX(CURANGLEDBCLASS) = NANGLEDBS
+ END IF
+ C
+@@ -1733,16 +1733,16 @@ C
+ & HEAP(ANGLEDBTPTR))
+ ELSE IF (WD(1:4).EQ.'CLAS') THEN
+ CALL NEXTWD('Class name>')
+- CLASSNAME = WD(1:20)
+- CLASSINDEX = 0
++ CLASNAME = WD(1:20)
++ CLASINDEX = 0
+ DO COUNT = 1, NANGLEDBCLASSES
+ IF (ANGDBCLASSNAMES(COUNT).EQ.
+- & CLASSNAME) THEN
++ & CLASNAME) THEN
+ PRINTTHISCLASS(COUNT) = .TRUE.
+- CLASSINDEX = COUNT
++ CLASINDEX = COUNT
+ END IF
+ END DO
+- IF (CLASSINDEX.EQ.0) THEN
++ IF (CLASINDEX.EQ.0) THEN
+ CALL DSPERR('ANGLEDB',
+ & 'unknown class. Using first.')
+ PRINTTHISCLASS(1) = .TRUE.
+diff --git a/source/rama.f b/source/rama.f
+index c5d14f2..3063e7b 100644
+--- a/source/rama.f
++++ b/source/rama.f
+@@ -1468,11 +1468,11 @@ C include files
+ C local variables
+ INTEGER COUNT, SPTR, OLDCLASS, OLDMAXRAMAS,
+ & THETYPE, CURPSIS, CURPHIS,
+- & CURCHIS, CURTHTS, CLASSINDEX
++ & CURCHIS, CURTHTS, CLASINDEX
+ INTEGER CLEN
+ DOUBLE PRECISION K1, CUTOFF
+ CHARACTER*4 THENAME
+- CHARACTER*50 CLASSNAME
++ CHARACTER*50 CLASNAME
+ C begin
+ C
+ C this is used by READRAMA2 to hold the selection
+@@ -1503,10 +1503,10 @@ C
+ ELSE IF (WD(1:4).EQ.'CLAS') THEN
+ OLDCLASS = CURRAMACLASS
+ CALL NEXTWD('class name =')
+- CLASSNAME = WD(1:50)
++ CLASNAME = WD(1:50)
+ RAMAMODE = NEW
+ DO COUNT = 1, NRAMACLASSES
+- IF (RAMACLASSNAMES(COUNT).EQ.CLASSNAME) THEN
++ IF (RAMACLASSNAMES(COUNT).EQ.CLASNAME) THEN
+ RAMAMODE = UPDATE
+ CURRAMACLASS = COUNT
+ END IF
+@@ -1525,7 +1525,7 @@ C
+ END IF
+ NRAMACLASSES = NRAMACLASSES + 1
+ CURRAMACLASS = NRAMACLASSES
+- RAMACLASSNAMES(CURRAMACLASS) = CLASSNAME
++ RAMACLASSNAMES(CURRAMACLASS) = CLASNAME
+ END IF
+ C
+ C set force constant for current class,
+@@ -1954,18 +1954,18 @@ C
+ & HEAP(RAMAATOMPTR), 0)
+ ELSE IF (WD(1:4).EQ.'CLAS') THEN
+ CALL NEXTWD('Class name>')
+- CLASSINDEX = 0
++ CLASINDEX = 0
+ DO COUNT = 1, NRAMACLASSES
+- IF (RAMACLASSNAMES(COUNT).EQ.CLASSNAME)
+- & CLASSINDEX = COUNT
++ IF (RAMACLASSNAMES(COUNT).EQ.CLASNAME)
++ & CLASINDEX = COUNT
+ END DO
+- IF (CLASSINDEX.EQ.0) THEN
++ IF (CLASINDEX.EQ.0) THEN
+ CALL DSPERR('RAMA',
+ & 'unknown class. Using first.')
+- CLASSINDEX = 1
++ CLASINDEX = 1
+ END IF
+ CALL PRINTRAMAS(CUTOFF, HEAP(CALCRAMAPTR),
+- & HEAP(RAMAATOMPTR), CLASSINDEX)
++ & HEAP(RAMAATOMPTR), CLASINDEX)
+ ELSE
+ CALL DSPERR('RAMA',
+ & 'Expected ALL or CLASs.')
diff --git a/sci-chemistry/cns/files/1.2.1-parallel.patch b/sci-chemistry/cns/files/1.2.1-parallel.patch
new file mode 100644
index 000000000000..dfaa40021d66
--- /dev/null
+++ b/sci-chemistry/cns/files/1.2.1-parallel.patch
@@ -0,0 +1,17 @@
+diff --git a/instlib/source/Makefile.proto b/instlib/source/Makefile.proto
+index 0d0dd3e..ae9e422 100644
+--- a/instlib/source/Makefile.proto
++++ b/instlib/source/Makefile.proto
+@@ -19,9 +19,9 @@ DEPENDS = $(OBJS) dmemory.o machine_c.o
+
+ # the default is to make the cns executable
+ cns_solve:
+- @ make -k printflags F77BUG="$(debug)" DEBUG="$(debug)"
+- @ make -k ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)"
+- @ make -k exepurge
++ @ make printflags F77BUG="$(debug)" DEBUG="$(debug)"
++ @ make ${MAKEOPTS} ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)"
++ @ make exepurge
+
+ # rule for the fortran routines
+ $(OBJS):
diff --git a/sci-chemistry/cns/files/1.3_p7-delete.patch b/sci-chemistry/cns/files/1.3_p7-delete.patch
new file mode 100644
index 000000000000..cbddf4289158
--- /dev/null
+++ b/sci-chemistry/cns/files/1.3_p7-delete.patch
@@ -0,0 +1,13 @@
+diff --git a/utils/cluster_struc.cpp b/utils/cluster_struc.cpp
+index b64467a..5f727db 100644
+--- a/utils/cluster_struc.cpp
++++ b/utils/cluster_struc.cpp
+@@ -173,7 +173,7 @@ int main(int argc, char *argv[]) {
+ for (int i = 0; i < nrstruc; i++) {
+ delete[] neighbor[i];
+ }
+- delete[] neighbor, neighborcount;
++ delete[] neighbor, delete[] neighborcount;
+ return 5;
+ }
+ if (rmsd < cutoff) {
diff --git a/sci-chemistry/cns/files/1.3_p7-gentoo.patch b/sci-chemistry/cns/files/1.3_p7-gentoo.patch
new file mode 100644
index 000000000000..7942c55abfb9
--- /dev/null
+++ b/sci-chemistry/cns/files/1.3_p7-gentoo.patch
@@ -0,0 +1,80 @@
+diff --git a/instlib/source/Makefile.proto b/instlib/source/Makefile.proto
+index 0d0dd3e..dd4b680 100644
+--- a/instlib/source/Makefile.proto
++++ b/instlib/source/Makefile.proto
+@@ -11,6 +11,8 @@
+
+ SHELL=/bin/sh
+
++cns_string=`date "+%y%m%d%H%M"`
++
+ # commands
+ RM = /bin/rm
+
+@@ -19,32 +21,26 @@ DEPENDS = $(OBJS) dmemory.o machine_c.o
+
+ # the default is to make the cns executable
+ cns_solve:
+- @ make -k printflags F77BUG="$(debug)" DEBUG="$(debug)"
+- @ make -k ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)"
+- @ make -k exepurge
++ @ make printflags F77BUG="$(debug)" DEBUG="$(debug)"
++ @ make ${MAKEOPTS} ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)"
++ @ make exepurge
+
+ # rule for the fortran routines
+ $(OBJS):
+- @ echo "compiling: $(@:.o=.f)"; \
+- $(F77) -c $(F77FLAGS) $(@:.o=.f)
++ $(F77) -c $(F77FLAGS) $(@:.o=.f)
+
+ # rule for the dynamic memory allocation C routines
+ dmemory.o: dmemory.c
+- @ echo ; echo "compiling: $?"
+- @ $(CC) -c $(CCFLAGS) $?
++ $(CC) -c $(CCFLAGS) $?
+
+ # rule for the machine specific C routines
+ machine_c.o: machine_c.c
+- @ echo ; echo "compiling: $?"
+- @ $(CC) -c $(CCFLAGS) $?
++ $(CC) -c $(CCFLAGS) $?
+
+ # rule for the executable itself
+ ../bin/cns_solve: $(DEPENDS)
+- @ echo ; echo "linking: cns_solve"; echo
+- @ cns_string=`date "+%y%m%d%H%M"`; \
+- $(LD) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \
+- $(LDFLAGS) \
+- $(CNS_FFTDIR) $(CNS_FFTLIB); \
++ $(LD) $(LDFLAGS) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \
++ $(CNS_FFTDIR) $(CNS_FFTLIB); \
+ if [ -x cns_solve-$$cns_string.exe ]; \
+ then echo "created executable file cns_solve-$$cns_string.exe"; \
+ echo ""; cd ../bin; $(RM) -f cns_solve; $(RM) -f cns; \
+diff --git a/instlib/utils/Makefile b/instlib/utils/Makefile
+index 98de84f..4f32b34 100644
+--- a/instlib/utils/Makefile
++++ b/instlib/utils/Makefile
+@@ -22,17 +22,17 @@ utils:
+ make clean
+
+ .f:
+- $(F77) -o $@ $(F77FLAGS) $(@).f $(F77LINK)
++ $(F77) $(LDFLAGS) -o $@ $(F77FLAGS) $(@).f $(F77LINK)
+
+ .c:
+- $(CC) -o $@ $(CCFLAGS) $(@).c $(CCLINK)
++ $(CC) $(LDFLAGS) -o $@ $(CCFLAGS) $(@).c $(CCLINK)
+
+ .cpp:
+- $(CPP) -o $@ $(CCFLAGS) $(@).cpp $(CCLINK)
++ $(CXX) $(LDFLAGS) -o $@ $(CXXFLAGS) $(@).cpp $(CCLINK)
+
+ .l:
+ lex $(@).l
+- $(CC) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB)
++ $(CC) $(LDFLAGS) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB)
+
+ relink:
+ @ cd $(CNS_INST)/utils; touch x; rm -f x `ls * | grep -v Makefile`
diff --git a/sci-chemistry/cns/files/cns_solve_env_sh b/sci-chemistry/cns/files/cns_solve_env_sh
new file mode 100644
index 000000000000..34e1a2b635cf
--- /dev/null
+++ b/sci-chemistry/cns/files/cns_solve_env_sh
@@ -0,0 +1,221 @@
+#!/bin/sh
+#
+# This file sets up the appropriate environmental variables and paths
+# for CNSsolve. In the case of the same machines with different versions
+# of the OS, backward compatibility is assumed - ie. a later version will
+# be setup for a previous version of the OS if nothing else is available.
+#
+# written by: Paul Adams
+#
+# copyright Yale University
+#
+# ==========================================================================
+#
+# >>>>>> Important: define the location of the CNSsolve directory <<<<<<
+#
+# CHANGE THE NEXT LINE TO POINT TO THE LOCATION OF THE CNSsolve DIRECTORY
+
+ CNS_SOLVE=_CNSsolve_location_
+
+#
+# ==========================================================================
+#
+# full expansion of the CNS_SOLVE variable prior to use.
+#
+export CNS_SOLVE; CNS_SOLVE=$CNS_SOLVE
+#
+# ==========================================================================
+#
+# set the number of threads for SGI multiprocessors
+# if this causes a problem on other systems it can be commented out
+#
+export MP_SET_NUMTHREADS; MP_SET_NUMTHREADS=1
+#
+# ==========================================================================
+#
+# get the machine architecture
+#
+if [ -d $CNS_SOLVE ]; then
+ if [ ! "$CNS_ARCH" ]; then
+ export CNS_ARCH; CNS_ARCH=`$CNS_SOLVE/bin/getarch`
+ fi
+else
+ export CNS_ARCH; CNS_ARCH='unknown'
+fi
+#
+# system variables (this is needed for openmp)
+#
+ulimit -s unlimited
+# ==========================================================================
+#
+# general environmental variables
+#
+export CNS_LIB; CNS_LIB=$CNS_SOLVE/libraries
+export CNS_MODULE; CNS_MODULE=$CNS_SOLVE/modules
+export CNS_TOPPAR; CNS_TOPPAR=$CNS_LIB/toppar
+export CNS_CONFDB; CNS_CONFDB=$CNS_LIB/confdb
+export CNS_XTALLIB; CNS_XTALLIB=$CNS_LIB/xtal
+export CNS_NMRLIB; CNS_NMRLIB=$CNS_LIB/nmr
+export CNS_XRAYLIB; CNS_XRAYLIB=$CNS_LIB/xray
+export CNS_XTALMODULE; CNS_XTALMODULE=$CNS_MODULE/xtal
+export CNS_NMRMODULE; CNS_NMRMODULE=$CNS_MODULE/nmr
+export CNS_HELPLIB; CNS_HELPLIB=$CNS_SOLVE/helplib
+#
+# general user aliases
+#
+cns_web () { $CNS_SOLVE/bin/cns_web; }
+cns_header () { $CNS_SOLVE/bin/cns_header; }
+cns_info () { cat $CNS_SOLVE/bin/cns_info; }
+cns_transfer () { $CNS_SOLVE/bin/cns_transfer; }
+if [ -x $CNS_SOLVE/bin/cns_edit_local ]; then
+ cns_edit () { $CNS_SOLVE/bin/cns_edit_local; }
+else
+ cns_edit () { $CNS_SOLVE/bin/cns_edit; }
+fi
+run_tutorial () { "csh -f tutorial.csh"; }
+#
+# g77 compilation and use
+#
+g77on () { CNS_G77=ON; . $CNS_SOLVE/.cns_solve_env_sh; }
+g77off () { unset CNS_G77; . $CNS_SOLVE/.cns_solve_env_sh; }
+#
+# developer aliases
+#
+run_tests () { $CNS_SOLVE/bin/run_tests; }
+run_diffs () { $CNS_SOLVE/bin/run_diffs; }
+maketar () { $CNS_SOLVE/bin/maketar; }
+create_patch () { $CNS_SOLVE/bin/create_patch; }
+#
+#
+# ==========================================================================
+#
+# to do expansions - unset noglob just in case user has it otherwise
+#
+set +f
+#
+# try to set up appropriate path
+#
+# first strip off any trailing information (eg. _g77)
+#
+CNS_ARCH=`echo ${CNS_ARCH} | sed -e 's/_g77//g'`
+#
+cns_vendor=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $1}'`
+cns_cpu=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $2}'`
+cns_os=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $3}'`
+cns_major=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $4}'`
+cns_minor=`echo $cns_major | sed -e 's/\./ /g'`
+#
+# if we are looking for a specific type of setup then limit search
+#
+cns_dirs=""
+if [ ! "$CNS_G77" ]; then
+ if /bin/ls -d $CNS_SOLVE/$cns_vendor-* >/dev/null 2>&1 ; then
+ cns_dirs="`/bin/ls -d $CNS_SOLVE/$cns_vendor-* 2>&1 | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`"
+ fi
+else
+ CNS_ARCH="${CNS_ARCH}_g77"
+ if /bin/ls -d $CNS_SOLVE/$cns_vendor-*_g77 >/dev/null 2>&1 ; then
+ cns_dirs="`/bin/ls -d $CNS_SOLVE/$cns_vendor-*_g77 2>&1 | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`"
+ fi
+fi
+#
+# first look for an exact match (with os version)
+#
+#
+cns_found=0
+if [ -n "$cns_dirs" ]; then
+ for cns_dir in $cns_dirs ; do
+ cns_tmp_major=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $4}'`
+ if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then
+ if [ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major} -o \
+ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major}_g77 ]; then
+ cns_archenv=$cns_dir
+ cns_found=1
+ fi
+ fi
+ done
+#
+#
+# now look for an exact match (without os version)
+#
+ if [ $cns_found -eq 0 ]; then
+ for cns_dir in $cns_dirs ; do
+ if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then
+ if [ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os} -o \
+ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}_g77 ]; then
+ cns_archenv=$cns_dir
+ cns_found=1
+ fi
+ fi
<