Lines 5-11
Link Here
|
5 |
EAPI="5" |
5 |
EAPI="5" |
6 |
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} ) |
6 |
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} ) |
7 |
|
7 |
|
8 |
inherit eutils flag-o-matic multilib multiprocessing python-r1 toolchain-funcs versionator |
8 |
inherit eutils flag-o-matic multiprocessing python-r1 toolchain-funcs versionator multilib-minimal |
9 |
|
9 |
|
10 |
MY_P="${PN}_$(replace_all_version_separators _)" |
10 |
MY_P="${PN}_$(replace_all_version_separators _)" |
11 |
MAJOR_V="$(get_version_component_range 1-2)" |
11 |
MAJOR_V="$(get_version_component_range 1-2)" |
Lines 20-31
Link Here
|
20 |
|
20 |
|
21 |
IUSE="context debug doc icu +nls mpi python static-libs +threads tools" |
21 |
IUSE="context debug doc icu +nls mpi python static-libs +threads tools" |
22 |
|
22 |
|
23 |
RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) |
23 |
RDEPEND="icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] ) |
24 |
!icu? ( virtual/libiconv ) |
24 |
!icu? ( virtual/libiconv[${MULTILIB_USEDEP}] ) |
25 |
mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) |
25 |
mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) ) |
26 |
python? ( ${PYTHON_DEPS} ) |
26 |
python? ( ${PYTHON_DEPS} ) |
27 |
app-arch/bzip2 |
27 |
app-arch/bzip2[${MULTILIB_USEDEP}] |
28 |
sys-libs/zlib |
28 |
sys-libs/zlib[${MULTILIB_USEDEP}] |
29 |
!app-admin/eselect-boost" |
29 |
!app-admin/eselect-boost" |
30 |
DEPEND="${RDEPEND} |
30 |
DEPEND="${RDEPEND} |
31 |
=dev-util/boost-build-${MAJOR_V}*" |
31 |
=dev-util/boost-build-${MAJOR_V}*" |
Lines 40-45
Link Here
|
40 |
# there is no point in having them in the ebuild to begin with. |
40 |
# there is no point in having them in the ebuild to begin with. |
41 |
RESTRICT="test" |
41 |
RESTRICT="test" |
42 |
|
42 |
|
|
|
43 |
python_bindings_needed() { |
44 |
multilib_is_native_abi && use python |
45 |
} |
46 |
|
47 |
tools_needed() { |
48 |
multilib_is_native_abi && use tools |
49 |
} |
50 |
|
51 |
# MPI stuff is not ported on multilib yet, disabling it for non-native ABIs |
52 |
mpi_needed() { |
53 |
multilib_is_native_abi && use mpi |
54 |
} |
55 |
|
43 |
create_user-config.jam() { |
56 |
create_user-config.jam() { |
44 |
local compiler compiler_version compiler_executable |
57 |
local compiler compiler_version compiler_executable |
45 |
|
58 |
|
Lines 54-68
Link Here
|
54 |
fi |
67 |
fi |
55 |
local mpi_configuration python_configuration |
68 |
local mpi_configuration python_configuration |
56 |
|
69 |
|
57 |
if use mpi; then |
70 |
if mpi_needed; then |
58 |
mpi_configuration="using mpi ;" |
71 |
mpi_configuration="using mpi ;" |
59 |
fi |
72 |
fi |
60 |
|
73 |
|
61 |
if use python; then |
74 |
if python_bindings_needed; then |
62 |
python_configuration="using python : : ${PYTHON} ;" |
75 |
python_configuration="using python : : ${PYTHON} ;" |
63 |
fi |
76 |
fi |
64 |
|
77 |
|
65 |
cat > user-config.jam << __EOF__ |
78 |
cat > "${BOOST_ROOT}/user-config.jam" << __EOF__ |
66 |
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
79 |
using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; |
67 |
${mpi_configuration} |
80 |
${mpi_configuration} |
68 |
${python_configuration} |
81 |
${python_configuration} |
Lines 95-112
Link Here
|
95 |
"${FILESDIR}/${PN}-1.52.0-threads.patch" |
108 |
"${FILESDIR}/${PN}-1.52.0-threads.patch" |
96 |
|
109 |
|
97 |
epatch_user |
110 |
epatch_user |
|
|
111 |
|
112 |
multilib_copy_sources |
98 |
} |
113 |
} |
99 |
|
114 |
|
100 |
ejam() { |
115 |
ejam() { |
101 |
echo b2 "$@" |
116 |
local b2_opts="--user-config=${BOOST_ROOT}/user-config.jam $@" |
102 |
b2 "$@" |
117 |
echo b2 ${b2_opts} |
|
|
118 |
b2 ${b2_opts} |
103 |
} |
119 |
} |
104 |
|
120 |
|
105 |
src_configure() { |
121 |
src_configure() { |
106 |
# Workaround for too many parallel processes requested, bug #506064 |
122 |
# Workaround for too many parallel processes requested, bug #506064 |
107 |
[ "$(makeopts_jobs)" -gt 64 ] && MAKEOPTS="${MAKEOPTS} -j64" |
123 |
[ "$(makeopts_jobs)" -gt 64 ] && MAKEOPTS="${MAKEOPTS} -j64" |
108 |
|
124 |
|
109 |
OPTIONS="$(usex debug gentoodebug gentoorelease) -j$(makeopts_jobs) -q -d+2 --user-config=${S}/user-config.jam" |
125 |
OPTIONS="$(usex debug gentoodebug gentoorelease) -j$(makeopts_jobs) -q -d+2" |
110 |
|
126 |
|
111 |
if [[ ${CHOST} == *-darwin* ]]; then |
127 |
if [[ ${CHOST} == *-darwin* ]]; then |
112 |
# We need to add the prefix, and in two cases this exceeds, so prepare |
128 |
# We need to add the prefix, and in two cases this exceeds, so prepare |
Lines 133-140
Link Here
|
133 |
|
149 |
|
134 |
use icu && OPTIONS+=" -sICU_PATH=${EPREFIX}/usr" |
150 |
use icu && OPTIONS+=" -sICU_PATH=${EPREFIX}/usr" |
135 |
use icu || OPTIONS+=" --disable-icu boost.locale.icu=off" |
151 |
use icu || OPTIONS+=" --disable-icu boost.locale.icu=off" |
136 |
use mpi || OPTIONS+=" --without-mpi" |
152 |
mpi_needed || OPTIONS+=" --without-mpi" |
137 |
use python || OPTIONS+=" --without-python" |
|
|
138 |
use nls || OPTIONS+=" --without-locale" |
153 |
use nls || OPTIONS+=" --without-locale" |
139 |
use context || OPTIONS+=" --without-context --without-coroutine" |
154 |
use context || OPTIONS+=" --without-context --without-coroutine" |
140 |
|
155 |
|
Lines 146-164
Link Here
|
146 |
[[ ${CHOST} == *-winnt* ]] && OPTIONS+=" -sNO_BZIP2=1" |
161 |
[[ ${CHOST} == *-winnt* ]] && OPTIONS+=" -sNO_BZIP2=1" |
147 |
} |
162 |
} |
148 |
|
163 |
|
149 |
src_compile() { |
164 |
multilib_src_compile() { |
150 |
export BOOST_ROOT="${S}" |
165 |
local -x BOOST_ROOT="${BUILD_DIR}" |
151 |
PYTHON_DIRS="" |
166 |
PYTHON_DIRS="" |
152 |
MPI_PYTHON_MODULE="" |
167 |
MPI_PYTHON_MODULE="" |
153 |
|
168 |
|
154 |
building() { |
169 |
building() { |
155 |
create_user-config.jam |
170 |
create_user-config.jam |
156 |
|
171 |
|
157 |
ejam ${OPTIONS} \ |
172 |
local PYTHON_OPTIONS |
158 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
173 |
if python_bindings_needed; then |
|
|
174 |
PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}" |
175 |
else |
176 |
PYTHON_OPTIONS=" --without-python" |
177 |
fi |
178 |
|
179 |
ejam \ |
180 |
${OPTIONS} \ |
181 |
${PYTHON_OPTIONS} \ |
159 |
|| die "Building of Boost libraries failed" |
182 |
|| die "Building of Boost libraries failed" |
160 |
|
183 |
|
161 |
if use python; then |
184 |
if python_bindings_needed; then |
162 |
if [[ -z "${PYTHON_DIRS}" ]]; then |
185 |
if [[ -z "${PYTHON_DIRS}" ]]; then |
163 |
PYTHON_DIRS="$(find bin.v2/libs -name python | sort)" |
186 |
PYTHON_DIRS="$(find bin.v2/libs -name python | sort)" |
164 |
else |
187 |
else |
Lines 173-179
Link Here
|
173 |
|| die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed" |
196 |
|| die "Renaming of '${dir}' to '${dir}-${EPYTHON}' failed" |
174 |
done |
197 |
done |
175 |
|
198 |
|
176 |
if use mpi; then |
199 |
if mpi_needed; then |
177 |
if [[ -z "${MPI_PYTHON_MODULE}" ]]; then |
200 |
if [[ -z "${MPI_PYTHON_MODULE}" ]]; then |
178 |
MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" |
201 |
MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoo* -name mpi.so)" |
179 |
if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then |
202 |
if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then |
Lines 190-241
Link Here
|
190 |
fi |
213 |
fi |
191 |
fi |
214 |
fi |
192 |
} |
215 |
} |
193 |
if use python; then |
216 |
if python_bindings_needed; then |
194 |
python_foreach_impl building |
217 |
python_foreach_impl building |
195 |
else |
218 |
else |
196 |
building |
219 |
building |
197 |
fi |
220 |
fi |
198 |
|
221 |
|
199 |
if use tools; then |
222 |
if tools_needed; then |
200 |
pushd tools > /dev/null || die |
223 |
pushd tools > /dev/null || die |
201 |
|
224 |
|
202 |
ejam ${OPTIONS} \ |
225 |
ejam \ |
|
|
226 |
${OPTIONS} \ |
227 |
${PYTHON_OPTIONS} \ |
203 |
|| die "Building of Boost tools failed" |
228 |
|| die "Building of Boost tools failed" |
204 |
popd > /dev/null || die |
229 |
popd > /dev/null || die |
205 |
fi |
230 |
fi |
206 |
} |
231 |
} |
207 |
|
232 |
|
208 |
src_install () { |
233 |
multilib_src_install_all() { |
|
|
234 |
if ! use python; then |
235 |
rm -r "${ED}"/usr/include/boost/python* || die |
236 |
fi |
237 |
|
238 |
if ! use nls; then |
239 |
rm -r "${ED}"/usr/include/boost/locale || die |
240 |
fi |
241 |
|
242 |
if ! use context; then |
243 |
rm -r "${ED}"/usr/include/boost/context || die |
244 |
rm -r "${ED}"/usr/include/boost/coroutine || die |
245 |
fi |
246 |
|
247 |
if use doc; then |
248 |
find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf |
249 |
dohtml \ |
250 |
-A pdf,txt,cpp,hpp \ |
251 |
*.{htm,html,png,css} \ |
252 |
-r doc |
253 |
dohtml -A pdf,txt -r tools |
254 |
insinto /usr/share/doc/${PF}/html |
255 |
doins -r libs |
256 |
doins -r more |
257 |
|
258 |
# To avoid broken links |
259 |
insinto /usr/share/doc/${PF}/html |
260 |
doins LICENSE_1_0.txt |
261 |
|
262 |
dosym /usr/include/boost /usr/share/doc/${PF}/html/boost |
263 |
fi |
264 |
} |
265 |
|
266 |
multilib_src_install() { |
267 |
local -x BOOST_ROOT="${BUILD_DIR}" |
209 |
installation() { |
268 |
installation() { |
210 |
create_user-config.jam |
269 |
create_user-config.jam |
211 |
|
270 |
|
212 |
if use python; then |
271 |
local PYTHON_OPTIONS |
|
|
272 |
if python_bindings_needed; then |
213 |
local dir |
273 |
local dir |
214 |
for dir in ${PYTHON_DIRS}; do |
274 |
for dir in ${PYTHON_DIRS}; do |
215 |
cp -pr ${dir}-${EPYTHON} ${dir} \ |
275 |
cp -pr ${dir}-${EPYTHON} ${dir} \ |
216 |
|| die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed" |
276 |
|| die "Copying of '${dir}-${EPYTHON}' to '${dir}' failed" |
217 |
done |
277 |
done |
218 |
|
278 |
|
219 |
if use mpi; then |
279 |
if mpi_needed; then |
220 |
cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \ |
280 |
cp -p stage/lib/mpi.so-${EPYTHON} "${MPI_PYTHON_MODULE}" \ |
221 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed" |
281 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to '${MPI_PYTHON_MODULE}' failed" |
222 |
cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \ |
282 |
cp -p stage/lib/mpi.so-${EPYTHON} stage/lib/mpi.so \ |
223 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed" |
283 |
|| die "Copying of 'stage/lib/mpi.so-${EPYTHON}' to 'stage/lib/mpi.so' failed" |
224 |
fi |
284 |
fi |
|
|
285 |
PYTHON_OPTIONS=" --python-buildid=${EPYTHON#python}" |
286 |
else |
287 |
PYTHON_OPTIONS=" --without-python" |
225 |
fi |
288 |
fi |
226 |
|
289 |
|
227 |
ejam ${OPTIONS} \ |
290 |
ejam \ |
|
|
291 |
${OPTIONS} \ |
292 |
${PYTHON_OPTIONS} \ |
228 |
--includedir="${ED}usr/include" \ |
293 |
--includedir="${ED}usr/include" \ |
229 |
--libdir="${ED}usr/$(get_libdir)" \ |
294 |
--libdir="${ED}usr/$(get_libdir)" \ |
230 |
$(use python && echo --python-buildid=${EPYTHON#python}) \ |
|
|
231 |
install || die "Installation of Boost libraries failed" |
295 |
install || die "Installation of Boost libraries failed" |
232 |
|
296 |
|
233 |
if use python; then |
297 |
if python_bindings_needed; then |
234 |
rm -r ${PYTHON_DIRS} || die |
298 |
rm -r ${PYTHON_DIRS} || die |
235 |
|
299 |
|
236 |
# Move mpi.so Python module to Python site-packages directory. |
300 |
# Move mpi.so Python module to Python site-packages directory. |
237 |
# https://svn.boost.org/trac/boost/ticket/2838 |
301 |
# https://svn.boost.org/trac/boost/ticket/2838 |
238 |
if use mpi; then |
302 |
if mpi_needed; then |
239 |
local moddir=$(python_get_sitedir)/boost |
303 |
local moddir=$(python_get_sitedir)/boost |
240 |
# moddir already includes eprefix |
304 |
# moddir already includes eprefix |
241 |
mkdir -p "${D}${moddir}" || die |
305 |
mkdir -p "${D}${moddir}" || die |
Lines 258-300
Link Here
|
258 |
python_optimize |
322 |
python_optimize |
259 |
fi |
323 |
fi |
260 |
} |
324 |
} |
261 |
if use python; then |
325 |
if python_bindings_needed; then |
262 |
python_foreach_impl installation |
326 |
python_foreach_impl installation |
263 |
else |
327 |
else |
264 |
installation |
328 |
installation |
265 |
fi |
329 |
fi |
266 |
|
330 |
|
267 |
if ! use python; then |
|
|
268 |
rm -r "${ED}"/usr/include/boost/python* || die |
269 |
fi |
270 |
|
271 |
if ! use nls; then |
272 |
rm -r "${ED}"/usr/include/boost/locale || die |
273 |
fi |
274 |
|
275 |
if ! use context; then |
276 |
rm -r "${ED}"/usr/include/boost/context || die |
277 |
rm -r "${ED}"/usr/include/boost/coroutine || die |
278 |
fi |
279 |
|
280 |
if use doc; then |
281 |
find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf |
282 |
dohtml \ |
283 |
-A pdf,txt,cpp,hpp \ |
284 |
*.{htm,html,png,css} \ |
285 |
-r doc |
286 |
dohtml -A pdf,txt -r tools |
287 |
insinto /usr/share/doc/${PF}/html |
288 |
doins -r libs |
289 |
doins -r more |
290 |
|
291 |
# To avoid broken links |
292 |
insinto /usr/share/doc/${PF}/html |
293 |
doins LICENSE_1_0.txt |
294 |
|
295 |
dosym /usr/include/boost /usr/share/doc/${PF}/html/boost |
296 |
fi |
297 |
|
298 |
pushd "${ED}usr/$(get_libdir)" > /dev/null || die |
331 |
pushd "${ED}usr/$(get_libdir)" > /dev/null || die |
299 |
|
332 |
|
300 |
local ext=$(get_libname) |
333 |
local ext=$(get_libname) |
Lines 307-313
Link Here
|
307 |
|
340 |
|
308 |
popd > /dev/null || die |
341 |
popd > /dev/null || die |
309 |
|
342 |
|
310 |
if use tools; then |
343 |
if tools_needed; then |
311 |
dobin dist/bin/* |
344 |
dobin dist/bin/* |
312 |
|
345 |
|
313 |
insinto /usr/share |
346 |
insinto /usr/share |