1 |
jlec 10/06/29 19:55:41 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ccp4-libs-6.1.3-r3.ebuild |
5 |
Log: |
6 |
Change way of installation, fixed insecure runpaths |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.7 sci-libs/ccp4-libs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/ChangeLog?rev=1.7&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/ChangeLog?rev=1.7&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/ChangeLog?r1=1.6&r2=1.7 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/ccp4-libs/ChangeLog,v |
19 |
retrieving revision 1.6 |
20 |
retrieving revision 1.7 |
21 |
diff -u -r1.6 -r1.7 |
22 |
--- ChangeLog 22 May 2010 10:04:27 -0000 1.6 |
23 |
+++ ChangeLog 29 Jun 2010 19:55:41 -0000 1.7 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for sci-libs/ccp4-libs |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/ccp4-libs/ChangeLog,v 1.6 2010/05/22 10:04:27 jlec Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/ccp4-libs/ChangeLog,v 1.7 2010/06/29 19:55:41 jlec Exp $ |
29 |
+ |
30 |
+*ccp4-libs-6.1.3-r3 (29 Jun 2010) |
31 |
+ |
32 |
+ 29 Jun 2010; Justin Lecher <jlec@g.o> +files/6.1.3-destdir.patch, |
33 |
+ files/6.1.3-dont-build-mmdb.patch, +files/6.1.3-noinstall.patch, |
34 |
+ +ccp4-libs-6.1.3-r3.ebuild: |
35 |
+ Change way of installation, fixed insecure runpaths |
36 |
|
37 |
*ccp4-libs-6.1.3-r2 (22 May 2010) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 sci-libs/ccp4-libs/ccp4-libs-6.1.3-r3.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ccp4-libs/ccp4-libs-6.1.3-r3.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-r3.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: ccp4-libs-6.1.3-r3.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-r3.ebuild,v 1.1 2010/06/29 19:55:41 jlec 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 |
# it tries to create libdir, bindir etc on live system in configure |
128 |
ccp_patch "${FILESDIR}"/${PV}-dont-make-dirs-in-configure.patch |
129 |
|
130 |
# gerror_ gets defined twice on ppc if you're using gfortran/g95 |
131 |
ccp_patch "${FILESDIR}"/6.0.2-ppc-double-define-gerror.patch |
132 |
|
133 |
# make creation of libccif.so smooth |
134 |
ccp_patch "${FILESDIR}"/${PV}-ccif-shared.patch |
135 |
|
136 |
# lets try to build libmmdb seperatly |
137 |
ccp_patch "${FILESDIR}"/${PV}-dont-build-mmdb.patch |
138 |
|
139 |
# unbundle libjpeg and cbflib |
140 |
ccp_patch "${FILESDIR}"/${PV}-unbundle-libs.patch |
141 |
|
142 |
# Fix missing DESTIDR |
143 |
ccp_patch "${FILESDIR}"/${PV}-destdir.patch |
144 |
|
145 |
# not installing during build |
146 |
ccp_patch "${FILESDIR}"/${PV}-noinstall.patch |
147 |
sed \ |
148 |
-e '/SHARE_INST/s:$(libdir):$(DESTDIR)/$(libdir):g' \ |
149 |
-i configure || die |
150 |
|
151 |
einfo "Done." # done applying Gentoo patches |
152 |
echo |
153 |
|
154 |
sed \ |
155 |
-e "s:/usr:${EPREFIX}/usr:g" \ |
156 |
-e 's:-Wl,-rpath,$CLIB::g' \ |
157 |
-e 's: -rpath $CLIB::g' \ |
158 |
-e 's: -I${srcdir}/include/cpp_c_headers::g' \ |
159 |
-i configure || die |
160 |
|
161 |
gnuconfig_update |
162 |
} |
163 |
|
164 |
src_configure() { |
165 |
|
166 |
rm -rf lib/DiffractionImage/{jpg,CBFlib} || die |
167 |
|
168 |
# Build system is broken if we set LDFLAGS |
169 |
userldflags="${LDFLAGS}" |
170 |
export SHARED_LIB_FLAGS="${LDFLAGS}" |
171 |
unset LDFLAGS |
172 |
|
173 |
# GENTOO_OSNAME can be one of: |
174 |
# irix irix64 sunos sunos64 aix hpux osf1 linux freebsd |
175 |
# linux_compaq_compilers linux_intel_compilers generic Darwin |
176 |
# ia64_linux_intel Darwin_ibm_compilers linux_ibm_compilers |
177 |
if [[ "${FORTRANC}" = "ifc" ]]; then |
178 |
if use ia64; then |
179 |
GENTOO_OSNAME="ia64_linux_intel" |
180 |
else |
181 |
# Should be valid for x86, maybe amd64 |
182 |
GENTOO_OSNAME="linux_intel_compilers" |
183 |
fi |
184 |
else |
185 |
# Should be valid for x86 and amd64, at least |
186 |
GENTOO_OSNAME="linux" |
187 |
fi |
188 |
|
189 |
# Sets up env |
190 |
ln -s \ |
191 |
ccp4.setup-bash \ |
192 |
"${S}"/include/ccp4.setup |
193 |
|
194 |
# We agree to the license by emerging this, set in LICENSE |
195 |
sed -i \ |
196 |
-e "s~^\(^agreed=\).*~\1yes~g" \ |
197 |
"${S}"/configure |
198 |
|
199 |
# Fix up variables -- need to reset CCP4_MASTER at install-time |
200 |
sed -i \ |
201 |
-e "s~^\(setenv CCP4_MASTER.*\)/.*~\1"${WORKDIR}"~g" \ |
202 |
-e "s~^\(setenv CCP4I_TCLTK.*\)/usr/local/bin~\1${EPREFIX}/usr/bin~g" \ |
203 |
"${S}"/include/ccp4.setup* |
204 |
|
205 |
# Set up variables for build |
206 |
source "${S}"/include/ccp4.setup |
207 |
|
208 |
export CC=$(tc-getCC) |
209 |
export CXX=$(tc-getCXX) |
210 |
export COPTIM=${CFLAGS} |
211 |
export CXXOPTIM=${CXXFLAGS} |
212 |
# Default to -O2 if FFLAGS is unset |
213 |
export FC=${FORTRANC} |
214 |
export FOPTIM=${FFLAGS:- -O2} |
215 |
# export CCP4_SCR="${T}" |
216 |
|
217 |
# Fix linking |
218 |
# $(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++ && \ |
219 |
export SHARE_LIB="\ |
220 |
$(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 && \ |
221 |
${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" |
222 |
|
223 |
# Can't use econf, configure rejects unknown options like --prefix |
224 |
./configure \ |
225 |
--onlylibs \ |
226 |
--with-shared-libs \ |
227 |
--with-fftw="${EPREFIX}"/usr \ |
228 |
--with-warnings \ |
229 |
--disable-cctbx \ |
230 |
--disable-clipper \ |
231 |
--tmpdir="${TMPDIR}" \ |
232 |
--bindir="${EPREFIX}"/usr/libexec/ccp4/bin/ \ |
233 |
--libdir="${EPREFIX}"/usr/$(get_libdir) \ |
234 |
${GENTOO_OSNAME} || die "econf failed" |
235 |
} |
236 |
|
237 |
src_compile() { |
238 |
emake -j1 \ |
239 |
DESTDIR="${ED}" onlylib || die "emake failed" |
240 |
} |
241 |
|
242 |
src_install() { |
243 |
# Set up variables for build |
244 |
source "${S}"/include/ccp4.setup |
245 |
|
246 |
emake -j1 \ |
247 |
DESTDIR="${ED}" \ |
248 |
includedir="${EPREFIX}"/usr/include \ |
249 |
library_includedir="${EPREFIX}"/usr/include \ |
250 |
install || die |
251 |
|
252 |
# Libs |
253 |
for file in "${S}"/lib/*; do |
254 |
if [[ -d ${file} ]]; then |
255 |
continue |
256 |
elif [[ -x ${file} ]]; then |
257 |
dolib.so ${file} || die |
258 |
else |
259 |
insinto /usr/$(get_libdir) |
260 |
doins ${file} || die |
261 |
fi |
262 |
done |
263 |
|
264 |
# Fix libdir in all *.la files |
265 |
sed -i \ |
266 |
-e "s:^\(libdir=\).*:\1\'${EPREFIX}/usr/$(get_libdir)\':g" \ |
267 |
"${ED}"/usr/$(get_libdir)/*.la || die |
268 |
|
269 |
# Data |
270 |
insinto /usr/share/ccp4/data/ |
271 |
doins -r "${S}"/lib/data/{*.PARM,*.prt,*.lib,*.dic,*.idl,*.cif,*.resource,*.york,*.hist,fraglib,reference_structures} || die |
272 |
dodoc "${S}"/lib/data/*.doc || die |
273 |
newdoc "${S}"/lib/data/README DATA-README || die |
274 |
} |
275 |
|
276 |
# Epatch wrapper for bulk patching |
277 |
ccp_patch() { |
278 |
EPATCH_SINGLE_MSG=" ${1##*/} ..." epatch ${1} |
279 |
} |