Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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