Annotation of /branches/R11-stable/extras/boost/boost-1.56.0-r1.smage2
Parent Directory | Revision Log
Revision 22859 -
(hide annotations)
(download)
Tue Oct 28 09:04:08 2014 UTC (9 years, 7 months ago) by niro
File size: 11881 byte(s)
Tue Oct 28 09:04:08 2014 UTC (9 years, 7 months ago) by niro
File size: 11881 byte(s)
-release branches/R11-stable
1 | niro | 22415 | # $Id$ |
2 | |||
3 | PNAME="boost" | ||
4 | PVER="1.56.0" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | niro | 22419 | SPLIT_PACKAGES=" |
8 | boost-system | ||
9 | niro | 22415 | boost-regex |
10 | boost-atomic | ||
11 | boost-chrono | ||
12 | boost-context | ||
13 | niro | 22419 | boost-coroutine |
14 | niro | 22415 | boost-date-time |
15 | boost-filesystem | ||
16 | boost-graph | ||
17 | boost-iostreams | ||
18 | boost-locale | ||
19 | boost-log | ||
20 | boost-math | ||
21 | boost-program-options | ||
22 | boost-python | ||
23 | boost-random | ||
24 | boost-serialization | ||
25 | boost-signals | ||
26 | boost-test | ||
27 | boost-thread | ||
28 | boost-timer | ||
29 | boost-wave | ||
30 | boost-jam | ||
31 | boost-build | ||
32 | boost | ||
33 | boost-doc | ||
34 | boost-examples" | ||
35 | |||
36 | PCAT="dev-libs" | ||
37 | HOMEPAGE="http://www.boost.org/" | ||
38 | |||
39 | COMMON_DEPEND=">= sys-libs/libstdc++-4.8" | ||
40 | BZIP_DEPEND=">= app-arch/bzip2-1.0.6" | ||
41 | ZLIB_DEPEND=">= sys-libs/zlib-1.2" | ||
42 | PYTHON_DEPEND=">= dev-lang/python-2.7" | ||
43 | ICU_DEPEND=">= dev-libs/icu-54" | ||
44 | |||
45 | SDEPEND="${COMMON_DEPEND} | ||
46 | ${BZIP_DEPEND} | ||
47 | ${ZLIB_DEPEND} | ||
48 | ${PYTHON_DEPEND} | ||
49 | ${ICU_DEPEND}" | ||
50 | |||
51 | SRCFILE="${PNAME}_$(echo ${PVER} | sed "s:\.:_:g").tar.bz2" | ||
52 | SRCDIR="${BUILDDIR}/${PNAME}_$(echo ${PVER} | sed "s:\.:_:g")" | ||
53 | |||
54 | sminclude python mbuild mtools | ||
55 | msetfeature "!check" | ||
56 | |||
57 | SRC_URI=( | ||
58 | sourceforge://${PNAME}/${SRCFILE} | ||
59 | mirror://${PNAME}/${SRCFILE} | ||
60 | ) | ||
61 | |||
62 | UP2SEPERATOR="_" | ||
63 | UP2DATE="updatecmd_sourceforge ${PNAME} | sed 's:_:.:g'" | ||
64 | |||
65 | # install_boost_lib ${name} | ||
66 | install_boost_lib() | ||
67 | { | ||
68 | local name="$1" | ||
69 | local libname | ||
70 | [[ -z ${name} ]] && die "no name given" | ||
71 | # replace all - with _ | ||
72 | libname="${name//-/_}" | ||
73 | |||
74 | minstalldir /usr/$(mlibdir) || die | ||
75 | |||
76 | niro | 22419 | # install normal libs if tehy exist |
77 | niro | 22415 | if [ -f stage/lib/lib${libname}.so.${PVER} ] |
78 | then | ||
79 | minstallexec stage/lib/lib${libname}.so.${PVER} /usr/$(mlibdir) || die | ||
80 | mlink lib${libname}.so.${PVER} /usr/$(mlibdir)/lib${libname}.so || die | ||
81 | else | ||
82 | echo -e "${COLYELLOW}No normal lib for '${libname}' found!${COLDEFAULT}" | ||
83 | fi | ||
84 | |||
85 | # install multithread libs if they exist | ||
86 | if [ -f stage/lib/lib${libname}-mt.so.${PVER} ] | ||
87 | then | ||
88 | minstallexec stage/lib/lib${libname}-mt.so.${PVER} /usr/$(mlibdir) || die | ||
89 | mlink lib${libname}-mt.so.${PVER} /usr/$(mlibdir)/lib${libname}-mt.so || die | ||
90 | else | ||
91 | echo -e "${COLYELLOW}No multithreading lib for '${libname}' found!${COLDEFAULT}" | ||
92 | fi | ||
93 | |||
94 | minstalldocs LICENSE_1_0.txt || die | ||
95 | } | ||
96 | |||
97 | split_info_boost-atomic() | ||
98 | { | ||
99 | DESCRIPTION="Run-Time component of boost atomic library." | ||
100 | DEPEND="${COMMON_DEPEND}" | ||
101 | } | ||
102 | |||
103 | split_info_boost-chrono() | ||
104 | { | ||
105 | DESCRIPTION="Run-Time component of boost chrono library." | ||
106 | DEPEND="${COMMON_DEPEND} | ||
107 | == dev-libs/boost-system-${PVER}" | ||
108 | } | ||
109 | |||
110 | split_info_boost-context() | ||
111 | { | ||
112 | DESCRIPTION="Run-Time component of boost context library." | ||
113 | DEPEND="${COMMON_DEPEND}" | ||
114 | } | ||
115 | |||
116 | niro | 22419 | split_info_boost-coroutine() |
117 | { | ||
118 | DESCRIPTION="Run-Time component of boost coroutine library." | ||
119 | DEPEND="${COMMON_DEPEND}" | ||
120 | } | ||
121 | |||
122 | niro | 22415 | split_info_boost-date-time() |
123 | { | ||
124 | DESCRIPTION="Run-Time component of boost date-time library." | ||
125 | DEPEND="${COMMON_DEPEND}" | ||
126 | } | ||
127 | |||
128 | split_info_boost-filesystem() | ||
129 | { | ||
130 | DESCRIPTION="Run-Time component of boost filesystem library." | ||
131 | DEPEND="${COMMON_DEPEND} | ||
132 | == dev-libs/boost-system-${PVER}" | ||
133 | } | ||
134 | |||
135 | split_info_boost-graph() | ||
136 | { | ||
137 | DESCRIPTION="Run-Time component of boost graph library." | ||
138 | DEPEND="${COMMON_DEPEND} | ||
139 | ${ICU_DEPEND} | ||
140 | == dev-libs/boost-regex-${PVER}" | ||
141 | } | ||
142 | |||
143 | split_info_boost-iostreams() | ||
144 | { | ||
145 | DESCRIPTION="Run-Time component of boost iostreams library." | ||
146 | DEPEND="${COMMON_DEPEND} | ||
147 | ${BZIP_DEPEND} | ||
148 | ${ZLIB_DEPEND}" | ||
149 | } | ||
150 | |||
151 | split_info_boost-locale() | ||
152 | { | ||
153 | DESCRIPTION="Run-Time component of boost locale library." | ||
154 | DEPEND="${COMMON_DEPEND} | ||
155 | niro | 22419 | ${ICU_DEPEND} |
156 | == dev-libs/boost-system-${PVER} | ||
157 | == dev-libs/boost-chrono-${PVER} | ||
158 | == dev-libs/boost-thread-${PVER}" | ||
159 | niro | 22415 | } |
160 | |||
161 | split_info_boost-log() | ||
162 | { | ||
163 | DESCRIPTION="Run-Time component of boost log library." | ||
164 | DEPEND="${COMMON_DEPEND}" | ||
165 | } | ||
166 | |||
167 | split_info_boost-math() | ||
168 | { | ||
169 | DESCRIPTION="Math functions for boost TR1/C99 library." | ||
170 | DEPEND="${COMMON_DEPEND}" | ||
171 | } | ||
172 | |||
173 | split_info_boost-program-options() | ||
174 | { | ||
175 | DESCRIPTION="Run-Time component of boost program_options library." | ||
176 | DEPEND="${COMMON_DEPEND}" | ||
177 | } | ||
178 | |||
179 | split_info_boost-python() | ||
180 | { | ||
181 | DESCRIPTION="Run-Time component of boost python library." | ||
182 | DEPEND="${COMMON_DEPEND} | ||
183 | ${PYTHON_DEPEND}" | ||
184 | } | ||
185 | |||
186 | split_info_boost-random() | ||
187 | { | ||
188 | DESCRIPTION="Run-Time component of boost random library." | ||
189 | DEPEND="${COMMON_DEPEND}" | ||
190 | } | ||
191 | |||
192 | split_info_boost-regex() | ||
193 | { | ||
194 | DESCRIPTION="Run-Time component of boost regex library." | ||
195 | DEPEND="${COMMON_DEPEND} | ||
196 | ${ICU_DEPEND}" | ||
197 | } | ||
198 | |||
199 | split_info_boost-serialization() | ||
200 | { | ||
201 | DESCRIPTION="Run-Time component of boost serialization library." | ||
202 | DEPEND="${COMMON_DEPEND}" | ||
203 | } | ||
204 | |||
205 | split_info_boost-signals() | ||
206 | { | ||
207 | DESCRIPTION="Run-Time component of boost signals and slots library." | ||
208 | DEPEND="${COMMON_DEPEND}" | ||
209 | } | ||
210 | |||
211 | split_info_boost-system() | ||
212 | { | ||
213 | DESCRIPTION="Run-Time component of boost system support library." | ||
214 | DEPEND="${COMMON_DEPEND}" | ||
215 | } | ||
216 | |||
217 | split_info_boost-test() | ||
218 | { | ||
219 | DESCRIPTION="Run-Time component of boost test library." | ||
220 | DEPEND="${COMMON_DEPEND}" | ||
221 | } | ||
222 | |||
223 | split_info_boost-thread() | ||
224 | { | ||
225 | DESCRIPTION="Run-Time component of boost thead library." | ||
226 | niro | 22419 | DEPEND="${COMMON_DEPEND} |
227 | == dev-libs/boost-system-${PVER}" | ||
228 | niro | 22415 | } |
229 | |||
230 | split_info_boost-timer() | ||
231 | { | ||
232 | DESCRIPTION="Run-Time component of boost timer library." | ||
233 | DEPEND="${COMMON_DEPEND} | ||
234 | == dev-libs/boost-system-${PVER} | ||
235 | == dev-libs/boost-chrono-${PVER}" | ||
236 | } | ||
237 | |||
238 | split_info_boost-wave() | ||
239 | { | ||
240 | DESCRIPTION="Run-Time component of boost C99/C++ pre-processing library." | ||
241 | DEPEND="${COMMON_DEPEND} | ||
242 | == dev-libs/boost-system-${PVER} | ||
243 | niro | 22419 | == dev-libs/boost-chrono-${PVER} |
244 | niro | 22415 | == dev-libs/boost-date-time-${PVER} |
245 | == dev-libs/boost-filesystem-${PVER} | ||
246 | == dev-libs/boost-thread-${PVER}" | ||
247 | } | ||
248 | |||
249 | split_info_boost-doc() | ||
250 | { | ||
251 | DESCRIPTION="HTML documentation for the Boost C++ libraries." | ||
252 | DEPEND="" | ||
253 | } | ||
254 | |||
255 | split_info_boost-examples() | ||
256 | { | ||
257 | DESCRIPTION="Source examples for the Boost C++ libraries" | ||
258 | DEPEND=">= dev-libs/boost-${PVER}" | ||
259 | } | ||
260 | |||
261 | split_info_boost-jam() | ||
262 | { | ||
263 | PCAT="dev-util" | ||
264 | DESCRIPTION="Boost.Jam is an alternative to make based on Jam." | ||
265 | DEPEND="${COMMON_DEPEND}" | ||
266 | } | ||
267 | |||
268 | split_info_boost-build() | ||
269 | { | ||
270 | PCAT="dev-util" | ||
271 | DESCRIPTION="Cross platform build system for C++ projects." | ||
272 | DEPEND="== dev-util/boost-jam-${PVER}" | ||
273 | } | ||
274 | |||
275 | split_info_boost() | ||
276 | { | ||
277 | DESCRIPTION="Boost provides free peer-reviewed portable C++ source libraries." | ||
278 | DEPEND="== dev-libs/boost-system-${PVER} | ||
279 | == dev-libs/boost-regex-${PVER} | ||
280 | == dev-libs/boost-atomic-${PVER} | ||
281 | == dev-libs/boost-chrono-${PVER} | ||
282 | == dev-libs/boost-context-${PVER} | ||
283 | niro | 22419 | == dev-libs/boost-coroutine-${PVER} |
284 | niro | 22415 | == dev-libs/boost-date-time-${PVER} |
285 | == dev-libs/boost-filesystem-${PVER} | ||
286 | == dev-libs/boost-graph-${PVER} | ||
287 | == dev-libs/boost-iostreams-${PVER} | ||
288 | == dev-libs/boost-locale-${PVER} | ||
289 | == dev-libs/boost-log-${PVER} | ||
290 | == dev-libs/boost-math-${PVER} | ||
291 | == dev-libs/boost-program-options-${PVER} | ||
292 | == dev-libs/boost-python-${PVER} | ||
293 | == dev-libs/boost-random-${PVER} | ||
294 | == dev-libs/boost-test-${PVER} | ||
295 | == dev-libs/boost-signals-${PVER} | ||
296 | == dev-libs/boost-test-${PVER} | ||
297 | == dev-libs/boost-thread-${PVER} | ||
298 | == dev-libs/boost-timer-${PVER} | ||
299 | == dev-libs/boost-wave-${PVER} | ||
300 | == dev-util/boost-jam-${PVER} | ||
301 | == dev-util/boost-build-${PVER}" | ||
302 | } | ||
303 | |||
304 | src_compile() | ||
305 | { | ||
306 | # bjam builded with gcc-4.2 segfaults without '-fno-strict-aliasing' | ||
307 | # see: http://svn.boost.org/trac/boost/ticket/977 | ||
308 | export CFLAGS="${CFLAGS} -fno-strict-aliasing" | ||
309 | export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" | ||
310 | |||
311 | # first build bjam (must use cc not gcc to use our modified cflags) | ||
312 | niro | 22419 | cd ${SRCDIR}/tools/build/src/engine |
313 | niro | 22415 | ./build.sh cc || die |
314 | |||
315 | # find bjam exec | ||
316 | niro | 22419 | local bjam=$(find ${SRCDIR}/tools/build/src/engine -name bjam -a -type f) |
317 | niro | 22415 | |
318 | # build bcp | ||
319 | cd ${SRCDIR}/tools/bcp | ||
320 | ${bjam} || die | ||
321 | |||
322 | # build boost libraries | ||
323 | # --layout=tagged will add the "-mt" suffix for multithreaded libraries | ||
324 | # and installs includes in /usr/include/boost. | ||
325 | # --layout=system no longer adds the -mt suffix for multi-threaded libs. | ||
326 | cd ${SRCDIR} | ||
327 | ${bjam} \ | ||
328 | variant=release \ | ||
329 | debug-symbols=off \ | ||
330 | runtime-link=shared \ | ||
331 | link=shared \ | ||
332 | threading=multi \ | ||
333 | niro | 22419 | python=$(mget-python-version) \ |
334 | niro | 22415 | toolset=gcc \ |
335 | --prefix=${BINDIR}/usr \ | ||
336 | --layout=system \ | ||
337 | || die | ||
338 | |||
339 | # build pyste | ||
340 | cd ${SRCDIR}/libs/python/pyste/install | ||
341 | python_docompile || die | ||
342 | } | ||
343 | |||
344 | src_install_boost-atomic() | ||
345 | { | ||
346 | cd ${SRCDIR} | ||
347 | install_boost_lib "${PNAME}" || die | ||
348 | } | ||
349 | |||
350 | src_install_boost-chrono() | ||
351 | { | ||
352 | cd ${SRCDIR} | ||
353 | install_boost_lib "${PNAME}" || die | ||
354 | } | ||
355 | |||
356 | src_install_boost-context() | ||
357 | { | ||
358 | cd ${SRCDIR} | ||
359 | install_boost_lib "${PNAME}" || die | ||
360 | } | ||
361 | |||
362 | niro | 22419 | src_install_boost-coroutine() |
363 | { | ||
364 | cd ${SRCDIR} | ||
365 | install_boost_lib "${PNAME}" || die | ||
366 | } | ||
367 | |||
368 | niro | 22415 | src_install_boost-date-time() |
369 | { | ||
370 | cd ${SRCDIR} | ||
371 | install_boost_lib "${PNAME}" || die | ||
372 | } | ||
373 | |||
374 | src_install_boost-filesystem() | ||
375 | { | ||
376 | cd ${SRCDIR} | ||
377 | install_boost_lib "${PNAME}" || die | ||
378 | } | ||
379 | |||
380 | src_install_boost-graph() | ||
381 | { | ||
382 | cd ${SRCDIR} | ||
383 | install_boost_lib "${PNAME}" || die | ||
384 | } | ||
385 | |||
386 | src_install_boost-iostreams() | ||
387 | { | ||
388 | cd ${SRCDIR} | ||
389 | install_boost_lib "${PNAME}" || die | ||
390 | } | ||
391 | |||
392 | src_install_boost-locale() | ||
393 | { | ||
394 | cd ${SRCDIR} | ||
395 | install_boost_lib "${PNAME}" || die | ||
396 | } | ||
397 | |||
398 | src_install_boost-log() | ||
399 | { | ||
400 | cd ${SRCDIR} | ||
401 | install_boost_lib "${PNAME}" || die | ||
402 | install_boost_lib "${PNAME}_setup" || die | ||
403 | } | ||
404 | |||
405 | src_install_boost-math() | ||
406 | { | ||
407 | cd ${SRCDIR} | ||
408 | install_boost_lib "${PNAME}_c99" || die | ||
409 | install_boost_lib "${PNAME}_c99f" || die | ||
410 | install_boost_lib "${PNAME}_c99l" || die | ||
411 | install_boost_lib "${PNAME}_tr1" || die | ||
412 | install_boost_lib "${PNAME}_tr1f" || die | ||
413 | install_boost_lib "${PNAME}_tr1l" || die | ||
414 | } | ||
415 | |||
416 | src_install_boost-program-options() | ||
417 | { | ||
418 | cd ${SRCDIR} | ||
419 | install_boost_lib "${PNAME}" || die | ||
420 | } | ||
421 | |||
422 | src_install_boost-python() | ||
423 | { | ||
424 | cd ${SRCDIR} | ||
425 | install_boost_lib "${PNAME}" || die | ||
426 | } | ||
427 | |||
428 | src_install_boost-random() | ||
429 | { | ||
430 | cd ${SRCDIR} | ||
431 | install_boost_lib "${PNAME}" || die | ||
432 | } | ||
433 | |||
434 | src_install_boost-regex() | ||
435 | { | ||
436 | cd ${SRCDIR} | ||
437 | install_boost_lib "${PNAME}" || die | ||
438 | } | ||
439 | |||
440 | src_install_boost-serialization() | ||
441 | { | ||
442 | cd ${SRCDIR} | ||
443 | install_boost_lib "${PNAME}" || die | ||
444 | install_boost_lib "boost_wserialization" || die | ||
445 | } | ||
446 | |||
447 | src_install_boost-signals() | ||
448 | { | ||
449 | cd ${SRCDIR} | ||
450 | install_boost_lib "${PNAME}" || die | ||
451 | } | ||
452 | |||
453 | src_install_boost-system() | ||
454 | { | ||
455 | cd ${SRCDIR} | ||
456 | install_boost_lib "${PNAME}" || die | ||
457 | } | ||
458 | |||
459 | src_install_boost-test() | ||
460 | { | ||
461 | cd ${SRCDIR} | ||
462 | install_boost_lib "boost_prg_exec_monitor" || die | ||
463 | install_boost_lib "boost_unit_test_framework" || die | ||
464 | } | ||
465 | |||
466 | src_install_boost-thread() | ||
467 | { | ||
468 | cd ${SRCDIR} | ||
469 | install_boost_lib "${PNAME}" || die | ||
470 | } | ||
471 | |||
472 | src_install_boost-timer() | ||
473 | { | ||
474 | cd ${SRCDIR} | ||
475 | install_boost_lib "${PNAME}" || die | ||
476 | } | ||
477 | |||
478 | src_install_boost-wave() | ||
479 | { | ||
480 | cd ${SRCDIR} | ||
481 | install_boost_lib "${PNAME}" || die | ||
482 | } | ||
483 | |||
484 | src_install_boost-jam() | ||
485 | { | ||
486 | cd ${SRCDIR} | ||
487 | |||
488 | # find bjam exec | ||
489 | niro | 22419 | local bjam=$(find ${SRCDIR}/tools/build/src/engine -name bjam -a -type f) |
490 | niro | 22415 | minstallexec ${bjam} || die |
491 | |||
492 | minstalldocs LICENSE_1_0.txt || die | ||
493 | } | ||
494 | |||
495 | src_install_boost-build() | ||
496 | { | ||
497 | cd ${SRCDIR} | ||
498 | minstalldir /usr/share || die | ||
499 | mcopy -a tools/build /usr/share/boost-build || die | ||
500 | |||
501 | # cleanup things provided by other packages | ||
502 | niro | 22420 | mdelete -r /usr/share/boost-build/doc || die |
503 | mdelete -r /usr/share/boost-build/example || die | ||
504 | niro | 22415 | |
505 | # cleanup uneccessary stuff | ||
506 | niro | 22420 | mdelete -r /usr/share/boost-build/debian || die |
507 | mdelete -r /usr/share/boost-build/notes || die | ||
508 | #mdelete /usr/share/boost-build/\*.txt || die | ||
509 | niro | 22415 | |
510 | minstalldocs LICENSE_1_0.txt || die | ||
511 | niro | 22420 | #minstalldocs tools/build/*.txt || die |
512 | minstalldocs tools/build/notes/*.txt || die | ||
513 | niro | 22415 | } |
514 | |||
515 | src_install_boost-doc() | ||
516 | { | ||
517 | cd ${SRCDIR} | ||
518 | minstalldir /usr/share/doc || die | ||
519 | mcopy -a doc/html /usr/share/doc/${PNAME}-${PVER} || die | ||
520 | } | ||
521 | |||
522 | src_install_boost-examples() | ||
523 | { | ||
524 | cd ${SRCDIR} | ||
525 | minstalldir /usr/share/doc || die | ||
526 | niro | 22420 | mcopy -a tools/build/example /usr/share/doc/${PNAME}-${PVER} || die |
527 | niro | 22415 | minstalldocs LICENSE_1_0.txt || die |
528 | } | ||
529 | |||
530 | src_install_boost() | ||
531 | { | ||
532 | cd ${SRCDIR} | ||
533 | |||
534 | # find bjam exec | ||
535 | niro | 22419 | local bjam=$(find ${SRCDIR}/tools/build/src/engine -name bjam -a -type f) |
536 | niro | 22415 | |
537 | # install boost | ||
538 | ${bjam} \ | ||
539 | variant=release \ | ||
540 | debug-symbols=off \ | ||
541 | runtime-link=shared \ | ||
542 | link=shared \ | ||
543 | threading=multi \ | ||
544 | niro | 22419 | python=$(mget-python-version) \ |
545 | niro | 22415 | toolset=gcc \ |
546 | --prefix=${BINDIR}/usr \ | ||
547 | --libdir=${BINDIR}/usr/$(mlibdir) \ | ||
548 | --layout=system \ | ||
549 | install \ | ||
550 | || die | ||
551 | |||
552 | # install bcp executables | ||
553 | minstallexec dist/bin/bcp || die | ||
554 | |||
555 | # install pyste | ||
556 | cd libs/python/pyste/install | ||
557 | python_doinstall || die | ||
558 | |||
559 | # install docs | ||
560 | cd ${SRCDIR} | ||
561 | minstalldocs LICENSE_1_0.txt README || die | ||
562 | |||
563 | # cleanup things provided by other packages | ||
564 | mdelete /usr/$(mlibdir)/libboost\*.so\* || die | ||
565 | mdelete /usr/$(mlibdir)/libboost\*.a || die | ||
566 | } |