1 |
commit: f65bbbcd0e1907edd09f0dd53d51070ced5b482f |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 3 17:45:27 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 3 17:47:36 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f65bbbcd |
7 |
|
8 |
dev-libs/boost: Bump to 1.65.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=618182 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
dev-libs/boost/Manifest | 1 + |
14 |
dev-libs/boost/boost-1.65.0.ebuild | 439 +++++++++++++++++++++ |
15 |
dev-libs/boost/files/boost-1.65.0-fix-python.patch | 144 +++++++ |
16 |
3 files changed, 584 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/boost/Manifest b/dev-libs/boost/Manifest |
19 |
index 2bed45d4d28..349a966ba48 100644 |
20 |
--- a/dev-libs/boost/Manifest |
21 |
+++ b/dev-libs/boost/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST boost_1_62_0.tar.bz2 84513338 SHA256 36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0 SHA512 5385ae3d5255a433a704169ad454d8dc2b0b5bcae3fb23defd6570df4ff7d845cf9fcbeebccdc1c5db0eec9f82ee3d90040de9507c8167467c635d3b215463be WHIRLPOOL 49c4558d5e6d72084f083a76217e3d97b504f112d7e4d228eded72dc49fa7e675ba943a9fc52a3c27d296ee689aee27d4566796c6eae71cf647430285777c0fb |
24 |
DIST boost_1_63_0.tar.bz2 81984414 SHA256 beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0 SHA512 c915c5f5778dee49b8e9d0a40f37f90f56fb1fdb1d8ce92d97bf48bc7bc462212487badfe4bbe30b06196d1149cfb221da12ac54e97499b0d4cb6466813bb4ad WHIRLPOOL 28c241785097272a1e0952e529eef082444e4ef35a8d738161e4a491a986d75359d3afe888b2ea91a4a81b6ec7a5772ebea337c9d09377b43f6eed66cac90378 |
25 |
+DIST boost_1_65_0.tar.bz2 82597718 SHA256 ea26712742e2fb079c2a566a31f3266973b76e38222b9f88b387e3c8b2f9902c SHA512 7142650fb8d61e3ef16ba066fc918e087f19e9bc2ad1d6a11fb10bf0d6b1b5ad05ab032f076a5233a1624b3669e952b2cc38b7dc074bbf53018e2970ee90fcdd WHIRLPOOL ca389eff2ffc4836b88688504c187e57f236a5967654e40377792d59dd2e4fc3d6ccb079174eae095ad610ccd683e795964c5011429845b27ab67166f8a82c19 |
26 |
|
27 |
diff --git a/dev-libs/boost/boost-1.65.0.ebuild b/dev-libs/boost/boost-1.65.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..031429c5de8 |
30 |
--- /dev/null |
31 |
+++ b/dev-libs/boost/boost-1.65.0.ebuild |
32 |
@@ -0,0 +1,439 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) |
38 |
+ |
39 |
+inherit eutils flag-o-matic multiprocessing python-r1 toolchain-funcs versionator multilib-minimal |
40 |
+ |
41 |
+MY_P="${PN}_$(replace_all_version_separators _)" |
42 |
+MAJOR_V="$(get_version_component_range 1-2)" |
43 |
+ |
44 |
+DESCRIPTION="Boost Libraries for C++" |
45 |
+HOMEPAGE="http://www.boost.org/" |
46 |
+SRC_URI="https://downloads.sourceforge.net/project/boost/${PN}/${PV}/${MY_P}.tar.bz2" |
47 |
+ |
48 |
+LICENSE="Boost-1.0" |
49 |
+SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122 |
50 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris ~x86-winnt" |
51 |
+ |
52 |
+IUSE="context debug doc icu +nls mpi python static-libs +threads tools" |
53 |
+ |
54 |
+RDEPEND="icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] ) |
55 |
+ !icu? ( virtual/libiconv[${MULTILIB_USEDEP}] ) |
56 |
+ mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] ) |
57 |
+ python? ( ${PYTHON_DEPS} ) |
58 |
+ app-arch/bzip2[${MULTILIB_USEDEP}] |
59 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
60 |
+ !app-admin/eselect-boost" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ =dev-util/boost-build-${MAJOR_V}*" |
63 |
+REQUIRED_USE=" |
64 |
+ mpi? ( threads ) |
65 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
66 |
+ |
67 |
+S="${WORKDIR}/${MY_P}" |
68 |
+ |
69 |
+# the tests will never fail because these are not intended as sanity |
70 |
+# tests at all. They are more a way for upstream to check their own code |
71 |
+# on new compilers. Since they would either be completely unreliable |
72 |
+# (failing for no good reason) or completely useless (never failing) |
73 |
+# there is no point in having them in the ebuild to begin with. |
74 |
+RESTRICT="test" |
75 |
+ |
76 |
+PATCHES=( |
77 |
+ "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" |
78 |
+ "${FILESDIR}/${PN}-1.55.0-context-x32.patch" |
79 |
+ "${FILESDIR}/${PN}-1.56.0-build-auto_index-tool.patch" |
80 |
+ "${FILESDIR}/${PN}-1.65.0-fix-python.patch" |
81 |
+) |
82 |
+ |
83 |
+python_bindings_needed() { |
84 |
+ multilib_is_native_abi && use python |
85 |
+} |
86 |
+ |
87 |
+tools_needed() { |
88 |
+ multilib_is_native_abi && use tools |
89 |
+} |
90 |
+ |
91 |
+create_user-config.jam() { |
92 |
+ local compiler compiler_version compiler_executable |
93 |
+ |
94 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
95 |
+ compiler="darwin" |
96 |
+ compiler_version="$(gcc-fullversion)" |
97 |
+ compiler_executable="$(tc-getCXX)" |
98 |
+ else |
99 |
+ compiler="gcc" |
100 |
+ compiler_version="$(gcc-version)" |
101 |
+ compiler_executable="$(tc-getCXX)" |
102 |
+ fi |
103 |
+ local mpi_configuration python_configuration |
104 |
+ |
105 |
+ if use mpi; then |
106 |
+ mpi_configuration="using mpi ;" |
107 |
+ fi |
108 |
+ |
109 |
+ if python_bindings_needed; then |
110 |
+ # boost expects libpython$(pyver) and doesn't allow overrides |
111 |
+ # and the build system is so creepy that it's easier just to |
112 |
+ # provide a symlink (linker's going to use SONAME anyway) |
113 |
+ # TODO: replace it with proper override one day |
114 |
+ ln -f -s "$(python_get_library_path)" "${T}/lib${EPYTHON}$(get_libname)" || die |
115 |
+ |
116 |
+ if tc-is-cross-compiler; then |
117 |
+ python_configuration="using python : ${EPYTHON#python} : : ${SYSROOT:-${EROOT}}/usr/include/${EPYTHON} : ${SYSROOT:-${EROOT}}/usr/$(get_libdir) ;" |
118 |
+ else |
119 |
+ # note: we need to provide version explicitly because of |
120 |
+ # a bug in the build system: |
121 |
+ # https://github.com/boostorg/build/pull/104 |
122 |
+ python_configuration="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) : ${T} ;" |
123 |
+ fi |
124 |
+ fi |
125 |
+ |
126 |
+ cat > "${BOOST_ROOT}/user-config.jam" << __EOF__ || die |
127 |
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
128 |
+${mpi_configuration} |
129 |
+${python_configuration} |
130 |
+__EOF__ |
131 |
+} |
132 |
+ |
133 |
+pkg_setup() { |
134 |
+ # Bail out on unsupported build configuration, bug #456792 |
135 |
+ if [[ -f "${EROOT%/}/etc/site-config.jam" ]]; then |
136 |
+ grep -q gentoorelease "${EROOT%/}/etc/site-config.jam" && grep -q gentoodebug "${EROOT%/}/etc/site-config.jam" || |
137 |
+ ( |
138 |
+ eerror "You are using custom ${EROOT%/}/etc/site-config.jam without defined gentoorelease/gentoodebug targets." |
139 |
+ eerror "Boost can not be built in such configuration." |
140 |
+ eerror "Please, either remove this file or add targets from ${EROOT%/}/usr/share/boost-build/site-config.jam to it." |
141 |
+ die |
142 |
+ ) |
143 |
+ fi |
144 |
+} |
145 |
+ |
146 |
+src_prepare() { |
147 |
+ default |
148 |
+ |
149 |
+ # Do not try to build missing 'wave' tool, bug #522682 |
150 |
+ # Upstream bugreport - https://svn.boost.org/trac/boost/ticket/10507 |
151 |
+ sed -i -e 's:wave/build//wave::' tools/Jamfile.v2 || die |
152 |
+ |
153 |
+ multilib_copy_sources |
154 |
+} |
155 |
+ |
156 |
+ejam() { |
157 |
+ local b2_opts=( |
158 |
+ "--user-config=${BOOST_ROOT}/user-config.jam" |
159 |
+ "$@" |
160 |
+ ) |
161 |
+ echo b2 "${b2_opts[@]}" |
162 |
+ b2 "${b2_opts[@]}" |
163 |
+} |
164 |
+ |
165 |
+src_configure() { |
166 |
+ # Workaround for too many parallel processes requested, bug #506064 |
167 |
+ [[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64" |
168 |
+ |
169 |
+ OPTIONS=( |
170 |
+ $(usex debug gentoodebug gentoorelease) |
171 |
+ "-j$(makeopts_jobs)" |
172 |
+ -q |
173 |
+ -d+2 |
174 |
+ ) |
175 |
+ |
176 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
177 |
+ # We need to add the prefix, and in two cases this exceeds, so prepare |
178 |
+ # for the largest possible space allocation. |
179 |
+ append-ldflags -Wl,-headerpad_max_install_names |
180 |
+ elif [[ ${CHOST} == *-winnt* ]]; then |
181 |
+ compiler=parity |
182 |
+ if [[ $($(tc-getCXX) -v) == *trunk* ]]; then |
183 |
+ compilerVersion=trunk |
184 |
+ else |
185 |
+ compilerVersion=$($(tc-getCXX) -v | sed '1q' \ |
186 |
+ | sed -e 's,\([a-z]*\) \([0-9]\.[0-9]\.[0-9][^ \t]*\) .*,\2,') |
187 |
+ fi |
188 |
+ compilerExecutable=$(tc-getCXX) |
189 |
+ fi |
190 |
+ |
191 |
+ # bug 298489 |
192 |
+ if use ppc || use ppc64; then |
193 |
+ [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec |
194 |
+ fi |
195 |
+ |
196 |
+ # Use C++14 globally as of 1.62 |
197 |
+ append-cxxflags -std=c++14 |
198 |
+ |
199 |
+ use icu && OPTIONS+=( |
200 |
+ "-sICU_PATH=${EPREFIX}/usr" |
201 |
+ ) |
202 |
+ use icu || OPTIONS+=( |
203 |
+ --disable-icu |
204 |
+ boost.locale.icu=off |
205 |
+ ) |
206 |
+ use mpi || OPTIONS+=( |
207 |
+ --without-mpi |
208 |
+ ) |
209 |
+ use nls || OPTIONS+=( |
210 |
+ --without-locale |
211 |
+ ) |
212 |
+ use context || OPTIONS+=( |
213 |
+ --without-context |
214 |
+ --without-coroutine |
215 |
+ --without-fiber |
216 |
+ ) |
217 |
+ use threads || OPTIONS+=( |
218 |
+ --without-thread |
219 |
+ ) |
220 |
+ |
221 |
+ OPTIONS+=( |
222 |
+ pch=off |
223 |
+ --boost-build="${EPREFIX}"/usr/share/boost-build |
224 |
+ --prefix="${ED%/}/usr" |
225 |
+ --layout=system |
226 |
+ # building with threading=single is currently not possible |
227 |
+ # https://svn.boost.org/trac/boost/ticket/7105 |
228 |
+ threading=multi |
229 |
+ link=$(usex static-libs shared,static shared) |
230 |
+ ) |
231 |
+ |
232 |
+ [[ ${CHOST} == *-winnt* ]] && OPTIONS+=( |
233 |
+ -sNO_BZIP2=1 |
234 |
+ ) |
235 |
+} |
236 |
+ |
237 |
+multilib_src_compile() { |
238 |
+ local -x BOOST_ROOT="${BUILD_DIR}" |
239 |
+ PYTHON_DIRS="" |
240 |
+ MPI_PYTHON_MODULE="" |
241 |
+ |
242 |
+ building() { |
243 |
+ create_user-config.jam |
244 |
+ |
245 |
+ local PYTHON_OPTIONS |
246 |
+ if python_bindings_needed; then |
247 |
+ PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}" |
248 |
+ else |
249 |
+ PYTHON_OPTIONS=" --without-python" |
250 |
+ fi |
251 |
+ |
252 |
+ ejam \ |
253 |
+ "${OPTIONS[@]}" \ |
254 |
+ ${PYTHON_OPTIONS} \ |
255 |
+ || die "Building of Boost libraries failed" |
256 |
+ |
257 |
+ if python_bindings_needed; then |
258 |
+ if [[ -z "${PYTHON_DIRS}" ]]; then |
259 |
+ PYTHON_DIRS="$(find bin.v2/libs -name python | sort)" |
260 |
+ else |
261 |
+ if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then |
262 |
+ die "Inconsistent structure of build directories" |
263 |
+ fi |
264 |
+ fi |
265 |
+ |
266 |
+ local dir |
267 |
+ for dir in ${PYTHON_DIRS}; do |
268 |
+ mv ${dir} ${dir}-${EPYTHON} \ |
269 |
+ || die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed" |
270 |
+ done |
271 |
+ |
272 |
+ if use mpi; then |
273 |
+ if [[ -z "${MPI_PYTHON_MODULE}" ]]; then |
274 |
+ MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" |
275 |
+ if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then |
276 |
+ die "Multiple mpi.so files found" |
277 |
+ fi |
278 |
+ else |
279 |
+ if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" ]]; then |
280 |
+ die "Inconsistent structure of build directories" |
281 |
+ fi |
282 |
+ fi |
283 |
+ |
284 |
+ mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} \ |
285 |
+ || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${EPYTHON}' failed" |
286 |
+ fi |
287 |
+ fi |
288 |
+ } |
289 |
+ if python_bindings_needed; then |
290 |
+ python_foreach_impl building |
291 |
+ else |
292 |
+ building |
293 |
+ fi |
294 |
+ |
295 |
+ if tools_needed; then |
296 |
+ pushd tools >/dev/null || die |
297 |
+ |
298 |
+ ejam \ |
299 |
+ "${OPTIONS[@]}" \ |
300 |
+ ${PYTHON_OPTIONS} \ |
301 |
+ || die "Building of Boost tools failed" |
302 |
+ popd >/dev/null || die |
303 |
+ fi |
304 |
+} |
305 |
+ |
306 |
+multilib_src_install_all() { |
307 |
+ if ! use python; then |
308 |
+ rm -r "${ED%/}"/usr/include/boost/python* || die |
309 |
+ fi |
310 |
+ |
311 |
+ if ! use nls; then |
312 |
+ rm -r "${ED%/}"/usr/include/boost/locale || die |
313 |
+ fi |
314 |
+ |
315 |
+ if ! use context; then |
316 |
+ rm -r "${ED%/}"/usr/include/boost/context || die |
317 |
+ rm -r "${ED%/}"/usr/include/boost/coroutine{,2} || die |
318 |
+ rm "${ED%/}"/usr/include/boost/asio/spawn.hpp || die |
319 |
+ fi |
320 |
+ |
321 |
+ if use doc; then |
322 |
+ # find extraneous files that shouldn't be installed |
323 |
+ # as part of the documentation and remove them. |
324 |
+ find libs/*/* \( -iname 'test' -o -iname 'src' \) -exec rm -rf '{}' + || die |
325 |
+ find doc \( -name 'Jamfile.v2' -o -name 'build' -o -name '*.manifest' \) -exec rm -rf '{}' + || die |
326 |
+ find tools \( -name 'Jamfile.v2' -o -name 'src' -o -name '*.cpp' -o -name '*.hpp' \) -exec rm -rf '{}' + || die |
327 |
+ |
328 |
+ docinto html |
329 |
+ dodoc *.{htm,html,png,css} |
330 |
+ dodoc -r doc libs more tools |
331 |
+ |
332 |
+ # To avoid broken links |
333 |
+ dodoc LICENSE_1_0.txt |
334 |
+ |
335 |
+ dosym /usr/include/boost /usr/share/doc/${PF}/html/boost |
336 |
+ fi |
337 |
+} |
338 |
+ |
339 |
+multilib_src_install() { |
340 |
+ local -x BOOST_ROOT="${BUILD_DIR}" |
341 |
+ installation() { |
342 |
+ create_user-config.jam |
343 |
+ |
344 |
+ local PYTHON_OPTIONS |
345 |
+ if python_bindings_needed; then |
346 |
+ local dir |
347 |
+ for dir in ${PYTHON_DIRS}; do |
348 |
+ cp -pr ${dir}-${EPYTHON} ${dir} \ |
349 |
+ || die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed" |
350 |
+ done |
351 |
+ |
352 |
+ if use mpi; then |
353 |
+ cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \ |
354 |
+ || die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed" |
355 |
+ cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \ |
356 |
+ || die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed" |
357 |
+ fi |
358 |
+ PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}" |
359 |
+ else |
360 |
+ PYTHON_OPTIONS=" --without-python" |
361 |
+ fi |
362 |
+ |
363 |
+ ejam \ |
364 |
+ "${OPTIONS[@]}" \ |
365 |
+ ${PYTHON_OPTIONS} \ |
366 |
+ --includedir="${ED%/}/usr/include" \ |
367 |
+ --libdir="${ED%/}/usr/$(get_libdir)" \ |
368 |
+ install || die "Installation of Boost libraries failed" |
369 |
+ |
370 |
+ if python_bindings_needed; then |
371 |
+ rm -r ${PYTHON_DIRS} || die |
372 |
+ |
373 |
+ # Move mpi.so Python module to Python site-packages directory. |
374 |
+ # https://svn.boost.org/trac/boost/ticket/2838 |
375 |
+ if use mpi; then |
376 |
+ local moddir=$(python_get_sitedir)/boost |
377 |
+ # moddir already includes eprefix |
378 |
+ mkdir -p "${D}${moddir}" || die |
379 |
+ mv "${ED%/}/usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die |
380 |
+ cat << EOF > "${D}${moddir}/__init__.py" || die |
381 |
+import sys |
382 |
+if sys.platform.startswith('linux'): |
383 |
+ import DLFCN |
384 |
+ flags = sys.getdlopenflags() |
385 |
+ sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL) |
386 |
+ from . import mpi |
387 |
+ sys.setdlopenflags(flags) |
388 |
+ del DLFCN, flags |
389 |
+else: |
390 |
+ from . import mpi |
391 |
+del sys |
392 |
+EOF |
393 |
+ fi |
394 |
+ |
395 |
+ python_optimize |
396 |
+ fi |
397 |
+ } |
398 |
+ if python_bindings_needed; then |
399 |
+ python_foreach_impl installation |
400 |
+ else |
401 |
+ installation |
402 |
+ fi |
403 |
+ |
404 |
+ pushd "${ED%/}/usr/$(get_libdir)" >/dev/null || die |
405 |
+ |
406 |
+ local ext=$(get_libname) |
407 |
+ if use threads; then |
408 |
+ local f |
409 |
+ for f in *${ext}; do |
410 |
+ dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}} |
411 |
+ done |
412 |
+ fi |
413 |
+ |
414 |
+ popd >/dev/null || die |
415 |
+ |
416 |
+ if tools_needed; then |
417 |
+ dobin dist/bin/* |
418 |
+ |
419 |
+ insinto /usr/share |
420 |
+ doins -r dist/share/boostbook |
421 |
+ fi |
422 |
+ |
423 |
+ # boost's build system truely sucks for not having a destdir. Because for |
424 |
+ # this reason we are forced to build with a prefix that includes the |
425 |
+ # DESTROOT, dynamic libraries on Darwin end messed up, referencing the |
426 |
+ # DESTROOT instread of the actual EPREFIX. There is no way out of here |
427 |
+ # but to do it the dirty way of manually setting the right install_names. |
428 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
429 |
+ einfo "Working around completely broken build-system(tm)" |
430 |
+ local d |
431 |
+ for d in "${ED%/}"/usr/lib/*.dylib; do |
432 |
+ if [[ -f ${d} ]]; then |
433 |
+ # fix the "soname" |
434 |
+ ebegin " correcting install_name of ${d#${ED}}" |
435 |
+ install_name_tool -id "/${d#${D}}" "${d}" |
436 |
+ eend $? |
437 |
+ # fix references to other libs |
438 |
+ refs=$(otool -XL "${d}" | \ |
439 |
+ sed -e '1d' -e 's/^\t//' | \ |
440 |
+ grep "^libboost_" | \ |
441 |
+ cut -f1 -d' ') |
442 |
+ local r |
443 |
+ for r in ${refs}; do |
444 |
+ ebegin " correcting reference to ${r}" |
445 |
+ install_name_tool -change \ |
446 |
+ "${r}" \ |
447 |
+ "${EPREFIX}/usr/lib/${r}" \ |
448 |
+ "${d}" |
449 |
+ eend $? |
450 |
+ done |
451 |
+ fi |
452 |
+ done |
453 |
+ fi |
454 |
+} |
455 |
+ |
456 |
+pkg_preinst() { |
457 |
+ # Yai for having symlinks that are nigh-impossible to remove without |
458 |
+ # resorting to dirty hacks like these. Removes lingering symlinks |
459 |
+ # from the slotted versions. |
460 |
+ local symlink |
461 |
+ for symlink in "${EROOT%/}/usr/include/boost" "${EROOT%/}/usr/share/boostbook"; do |
462 |
+ if [[ -L ${symlink} ]]; then |
463 |
+ rm -f "${symlink}" || die |
464 |
+ fi |
465 |
+ done |
466 |
+ |
467 |
+ # some ancient installs still have boost cruft lying around |
468 |
+ # for unknown reasons, causing havoc for reverse dependencies |
469 |
+ # Bug: 607734 |
470 |
+ rm -rf "${EROOT%/}"/usr/include/boost-1_[3-5]? || die |
471 |
+} |
472 |
|
473 |
diff --git a/dev-libs/boost/files/boost-1.65.0-fix-python.patch b/dev-libs/boost/files/boost-1.65.0-fix-python.patch |
474 |
new file mode 100644 |
475 |
index 00000000000..e960edb8703 |
476 |
--- /dev/null |
477 |
+++ b/dev-libs/boost/files/boost-1.65.0-fix-python.patch |
478 |
@@ -0,0 +1,144 @@ |
479 |
+--- a/boostcpp.jam |
480 |
++++ b/boostcpp.jam |
481 |
+@@ -104,7 +104,7 @@ |
482 |
+ python-id = [ option.get "python-buildid" ] ; |
483 |
+ if $(python-id) |
484 |
+ { |
485 |
+- PYTHON_ID = [ regex.replace $(python-id) [*\\/:.\"\'] _ ] ; |
486 |
++ PYTHON_ID = [ regex.replace $(python-id) [*\\/:\"\'] _ ] ; |
487 |
+ } |
488 |
+ |
489 |
+ |
490 |
+--- a/libs/python/build/Jamfile |
491 |
++++ b/libs/python/build/Jamfile |
492 |
+@@ -31,26 +31,23 @@ |
493 |
+ ; |
494 |
+ } |
495 |
+ |
496 |
+-py2-version = [ py-version 2 ] ; |
497 |
+-py3-version = [ py-version 3 ] ; |
498 |
+- |
499 |
+ project boost/python |
500 |
+ : source-location ../src |
501 |
+ ; |
502 |
+ |
503 |
+ rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } } |
504 |
+ rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } } |
505 |
+-local rule eq ( a : b ) { if $(a) = $(b) { return 1 ; } } |
506 |
+- |
507 |
+-lib_boost_python(2) = boost_python ; |
508 |
+-lib_boost_python(3) = boost_python3 ; |
509 |
+- |
510 |
+-lib_boost_python($(py2-version)) = $(lib_boost_python(2)) ; |
511 |
+-lib_boost_python($(py3-version)) = $(lib_boost_python(3)) ; |
512 |
+ |
513 |
+-rule lib_boost_python ( version ) |
514 |
++rule lib_boost_python |
515 |
+ { |
516 |
+- lib $(lib_boost_python($(version))) |
517 |
++ local python_major_version = [ MATCH "^([^.]+)" : [ feature.values python ] ] ; |
518 |
++ local python2 ; |
519 |
++ if $(python_major_version) = 2 |
520 |
++ { |
521 |
++ python2 = true ; |
522 |
++ } |
523 |
++ |
524 |
++ lib boost_python |
525 |
+ : # sources |
526 |
+ list.cpp |
527 |
+ long.cpp |
528 |
+@@ -96,7 +93,8 @@ |
529 |
+ # python_for_extensions is a target defined by Boost.Build to |
530 |
+ # provide the Python include paths, and on Windows, the Python |
531 |
+ # import library, as usage requirements. |
532 |
+- [ cond [ python.configured ] : <library>/python//python_for_extensions ] |
533 |
++ [ cond $(python2) : <cxxflags>-fno-strict-aliasing ] |
534 |
++ [ cond [ python.configured ] : <library>/python//python ] |
535 |
+ |
536 |
+ # we prevent building when there is no python available |
537 |
+ # as it's not possible anyway, and to cause dependents to |
538 |
+@@ -105,13 +103,10 @@ |
539 |
+ <dependency>config-warning |
540 |
+ |
541 |
+ <python-debugging>on:<define>BOOST_DEBUG_PYTHON |
542 |
+- <python>$(version) |
543 |
+ |
544 |
+ -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag |
545 |
+ <tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).python-tag |
546 |
+ |
547 |
+- <conditional>@python.require-py |
548 |
+- |
549 |
+ : # default build |
550 |
+ <link>shared |
551 |
+ : # usage requirements |
552 |
+@@ -120,68 +115,8 @@ |
553 |
+ ; |
554 |
+ } |
555 |
+ |
556 |
+-lib_boost_numpy(2) = boost_numpy ; |
557 |
+-lib_boost_numpy(3) = boost_numpy3 ; |
558 |
+- |
559 |
+-lib_boost_numpy($(py2-version)) = $(lib_boost_numpy(2)) ; |
560 |
+-lib_boost_numpy($(py3-version)) = $(lib_boost_numpy(3)) ; |
561 |
+- |
562 |
+-rule lib_boost_numpy ( version ) |
563 |
+-{ |
564 |
+- numpy-include = [ python.numpy-include ] ; |
565 |
+- lib $(lib_boost_numpy($(version))) |
566 |
+- : # sources |
567 |
+- numpy/dtype.cpp |
568 |
+- numpy/matrix.cpp |
569 |
+- numpy/ndarray.cpp |
570 |
+- numpy/numpy.cpp |
571 |
+- numpy/scalars.cpp |
572 |
+- numpy/ufunc.cpp |
573 |
+- : # requirements |
574 |
+- <link>static:<define>BOOST_NUMPY_STATIC_LIB |
575 |
+- <define>BOOST_NUMPY_SOURCE |
576 |
+- [ cond [ python.numpy ] : <library>/python//python_for_extensions ] |
577 |
+- [ unless [ python.numpy ] : <build>no ] |
578 |
+- <include>$(numpy-include) |
579 |
+- <library>$(lib_boost_python($(version))) |
580 |
+- <python-debugging>on:<define>BOOST_DEBUG_PYTHON |
581 |
+- <python>$(version) |
582 |
++libraries = boost_python ; |
583 |
+ |
584 |
+- -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag |
585 |
+- <tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).python-tag |
586 |
+- |
587 |
+- <conditional>@python.require-py |
588 |
+- |
589 |
+- : # default build |
590 |
+- <link>shared |
591 |
+- : # usage requirements |
592 |
+- <link>static:<define>BOOST_NUMPY_STATIC_LIB |
593 |
+- <python-debugging>on:<define>BOOST_DEBUG_PYTHON |
594 |
+- ; |
595 |
+-} |
596 |
+- |
597 |
+-libraries = ; |
598 |
+- |
599 |
+-for local N in 2 3 |
600 |
+-{ |
601 |
+- if $(py$(N)-version) |
602 |
+- { |
603 |
+- lib_boost_python $(py$(N)-version) ; |
604 |
+- libraries += $(lib_boost_python($(py$(N)-version))) ; |
605 |
+- } |
606 |
+- else |
607 |
+- { |
608 |
+- alias $(lib_boost_python($(N))) ; |
609 |
+- } |
610 |
+- if $(py$(N)-version) && [ python.numpy ] |
611 |
+- { |
612 |
+- lib_boost_numpy $(py$(N)-version) ; |
613 |
+- libraries += $(lib_boost_numpy($(py$(N)-version))) ; |
614 |
+- } |
615 |
+- else |
616 |
+- { |
617 |
+- alias $(lib_boost_numpy($(N))) ; |
618 |
+- } |
619 |
+-} |
620 |
++lib_boost_python ; |
621 |
+ |
622 |
+ boost-install $(libraries) ; |