Magellan Linux

Annotation of /branches/R11-unstable/extras/boost/boost-1.56.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22415 - (hide annotations) (download)
Thu Apr 3 22:39:04 2014 UTC (10 years, 5 months ago) by niro
Original Path: trunk/extras/boost/boost-1.56.0-r1.smage2
File size: 11455 byte(s)
auto added: ver bump to 1.56.0-r1
1 niro 22415 # $Id$
2    
3     PNAME="boost"
4     PVER="1.56.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-54"
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} | sed 's:_:.:g'"
62    
63     # install_boost_lib ${name}
64     install_boost_lib()
65     {
66     local name="$1"
67     local libname
68     [[ -z ${name} ]] && die "no name given"
69     # replace all - with _
70     libname="${name//-/_}"
71    
72     minstalldir /usr/$(mlibdir) || die
73    
74     # install normal libs if they 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     variant=release \
315     debug-symbols=off \
316     runtime-link=shared \
317     link=shared \
318     threading=multi \
319     python=$(get_python_version) \
320     toolset=gcc \
321     --prefix=${BINDIR}/usr \
322     --layout=system \
323     || die
324    
325     # build pyste
326     cd ${SRCDIR}/libs/python/pyste/install
327     python_docompile || die
328     }
329    
330     src_install_boost-atomic()
331     {
332     cd ${SRCDIR}
333     install_boost_lib "${PNAME}" || die
334     }
335    
336     src_install_boost-chrono()
337     {
338     cd ${SRCDIR}
339     install_boost_lib "${PNAME}" || die
340     }
341    
342     src_install_boost-context()
343     {
344     cd ${SRCDIR}
345     install_boost_lib "${PNAME}" || die
346     }
347    
348     src_install_boost-date-time()
349     {
350     cd ${SRCDIR}
351     install_boost_lib "${PNAME}" || die
352     }
353    
354     src_install_boost-filesystem()
355     {
356     cd ${SRCDIR}
357     install_boost_lib "${PNAME}" || die
358     }
359    
360     src_install_boost-graph()
361     {
362     cd ${SRCDIR}
363     install_boost_lib "${PNAME}" || die
364     }
365    
366     src_install_boost-iostreams()
367     {
368     cd ${SRCDIR}
369     install_boost_lib "${PNAME}" || die
370     }
371    
372     src_install_boost-locale()
373     {
374     cd ${SRCDIR}
375     install_boost_lib "${PNAME}" || die
376     }
377    
378     src_install_boost-log()
379     {
380     cd ${SRCDIR}
381     install_boost_lib "${PNAME}" || die
382     install_boost_lib "${PNAME}_setup" || die
383     }
384    
385     src_install_boost-math()
386     {
387     cd ${SRCDIR}
388     install_boost_lib "${PNAME}_c99" || die
389     install_boost_lib "${PNAME}_c99f" || die
390     install_boost_lib "${PNAME}_c99l" || die
391     install_boost_lib "${PNAME}_tr1" || die
392     install_boost_lib "${PNAME}_tr1f" || die
393     install_boost_lib "${PNAME}_tr1l" || die
394     }
395    
396     src_install_boost-program-options()
397     {
398     cd ${SRCDIR}
399     install_boost_lib "${PNAME}" || die
400     }
401    
402     src_install_boost-python()
403     {
404     cd ${SRCDIR}
405     install_boost_lib "${PNAME}" || die
406     }
407    
408     src_install_boost-random()
409     {
410     cd ${SRCDIR}
411     install_boost_lib "${PNAME}" || die
412     }
413    
414     src_install_boost-regex()
415     {
416     cd ${SRCDIR}
417     install_boost_lib "${PNAME}" || die
418     }
419    
420     src_install_boost-serialization()
421     {
422     cd ${SRCDIR}
423     install_boost_lib "${PNAME}" || die
424     install_boost_lib "boost_wserialization" || die
425     }
426    
427     src_install_boost-signals()
428     {
429     cd ${SRCDIR}
430     install_boost_lib "${PNAME}" || die
431     }
432    
433     src_install_boost-system()
434     {
435     cd ${SRCDIR}
436     install_boost_lib "${PNAME}" || die
437     }
438    
439     src_install_boost-test()
440     {
441     cd ${SRCDIR}
442     install_boost_lib "boost_prg_exec_monitor" || die
443     install_boost_lib "boost_unit_test_framework" || die
444     }
445    
446     src_install_boost-thread()
447     {
448     cd ${SRCDIR}
449     install_boost_lib "${PNAME}" || die
450     }
451    
452     src_install_boost-timer()
453     {
454     cd ${SRCDIR}
455     install_boost_lib "${PNAME}" || die
456     }
457    
458     src_install_boost-wave()
459     {
460     cd ${SRCDIR}
461     install_boost_lib "${PNAME}" || die
462     }
463    
464     src_install_boost-jam()
465     {
466     cd ${SRCDIR}
467    
468     # find bjam exec
469     local bjam=$(find ${SRCDIR}/tools/build/v2/engine -name bjam -a -type f)
470     minstallexec ${bjam} || die
471    
472     minstalldocs LICENSE_1_0.txt || die
473     }
474    
475     src_install_boost-build()
476     {
477     cd ${SRCDIR}
478     minstalldir /usr/share || die
479     mcopy -a tools/build /usr/share/boost-build || die
480    
481     # cleanup things provided by other packages
482     mdelete -r /usr/share/boost-build/v2/doc || die
483     mdelete -r /usr/share/boost-build/v2/example || die
484    
485     # cleanup uneccessary stuff
486     mdelete -r /usr/share/boost-build/v2/debian || die
487     mdelete -r /usr/share/boost-build/v2/notes || die
488     mdelete /usr/share/boost-build/v2/\*.txt || die
489    
490     minstalldocs LICENSE_1_0.txt || die
491     minstalldocs tools/build/v2/*.txt || die
492     minstalldocs tools/build/v2/notes/*.txt || die
493     }
494    
495     src_install_boost-doc()
496     {
497     cd ${SRCDIR}
498     minstalldir /usr/share/doc || die
499     mcopy -a doc/html /usr/share/doc/${PNAME}-${PVER} || die
500     }
501    
502     src_install_boost-examples()
503     {
504     cd ${SRCDIR}
505     minstalldir /usr/share/doc || die
506     mcopy -a tools/build/v2/example /usr/share/doc/${PNAME}-${PVER} || die
507     minstalldocs LICENSE_1_0.txt || die
508     }
509    
510     src_install_boost()
511     {
512     cd ${SRCDIR}
513    
514     # find bjam exec
515     local bjam=$(find ${SRCDIR}/tools/build/v2/engine -name bjam -a -type f)
516    
517     # install boost
518     ${bjam} \
519     variant=release \
520     debug-symbols=off \
521     runtime-link=shared \
522     link=shared \
523     threading=multi \
524     python=$(get_python_version) \
525     toolset=gcc \
526     --prefix=${BINDIR}/usr \
527     --libdir=${BINDIR}/usr/$(mlibdir) \
528     --layout=system \
529     install \
530     || die
531    
532     # install bcp executables
533     minstallexec dist/bin/bcp || die
534    
535     # install pyste
536     cd libs/python/pyste/install
537     python_doinstall || die
538    
539     # install docs
540     cd ${SRCDIR}
541     minstalldocs LICENSE_1_0.txt README || die
542    
543     # cleanup things provided by other packages
544     mdelete /usr/$(mlibdir)/libboost\*.so\* || die
545     mdelete /usr/$(mlibdir)/libboost\*.a || die
546     }