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