diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2009-07-27 06:26:01 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2009-07-27 06:26:01 +0000 |
commit | 54fed30bde130c060f4514728dc2a8d60f7602cc (patch) | |
tree | ae0b814daffb7c397fcd4f1e01de5b34d160c0f5 /sci-chemistry | |
parent | Set svn revision (diff) | |
download | historical-54fed30bde130c060f4514728dc2a8d60f7602cc.tar.gz historical-54fed30bde130c060f4514728dc2a8d60f7602cc.tar.bz2 historical-54fed30bde130c060f4514728dc2a8d60f7602cc.zip |
Pull in Justin Lecher's fixes from the science overlay, except for ARIA.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/cns/ChangeLog | 8 | ||||
-rw-r--r-- | sci-chemistry/cns/Manifest | 12 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1-r1.ebuild | 190 | ||||
-rw-r--r-- | sci-chemistry/cns/files/1.2.1-gentoo.patch | 72 |
4 files changed, 276 insertions, 6 deletions
diff --git a/sci-chemistry/cns/ChangeLog b/sci-chemistry/cns/ChangeLog index 4e8649e27420..357d0e1dd09c 100644 --- a/sci-chemistry/cns/ChangeLog +++ b/sci-chemistry/cns/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-chemistry/cns # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.15 2009/07/07 23:26:17 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.16 2009/07/27 06:26:01 dberkholz Exp $ + +*cns-1.2.1-r1 (27 Jul 2009) + + 27 Jul 2009; Donnie Berkholz <dberkholz@gentoo.org>; + +files/1.2.1-gentoo.patch, +cns-1.2.1-r1.ebuild: + Pull in Justin Lecher's fixes from the science overlay, except for ARIA. 07 Jul 2009; Diego E. Pettenò <flameeyes@gentoo.org> cns-1.2.1.ebuild: Use elog for fetch error. diff --git a/sci-chemistry/cns/Manifest b/sci-chemistry/cns/Manifest index a9fd31708be8..2b4ee79ad475 100644 --- a/sci-chemistry/cns/Manifest +++ b/sci-chemistry/cns/Manifest @@ -4,23 +4,25 @@ Hash: SHA1 AUX 1.1-time-length-10.patch 443 RMD160 664ae29ccb2921954ffb14653e4560ed2bef1fa4 SHA1 ca1ddd1535c54bd541570eaf0187eb4c6f638e13 SHA256 73ca56b80588aabd513d6f5171db1217189899e04b5e460a55824eef13c5505a AUX 1.2-allow-unknown-architectures.patch 540 RMD160 559f16141025b3d102a316af79ba0ee195846774 SHA1 d168a0413aab5e84ea48f1de5e0a84bc7206fcc7 SHA256 47f398e4c534f01eb64a1c68d477d21a8371707a0977b900d9f2124d3d37243d AUX 1.2.1-allow-gcc-openmp.patch 926 RMD160 b8ccec007a717c53ca15731b1b5637bb067d2dda SHA1 b5c876271029e47e180d1dd6d51df51b648f6232 SHA256 8c650b36ef731f7b799397ac9f6abfe9cdf46508df930e7bd3a0f2a0dc2e2275 +AUX 1.2.1-gentoo.patch 2411 RMD160 a82893524541961a9797fd2bb84982e609fda717 SHA1 7d3168a9cf7622923138022a5683aa65b5d5c34d SHA256 58972606d23d87fdeb08c9e37d9d5c536983e5a1ad4647dedd5b283ef67bc52c AUX cns_solve_env_sh 7002 RMD160 23aeaddf9fad54fc52d3b6df68564039764802b4 SHA1 1145438aa5325c9229629bcfd3dae283bc960d72 SHA256 e6191df6265ffc02661f196b91b597fac752e85ca37b4bb735b83fd62a13fe0b DIST cns_solve_1.1_basic_inputs.tar.gz 5049767 RMD160 eb5686a006d53cf269456eaecd7507842c8a10eb SHA1 255e7c5170168f9e032ef9e84a870eddf176f4ce SHA256 916d86d96159bd945a3b05e26c71af0cc6097234776385630f618fa2641cf3eb DIST cns_solve_1.1_data.tar.gz 18770504 RMD160 a18470f31fa6213e817dadf3c3c56231ebce9e63 SHA1 3eaae5ecd1df14412083af8a31a6e3f7b14c4753 SHA256 da59213013b845ca357decfc11337c7dfdb3134bd012c710291c66e8febdbb37 DIST cns_solve_1.1_test.tar.gz 2852870 RMD160 2f7e7b5ed4e603b2459944a8991829d1361315b5 SHA1 c50587cf3fdfcb1266d13dbd689a9b8b094fb681 SHA256 c5d049596cca4f6985b0b4997f4fa62345d2c111b8fab534918829ade1899a23 -DIST cns_solve_1.21_all-mp.tar.gz 32758988 RMD160 cdcb19a4a5032891ae4ac17ca8ed4ad43747a7f5 SHA1 e06c0d66183eb0933f7b8b3b7fcbfc2661a05bc8 SHA256 b9f7a7593a462e25898e0473100aaba04866af23e4b8b4d1846f0726da2005e1 +DIST cns_solve_1.21_all-mp.tar.gz 32748040 RMD160 0da9c1858e858474a8798149b7692b9e097adc9e SHA1 3ba32a6622b55dfff397b6844e8b8a594124a482 SHA256 7ab464e20932eb024ba6378738da77a4a03642d63b0ca9772b612a7cf27baec1 DIST cns_solve_1.21_all.tar.gz 32739912 RMD160 ab763373923264497d1ccb507cab23b2e1af9826 SHA1 93059805e14f0482cf58755daecc52cf97863215 SHA256 a581c6a0e9e5ffd45f025520959921d7ba91bb5d1e6569f1c81e709bb6f87c81 DIST cns_solve_1.2_all.tar.gz 30456531 RMD160 45cff57b3f026d730032cfc1c9476880f7cc81ab SHA1 1611ad499746993a9d210e6053e1cdd1553848a7 SHA256 230847d8e00def4b55dda8c50d9148bca11a88ed6bc575e735041c91f8fff064 EBUILD cns-1.1.ebuild 3605 RMD160 d909804101c942679132d7c37707e3e0f3cf3617 SHA1 b4d9f4f0fd25618e8a85d9a593c3f3e46bee2efa SHA256 81855368f4aa81e479078187e733b10625ec1a0a893c856b5d97022d64af787e EBUILD cns-1.2-r1.ebuild 4474 RMD160 4c00d86abde1f2c046eacbe0d0cd1a989222b724 SHA1 30284469ebd2284cebb4eaf309cc7840afe44894 SHA256 105e0688bc6ac038f97a6ed93905ed16ce15350c81ded1870892653972eb1372 +EBUILD cns-1.2.1-r1.ebuild 5484 RMD160 77f475cf3acd63edd0b4de60899e52bcd9cfef60 SHA1 355a956cb00e7e6544654a7cad6c23c1338ef0c6 SHA256 9b582cfa327173a8d5ed321f4c4f4daa0be4f5940b10e12faa2f323a95068998 EBUILD cns-1.2.1.ebuild 5581 RMD160 266bdf311cc963b8f6974888890897980791655e SHA1 563c412fbc397c71b4a580e4127df56ac8c4d3e3 SHA256 686f7c10b9ca44b0d9869761467ad529994ab86e84a2808efab9e107e08cce3f EBUILD cns-1.2.ebuild 3504 RMD160 e3dd53a4fa0a7118f7571e7bca7819d4ad9e39b5 SHA1 926f47b6b27c48c027d903add199d5445e62b13a SHA256 9eecdffa0fbe9fa50b68ea25654aa8b48dda3abc3eec63b21a6f373cdfd2ee19 -MISC ChangeLog 2716 RMD160 d83b68b0831900fd246d3f36bf53a0d0a16dc902 SHA1 e5cf436d684a284d69aa0492148178c08cc8cfd4 SHA256 7a1f101c04ab78ac3814c7dbc4234580c3a542e9931c47a9de41f9dcde46cc51 +MISC ChangeLog 2927 RMD160 85884210fef3b24017b05349ce00135aa8378cfb SHA1 ed41e0fc25e22d295f73796bbfe609c78bafb57e SHA256 2c258599bd0653b95617812f063c3b70a7c1f72c76424d91a43e9feb378b67b0 MISC metadata.xml 166 RMD160 4452298fd03e7c9395d1182bfe69d60a14144af6 SHA1 cb0b513473c0348f4f6f6cd9a132e4884155fddb SHA256 84c92b49702daf95eace8d2765215cbd8650da4ef776f9f700b5ce3785dec852 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkpT2Z8ACgkQAiZjviIA2XikqACbBx3qJ0rta5i/NxuA7tnz+u/k -WOMAn3zmH0MBuCUQztG34iRMsAyRwsIv -=zEI2 +iEYEARECAAYFAkptSIIACgkQXVaO67S1rtu2WwCfbQANlERhL1QLl6/eyh5yMMKn +cG0AoN9ReYE7HzaE5aV3ULi21Yg/1o6U +=ZeKt -----END PGP SIGNATURE----- diff --git a/sci-chemistry/cns/cns-1.2.1-r1.ebuild b/sci-chemistry/cns/cns-1.2.1-r1.ebuild new file mode 100644 index 000000000000..006c3c763e8d --- /dev/null +++ b/sci-chemistry/cns/cns-1.2.1-r1.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r1.ebuild,v 1.1 2009/07/27 06:26:01 dberkholz Exp $ + +EAPI="2" + +inherit eutils fortran 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" + +SLOT="0" +LICENSE="cns" +KEYWORDS="~amd64 ~x86" +IUSE="openmp" + +RDEPEND="app-shells/tcsh + !app-text/dos2unix" +DEPEND="${RDEPEND}" + +RESTRICT="fetch" +S="${WORKDIR}/${MY_P}" + +FORTRAN="g77 gfortran" + +pkg_nofetch() { + elog "Fill out the form at http://cns.csb.yale.edu/cns_request/" + elog "and place these files:" + elog ${A} + elog "in ${DISTDIR}." +} + +pkg_setup() { + fortran_pkg_setup + + if [[ $(tc-getCC)$ == *gcc* ]] && + ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] || + ! built_with_use sys-devel/gcc openmp ) + then + ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 " + ewarn "Switch CC to an OpenMP capable compiler" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PV}-gentoo.patch + + append-fflags -fopenmp + + # the code uses Intel-compiler-specific directives + epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch + + OMPLIB="-lgomp" + + use amd64 && \ + append-cflags "-DINTEGER='long long int'" && \ + append-fflags -fdefault-integer-8 + + # Set up location for the build directory + # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION + cp "${FILESDIR}"/cns_solve_env_sh "${T}"/ + sed -i \ + -e "s:_CNSsolve_location_:${S}:g" \ + -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \ + "${S}"/cns_solve_env + sed -i \ + -e "s:_CNSsolve_location_:${S}:g" \ + -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \ + "${T}"/cns_solve_env_sh +} + +src_compile() { + local GLOBALS + local MALIGN + if [[ ${FORTRANC} = g77 ]]; then + GLOBALS="-fno-globals" + MALIGN='\$(CNS_MALIGN_I86)' + fi + + # Set up the compiler to use + pushd instlib/machine/unsupported/g77-unix 2>/dev/null + ln -s Makefile.header Makefile.header.${FORTRANC} || die + popd 2>/dev/null + + # make install really means build, since it's expected to be used in-place + emake \ + CC="$(tc-getCC)" \ + F77="${FORTRANC}" \ + LD="${FORTRANC}" \ + CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \ + LDFLAGS="${LDFLAGS}" \ + F77OPT="${FFLAGS:- -O2} ${MALIGN}" \ + F77STD="${GLOBALS}" \ + OMPLIB="${OMPLIB}" \ + g77install \ + || die "emake failed" + +} + +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() { + # Install to locations resembling FHS + sed -i \ + -e "s:${S}:usr:g" \ + -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT /usr:g" \ + -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/data: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" \ + "${S}"/cns_solve_env + # I don't entirely understand why the sh version requires a leading / + # for CNS_SOLVE and CNS_ROOT, but it does + sed -i \ + -e "s:${S}:/usr:g" \ + -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=/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" \ + "${T}"/cns_solve_env_sh + + # Get rid of setup stuff we don't need in the installed script + sed -i \ + -e "83,$ d" \ + -e "37,46 d" \ + "${S}"/cns_solve_env + sed -i \ + -e "84,$ d" \ + -e "39,50 d" \ + "${T}"/cns_solve_env_sh + + newbin "${S}"/*_g77/bin/cns_solve* cns_solve \ + || die "install cns_solve failed" + + # Can be run by either cns_solve or cns + dosym cns_solve /usr/bin/cns + + # Don't want to install this + rm -f "${S}"/*_g77/utils/Makefile + + dobin "${S}"/*_g77/utils/* || die "install utils failed" + + sed -i \ + -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \ + "${S}"/bin/cns_web + + dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed" + + 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/* +} + +pkg_info() { + 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)." +} + +pkg_postinst() { + pkg_info +} 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..45f5c318155f --- /dev/null +++ b/sci-chemistry/cns/files/1.2.1-gentoo.patch @@ -0,0 +1,72 @@ +--- 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) $(OMPLIB); \ + 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; \ +@@ -59,7 +55,7 @@ + @ echo; echo "flags:"; \ + echo " fortran -> [$(F77)] $(F77FLAGS)"; \ + echo " c -> [$(CC)] $(CCFLAGS)"; \ +- echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB)"; \ ++ echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMP_LIB)"; \ + echo + + # regenerate makefiles +--- 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` |