Magellan Linux

Contents of /trunk/extras/boost/boost-1.60.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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