Gentoo Archives: gentoo-commits

From: "Sergey Popov (pinkbyte)" <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/boost: ChangeLog boost-1.56.0.ebuild
Date: Thu, 04 Sep 2014 09:13:28
Message-Id: 20140904091324.B62284AD4@oystercatcher.gentoo.org
1 pinkbyte 14/09/04 09:13:24
2
3 Modified: ChangeLog
4 Added: boost-1.56.0.ebuild
5 Log:
6 Version bump, wrt bug #519476
7
8 (Portage version: 2.2.12-r1/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
9
10 Revision Changes Path
11 1.332 dev-libs/boost/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.332&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.332&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.331&r2=1.332
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v
20 retrieving revision 1.331
21 retrieving revision 1.332
22 diff -u -r1.331 -r1.332
23 --- ChangeLog 19 Aug 2014 10:37:37 -0000 1.331
24 +++ ChangeLog 4 Sep 2014 09:13:24 -0000 1.332
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-libs/boost
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.331 2014/08/19 10:37:37 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.332 2014/09/04 09:13:24 pinkbyte Exp $
30 +
31 +*boost-1.56.0 (04 Sep 2014)
32 +
33 + 04 Sep 2014; Sergey Popov <pinkbyte@g.o> +boost-1.56.0.ebuild:
34 + Version bump, wrt bug #519476
35
36 19 Aug 2014; Raúl Porcel <armin76@g.o> boost-1.52.0-r7.ebuild:
37 alpha/ia64/sparc stable wrt #518488
38
39
40
41 1.1 dev-libs/boost/boost-1.56.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.56.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.56.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: boost-1.56.0.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.56.0.ebuild,v 1.1 2014/09/04 09:13:24 pinkbyte Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
54
55 inherit eutils flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator multilib-minimal
56
57 MY_P="${PN}_$(replace_all_version_separators _)"
58 MAJOR_V="$(get_version_component_range 1-2)"
59
60 DESCRIPTION="Boost Libraries for C++"
61 HOMEPAGE="http://www.boost.org/"
62 SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
63
64 LICENSE="Boost-1.0"
65 SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122
66 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~x86-linux"
67
68 IUSE="context debug doc icu +nls mpi python static-libs +threads tools"
69
70 RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-cpplibs[-abi_x86_32(-)] )
71 icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
72 !icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
73 mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
74 python? ( ${PYTHON_DEPS} )
75 app-arch/bzip2[${MULTILIB_USEDEP}]
76 sys-libs/zlib[${MULTILIB_USEDEP}]
77 !app-admin/eselect-boost"
78 DEPEND="${RDEPEND}
79 =dev-util/boost-build-${MAJOR_V}*"
80 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
81
82 S="${WORKDIR}/${MY_P}"
83
84 # the tests will never fail because these are not intended as sanity
85 # tests at all. They are more a way for upstream to check their own code
86 # on new compilers. Since they would either be completely unreliable
87 # (failing for no good reason) or completely useless (never failing)
88 # there is no point in having them in the ebuild to begin with.
89 RESTRICT="test"
90
91 python_bindings_needed() {
92 multilib_is_native_abi && use python
93 }
94
95 tools_needed() {
96 multilib_is_native_abi && use tools
97 }
98
99 # MPI stuff is not ported on multilib yet, disabling it for non-native ABIs
100 mpi_needed() {
101 multilib_is_native_abi && use mpi
102 }
103
104 create_user-config.jam() {
105 local compiler compiler_version compiler_executable
106
107 if [[ ${CHOST} == *-darwin* ]]; then
108 compiler="darwin"
109 compiler_version="$(gcc-fullversion)"
110 compiler_executable="$(tc-getCXX)"
111 else
112 compiler="gcc"
113 compiler_version="$(gcc-version)"
114 compiler_executable="$(tc-getCXX)"
115 fi
116 local mpi_configuration python_configuration
117
118 if mpi_needed; then
119 mpi_configuration="using mpi ;"
120 fi
121
122 if python_bindings_needed; then
123 python_configuration="using python : : ${PYTHON} ;"
124 fi
125
126 cat > "${BOOST_ROOT}/user-config.jam" << __EOF__
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 epatch \
148 "${FILESDIR}/${PN}-1.51.0-respect_python-buildid.patch" \
149 "${FILESDIR}/${PN}-1.51.0-support_dots_in_python-buildid.patch" \
150 "${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch" \
151 "${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch" \
152 "${FILESDIR}/${PN}-1.48.0-python_linking.patch" \
153 "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" \
154 "${FILESDIR}/${PN}-1.55.0-context-x32.patch" \
155 "${FILESDIR}/${PN}-1.55.0-tools-c98-compat.patch" \
156 "${FILESDIR}/${PN}-1.52.0-threads.patch"
157
158 epatch_user
159
160 multilib_copy_sources
161 }
162
163 ejam() {
164 local b2_opts="--user-config=${BOOST_ROOT}/user-config.jam $@"
165 echo b2 ${b2_opts}
166 b2 ${b2_opts}
167 }
168
169 src_configure() {
170 # Workaround for too many parallel processes requested, bug #506064
171 [ "$(makeopts_jobs)" -gt 64 ] && MAKEOPTS="${MAKEOPTS} -j64"
172
173 OPTIONS="$(usex debug gentoodebug gentoorelease) -j$(makeopts_jobs) -q -d+2"
174
175 if [[ ${CHOST} == *-darwin* ]]; then
176 # We need to add the prefix, and in two cases this exceeds, so prepare
177 # for the largest possible space allocation.
178 append-ldflags -Wl,-headerpad_max_install_names
179 elif [[ ${CHOST} == *-winnt* ]]; then
180 compiler=parity
181 if [[ $($(tc-getCXX) -v) == *trunk* ]]; then
182 compilerVersion=trunk
183 else
184 compilerVersion=$($(tc-getCXX) -v | sed '1q' \
185 | sed -e 's,\([a-z]*\) \([0-9]\.[0-9]\.[0-9][^ \t]*\) .*,\2,')
186 fi
187 compilerExecutable=$(tc-getCXX)
188 fi
189
190 # bug 298489
191 if use ppc || use ppc64; then
192 [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
193 fi
194
195 # Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard.
196 append-cxxflags -std=gnu++98
197
198 use icu && OPTIONS+=" -sICU_PATH=${EPREFIX}/usr"
199 use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
200 mpi_needed || OPTIONS+=" --without-mpi"
201 use nls || OPTIONS+=" --without-locale"
202 use context || OPTIONS+=" --without-context --without-coroutine"
203
204 OPTIONS+=" pch=off"
205 OPTIONS+=" --boost-build=${EPREFIX}/usr/share/boost-build --prefix=\"${ED}usr\""
206 OPTIONS+=" --layout=system"
207 OPTIONS+=" threading=$(usex threads multi single) link=$(usex static-libs shared,static shared)"
208
209 [[ ${CHOST} == *-winnt* ]] && OPTIONS+=" -sNO_BZIP2=1"
210 }
211
212 multilib_src_compile() {
213 local -x BOOST_ROOT="${BUILD_DIR}"
214 PYTHON_DIRS=""
215 MPI_PYTHON_MODULE=""
216
217 building() {
218 create_user-config.jam
219
220 local PYTHON_OPTIONS
221 if python_bindings_needed; then
222 PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}"
223 else
224 PYTHON_OPTIONS=" --without-python"
225 fi
226
227 ejam \
228 ${OPTIONS} \
229 ${PYTHON_OPTIONS} \
230 || die "Building of Boost libraries failed"
231
232 if python_bindings_needed; then
233 if [[ -z "${PYTHON_DIRS}" ]]; then
234 PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
235 else
236 if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
237 die "Inconsistent structure of build directories"
238 fi
239 fi
240
241 local dir
242 for dir in ${PYTHON_DIRS}; do
243 mv ${dir} ${dir}-${EPYTHON} \
244 || die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed"
245 done
246
247 if mpi_needed; then
248 if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
249 MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)"
250 if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
251 die "Multiple mpi.so files found"
252 fi
253 else
254 if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" ]]; then
255 die "Inconsistent structure of build directories"
256 fi
257 fi
258
259 mv stage/lib/mpi.so stage/lib/mpi.so-${EPYTHON} \
260 || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${EPYTHON}' failed"
261 fi
262 fi
263 }
264 if python_bindings_needed; then
265 python_foreach_impl building
266 else
267 building
268 fi
269
270 if tools_needed; then
271 pushd tools > /dev/null || die
272
273 ejam \
274 ${OPTIONS} \
275 ${PYTHON_OPTIONS} \
276 || die "Building of Boost tools failed"
277 popd > /dev/null || die
278 fi
279 }
280
281 multilib_src_install_all() {
282 if ! use python; then
283 rm -r "${ED}"/usr/include/boost/python* || die
284 fi
285
286 if ! use nls; then
287 rm -r "${ED}"/usr/include/boost/locale || die
288 fi
289
290 if ! use context; then
291 rm -r "${ED}"/usr/include/boost/context || die
292 rm -r "${ED}"/usr/include/boost/coroutine || die
293 fi
294
295 if use doc; then
296 find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
297 dohtml \
298 -A pdf,txt,cpp,hpp \
299 *.{htm,html,png,css} \
300 -r doc
301 dohtml -A pdf,txt -r tools
302 insinto /usr/share/doc/${PF}/html
303 doins -r libs
304 doins -r more
305
306 # To avoid broken links
307 insinto /usr/share/doc/${PF}/html
308 doins LICENSE_1_0.txt
309
310 dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
311 fi
312 }
313
314 multilib_src_install() {
315 local -x BOOST_ROOT="${BUILD_DIR}"
316 installation() {
317 create_user-config.jam
318
319 local PYTHON_OPTIONS
320 if python_bindings_needed; then
321 local dir
322 for dir in ${PYTHON_DIRS}; do
323 cp -pr ${dir}-${EPYTHON} ${dir} \
324 || die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed"
325 done
326
327 if mpi_needed; then
328 cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \
329 || die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed"
330 cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \
331 || die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed"
332 fi
333 PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}"
334 else
335 PYTHON_OPTIONS=" --without-python"
336 fi
337
338 ejam \
339 ${OPTIONS} \
340 ${PYTHON_OPTIONS} \
341 --includedir="${ED}usr/include" \
342 --libdir="${ED}usr/$(get_libdir)" \
343 install || die "Installation of Boost libraries failed"
344
345 if python_bindings_needed; then
346 rm -r ${PYTHON_DIRS} || die
347
348 # Move mpi.so Python module to Python site-packages directory.
349 # https://svn.boost.org/trac/boost/ticket/2838
350 if mpi_needed; then
351 local moddir=$(python_get_sitedir)/boost
352 # moddir already includes eprefix
353 mkdir -p "${D}${moddir}" || die
354 mv "${ED}usr/$(get_libdir)/mpi.so" "${D}${moddir}" || die
355 cat << EOF > "${D}${moddir}/__init__.py" || die
356 import sys
357 if sys.platform.startswith('linux'):
358 import DLFCN
359 flags = sys.getdlopenflags()
360 sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
361 from . import mpi
362 sys.setdlopenflags(flags)
363 del DLFCN, flags
364 else:
365 from . import mpi
366 del sys
367 EOF
368 fi
369
370 python_optimize
371 fi
372 }
373 if python_bindings_needed; then
374 python_foreach_impl installation
375 else
376 installation
377 fi
378
379 pushd "${ED}usr/$(get_libdir)" > /dev/null || die
380
381 local ext=$(get_libname)
382 if use threads; then
383 local f
384 for f in *${ext}; do
385 dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}}
386 done
387 fi
388
389 popd > /dev/null || die
390
391 if tools_needed; then
392 dobin dist/bin/*
393
394 insinto /usr/share
395 doins -r dist/share/boostbook
396 fi
397
398 # boost's build system truely sucks for not having a destdir. Because for
399 # this reason we are forced to build with a prefix that includes the
400 # DESTROOT, dynamic libraries on Darwin end messed up, referencing the
401 # DESTROOT instread of the actual EPREFIX. There is no way out of here
402 # but to do it the dirty way of manually setting the right install_names.
403 if [[ ${CHOST} == *-darwin* ]]; then
404 einfo "Working around completely broken build-system(tm)"
405 local d
406 for d in "${ED}"usr/lib/*.dylib; do
407 if [[ -f ${d} ]]; then
408 # fix the "soname"
409 ebegin " correcting install_name of ${d#${ED}}"
410 install_name_tool -id "/${d#${D}}" "${d}"
411 eend $?
412 # fix references to other libs
413 refs=$(otool -XL "${d}" | \
414 sed -e '1d' -e 's/^\t//' | \
415 grep "^libboost_" | \
416 cut -f1 -d' ')
417 local r
418 for r in ${refs}; do
419 ebegin " correcting reference to ${r}"
420 install_name_tool -change \
421 "${r}" \
422 "${EPREFIX}/usr/lib/${r}" \
423 "${d}"
424 eend $?
425 done
426 fi
427 done
428 fi
429 }
430
431 pkg_preinst() {
432 # Yai for having symlinks that are nigh-impossible to remove without
433 # resorting to dirty hacks like these. Removes lingering symlinks
434 # from the slotted versions.
435 local symlink
436 for symlink in "${EROOT}usr/include/boost" "${EROOT}usr/share/boostbook"; do
437 [[ -L ${symlink} ]] && rm -f "${symlink}"
438 done
439 }