Gentoo Archives: gentoo-commits

From: "Donnie Berkholz (dberkholz)" <dberkholz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/cns: ChangeLog cns-1.2-r1.ebuild
Date: Fri, 07 Dec 2007 08:59:13
Message-Id: E1J0Z2w-00022Q-4U@stork.gentoo.org
1 dberkholz 07/12/07 08:58:58
2
3 Modified: ChangeLog
4 Added: cns-1.2-r1.ebuild
5 Log:
6 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.
7 (Portage version: 2.1.4_rc4)
8
9 Revision Changes Path
10 1.8 sci-chemistry/cns/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.8&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?rev=1.8&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/ChangeLog?r1=1.7&r2=1.8
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v
19 retrieving revision 1.7
20 retrieving revision 1.8
21 diff -u -r1.7 -r1.8
22 --- ChangeLog 22 Jun 2007 07:01:13 -0000 1.7
23 +++ ChangeLog 7 Dec 2007 08:58:57 -0000 1.8
24 @@ -1,6 +1,14 @@
25 # ChangeLog for sci-chemistry/cns
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.7 2007/06/22 07:01:13 dberkholz Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.8 2007/12/07 08:58:57 dberkholz Exp $
29 +
30 +*cns-1.2-r1 (07 Dec 2007)
31 +
32 + 07 Dec 2007; Donnie Berkholz <dberkholz@g.o>; +cns-1.2-r1.ebuild:
33 + Fix non-g77 build; make cns_web work; install the environment script to
34 + /etc/profile.d/ so people don't need to manually source it; also install the
35 + (hidden) bash/sh-compatible script; don't pass LDFLAGS because gfortran
36 + doesn't deal with them properly.
37
38 *cns-1.2 (22 Jun 2007)
39
40
41
42
43 1.1 sci-chemistry/cns/cns-1.2-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: cns-1.2-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2007 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.1 2007/12/07 08:58:57 dberkholz Exp $
53
54 inherit eutils fortran toolchain-funcs
55
56 MY_PN="${PN}_solve"
57 MY_P="${MY_PN}_${PV}"
58
59 DESCRIPTION="Crystallography and NMR System"
60 HOMEPAGE="http://cns.csb.yale.edu/"
61 SRC_URI="${MY_P}_all.tar.gz"
62 RESTRICT="fetch"
63 LICENSE="cns"
64 SLOT="0"
65 KEYWORDS="~ppc ~x86"
66 IUSE=""
67 RDEPEND="|| ( app-shells/tcsh app-shells/csh )
68 !app-text/dos2unix"
69 DEPEND="${RDEPEND}"
70 S="${WORKDIR}/${MY_P}"
71
72 FORTRAN="g77 gfortran"
73
74 pkg_nofetch() {
75 einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/"
76 einfo "and place these files:"
77 einfo "${A}"
78 einfo "in ${DISTDIR}."
79 }
80
81 src_unpack() {
82 unpack ${A}
83 cd "${S}"
84
85 # The length of time must be at least 10, not 9
86 # http://gcc.gnu.org/ml/fortran/2006-02/msg00198.html
87 epatch "${FILESDIR}"/1.1-time-length-10.patch
88
89 # Set up location for the build directory
90 # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION
91 sed -i \
92 -e "s:_CNSsolve_location_:${S}:g" \
93 -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \
94 "${S}"/cns_solve_env
95 sed -i \
96 -e "s:_CNSsolve_location_:${S}:g" \
97 -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \
98 "${S}"/.cns_solve_env_sh
99 }
100
101 src_compile() {
102 local GLOBALS
103 local MALIGN=
104 if [[ ${FORTRANC} = g77 ]]; then
105 GLOBALS="-fno-globals"
106 MALIGN='\$(CNS_MALIGN_I86)'
107 fi
108
109 # make install really means build, since it's expected to be used in-place
110 emake \
111 CC="$(tc-getCC)" \
112 F77="${FORTRANC}" \
113 LD="${FORTRANC}" \
114 CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \
115 F77OPT="${FFLAGS:- -O2} ${MALIGN}" \
116 F77STD="${GLOBALS}" \
117 g77install \
118 || die "emake failed"
119 }
120
121 src_test() {
122 # We need to force on g77 manually, because we can't get aliases working
123 # when we source in a -c
124 einfo "Running tests ..."
125 sh -c \
126 "export CNS_G77=ON; source .cns_solve_env_sh; make run_tests" \
127 || die "tests failed"
128 einfo "Displaying test results ..."
129 cat "${S}"/*_g77/test/*.diff-test
130 }
131
132 src_install() {
133 # Install to locations resembling FHS
134 sed -i \
135 -e "s:${S}:usr:g" \
136 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT usr:g" \
137 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/data:g" \
138 -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \
139 -e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \
140 -e "s:\$CNS_LIB:\$CNS_DATA:g" \
141 -e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \
142 -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/bin/cns_info:g" \
143 "${S}"/cns_solve_env
144 # I don't entirely understand why the sh version requires a leading /
145 # for CNS_SOLVE and CNS_ROOT, but it does
146 sed -i \
147 -e "s:${S}:/usr:g" \
148 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=/usr:g" \
149 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/data:g" \
150 -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \
151 -e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \
152 -e "s:\$CNS_LIB:\$CNS_DATA:g" \
153 -e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \
154 -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/bin/cns_info:g" \
155 "${S}"/.cns_solve_env_sh
156
157 # Get rid of setup stuff we don't need in the installed script
158 sed -i \
159 -e "83,$ d" \
160 -e "37,46 d" \
161 "${S}"/cns_solve_env
162 sed -i \
163 -e "84,$ d" \
164 -e "39,50 d" \
165 "${S}"/.cns_solve_env_sh
166
167 newbin "${S}"/*_g77/bin/cns_solve* cns_solve \
168 || die "install cns_solve failed"
169
170 # Can be run by either cns_solve or cns
171 dosym cns_solve /usr/bin/cns
172
173 # Don't want to install this
174 rm -f "${S}"/*_g77/utils/Makefile
175
176 dobin "${S}"/*_g77/utils/* || die "install utils failed"
177
178 sed -i \
179 -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \
180 "${S}"/bin/cns_web
181
182 dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed"
183
184 insinto /usr/share/cns
185 doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib
186 doins "${S}"/bin/cns_info
187
188 insinto /etc/profile.d
189 newins "${S}"/cns_solve_env cns_solve_env.csh
190 newins "${S}"/.cns_solve_env_sh cns_solve_env.sh
191
192 dohtml \
193 -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 \
194 -f all_cns_info_template,omac,def \
195 -r doc/html/*
196 }
197
198
199
200 --
201 gentoo-commits@g.o mailing list