--- /dev/null
+# ChangeLog for sci-chemistry/cyana
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cyana/ChangeLog,v 1.1 2010/03/07 10:07:09 jlec Exp $
+
+*cyana-2.1 (07 Mar 2010)
+
+ 07 Mar 2010; Justin Lecher (jlec) <jlec@gentoo.org> +files/2.1-exec.patch,
+ +files/2.1-typo.patch, +cyana-2.1.ebuild, +metadata.xml:
+ CYANA ((c) by Peter Gu"ntert) is a program for automated structure
+ calculation of biological macromolecules on the basis of conformational
+ constraints from NMR. The combination of automated NOESY cross peak
+ assignment, structure calculation with a fast torsion angle dynamics
+ algorithm, and the ease-of-use of CYANA provide for unprecedented
+ efficiency in NMR protein structure determination.
+
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 2.1-exec.patch 1959 RMD160 c67a5748eb7627c1dc66d1e6546bc24416bf8263 SHA1 002889b52871499fe62e85d9217c1c3e0b52d163 SHA256 fe8835c6dcdb6a8befa32e6bff1b761c5c6ae6131f73750e18724fb96f9a9623
+AUX 2.1-typo.patch 484 RMD160 c947da047f562eedcc8036d8d97bef37885e1521 SHA1 65f772b18082b956ae5bdfebe8663a522b7d7cc3 SHA256 ef05c4254cf859e804c44cdfa5774aca5a2f1aa853f0b6c0bccee837db2a5b8b
+DIST cyana-2.1.tar.gz 2203650 RMD160 20dc614587792f5d02d50a104871a04b2507ee24 SHA1 60583c10117634e6031a901021ce6bad3206bb7d SHA256 4b49d23eda3a327074fa337c7ee13262e93fb2b92cc6feb9139dfb7695bdeded
+EBUILD cyana-2.1.ebuild 1632 RMD160 c6ff366930b670c7875ba7bbd4762ae064ab2eea SHA1 a0cf546752e42b0b4efe3425cc15ecd109d825d2 SHA256 8e7906353289633a6d28e51a705976a12524f88101e724f54bd7d09f93cb6df3
+MISC ChangeLog 777 RMD160 d7287e927d147ff334a7801e8e938eacd26c3c86 SHA1 985e0a134be854eb76fa038fb92ebb4665d3e047 SHA256 09f7010e8e96c3ff0c9f13981f223dceecc3fca342fcb64413b818b0e2d4d5aa
+MISC metadata.xml 216 RMD160 04a6fc4e2160b439296b52aa97d5b7d83af75508 SHA1 9561c9e6eada6aac9b503407917900529ce703e9 SHA256 24f5c205c2655ef27138c8aa087701626f5b4c666229c9ef7fe814e63ea2e776
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.14 (GNU/Linux)
+
+iEYEARECAAYFAkuTetsACgkQgAnW8HDreRa1mgCeMN1PRMbbIjwjr28S/8uJL63m
+OukAn3F5QgBv/tplKepwa1i4EGfYor7g
+=j9pI
+-----END PGP SIGNATURE-----
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cyana/cyana-2.1.ebuild,v 1.1 2010/03/07 10:07:09 jlec Exp $
+
+EAPI="3"
+
+inherit eutils fortran toolchain-funcs
+
+# we need libg2c for gfortran # 136988
+FORTRAN="ifc"
+
+DESCRIPTION="Combined assignment and dynamics algorithm for NMR applications"
+HOMEPAGE="http://www.las.jp/english/products/s08_cyana/index.html"
+SRC_URI="${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="as-is"
+IUSE="examples"
+
+RESTRICT="fetch"
+
+pkg_nofetch() {
+ elog "Please visit"
+ elog "http://www.las.jp/english/products/s08_cyana/licenses.html"
+ elog "and get a copy of ${A}."
+ elog "Place it in ${DISTDIR}."
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-typo.patch
+ epatch "${FILESDIR}"/${PV}-exec.patch
+
+ cat >> etc/config <<- EOF
+ VERSION=${PV}
+ SHELL=${EPREFIX}/bin/sh
+ FC=${FORTRANC}
+ FFLAGS=${FFLAGS}
+ FFLAGS2=${FFLAGS}
+ CC=$(tc-getCC)
+ FORK=g77fork.o
+ LDFLAGS=${LDFLAGS}
+ LIBS=-pthread -lpthread -liomp5
+ EOF
+
+ if [[ ${FORTRANC} == gfortran ]]; then
+ cat >> etc/config <<- EOF
+ DEFS=-Dgfortran
+ SYSTEM=gfortran
+ EOF
+ else
+ cat >> etc/config <<- EOF
+ DEFS=-Dintel
+ SYSTEM=intel
+ EOF
+ fi
+}
+
+src_compile() {
+ cd src
+ emake \
+ || die
+}
+
+src_install() {
+ source etc/config
+ dobin cyana{job,table,filter,clean} || die
+ newbin src/${PN}/${PN}exe.${SYSTEM} ${PN} || die
+ insinto /usr/share/${PN}
+ doins -r lib macro help || die
+ use examples && doins -r demo
+
+ cat >> "${T}"/20cyana <<- EOF
+ CYANALIB="${EPREFIX}/usr/share/${PN}"
+ EOF
+
+ doenvd "${T}"/20cyana || die
+}
--- /dev/null
+diff --git a/cyana b/cyana
+index 4f746cf..a7ff060 100755
+--- a/cyana
++++ b/cyana
+@@ -45,16 +45,13 @@ shift `expr $optind - 1`
+
+ if [ "$h" ]; then usage=1; fi
+ if [ "$usage" ]; then
+- echo "Usage: $prog -hctx parameters ..."
++ echo "Usage: $prog -hS parameters ..."
+ echo
+ echo " -h help"
+ echo " -c command command to start program (must contain \$exefile)"
+ echo " -S run in safe mode, i.e. within one directory"
+- echo " -t system explicit system type"
+- echo " -x display name of executable without executing it"
+ exit 2
+ fi
+-if [ "$c" ]; then cmd="$c"; fi
+ sys=$t
+ mode=$x
+ safe=$S
+@@ -65,23 +62,6 @@ safe=$S
+ eval ${PROG}ARG='$*'
+ export ${PROG}ARG
+
+-
+-# ------ Set library name ------
+-
+-f=$0
+-if [ `echo $f | sed 's,^/.*,+,'` != "+" ]; then f=`which $0`; fi
+-odir=`pwd`
+-while [ "`ls -l $f | awk '{ print substr($1,1,1) }'`" = "l" ]; do
+- l=`ls -l $f | awk '{ i = NF; print $i }'`
+- cd `dirname $f`; cd `dirname $l`; l=`pwd`/`basename $l`
+- f=$l
+-done
+-cd `dirname $f`
+-libdir=`pwd | sed 's,/src/'${prog}'$,,'`
+-cd $odir
+-eval ${PROG}LIB=$libdir
+-export ${PROG}LIB
+-
+ if [ "$safe" ]; then
+ CYANAINIT=initsafe; export CYANAINIT
+ fi
+@@ -89,29 +69,4 @@ fi
+
+ # ------ Start the program ------
+
+-if [ -d $libdir/src/$prog ]; then
+- exe=$libdir/src/$prog/$exe
+-else
+- exe=$libdir/$exe
+-fi
+-if [ "$sys" = "" ]; then
+- sys=`$libdir/etc/identify`
+- files="$exe.$sys* $exe.gnu $exe.*"
+-else
+- files=$exe.$sys
+-fi
+-for exefile in $files; do
+- if [ -x $exefile ]; then
+- if [ "$mode" ]; then
+- echo $exefile; exit 0
+- else
+- if [ "`echo $cmd | grep -c '\$exefile'`" -gt 0 ]; then
+- eval exec $cmd
+- else
+- eval exec $cmd $exefile
+- fi
+- fi
+- fi
+-done
+-echo "No executable found in \"`dirname $exe`\"."
+-exit 1
++exec cyana
--- /dev/null
+diff --git a/src/cyana/putpro.f b/src/cyana/putpro.f
+index d4080f9..4490225 100644
+--- a/src/cyana/putpro.f
++++ b/src/cyana/putpro.f
+@@ -66,7 +66,7 @@ c ------------------------------------------------------ BMRB header
+ * ' _Mol_residue_sequence',
+ * ';'
+ do i=1,nr,20
+- write (iunit,'(20A1))') (rcode(rnam(j)),j=i,min(nr,i+19))
++ write (iunit,'(20A1)') (rcode(rnam(j)),j=i,min(nr,i+19))
+ end do
+
+ write (iunit,'(A)')
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>jlec@gentoo.org</email>
+</maintainer>
+</pkgmetadata>