Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/ccp4-libs: ccp4-libs-6.1.3.ebuild ChangeLog metadata.xml
Date: Tue, 02 Feb 2010 20:38:20
Message-Id: E1NcPVp-0003j4-R5@stork.gentoo.org
1 jlec 10/02/02 20:38:17
2
3 Added: ccp4-libs-6.1.3.ebuild ChangeLog metadata.xml
4 Log:
5 Splitt out ccp4 libraries -- big thanks to dberkholz starting this project
6 (Portage version: 2.2_rc62/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-libs/ccp4-libs/ccp4-libs-6.1.3.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/ccp4-libs-6.1.3.ebuild?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/ccp4-libs-6.1.3.ebuild?rev=1.1&content-type=text/plain
13
14 Index: ccp4-libs-6.1.3.ebuild
15 ===================================================================
16 # Copyright 1999-2010 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18 # $Header: /var/cvsroot/gentoo-x86/sci-libs/ccp4-libs/ccp4-libs-6.1.3.ebuild,v 1.1 2010/02/02 20:38:16 jlec Exp $
19
20 EAPI="3"
21
22 inherit fortran eutils gnuconfig toolchain-funcs
23
24 FORTRAN="g77 gfortran ifc"
25
26 SRC="ftp://ftp.ccp4.ac.uk/ccp4"
27
28 #UPDATE="04_03_09"
29 #PATCHDATE="090511"
30
31 MY_P="${P/-libs}"
32
33 PATCH_TOT="0"
34 # Here's a little scriptlet to generate this list from the provided
35 # index.patches file
36 #
37 # i=1; while read -a line; do [[ ${line//#} != ${line} ]] && continue;
38 # echo "PATCH${i}=( ${line[1]}"; echo "${line[0]} )"; (( i++ )); done <
39 # index.patches
40 #PATCH1=( src/topp_
41 #topp.f-r1.16.2.5-r1.16.2.6.diff )
42 #PATCH2=( .
43 #configure-r1.372.2.18-r1.372.2.19.diff )
44
45 DESCRIPTION="Protein X-ray crystallography toolkit"
46 HOMEPAGE="http://www.ccp4.ac.uk/"
47 SRC_URI="${SRC}/${PV}/${MY_P}-core-src.tar.gz"
48 # patch tarball from upstream
49 [[ -n ${UPDATE} ]] && SRC_URI="${SRC_URI} ${SRC}/${PV}/updates/${P}-src-patch-${UPDATE}.tar.gz"
50 # patches created by us
51 [[ -n ${PATCHDATE} ]] && SRC_URI="${SRC_URI} http://dev.gentooexperimental.org/~jlec/science-dist/${PV}-${PATCHDATE}-updates.patch.bz2"
52
53 for i in $(seq $PATCH_TOT); do
54 NAME="PATCH${i}[1]"
55 SRC_URI="${SRC_URI}
56 ${SRC}/${PV}/patches/${!NAME}"
57 done
58
59 LICENSE="ccp4"
60 SLOT="0"
61 KEYWORDS="~amd64 ~x86"
62 IUSE=""
63
64 RDEPEND="
65 app-shells/tcsh
66 !<sci-chemistry/ccp4-6.1.3
67 =sci-libs/fftw-2*
68 sci-libs/mmdb
69 sci-libs/monomer-db
70 virtual/lapack
71 virtual/blas"
72 DEPEND="${RDEPEND}"
73
74 RESTRICT="mirror"
75
76 S="${WORKDIR}/${MY_P}"
77
78 src_prepare() {
79 einfo "Applying upstream patches ..."
80 for patch in $(seq $PATCH_TOT); do
81 base="PATCH${patch}"
82 dir=$(eval echo \${${base}[0]})
83 p=$(eval echo \${${base}[1]})
84 pushd "${dir}" >& /dev/null
85 ccp_patch "${DISTDIR}/${p}"
86 popd >& /dev/null
87 done
88 einfo "Done."
89 echo
90
91 [[ -n ${PATCHDATE} ]] && epatch "${WORKDIR}"/${PV}-${PATCHDATE}-updates.patch
92
93 einfo "Applying Gentoo patches ..."
94 # it tries to create libdir, bindir etc on live system in configure
95 ccp_patch "${FILESDIR}"/${PV}-dont-make-dirs-in-configure.patch
96
97 # gerror_ gets defined twice on ppc if you're using gfortran/g95
98 ccp_patch "${FILESDIR}"/6.0.2-ppc-double-define-gerror.patch
99
100 # make creation of libccif.so smooth
101 ccp_patch "${FILESDIR}"/${PV}-ccif-shared.patch
102
103 # lets try to build libmmdb seperatly
104 ccp_patch "${FILESDIR}"/${PV}-dont-build-mmdb.patch
105
106 einfo "Done." # done applying Gentoo patches
107 echo
108
109 gnuconfig_update
110 }
111
112 src_configure() {
113 # Build system is broken if we set LDFLAGS
114 userldflags="${LDFLAGS}"
115 export SHARED_LIB_FLAGS="${LDFLAGS}"
116 unset LDFLAGS
117
118 # GENTOO_OSNAME can be one of:
119 # irix irix64 sunos sunos64 aix hpux osf1 linux freebsd
120 # linux_compaq_compilers linux_intel_compilers generic Darwin
121 # ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers
122 if [[ "${FORTRANC}" = "ifc" ]]; then
123 if use ia64; then
124 GENTOO_OSNAME="ia64_linux_intel"
125 else
126 # Should be valid for x86, maybe amd64
127 GENTOO_OSNAME="linux_intel_compilers"
128 fi
129 else
130 # Should be valid for x86 and amd64, at least
131 GENTOO_OSNAME="linux"
132 fi
133
134 # Sets up env
135 ln -s \
136 ccp4.setup-bash \
137 "${S}"/include/ccp4.setup
138
139 # We agree to the license by emerging this, set in LICENSE
140 sed -i \
141 -e "s~^\(^agreed=\).*~\1yes~g" \
142 "${S}"/configure
143
144 # Fix up variables -- need to reset CCP4_MASTER at install-time
145 sed -i \
146 -e "s~^\(setenv CCP4_MASTER.*\)/.*~\1"${WORKDIR}"~g" \
147 -e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1${EPREFIX}/usr/bin~g" \
148 "${S}"/include/ccp4.setup*
149
150 # Set up variables for build
151 source "${S}"/include/ccp4.setup
152
153 export CC=$(tc-getCC)
154 export CXX=$(tc-getCXX)
155 export COPTIM=${CFLAGS}
156 export CXXOPTIM=${CXXFLAGS}
157 # Default to -O2 if FFLAGS is unset
158 export FC=${FORTRANC}
159 export FOPTIM=${FFLAGS:- -O2}
160 # export CCP4_SCR="${T}"
161
162 # Fix linking
163 # $(tc-getCC) ${userldflags} -shared -Wl,-soname,libmmdb.so -o libmmdb.so \${MMDBOBJS} $(gcc-config -L | awk -F: '{for(i=1; i<=NF; i++) printf " -L%s", $i}') -lm -lstdc++ && \
164 export SHARE_LIB="\
165 $(tc-getCC) ${userldflags} -shared -Wl,-soname,libccp4c.so -o libccp4c.so \${CORELIBOBJS} \${CGENERALOBJS} \${CUCOBJS} \${CMTZOBJS} \${CMAPOBJS} \${CSYMOBJS} -L.. -lccif $(gcc-config -L | awk -F: '{for(i=1; i<=NF; i++) printf " -L%s", $i}') -lm && \
166 ${FORTRANC} ${userldflags} -shared -Wl,-soname,libccp4f.so -o libccp4f.so \${FORTRANLOBJS} \${FINTERFACEOBJS} -L.. -lccif -L. -lccp4c -lmmdb $(gcc-config -L | awk -F: '{for(i=1; i<=NF; i++) printf " -L%s", $i}') -lstdc++ -lgfortran -lm"
167
168 # Can't use econf, configure rejects unknown options like --prefix
169 ./configure \
170 --onlylibs \
171 --with-shared-libs \
172 --with-fftw=${EPREFIX}/usr \
173 --with-warnings \
174 --disable-cctbx \
175 --disable-clipper \
176 --tmpdir="${TMPDIR}" \
177 ${GENTOO_OSNAME} || die "econf failed"
178 }
179
180 src_compile() {
181 emake -j1 onlylib || die "emake failed"
182 }
183
184 src_install() {
185 # Set up variables for build
186 source "${S}"/include/ccp4.setup
187
188 einstall || die "install failed"
189
190 # Libs
191 for file in "${S}"/lib/*; do
192 if [[ -d ${file} ]]; then
193 continue
194 elif [[ -x ${file} ]]; then
195 dolib.so ${file} || die
196 else
197 insinto /usr/$(get_libdir)
198 doins ${file} || die
199 fi
200 done
201
202 # Bins
203 dobin bin/{automask,diff2jpeg,diffdump,printpeaks} || die
204 newbin bin/superpose superpose-ccp4 || die
205
206 # Fix libdir in all *.la files
207 sed -i \
208 -e "s:^\(libdir=\).*:\1\'${EPREFIX}/usr/$(get_libdir)\':g" \
209 "${ED}"/usr/$(get_libdir)/*.la || die
210
211 # Data
212 insinto /usr/share/ccp4/data/
213 doins -r "${S}"/lib/data/{*.PARM,*.prt,*.lib,*.dic,*.idl,*.cif,*.resource,*.york,*.hist,fraglib,reference_structures} || die
214 dodoc "${S}"/lib/data/*.doc
215 newdoc "${S}"/lib/data/README DATA-README
216
217 # Include files
218 insinto /usr/include
219 for i in ccp4; do
220 doins -r "${S}"/include/${i} || die
221 done
222 }
223
224 # Epatch wrapper for bulk patching
225 ccp_patch() {
226 EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1}
227 }
228
229
230
231 1.1 sci-libs/ccp4-libs/ChangeLog
232
233 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/ChangeLog?rev=1.1&view=markup
234 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/ChangeLog?rev=1.1&content-type=text/plain
235
236 Index: ChangeLog
237 ===================================================================
238 # ChangeLog for sci-libs/ccp4-libs
239 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
240 # $Header: /var/cvsroot/gentoo-x86/sci-libs/ccp4-libs/ChangeLog,v 1.1 2010/02/02 20:38:16 jlec Exp $
241
242 *ccp4-libs-6.1.3 (02 Feb 2010)
243
244 02 Feb 2010; Justin Lecher (jlec) <jlec@g.o>
245 +files/6.0.2-ppc-double-define-gerror.patch,
246 +files/6.1.3-ccif-shared.patch, +files/6.1.3-dont-build-mmdb.patch,
247 +files/6.1.3-dont-make-dirs-in-configure.patch,
248 +files/6.1.3-glibc2.10.patch, +files/6.1.3-link-proberly.patch,
249 +ccp4-libs-6.1.3.ebuild, +metadata.xml:
250 Splitted libraries from sci-chemistry/ccp4
251
252
253
254
255 1.1 sci-libs/ccp4-libs/metadata.xml
256
257 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/metadata.xml?rev=1.1&view=markup
258 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/ccp4-libs/metadata.xml?rev=1.1&content-type=text/plain
259
260 Index: metadata.xml
261 ===================================================================
262 <?xml version="1.0" encoding="UTF-8"?>
263 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
264 <pkgmetadata>
265 <herd>sci-chemistry</herd>
266 <maintainer>
267 <email>jlec@g.o</email>
268 <name>Justin Lecher (jlec)</name>
269 </maintainer>
270 </pkgmetadata>