summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2007-12-07 08:58:58 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2007-12-07 08:58:58 +0000
commitb441df6af7e654ab3726badb55810fdffb2cb0a5 (patch)
treefdf6d54faa509b80ea466178625dfc48c195fae1 /sci-chemistry/cns
parentstable x86, bug 191415 (diff)
downloadhistorical-b441df6af7e654ab3726badb55810fdffb2cb0a5.tar.gz
historical-b441df6af7e654ab3726badb55810fdffb2cb0a5.tar.bz2
historical-b441df6af7e654ab3726badb55810fdffb2cb0a5.zip
Fix non-g77 build; make cns_web work; install the environment script to /etc/profile.d/ so people don't need to manually source it; also install the (hidden) bash/sh-compatible script; don't pass LDFLAGS because gfortran doesn't deal with them properly.
Package-Manager: portage-2.1.4_rc4
Diffstat (limited to 'sci-chemistry/cns')
-rw-r--r--sci-chemistry/cns/ChangeLog10
-rw-r--r--sci-chemistry/cns/Manifest25
-rw-r--r--sci-chemistry/cns/cns-1.2-r1.ebuild147
-rw-r--r--sci-chemistry/cns/files/digest-cns-1.2-r13
4 files changed, 180 insertions, 5 deletions
diff --git a/sci-chemistry/cns/ChangeLog b/sci-chemistry/cns/ChangeLog
index 0b23d6eeccf2..2e3b8243b953 100644
--- a/sci-chemistry/cns/ChangeLog
+++ b/sci-chemistry/cns/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-chemistry/cns
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.7 2007/06/22 07:01:13 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.8 2007/12/07 08:58:57 dberkholz Exp $
+
+*cns-1.2-r1 (07 Dec 2007)
+
+ 07 Dec 2007; Donnie Berkholz <dberkholz@gentoo.org>; +cns-1.2-r1.ebuild:
+ Fix non-g77 build; make cns_web work; install the environment script to
+ /etc/profile.d/ so people don't need to manually source it; also install the
+ (hidden) bash/sh-compatible script; don't pass LDFLAGS because gfortran
+ doesn't deal with them properly.
*cns-1.2 (22 Jun 2007)
diff --git a/sci-chemistry/cns/Manifest b/sci-chemistry/cns/Manifest
index 421ac5fbeef6..ec9923e75a6e 100644
--- a/sci-chemistry/cns/Manifest
+++ b/sci-chemistry/cns/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 1.1-time-length-10.patch 443 RMD160 664ae29ccb2921954ffb14653e4560ed2bef1fa4 SHA1 ca1ddd1535c54bd541570eaf0187eb4c6f638e13 SHA256 73ca56b80588aabd513d6f5171db1217189899e04b5e460a55824eef13c5505a
MD5 53591c4f04cc3ac9c21ba8da86ffa24b files/1.1-time-length-10.patch 443
RMD160 664ae29ccb2921954ffb14653e4560ed2bef1fa4 files/1.1-time-length-10.patch 443
@@ -10,14 +13,18 @@ EBUILD cns-1.1.ebuild 3627 RMD160 7afb52c6e1fb8fb0dad02f7cadf00753394a43de SHA1
MD5 b89c4d5f044c8d6d7155855dd49dea76 cns-1.1.ebuild 3627
RMD160 7afb52c6e1fb8fb0dad02f7cadf00753394a43de cns-1.1.ebuild 3627
SHA256 80af06cf6075ad20db398ef3c6cbec8c5e92bee09d039fcdcc0634a7db2c6146 cns-1.1.ebuild 3627
+EBUILD cns-1.2-r1.ebuild 4435 RMD160 ed8f0c0b7117ff01442250d3a5e2d89cf35a3db3 SHA1 8a5cff0418ae8f94f9e8029ad6163158ad8e8961 SHA256 34433aec245c50dbb1d516c2807806f916199e41e73ad520308df42d367ef08d
+MD5 ff3a216778af83d2e937ab5d2ae900f7 cns-1.2-r1.ebuild 4435
+RMD160 ed8f0c0b7117ff01442250d3a5e2d89cf35a3db3 cns-1.2-r1.ebuild 4435
+SHA256 34433aec245c50dbb1d516c2807806f916199e41e73ad520308df42d367ef08d cns-1.2-r1.ebuild 4435
EBUILD cns-1.2.ebuild 3526 RMD160 9179b57dcbbe8d75b97fa6abf8568213dbe85fd6 SHA1 3d8b846fb0e7d479d3c7cf97f31b76ca8ae012a8 SHA256 10324bf7c2f0dad705ff2c4c51c8d17c7469a4e0d18d08ea2f4e3b8fa1f974c9
MD5 cad9887e9edc4445e3c3814e4ae34b5d cns-1.2.ebuild 3526
RMD160 9179b57dcbbe8d75b97fa6abf8568213dbe85fd6 cns-1.2.ebuild 3526
SHA256 10324bf7c2f0dad705ff2c4c51c8d17c7469a4e0d18d08ea2f4e3b8fa1f974c9 cns-1.2.ebuild 3526
-MISC ChangeLog 1199 RMD160 2c8cf60c7a801f8b3261b37ccf95872773fd0c77 SHA1 8b84d6d231f4d161186c9fcd2447a72403ac70d4 SHA256 3b32dc4ac01cc84bd0550af925bce4de391087a8ae6598116e75ef5d8323d16d
-MD5 ca3dac2672f9f10b75f6f8e44e322839 ChangeLog 1199
-RMD160 2c8cf60c7a801f8b3261b37ccf95872773fd0c77 ChangeLog 1199
-SHA256 3b32dc4ac01cc84bd0550af925bce4de391087a8ae6598116e75ef5d8323d16d ChangeLog 1199
+MISC ChangeLog 1564 RMD160 b9fcf8df82a39277db340978cf5ae7e73c3a53eb SHA1 f59bc5a6b8e8da8f9c885cef45fb7fa771f38679 SHA256 be4a7ca6bbd4219d6b74f273d7888a652cd62e38f24afccedda878167e8cec23
+MD5 a299584af66525e3815a94310562d51e ChangeLog 1564
+RMD160 b9fcf8df82a39277db340978cf5ae7e73c3a53eb ChangeLog 1564
+SHA256 be4a7ca6bbd4219d6b74f273d7888a652cd62e38f24afccedda878167e8cec23 ChangeLog 1564
MISC metadata.xml 166 RMD160 4452298fd03e7c9395d1182bfe69d60a14144af6 SHA1 cb0b513473c0348f4f6f6cd9a132e4884155fddb SHA256 84c92b49702daf95eace8d2765215cbd8650da4ef776f9f700b5ce3785dec852
MD5 43628e9f5743b5c3b018a82669a76bc7 metadata.xml 166
RMD160 4452298fd03e7c9395d1182bfe69d60a14144af6 metadata.xml 166
@@ -28,3 +35,13 @@ SHA256 8d3e2c15dea9f13feb8c0f6ef3d46f5e4892a1f51175176146bd76915ff9c0cf files/di
MD5 fc43bb6a094383b0d23f972804920841 files/digest-cns-1.2 259
RMD160 c7558e8567e1f9ba6e8c567c1aeb0f061b35c87c files/digest-cns-1.2 259
SHA256 a5448713d044cf6c88894266096a09518a40cd515df46820f6577175cea5d2ed files/digest-cns-1.2 259
+MD5 fc43bb6a094383b0d23f972804920841 files/digest-cns-1.2-r1 259
+RMD160 c7558e8567e1f9ba6e8c567c1aeb0f061b35c87c files/digest-cns-1.2-r1 259
+SHA256 a5448713d044cf6c88894266096a09518a40cd515df46820f6577175cea5d2ed files/digest-cns-1.2-r1 259
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFHWQtdXVaO67S1rtsRAts/AKDhNcEA3z7atS+HREnCZ/eaNtdwAACeMWMk
+e785WsTm/pqKHkKJvIQW4vA=
+=6Bhl
+-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/cns/cns-1.2-r1.ebuild b/sci-chemistry/cns/cns-1.2-r1.ebuild
new file mode 100644
index 000000000000..e7884ca2f74c
--- /dev/null
+++ b/sci-chemistry/cns/cns-1.2-r1.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.1 2007/12/07 08:58:57 dberkholz Exp $
+
+inherit eutils fortran toolchain-funcs
+
+MY_PN="${PN}_solve"
+MY_P="${MY_PN}_${PV}"
+
+DESCRIPTION="Crystallography and NMR System"
+HOMEPAGE="http://cns.csb.yale.edu/"
+SRC_URI="${MY_P}_all.tar.gz"
+RESTRICT="fetch"
+LICENSE="cns"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE=""
+RDEPEND="|| ( app-shells/tcsh app-shells/csh )
+ !app-text/dos2unix"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${MY_P}"
+
+FORTRAN="g77 gfortran"
+
+pkg_nofetch() {
+ einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/"
+ einfo "and place these files:"
+ einfo "${A}"
+ einfo "in ${DISTDIR}."
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # The length of time must be at least 10, not 9
+ # http://gcc.gnu.org/ml/fortran/2006-02/msg00198.html
+ epatch "${FILESDIR}"/1.1-time-length-10.patch
+
+ # Set up location for the build directory
+ # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION
+ 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" \
+ "${S}"/.cns_solve_env_sh
+}
+
+src_compile() {
+ local GLOBALS
+ local MALIGN=
+ if [[ ${FORTRANC} = g77 ]]; then
+ GLOBALS="-fno-globals"
+ MALIGN='\$(CNS_MALIGN_I86)'
+ fi
+
+ # 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)" \
+ F77OPT="${FFLAGS:- -O2} ${MALIGN}" \
+ F77STD="${GLOBALS}" \
+ 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 .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_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \
+ -e "s:\$CNS_LIB:\$CNS_DATA:g" \
+ -e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \
+ -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/bin/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/data:g" \
+ -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \
+ -e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \
+ -e "s:\$CNS_LIB:\$CNS_DATA:g" \
+ -e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \
+ -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/bin/cns_info:g" \
+ "${S}"/.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" \
+ "${S}"/.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 "${S}"/.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/*
+}
diff --git a/sci-chemistry/cns/files/digest-cns-1.2-r1 b/sci-chemistry/cns/files/digest-cns-1.2-r1
new file mode 100644
index 000000000000..1b3fb7cb9da1
--- /dev/null
+++ b/sci-chemistry/cns/files/digest-cns-1.2-r1
@@ -0,0 +1,3 @@
+MD5 66b54d9f9e780beee850e4dd07d7031a cns_solve_1.2_all.tar.gz 30456531
+RMD160 45cff57b3f026d730032cfc1c9476880f7cc81ab cns_solve_1.2_all.tar.gz 30456531
+SHA256 230847d8e00def4b55dda8c50d9148bca11a88ed6bc575e735041c91f8fff064 cns_solve_1.2_all.tar.gz 30456531