1 |
commit: 0deae762d9373aa9362c2867e9e1fccdc140f71a |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 14 18:29:44 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 14 18:29:44 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0deae762 |
7 |
|
8 |
dev-libs/boost: Version bump to 1.71.0 |
9 |
|
10 |
* Added a message in `pkg_postinst` to remind users to rebuild boost |
11 |
and revdeps when upgrading the C++ toolchain. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/594844 |
14 |
Closes: https://bugs.gentoo.org/627302 |
15 |
Closes: https://bugs.gentoo.org/629976 |
16 |
Closes: https://bugs.gentoo.org/641738 |
17 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
18 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
19 |
|
20 |
dev-libs/boost/Manifest | 1 + |
21 |
dev-libs/boost/boost-1.71.0.ebuild | 340 +++++++++++++++++++++++++++++++++++++ |
22 |
2 files changed, 341 insertions(+) |
23 |
|
24 |
diff --git a/dev-libs/boost/Manifest b/dev-libs/boost/Manifest |
25 |
index 5f560092574..c189b10ccc4 100644 |
26 |
--- a/dev-libs/boost/Manifest |
27 |
+++ b/dev-libs/boost/Manifest |
28 |
@@ -1,2 +1,3 @@ |
29 |
DIST boost_1_65_0.tar.bz2 82597718 BLAKE2B 0080956d6ad2f14130ce4a4734b1bd1ce83d3651b226653689e02770baa83cf11811ef4e44948ff68a168d9ce5cbfaea4f758970df2b4e9faa2d410181885f5b SHA512 7142650fb8d61e3ef16ba066fc918e087f19e9bc2ad1d6a11fb10bf0d6b1b5ad05ab032f076a5233a1624b3669e952b2cc38b7dc074bbf53018e2970ee90fcdd |
30 |
DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49 |
31 |
+DIST boost_1_71_0.tar.bz2 100124647 BLAKE2B edf5a03d5a5a63ef5826ef3c19a5ee862a43eb93e8e3d76f8a0d1f2c23122f5a0535e045058110574cd19092f3199c28ab9dae53f9db05ffe8c0b0b8cdbe27a9 SHA512 b7937d50c4512cf13cadd0ca829de36cf2cbc6fb788f45b1d4565ad0753e2b206c545125a5862016c2f16016f2e4a6b687928963b466fff17c3e0a4437142c20 |
32 |
|
33 |
diff --git a/dev-libs/boost/boost-1.71.0.ebuild b/dev-libs/boost/boost-1.71.0.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..1cb3422d121 |
36 |
--- /dev/null |
37 |
+++ b/dev-libs/boost/boost-1.71.0.ebuild |
38 |
@@ -0,0 +1,340 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) |
45 |
+ |
46 |
+inherit flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal |
47 |
+ |
48 |
+MY_PV="$(ver_rs 1- _)" |
49 |
+MAJOR_V="$(ver_cut 1-2)" |
50 |
+ |
51 |
+DESCRIPTION="Boost Libraries for C++" |
52 |
+HOMEPAGE="https://www.boost.org/" |
53 |
+SRC_URI="https://dl.bintray.com/boostorg/release/${PV}/source/boost_${MY_PV}.tar.bz2" |
54 |
+ |
55 |
+LICENSE="Boost-1.0" |
56 |
+SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122 |
57 |
+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" |
58 |
+IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python static-libs +threads tools zlib zstd" |
59 |
+REQUIRED_USE=" |
60 |
+ mpi? ( threads ) |
61 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
62 |
+ |
63 |
+# the tests will never fail because these are not intended as sanity |
64 |
+# tests at all. They are more a way for upstream to check their own code |
65 |
+# on new compilers. Since they would either be completely unreliable |
66 |
+# (failing for no good reason) or completely useless (never failing) |
67 |
+# there is no point in having them in the ebuild to begin with. |
68 |
+RESTRICT="test" |
69 |
+ |
70 |
+RDEPEND=" |
71 |
+ !app-admin/eselect-boost |
72 |
+ !dev-libs/boost-numpy |
73 |
+ bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] ) |
74 |
+ icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] ) |
75 |
+ !icu? ( virtual/libiconv[${MULTILIB_USEDEP}] ) |
76 |
+ lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] ) |
77 |
+ mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] ) |
78 |
+ python? ( |
79 |
+ ${PYTHON_DEPS} |
80 |
+ numpy? ( >=dev-python/numpy-1.14.5[${PYTHON_USEDEP}] ) |
81 |
+ ) |
82 |
+ zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] ) |
83 |
+ zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )" |
84 |
+DEPEND="${RDEPEND}" |
85 |
+BDEPEND="=dev-util/boost-build-${MAJOR_V}*" |
86 |
+ |
87 |
+S="${WORKDIR}/${PN}_${MY_PV}" |
88 |
+ |
89 |
+PATCHES=( |
90 |
+ "${FILESDIR}"/${PN}-1.48.0-disable_icu_rpath.patch |
91 |
+ "${FILESDIR}"/${PN}-1.69.0-context-x32.patch |
92 |
+ "${FILESDIR}"/${PN}-1.56.0-build-auto_index-tool.patch |
93 |
+) |
94 |
+ |
95 |
+python_bindings_needed() { |
96 |
+ multilib_is_native_abi && use python |
97 |
+} |
98 |
+ |
99 |
+tools_needed() { |
100 |
+ multilib_is_native_abi && use tools |
101 |
+} |
102 |
+ |
103 |
+create_user-config.jam() { |
104 |
+ local user_config_jam="${BUILD_DIR}"/user-config.jam |
105 |
+ if [[ -s ${user_config_jam} ]]; then |
106 |
+ einfo "${user_config_jam} already exists, skipping configuration" |
107 |
+ return |
108 |
+ else |
109 |
+ einfo "Creating configuration in ${user_config_jam}" |
110 |
+ fi |
111 |
+ |
112 |
+ local compiler compiler_version compiler_executable="$(tc-getCXX)" |
113 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
114 |
+ compiler="darwin" |
115 |
+ compiler_version="$(gcc-fullversion)" |
116 |
+ else |
117 |
+ compiler="gcc" |
118 |
+ compiler_version="$(gcc-version)" |
119 |
+ fi |
120 |
+ |
121 |
+ if use mpi; then |
122 |
+ local mpi_configuration="using mpi ;" |
123 |
+ fi |
124 |
+ |
125 |
+ cat > "${user_config_jam}" <<- __EOF__ || die |
126 |
+ using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
127 |
+ ${mpi_configuration} |
128 |
+ __EOF__ |
129 |
+ |
130 |
+ if python_bindings_needed; then |
131 |
+ append_to_user_config() { |
132 |
+ local py_config |
133 |
+ if tc-is-cross-compiler; then |
134 |
+ py_config="using python : ${EPYTHON#python} : : ${ESYSROOT}/usr/include/${EPYTHON} : ${ESYSROOT}/usr/$(get_libdir) ;" |
135 |
+ else |
136 |
+ py_config="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) ;" |
137 |
+ fi |
138 |
+ echo "${py_config}" >> "${user_config_jam}" || die |
139 |
+ } |
140 |
+ python_foreach_impl append_to_user_config |
141 |
+ fi |
142 |
+ |
143 |
+ if python_bindings_needed && use numpy; then |
144 |
+ einfo "Enabling support for NumPy extensions in Boost.Python" |
145 |
+ else |
146 |
+ einfo "Disabling support for NumPy extensions in Boost.Python" |
147 |
+ |
148 |
+ # Boost.Build does not allow for disabling of numpy |
149 |
+ # extensions, thereby leading to automagic numpy |
150 |
+ # https://github.com/boostorg/python/issues/111#issuecomment-280447482 |
151 |
+ sed \ |
152 |
+ -e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \ |
153 |
+ -i "${BUILD_DIR}"/libs/python/build/Jamfile || die |
154 |
+ fi |
155 |
+} |
156 |
+ |
157 |
+pkg_setup() { |
158 |
+ # Bail out on unsupported build configuration, bug #456792 |
159 |
+ if [[ -f "${EROOT}"/etc/site-config.jam ]]; then |
160 |
+ if ! grep -q 'gentoo\(debug\|release\)' "${EROOT}"/etc/site-config.jam; then |
161 |
+ eerror "You are using custom ${EROOT}/etc/site-config.jam without defined gentoorelease/gentoodebug targets." |
162 |
+ eerror "Boost can not be built in such configuration." |
163 |
+ eerror "Please, either remove this file or add targets from ${EROOT}/usr/share/boost-build/site-config.jam to it." |
164 |
+ die "Unsupported target in ${EROOT}/etc/site-config.jam" |
165 |
+ fi |
166 |
+ fi |
167 |
+} |
168 |
+ |
169 |
+src_prepare() { |
170 |
+ default |
171 |
+ |
172 |
+ # Do not try to build missing 'wave' tool, bug #522682 |
173 |
+ # Upstream bugreport - https://svn.boost.org/trac/boost/ticket/10507 |
174 |
+ sed -i -e 's:wave/build//wave::' tools/Jamfile.v2 || die |
175 |
+ |
176 |
+ multilib_copy_sources |
177 |
+} |
178 |
+ |
179 |
+ejam() { |
180 |
+ create_user-config.jam |
181 |
+ |
182 |
+ local b2_opts=( "--user-config=${BUILD_DIR}/user-config.jam" ) |
183 |
+ if python_bindings_needed; then |
184 |
+ append_to_b2_opts() { |
185 |
+ b2_opts+=( python="${EPYTHON#python}" ) |
186 |
+ } |
187 |
+ python_foreach_impl append_to_b2_opts |
188 |
+ else |
189 |
+ b2_opts+=( --without-python ) |
190 |
+ fi |
191 |
+ b2_opts+=( "$@" ) |
192 |
+ |
193 |
+ echo b2 "${b2_opts[@]}" >&2 |
194 |
+ b2 "${b2_opts[@]}" |
195 |
+} |
196 |
+ |
197 |
+src_configure() { |
198 |
+ # Workaround for too many parallel processes requested, bug #506064 |
199 |
+ [[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64" |
200 |
+ |
201 |
+ OPTIONS=( |
202 |
+ $(usex debug gentoodebug gentoorelease) |
203 |
+ "-j$(makeopts_jobs)" |
204 |
+ -q |
205 |
+ -d+2 |
206 |
+ pch=off |
207 |
+ $(usex icu "-sICU_PATH=${ESYSROOT}/usr" '--disable-icu boost.locale.icu=off') |
208 |
+ $(usex mpi '' '--without-mpi') |
209 |
+ $(usex nls '' '--without-locale') |
210 |
+ $(usex context '' '--without-context --without-coroutine --without-fiber') |
211 |
+ $(usex threads '' '--without-thread') |
212 |
+ --without-stacktrace |
213 |
+ --boost-build="${BROOT}"/usr/share/boost-build |
214 |
+ --prefix="${ED}/usr" |
215 |
+ --layout=system |
216 |
+ # CMake has issues working with multiple python impls, |
217 |
+ # disable cmake config generation for the time being |
218 |
+ # https://github.com/boostorg/python/issues/262#issuecomment-483069294 |
219 |
+ --no-cmake-config |
220 |
+ # building with threading=single is currently not possible |
221 |
+ # https://svn.boost.org/trac/boost/ticket/7105 |
222 |
+ threading=multi |
223 |
+ link=$(usex static-libs shared,static shared) |
224 |
+ # this seems to be the only way to disable compression algorithms |
225 |
+ # https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build |
226 |
+ -sNO_BZIP2=$(usex bzip2 0 1) |
227 |
+ -sNO_LZMA=$(usex lzma 0 1) |
228 |
+ -sNO_ZLIB=$(usex zlib 0 1) |
229 |
+ -sNO_ZSTD=$(usex zstd 0 1) |
230 |
+ ) |
231 |
+ |
232 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
233 |
+ # We need to add the prefix, and in two cases this exceeds, so prepare |
234 |
+ # for the largest possible space allocation. |
235 |
+ append-ldflags -Wl,-headerpad_max_install_names |
236 |
+ fi |
237 |
+ |
238 |
+ # Use C++14 globally as of 1.62 |
239 |
+ append-cxxflags -std=c++14 |
240 |
+} |
241 |
+ |
242 |
+multilib_src_compile() { |
243 |
+ ejam "${OPTIONS[@]}" || die |
244 |
+ |
245 |
+ if tools_needed; then |
246 |
+ pushd tools >/dev/null || die |
247 |
+ ejam \ |
248 |
+ "${OPTIONS[@]}" \ |
249 |
+ || die "Building of Boost tools failed" |
250 |
+ popd >/dev/null || die |
251 |
+ fi |
252 |
+} |
253 |
+ |
254 |
+multilib_src_install_all() { |
255 |
+ if ! use numpy; then |
256 |
+ rm -r "${ED}"/usr/include/boost/python/numpy* || die |
257 |
+ fi |
258 |
+ |
259 |
+ if ! use python; then |
260 |
+ rm -r "${ED}"/usr/include/boost/{python*,mpi/python*,parameter/aux_/python,parameter/python*} || die |
261 |
+ fi |
262 |
+ |
263 |
+ if ! use nls; then |
264 |
+ rm -r "${ED}"/usr/include/boost/locale || die |
265 |
+ fi |
266 |
+ |
267 |
+ if ! use context; then |
268 |
+ rm -r "${ED}"/usr/include/boost/context || die |
269 |
+ rm -r "${ED}"/usr/include/boost/coroutine{,2} || die |
270 |
+ rm "${ED}"/usr/include/boost/asio/spawn.hpp || die |
271 |
+ fi |
272 |
+ |
273 |
+ if use doc; then |
274 |
+ # find extraneous files that shouldn't be installed |
275 |
+ # as part of the documentation and remove them. |
276 |
+ find libs/*/* \( -iname 'test' -o -iname 'src' \) -exec rm -rf '{}' + || die |
277 |
+ find doc \( -name 'Jamfile.v2' -o -name 'build' -o -name '*.manifest' \) -exec rm -rf '{}' + || die |
278 |
+ find tools \( -name 'Jamfile.v2' -o -name 'src' -o -name '*.cpp' -o -name '*.hpp' \) -exec rm -rf '{}' + || die |
279 |
+ |
280 |
+ docinto html |
281 |
+ dodoc *.{htm,html,png,css} |
282 |
+ dodoc -r doc libs more tools |
283 |
+ |
284 |
+ # To avoid broken links |
285 |
+ dodoc LICENSE_1_0.txt |
286 |
+ |
287 |
+ dosym ../../../../include/boost /usr/share/doc/${PF}/html/boost |
288 |
+ fi |
289 |
+} |
290 |
+ |
291 |
+multilib_src_install() { |
292 |
+ ejam \ |
293 |
+ "${OPTIONS[@]}" \ |
294 |
+ --includedir="${ED}/usr/include" \ |
295 |
+ --libdir="${ED}/usr/$(get_libdir)" \ |
296 |
+ install || die "Installation of Boost libraries failed" |
297 |
+ |
298 |
+ pushd "${ED}/usr/$(get_libdir)" >/dev/null || die |
299 |
+ |
300 |
+ local ext=$(get_libname) |
301 |
+ if use threads; then |
302 |
+ local f |
303 |
+ for f in *${ext}; do |
304 |
+ dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}} |
305 |
+ done |
306 |
+ fi |
307 |
+ |
308 |
+ popd >/dev/null || die |
309 |
+ |
310 |
+ if tools_needed; then |
311 |
+ dobin dist/bin/* |
312 |
+ |
313 |
+ insinto /usr/share |
314 |
+ doins -r dist/share/boostbook |
315 |
+ fi |
316 |
+ |
317 |
+ # boost's build system truely sucks for not having a destdir. Because for |
318 |
+ # this reason we are forced to build with a prefix that includes the |
319 |
+ # DESTROOT, dynamic libraries on Darwin end messed up, referencing the |
320 |
+ # DESTROOT instread of the actual EPREFIX. There is no way out of here |
321 |
+ # but to do it the dirty way of manually setting the right install_names. |
322 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
323 |
+ einfo "Working around completely broken build-system(tm)" |
324 |
+ local d |
325 |
+ for d in "${ED}"/usr/lib/*.dylib; do |
326 |
+ if [[ -f ${d} ]]; then |
327 |
+ # fix the "soname" |
328 |
+ ebegin " correcting install_name of ${d#${ED}}" |
329 |
+ install_name_tool -id "/${d#${D}}" "${d}" |
330 |
+ eend $? |
331 |
+ # fix references to other libs |
332 |
+ refs=$(otool -XL "${d}" | \ |
333 |
+ sed -e '1d' -e 's/^\t//' | \ |
334 |
+ grep "^libboost_" | \ |
335 |
+ cut -f1 -d' ') |
336 |
+ local r |
337 |
+ for r in ${refs}; do |
338 |
+ ebegin " correcting reference to ${r}" |
339 |
+ install_name_tool -change \ |
340 |
+ "${r}" \ |
341 |
+ "${EPREFIX}/usr/lib/${r}" \ |
342 |
+ "${d}" |
343 |
+ eend $? |
344 |
+ done |
345 |
+ fi |
346 |
+ done |
347 |
+ fi |
348 |
+} |
349 |
+ |
350 |
+pkg_preinst() { |
351 |
+ # Yai for having symlinks that are nigh-impossible to remove without |
352 |
+ # resorting to dirty hacks like these. Removes lingering symlinks |
353 |
+ # from the slotted versions. |
354 |
+ local symlink |
355 |
+ for symlink in "${EROOT}"/usr/include/boost "${EROOT}"/usr/share/boostbook; do |
356 |
+ if [[ -L ${symlink} ]]; then |
357 |
+ rm -f "${symlink}" || die |
358 |
+ fi |
359 |
+ done |
360 |
+ |
361 |
+ # some ancient installs still have boost cruft lying around |
362 |
+ # for unknown reasons, causing havoc for reverse dependencies |
363 |
+ # Bug: 607734 |
364 |
+ rm -rf "${EROOT}"/usr/include/boost-1_[3-5]? || die |
365 |
+} |
366 |
+ |
367 |
+pkg_postinst() { |
368 |
+ elog "Boost.Regex is *extremely* ABI sensitive. If you get errors such as" |
369 |
+ elog |
370 |
+ elog " undefined reference to \`boost::re_detail_$(ver_cut 1)0$(ver_cut 2)00::cpp_regex_traits_implementation" |
371 |
+ elog " <char>::transform_primary[abi:cxx11](char const*, char const*) const'" |
372 |
+ elog |
373 |
+ elog "Then you need you need to recompile Boost and all its reverse dependencies" |
374 |
+ elog "using the same toolchain. In general, *every* change of the C++ toolchain" |
375 |
+ elog "requires a complete rebuild of the boost-dependent ecosystem." |
376 |
+ elog |
377 |
+ elog "See for instance https://bugs.gentoo.org/638138" |
378 |
+} |