Magellan Linux

Contents of /trunk/extras/boost/boost-1.54.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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