1 |
pinkbyte 13/12/27 16:59:48 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: boost-1.54.0-r1.ebuild boost-1.53.0-r1.ebuild |
5 |
Removed: boost-1.54.0.ebuild boost-1.53.0.ebuild |
6 |
Log: |
7 |
Properly disable all code, which depends on Boost.Context and remove all redundant headers, wrt bug #493116. Thanks to Mike Frysinger for discovering this issue. Drop old revisions |
8 |
|
9 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42) |
10 |
|
11 |
Revision Changes Path |
12 |
1.310 dev-libs/boost/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.310&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.310&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.309&r2=1.310 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v |
21 |
retrieving revision 1.309 |
22 |
retrieving revision 1.310 |
23 |
diff -u -r1.309 -r1.310 |
24 |
--- ChangeLog 14 Dec 2013 19:45:54 -0000 1.309 |
25 |
+++ ChangeLog 27 Dec 2013 16:59:47 -0000 1.310 |
26 |
@@ -1,6 +1,15 @@ |
27 |
# ChangeLog for dev-libs/boost |
28 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.309 2013/12/14 19:45:54 ago Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.310 2013/12/27 16:59:47 pinkbyte Exp $ |
31 |
+ |
32 |
+*boost-1.54.0-r1 (27 Dec 2013) |
33 |
+*boost-1.53.0-r1 (27 Dec 2013) |
34 |
+ |
35 |
+ 27 Dec 2013; Sergey Popov <pinkbyte@g.o> -boost-1.53.0.ebuild, |
36 |
+ +boost-1.53.0-r1.ebuild, -boost-1.54.0.ebuild, +boost-1.54.0-r1.ebuild: |
37 |
+ Properly disable all code, which depends on Boost.Context and remove all |
38 |
+ redundant headers, wrt bug #493116. Thanks to Mike Frysinger for discovering |
39 |
+ this issue. Drop old revisions |
40 |
|
41 |
14 Dec 2013; Agostino Sarubbo <ago@g.o> boost-1.52.0-r6.ebuild: |
42 |
Stable for sparc, wrt bug #455464 |
43 |
|
44 |
|
45 |
|
46 |
1.1 dev-libs/boost/boost-1.54.0-r1.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.54.0-r1.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.54.0-r1.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: boost-1.54.0-r1.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2013 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.54.0-r1.ebuild,v 1.1 2013/12/27 16:59:47 pinkbyte Exp $ |
56 |
|
57 |
EAPI="5" |
58 |
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) |
59 |
|
60 |
inherit eutils flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator |
61 |
|
62 |
MY_P=${PN}_$(replace_all_version_separators _) |
63 |
|
64 |
DESCRIPTION="Boost Libraries for C++" |
65 |
HOMEPAGE="http://www.boost.org/" |
66 |
SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2" |
67 |
|
68 |
LICENSE="Boost-1.0" |
69 |
MAJOR_V="$(get_version_component_range 1-2)" |
70 |
SLOT="0/${MAJOR_V}" |
71 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux" |
72 |
IUSE="debug doc icu +nls mpi python static-libs +threads tools" |
73 |
|
74 |
RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) |
75 |
!icu? ( virtual/libiconv ) |
76 |
mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) |
77 |
python? ( ${PYTHON_DEPS} ) |
78 |
app-arch/bzip2 |
79 |
sys-libs/zlib |
80 |
!app-admin/eselect-boost" |
81 |
DEPEND="${RDEPEND} |
82 |
=dev-util/boost-build-${MAJOR_V}*" |
83 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
84 |
|
85 |
S="${WORKDIR}/${MY_P}" |
86 |
|
87 |
create_user-config.jam() { |
88 |
local compiler compiler_version compiler_executable |
89 |
|
90 |
if [[ ${CHOST} == *-darwin* ]]; then |
91 |
compiler="darwin" |
92 |
compiler_version="$(gcc-fullversion)" |
93 |
compiler_executable="$(tc-getCXX)" |
94 |
else |
95 |
compiler="gcc" |
96 |
compiler_version="$(gcc-version)" |
97 |
compiler_executable="$(tc-getCXX)" |
98 |
fi |
99 |
local mpi_configuration python_configuration |
100 |
|
101 |
if use mpi; then |
102 |
mpi_configuration="using mpi ;" |
103 |
fi |
104 |
|
105 |
if use python; then |
106 |
python_configuration="using python : : ${PYTHON} ;" |
107 |
fi |
108 |
|
109 |
cat > user-config.jam << __EOF__ |
110 |
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
111 |
${mpi_configuration} |
112 |
${python_configuration} |
113 |
__EOF__ |
114 |
} |
115 |
|
116 |
src_prepare() { |
117 |
epatch \ |
118 |
"${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ |
119 |
"${FILESDIR}/${PN}-1.51.0-respect_python-buildid.patch" \ |
120 |
"${FILESDIR}/${PN}-1.51.0-support_dots_in_python-buildid.patch" \ |
121 |
"${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch" \ |
122 |
"${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch" \ |
123 |
"${FILESDIR}/${PN}-1.48.0-python_linking.patch" \ |
124 |
"${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" |
125 |
epatch "${FILESDIR}/${PN}-1.53.0-library_status.patch" # bug 459112 |
126 |
epatch "${FILESDIR}/${PN}-1.53.0-glibc-2.18-compat.patch" # bug 482372 |
127 |
|
128 |
# Avoid a patch for now |
129 |
for file in libs/context/src/asm/*.S; do |
130 |
cat - >> $file <<EOF |
131 |
|
132 |
#if defined(__linux__) && defined(__ELF__) |
133 |
.section .note.GNU-stack,"",%progbits |
134 |
#endif |
135 |
EOF |
136 |
done |
137 |
} |
138 |
|
139 |
ejam() { |
140 |
echo b2 "$@" |
141 |
b2 "$@" |
142 |
} |
143 |
|
144 |
src_configure() { |
145 |
OPTIONS="$(usex debug gentoodebug gentoorelease) -j$(makeopts_jobs) -q -d+2 --user-config=${S}/user-config.jam" |
146 |
|
147 |
if [[ ${CHOST} == *-darwin* ]]; then |
148 |
# We need to add the prefix, and in two cases this exceeds, so prepare |
149 |
# for the largest possible space allocation. |
150 |
append-ldflags -Wl,-headerpad_max_install_names |
151 |
elif [[ ${CHOST} == *-winnt* ]]; then |
152 |
compiler=parity |
153 |
if [[ $($(tc-getCXX) -v) == *trunk* ]]; then |
154 |
compilerVersion=trunk |
155 |
else |
156 |
compilerVersion=$($(tc-getCXX) -v | sed '1q' \ |
157 |
| sed -e 's,\([a-z]*\) \([0-9]\.[0-9]\.[0-9][^ \t]*\) .*,\2,') |
158 |
fi |
159 |
compilerExecutable=$(tc-getCXX) |
160 |
fi |
161 |
|
162 |
# bug 298489 |
163 |
if use ppc || use ppc64; then |
164 |
[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec |
165 |
fi |
166 |
|
167 |
# Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard. |
168 |
append-cxxflags -std=gnu++98 |
169 |
|
170 |
use icu && OPTIONS+=" -sICU_PATH=${EPREFIX}/usr" |
171 |
use icu || OPTIONS+=" --disable-icu boost.locale.icu=off" |
172 |
use mpi || OPTIONS+=" --without-mpi" |
173 |
use python || OPTIONS+=" --without-python" |
174 |
use nls || OPTIONS+=" --without-locale" |
175 |
|
176 |
OPTIONS+=" pch=off --boost-build=${EPREFIX}/usr/share/boost-build --prefix=\"${ED}usr\" --layout=system threading=$(usex threads multi single) link=$(usex static-libs shared,static shared)" |
177 |
OPTIONS+=" --without-context --without-coroutine" |
178 |
|
179 |
[[ ${CHOST} == *-winnt* ]] && OPTIONS+=" -sNO_BZIP2=1" |
180 |
} |
181 |
|
182 |
src_compile() { |
183 |
export BOOST_ROOT="${S}" |
184 |
PYTHON_DIRS="" |
185 |
MPI_PYTHON_MODULE="" |
186 |
|
187 |
building() { |
188 |
create_user-config.jam |
189 |
|
190 |
ejam ${OPTIONS} \ |
191 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
192 |
|| die "Building of Boost libraries failed" |
193 |
|
194 |
if use python; then |
195 |
if [[ -z "${PYTHON_DIRS}" ]]; then |
196 |
PYTHON_DIRS="$(find bin.v2/libs -name python | sort)" |
197 |
else |
198 |
if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then |
199 |
die "Inconsistent structure of build directories" |
200 |
fi |
201 |
fi |
202 |
|
203 |
local dir |
204 |
for dir in ${PYTHON_DIRS}; do |
205 |
mv ${dir} ${dir}-${EPYTHON} \ |
206 |
|| die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed" |
207 |
done |
208 |
|
209 |
if use mpi; then |
210 |
if [[ -z "${MPI_PYTHON_MODULE}" ]]; then |
211 |
MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" |
212 |
if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then |
213 |
die "Multiple mpi.so files found" |
214 |
fi |
215 |
else |
216 |
if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" ]]; then |
217 |
die "Inconsistent structure of build directories" |
218 |
fi |
219 |
fi |
220 |
|
221 |
mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} \ |
222 |
|| die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${EPYTHON}' failed" |
223 |
fi |
224 |
fi |
225 |
} |
226 |
if use python; then |
227 |
python_foreach_impl building |
228 |
else |
229 |
building |
230 |
fi |
231 |
|
232 |
if use tools; then |
233 |
pushd tools > /dev/null || die |
234 |
|
235 |
ejam ${OPTIONS} \ |
236 |
|| die "Building of Boost tools failed" |
237 |
popd > /dev/null || die |
238 |
fi |
239 |
} |
240 |
|
241 |
src_install () { |
242 |
installation() { |
243 |
create_user-config.jam |
244 |
|
245 |
if use python; then |
246 |
local dir |
247 |
for dir in ${PYTHON_DIRS}; do |
248 |
cp -pr ${dir}-${EPYTHON} ${dir} \ |
249 |
|| die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed" |
250 |
done |
251 |
|
252 |
if use mpi; then |
253 |
cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \ |
254 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed" |
255 |
cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \ |
256 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed" |
257 |
fi |
258 |
fi |
259 |
|
260 |
ejam ${OPTIONS} \ |
261 |
--includedir="${ED}usr/include" \ |
262 |
--libdir="${ED}usr/$(get_libdir)" \ |
263 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
264 |
install || die "Installation of Boost libraries failed" |
265 |
|
266 |
if use python; then |
267 |
rm -r ${PYTHON_DIRS} || die |
268 |
|
269 |
# Move mpi.so Python module to Python site-packages directory. |
270 |
# https://svn.boost.org/trac/boost/ticket/2838 |
271 |
if use mpi; then |
272 |
local moddir=$(python_get_sitedir)/boost |
273 |
# moddir already includes eprefix |
274 |
mkdir -p "${D}${moddir}" || die |
275 |
mv "${ED}usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die |
276 |
cat << EOF > "${D}${moddir}/__init__.py" || die |
277 |
import sys |
278 |
if sys.platform.startswith('linux'): |
279 |
import DLFCN |
280 |
flags = sys.getdlopenflags() |
281 |
sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL) |
282 |
from . import mpi |
283 |
sys.setdlopenflags(flags) |
284 |
del DLFCN, flags |
285 |
else: |
286 |
from . import mpi |
287 |
del sys |
288 |
EOF |
289 |
fi |
290 |
|
291 |
python_optimize |
292 |
fi |
293 |
} |
294 |
if use python; then |
295 |
python_foreach_impl installation |
296 |
else |
297 |
installation |
298 |
fi |
299 |
|
300 |
if ! use python; then |
301 |
rm -r "${ED}"/usr/include/boost/python* || die |
302 |
fi |
303 |
|
304 |
if ! use nls; then |
305 |
rm -r "${ED}"/usr/include/boost/locale || die |
306 |
fi |
307 |
|
308 |
rm -r "${ED}"/usr/include/boost/context || die |
309 |
rm -r "${ED}"/usr/include/boost/coroutine || die |
310 |
|
311 |
if use doc; then |
312 |
find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf |
313 |
dohtml \ |
314 |
-A pdf,txt,cpp,hpp \ |
315 |
*.{htm,html,png,css} \ |
316 |
-r doc |
317 |
dohtml -A pdf,txt -r tools |
318 |
insinto /usr/share/doc/${PF}/html |
319 |
doins -r libs |
320 |
doins -r more |
321 |
|
322 |
# To avoid broken links |
323 |
insinto /usr/share/doc/${PF}/html |
324 |
doins LICENSE_1_0.txt |
325 |
|
326 |
dosym /usr/include/boost /usr/share/doc/${PF}/html/boost |
327 |
fi |
328 |
|
329 |
pushd "${ED}usr/$(get_libdir)" > /dev/null || die |
330 |
|
331 |
local ext=$(get_libname) |
332 |
if use threads; then |
333 |
local f |
334 |
for f in *${ext}; do |
335 |
dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}} |
336 |
done |
337 |
fi |
338 |
|
339 |
popd > /dev/null || die |
340 |
|
341 |
if use tools; then |
342 |
dobin dist/bin/* |
343 |
|
344 |
insinto /usr/share |
345 |
doins -r dist/share/boostbook |
346 |
fi |
347 |
|
348 |
# boost's build system truely sucks for not having a destdir. Because for |
349 |
# this reason we are forced to build with a prefix that includes the |
350 |
# DESTROOT, dynamic libraries on Darwin end messed up, referencing the |
351 |
# DESTROOT instread of the actual EPREFIX. There is no way out of here |
352 |
# but to do it the dirty way of manually setting the right install_names. |
353 |
if [[ ${CHOST} == *-darwin* ]]; then |
354 |
einfo "Working around completely broken build-system(tm)" |
355 |
local d |
356 |
for d in "${ED}"usr/lib/*.dylib; do |
357 |
if [[ -f ${d} ]]; then |
358 |
# fix the "soname" |
359 |
ebegin " correcting install_name of ${d#${ED}}" |
360 |
install_name_tool -id "/${d#${D}}" "${d}" |
361 |
eend $? |
362 |
# fix references to other libs |
363 |
refs=$(otool -XL "${d}" | \ |
364 |
sed -e '1d' -e 's/^\t//' | \ |
365 |
grep "^libboost_" | \ |
366 |
cut -f1 -d' ') |
367 |
local r |
368 |
for r in ${refs}; do |
369 |
ebegin " correcting reference to ${r}" |
370 |
install_name_tool -change \ |
371 |
"${r}" \ |
372 |
"${EPREFIX}/usr/lib/${r}" \ |
373 |
"${d}" |
374 |
eend $? |
375 |
done |
376 |
fi |
377 |
done |
378 |
fi |
379 |
} |
380 |
|
381 |
pkg_preinst() { |
382 |
# Yai for having symlinks that are nigh-impossible to remove without |
383 |
# resorting to dirty hacks like these. Removes lingering symlinks |
384 |
# from the slotted versions. |
385 |
local symlink |
386 |
for symlink in "${EROOT}usr/include/boost" "${EROOT}usr/share/boostbook"; do |
387 |
[[ -L ${symlink} ]] && rm -f "${symlink}" |
388 |
done |
389 |
} |
390 |
|
391 |
# the tests will never fail because these are not intended as sanity |
392 |
# tests at all. They are more a way for upstream to check their own code |
393 |
# on new compilers. Since they would either be completely unreliable |
394 |
# (failing for no good reason) or completely useless (never failing) |
395 |
# there is no point in having them in the ebuild to begin with. |
396 |
src_test() { :; } |
397 |
|
398 |
|
399 |
|
400 |
1.1 dev-libs/boost/boost-1.53.0-r1.ebuild |
401 |
|
402 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.53.0-r1.ebuild?rev=1.1&view=markup |
403 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.53.0-r1.ebuild?rev=1.1&content-type=text/plain |
404 |
|
405 |
Index: boost-1.53.0-r1.ebuild |
406 |
=================================================================== |
407 |
# Copyright 1999-2013 Gentoo Foundation |
408 |
# Distributed under the terms of the GNU General Public License v2 |
409 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.53.0-r1.ebuild,v 1.1 2013/12/27 16:59:47 pinkbyte Exp $ |
410 |
|
411 |
EAPI="5" |
412 |
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) |
413 |
|
414 |
inherit eutils flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator |
415 |
|
416 |
MY_P=${PN}_$(replace_all_version_separators _) |
417 |
|
418 |
DESCRIPTION="Boost Libraries for C++" |
419 |
HOMEPAGE="http://www.boost.org/" |
420 |
SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2" |
421 |
|
422 |
LICENSE="Boost-1.0" |
423 |
MAJOR_V="$(get_version_component_range 1-2)" |
424 |
SLOT="0/${MAJOR_V}" |
425 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux" |
426 |
IUSE="debug doc icu +nls mpi python static-libs +threads tools" |
427 |
|
428 |
RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) |
429 |
!icu? ( virtual/libiconv ) |
430 |
mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) |
431 |
python? ( ${PYTHON_DEPS} ) |
432 |
app-arch/bzip2 |
433 |
sys-libs/zlib |
434 |
!app-admin/eselect-boost" |
435 |
DEPEND="${RDEPEND} |
436 |
=dev-util/boost-build-${MAJOR_V}*" |
437 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
438 |
|
439 |
S="${WORKDIR}/${MY_P}" |
440 |
|
441 |
create_user-config.jam() { |
442 |
local compiler compiler_version compiler_executable |
443 |
|
444 |
if [[ ${CHOST} == *-darwin* ]]; then |
445 |
compiler="darwin" |
446 |
compiler_version="$(gcc-fullversion)" |
447 |
compiler_executable="$(tc-getCXX)" |
448 |
else |
449 |
compiler="gcc" |
450 |
compiler_version="$(gcc-version)" |
451 |
compiler_executable="$(tc-getCXX)" |
452 |
fi |
453 |
local mpi_configuration python_configuration |
454 |
|
455 |
if use mpi; then |
456 |
mpi_configuration="using mpi ;" |
457 |
fi |
458 |
|
459 |
if use python; then |
460 |
python_configuration="using python : : ${PYTHON} ;" |
461 |
fi |
462 |
|
463 |
cat > user-config.jam << __EOF__ |
464 |
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
465 |
${mpi_configuration} |
466 |
${python_configuration} |
467 |
__EOF__ |
468 |
} |
469 |
|
470 |
src_prepare() { |
471 |
epatch \ |
472 |
"${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \ |
473 |
"${FILESDIR}/${PN}-1.51.0-respect_python-buildid.patch" \ |
474 |
"${FILESDIR}/${PN}-1.51.0-support_dots_in_python-buildid.patch" \ |
475 |
"${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch" \ |
476 |
"${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch" \ |
477 |
"${FILESDIR}/${PN}-1.48.0-python_linking.patch" \ |
478 |
"${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" |
479 |
epatch "${FILESDIR}/${PN}-1.53.0-library_status.patch" # bug 459112 |
480 |
epatch "${FILESDIR}/${PN}-1.53.0-glibc-2.18-compat.patch" # bug 482372 |
481 |
|
482 |
# Avoid a patch for now |
483 |
for file in libs/context/src/asm/*.S; do |
484 |
cat - >> $file <<EOF |
485 |
|
486 |
#if defined(__linux__) && defined(__ELF__) |
487 |
.section .note.GNU-stack,"",%progbits |
488 |
#endif |
489 |
EOF |
490 |
done |
491 |
} |
492 |
|
493 |
ejam() { |
494 |
echo b2 "$@" |
495 |
b2 "$@" |
496 |
} |
497 |
|
498 |
src_configure() { |
499 |
OPTIONS="$(usex debug gentoodebug gentoorelease) -j$(makeopts_jobs) -q -d+2 --user-config=${S}/user-config.jam" |
500 |
|
501 |
if [[ ${CHOST} == *-darwin* ]]; then |
502 |
# We need to add the prefix, and in two cases this exceeds, so prepare |
503 |
# for the largest possible space allocation. |
504 |
append-ldflags -Wl,-headerpad_max_install_names |
505 |
elif [[ ${CHOST} == *-winnt* ]]; then |
506 |
compiler=parity |
507 |
if [[ $($(tc-getCXX) -v) == *trunk* ]]; then |
508 |
compilerVersion=trunk |
509 |
else |
510 |
compilerVersion=$($(tc-getCXX) -v | sed '1q' \ |
511 |
| sed -e 's,\([a-z]*\) \([0-9]\.[0-9]\.[0-9][^ \t]*\) .*,\2,') |
512 |
fi |
513 |
compilerExecutable=$(tc-getCXX) |
514 |
fi |
515 |
|
516 |
# bug 298489 |
517 |
if use ppc || use ppc64; then |
518 |
[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec |
519 |
fi |
520 |
|
521 |
# Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard. |
522 |
append-cxxflags -std=gnu++98 |
523 |
|
524 |
use icu && OPTIONS+=" -sICU_PATH=${EPREFIX}/usr" |
525 |
use icu || OPTIONS+=" --disable-icu boost.locale.icu=off" |
526 |
use mpi || OPTIONS+=" --without-mpi" |
527 |
use python || OPTIONS+=" --without-python" |
528 |
use nls || OPTIONS+=" --without-locale" |
529 |
|
530 |
OPTIONS+=" pch=off --boost-build=${EPREFIX}/usr/share/boost-build --prefix=\"${ED}usr\" --layout=system threading=$(usex threads multi single) link=$(usex static-libs shared,static shared)" |
531 |
OPTIONS+=" --without-context" |
532 |
|
533 |
[[ ${CHOST} == *-winnt* ]] && OPTIONS+=" -sNO_BZIP2=1" |
534 |
} |
535 |
|
536 |
src_compile() { |
537 |
export BOOST_ROOT="${S}" |
538 |
PYTHON_DIRS="" |
539 |
MPI_PYTHON_MODULE="" |
540 |
|
541 |
building() { |
542 |
create_user-config.jam |
543 |
|
544 |
ejam ${OPTIONS} \ |
545 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
546 |
|| die "Building of Boost libraries failed" |
547 |
|
548 |
if use python; then |
549 |
if [[ -z "${PYTHON_DIRS}" ]]; then |
550 |
PYTHON_DIRS="$(find bin.v2/libs -name python | sort)" |
551 |
else |
552 |
if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then |
553 |
die "Inconsistent structure of build directories" |
554 |
fi |
555 |
fi |
556 |
|
557 |
local dir |
558 |
for dir in ${PYTHON_DIRS}; do |
559 |
mv ${dir} ${dir}-${EPYTHON} \ |
560 |
|| die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed" |
561 |
done |
562 |
|
563 |
if use mpi; then |
564 |
if [[ -z "${MPI_PYTHON_MODULE}" ]]; then |
565 |
MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" |
566 |
if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then |
567 |
die "Multiple mpi.so files found" |
568 |
fi |
569 |
else |
570 |
if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" ]]; then |
571 |
die "Inconsistent structure of build directories" |
572 |
fi |
573 |
fi |
574 |
|
575 |
mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} \ |
576 |
|| die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${EPYTHON}' failed" |
577 |
fi |
578 |
fi |
579 |
} |
580 |
if use python; then |
581 |
python_foreach_impl building |
582 |
else |
583 |
building |
584 |
fi |
585 |
|
586 |
if use tools; then |
587 |
pushd tools > /dev/null || die |
588 |
|
589 |
ejam ${OPTIONS} \ |
590 |
|| die "Building of Boost tools failed" |
591 |
popd > /dev/null || die |
592 |
fi |
593 |
} |
594 |
|
595 |
src_install () { |
596 |
installation() { |
597 |
create_user-config.jam |
598 |
|
599 |
if use python; then |
600 |
local dir |
601 |
for dir in ${PYTHON_DIRS}; do |
602 |
cp -pr ${dir}-${EPYTHON} ${dir} \ |
603 |
|| die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed" |
604 |
done |
605 |
|
606 |
if use mpi; then |
607 |
cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \ |
608 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed" |
609 |
cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \ |
610 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed" |
611 |
fi |
612 |
fi |
613 |
|
614 |
ejam ${OPTIONS} \ |
615 |
--includedir="${ED}usr/include" \ |
616 |
--libdir="${ED}usr/$(get_libdir)" \ |
617 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
618 |
install || die "Installation of Boost libraries failed" |
619 |
|
620 |
if use python; then |
621 |
rm -r ${PYTHON_DIRS} || die |
622 |
|
623 |
# Move mpi.so Python module to Python site-packages directory. |
624 |
# https://svn.boost.org/trac/boost/ticket/2838 |
625 |
if use mpi; then |
626 |
local moddir=$(python_get_sitedir)/boost |
627 |
# moddir already includes eprefix |
628 |
mkdir -p "${D}${moddir}" || die |
629 |
mv "${ED}usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die |
630 |
cat << EOF > "${D}${moddir}/__init__.py" || die |
631 |
import sys |
632 |
if sys.platform.startswith('linux'): |
633 |
import DLFCN |
634 |
flags = sys.getdlopenflags() |
635 |
sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL) |
636 |
from . import mpi |
637 |
sys.setdlopenflags(flags) |
638 |
del DLFCN, flags |
639 |
else: |
640 |
from . import mpi |
641 |
del sys |
642 |
EOF |
643 |
fi |
644 |
|
645 |
python_optimize |
646 |
fi |
647 |
} |
648 |
if use python; then |
649 |
python_foreach_impl installation |
650 |
else |
651 |
installation |
652 |
fi |
653 |
|
654 |
if ! use python; then |
655 |
rm -r "${ED}"/usr/include/boost/python* || die |
656 |
fi |
657 |
|
658 |
if ! use nls; then |
659 |
rm -r "${ED}"/usr/include/boost/locale || die |
660 |
fi |
661 |
|
662 |
rm -r "${ED}"/usr/include/boost/context || die |
663 |
rm -r "${ED}"/usr/include/boost/coroutine || die |
664 |
|
665 |
if use doc; then |
666 |
find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf |
667 |
dohtml \ |
668 |
-A pdf,txt,cpp,hpp \ |
669 |
*.{htm,html,png,css} \ |
670 |
-r doc |
671 |
dohtml -A pdf,txt -r tools |
672 |
insinto /usr/share/doc/${PF}/html |
673 |
doins -r libs |
674 |
doins -r more |
675 |
|
676 |
# To avoid broken links |
677 |
insinto /usr/share/doc/${PF}/html |
678 |
doins LICENSE_1_0.txt |
679 |
|
680 |
dosym /usr/include/boost /usr/share/doc/${PF}/html/boost |
681 |
fi |
682 |
|
683 |
pushd "${ED}usr/$(get_libdir)" > /dev/null || die |
684 |
|
685 |
local ext=$(get_libname) |
686 |
if use threads; then |
687 |
local f |
688 |
for f in *${ext}; do |
689 |
dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}} |
690 |
done |
691 |
fi |
692 |
|
693 |
popd > /dev/null || die |
694 |
|
695 |
if use tools; then |
696 |
dobin dist/bin/* |
697 |
|
698 |
insinto /usr/share |
699 |
doins -r dist/share/boostbook |
700 |
fi |
701 |
|
702 |
# boost's build system truely sucks for not having a destdir. Because for |
703 |
# this reason we are forced to build with a prefix that includes the |
704 |
# DESTROOT, dynamic libraries on Darwin end messed up, referencing the |
705 |
# DESTROOT instread of the actual EPREFIX. There is no way out of here |
706 |
# but to do it the dirty way of manually setting the right install_names. |
707 |
if [[ ${CHOST} == *-darwin* ]]; then |
708 |
einfo "Working around completely broken build-system(tm)" |
709 |
local d |
710 |
for d in "${ED}"usr/lib/*.dylib; do |
711 |
if [[ -f ${d} ]]; then |
712 |
# fix the "soname" |
713 |
ebegin " correcting install_name of ${d#${ED}}" |
714 |
install_name_tool -id "/${d#${D}}" "${d}" |
715 |
eend $? |
716 |
# fix references to other libs |
717 |
refs=$(otool -XL "${d}" | \ |
718 |
sed -e '1d' -e 's/^\t//' | \ |
719 |
grep "^libboost_" | \ |
720 |
cut -f1 -d' ') |
721 |
local r |
722 |
for r in ${refs}; do |
723 |
ebegin " correcting reference to ${r}" |
724 |
install_name_tool -change \ |
725 |
"${r}" \ |
726 |
"${EPREFIX}/usr/lib/${r}" \ |
727 |
"${d}" |
728 |
eend $? |
729 |
done |
730 |
fi |
731 |
done |
732 |
fi |
733 |
} |
734 |
|
735 |
pkg_preinst() { |
736 |
# Yai for having symlinks that are nigh-impossible to remove without |
737 |
# resorting to dirty hacks like these. Removes lingering symlinks |
738 |
# from the slotted versions. |
739 |
local symlink |
740 |
for symlink in "${EROOT}usr/include/boost" "${EROOT}usr/share/boostbook"; do |
741 |
[[ -L ${symlink} ]] && rm -f "${symlink}" |
742 |
done |
743 |
} |
744 |
|
745 |
# the tests will never fail because these are not intended as sanity |
746 |
# tests at all. They are more a way for upstream to check their own code |
747 |
# on new compilers. Since they would either be completely unreliable |
748 |
# (failing for no good reason) or completely useless (never failing) |
749 |
# there is no point in having them in the ebuild to begin with. |
750 |
src_test() { :; } |