Magellan Linux

Annotation of /trunk/include/multilib.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29792 - (hide annotations) (download)
Thu Oct 12 11:37:16 2017 UTC (7 years ago) by niro
File size: 13814 byte(s)
-moved meson mutlilib wrapper to meson.sminc and introduce ABI_DO_NOT_ENTER_SRCDIR variable, an boolean which can be used to switch off to automatically enter the abi SRCDIR an abi-xxx runs
1 niro 6346 # $Id$
2 niro 2 # multilib abis
3    
4 niro 11547 # tell the buildsystem that we are doing a multilib build
5     export MULTILIB_BUILD="true"
6 niro 11544
7 niro 8334 # be verbose or nor (true|false}
8     : ${MULTILIB_VERBOSE="true"}
9    
10 niro 29792 # enter SRCDIR of each abi an abi runs
11     : ${ABI_DO_NOT_ENTER_SRCDIR="true"}
12    
13 niro 11029 # multilib should call all dependant includes, which gets overridden
14 niro 11030 sminclude mtools
15 niro 11029
16 niro 2 # do not define EMUL_LINUX_32 after inherit of multlib !!
17     # it may break i*86 builds
18    
19     # default ABIs to be build
20     case ${ARCH} in
21     x86_64)
22     : ${MULTILIB_ABIS="m32 m64"}
23     # default false
24     : ${EMUL_LINUX_32="false"}
25    
26     # add linux32 to the dependencies
27     if [[ ${EMUL_LINUX_32} = true ]]
28     then
29 niro 7554 EMUL_LINUX_32_SDEPEND_x86_64=">= sys-apps/util-linux-2.19"
30 niro 6406 SPECIAL_VARS="${SPECIAL_VARS} EMUL_LINUX_32_SDEPEND_x86_64"
31 niro 2 fi
32     ;;
33     i*86)
34     : ${MULTILIB_ABIS="m32"}
35     # always false
36     EMUL_LINUX_32="false"
37     ;;
38     esac
39    
40     # add linux32 to the dependencies
41     if [[ ${EMUL_LINUX_32} = true ]]
42     then
43     # very dirty trick to get the dependencies right
44     # ; is the IFS, tr replaces ; with an crlfs
45     # the var ist decided with our common eval+echo magic
46     if [[ -z ${SDEPEND} ]]
47     then
48 niro 22297 SDEPEND="$(marchsdepend EMUL_LINUX_32_SDEPEND)"
49 niro 2 else
50     SDEPEND="${SDEPEND}
51 niro 22297 $(marchsdepend EMUL_LINUX_32_SDEPEND)"
52 niro 2 fi
53     fi
54    
55     ##
56     # overide some defaults to respect ABI_LIBDIR
57     ##
58     mlibdir()
59     {
60     local libdir=lib
61     [[ ${ARCH} = x86_64 ]] && libdir=lib64
62     [[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}"
63    
64     echo "${libdir}"
65     }
66    
67     ##
68     # multilib abi changers
69     ##
70     abi-m32()
71     {
72     export ABI="m32"
73     export CC="gcc -${ABI}"
74     export CXX="g++ -${ABI}"
75     export ABI_LIBDIR="lib"
76 niro 307 if [[ ${EXPORT_ABI_LDFLAGS} != false ]]
77     then
78 niro 11300 local saved_ldflags="${LDFLAGS}"
79     export LDFLAGS="${LDFLAGS} -L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}"
80 niro 307 fi
81 niro 5371 # keep pkgconfig clean
82     local orig_pkg_config_path="${PKG_CONFIG_PATH}"
83     export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}"
84 niro 2
85 niro 8334 if [[ ${MULTILIB_VERBOSE} = true ]]
86 niro 307 then
87 niro 8334 echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}"
88     echo -e "${COLBLUE}*** ${COLGREEN} ABI${COLDEFAULT}='${ABI}'"
89     echo -e "${COLBLUE}*** ${COLGREEN} CC${COLDEFAULT}='${CC}'"
90     echo -e "${COLBLUE}*** ${COLGREEN} CXX${COLDEFAULT}='${CXX}'"
91     echo -e "${COLBLUE}*** ${COLGREEN} ABI_LIBDIR${COLDEFAULT}='${ABI_LIBDIR}'"
92     if [[ ${EXPORT_ABI_LDFLAGS} != false ]]
93     then
94     echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${LDFLAGS}'"
95     else
96     echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'"
97     fi
98 niro 11525 echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'"
99     echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'"
100 niro 8334 echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'"
101 niro 307 fi
102 niro 2
103     # configure a linux32 emulated build
104     if [[ ${EMUL_LINUX_32} = true ]]
105     then
106 niro 8334 if [[ ${MULTILIB_VERBOSE} = true ]]
107     then
108     echo -e "${COLBLUE}*** ${COLGREEN} EMUL_LINUX_32${COLDEFAULT}='${EMUL_LINUX_32}'"
109     fi
110 niro 2 uname(){ linux32 uname $@; } && export -f uname
111 niro 11830 local orig_chost="${CHOST}" && export CHOST="i686-pc-linux-gnu"
112 niro 2 fi
113 niro 8334 if [[ ${MULTILIB_VERBOSE} = true ]]
114     then
115     echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'"
116     fi
117 niro 2
118     # run any given command
119 niro 13974 eval $@ || die
120 niro 2
121 niro 11300 unset ABI CC CXX ABI_LIBDIR
122 niro 5371 # keep pkgconfig clean
123     export PKG_CONFIG_PATH="${orig_pkg_config_path}"
124 niro 11300 export LDFLAGS="${saved_ldflags}"
125 niro 2
126     # restore original settings
127     if [[ ${EMUL_LINUX_32} = true ]]
128     then
129     unset uname
130 niro 11830 export CHOST="${orig_chost}" && unset orig_chost
131 niro 2 fi
132     }
133    
134     abi-m64()
135     {
136     export ABI="m64"
137     export CC="gcc -${ABI}"
138     export CXX="g++ -${ABI}"
139     export ABI_LIBDIR="lib64"
140 niro 307 if [[ ${EXPORT_ABI_LDFLAGS} != false ]]
141     then
142 niro 11300 local saved_ldflags="${LDFLAGS}"
143 niro 307 export LDFLAGS="-L/${ABI_LIBDIR} -L/usr/${ABI_LIBDIR}"
144     fi
145 niro 5371 # keep pkgconfig clean
146     local orig_pkg_config_path="${PKG_CONFIG_PATH}"
147     export PKG_CONFIG_PATH="/usr/${ABI_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}"
148 niro 2
149 niro 8334 if [[ ${MULTILIB_VERBOSE} = true ]]
150 niro 307 then
151 niro 8334 echo -e "${COLBLUE}*** ${COLGREEN}running with -${ABI} ABI${COLDEFAULT}"
152     echo -e "${COLBLUE}*** ${COLGREEN} ABI${COLDEFAULT}='${ABI}'"
153     echo -e "${COLBLUE}*** ${COLGREEN} CC${COLDEFAULT}='${CC}'"
154     echo -e "${COLBLUE}*** ${COLGREEN} CXX${COLDEFAULT}='${CXX}'"
155     echo -e "${COLBLUE}*** ${COLGREEN} ABI_LIBDIR${COLDEFAULT}='${ABI_LIBDIR}'"
156     if [[ ${EXPORT_ABI_LDFLAGS} != false ]]
157     then
158     echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${LDFLAGS}'"
159     else
160     echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'"
161     fi
162     echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'"
163 niro 11525 echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'"
164 niro 8334 echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'"
165 niro 307 fi
166 niro 2
167     # run any given command
168     eval $@ || die
169    
170 niro 11300 unset ABI CC CXX ABI_LIBDIR
171 niro 5371 # keep pkgconfig clean
172     export PKG_CONFIG_PATH="${orig_pkg_config_path}"
173 niro 11300 export LDFLAGS="${saved_ldflags}"
174 niro 2 }
175    
176     only-m32()
177     {
178     local abi=m32
179     local i
180    
181     for i in ${MULTILIB_ABIS}
182     do
183     if [[ ${i} = ${abi} ]]
184     then
185     # export this for mpatch etc (to repect only-${abi})
186     export MULTILIB_ONLY_ABI=${abi}
187    
188 niro 29792 if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
189     then
190     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
191     fi
192 niro 2 abi-${abi} $@ || die
193    
194     # unset this is very important
195     unset MULTILIB_ONLY_ABI
196     fi
197     done
198     }
199    
200     only-m64()
201     {
202     local abi=m64
203     local i
204    
205     for i in ${MULTILIB_ABIS}
206     do
207     if [[ ${i} = ${abi} ]]
208     then
209     # export this for mpatch etc (to repect only-${abi})
210     export MULTILIB_ONLY_ABI=${abi}
211    
212 niro 29792 if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
213     then
214     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
215     fi
216 niro 2 abi-${abi} $@ || die
217    
218     # unset this is very important
219     unset MULTILIB_ONLY_ABI
220     fi
221     done
222     }
223    
224     all-abis()
225     {
226     local abi
227     for abi in ${MULTILIB_ABIS}
228     do
229 niro 29792 if [[ ${ABI_DO_NOT_ENTER_SRCDIR} != true ]]
230     then
231     cd ${SRCDIR}-${abi}/${SRCSUBDIR}
232     fi
233 niro 2 abi-${abi} $@ || die
234     done
235     }
236    
237 niro 6346 mabi()
238     {
239     echo \${ABI}
240     }
241    
242 niro 11825 mabi-cc()
243     {
244 niro 20903 echo "gcc -\${ABI}"
245 niro 11825 }
246    
247     mabi-cxx()
248     {
249 niro 20903 echo "g++ -\${ABI}"
250 niro 11825 }
251    
252 niro 11828 mabi-cflags()
253     {
254 niro 20903 echo "\${CFLAGS}"
255 niro 11828 }
256    
257     mabi-cxxflags()
258     {
259 niro 20903 echo "\${CXXFLAGS}"
260 niro 11828 }
261    
262     mabi-ldflags()
263     {
264 niro 20903 echo "\${LDFLAGS}"
265 niro 11828 }
266    
267 niro 2 ##
268     # multilib compile functions
269     ##
270    
271 niro 3671 if [[ ! -z $(typeset -f mconfigure) ]]
272     then
273     # rename the old one
274     old_mconfigure=old$(typeset -f mconfigure)
275 niro 4783 eval "${old_mconfigure}"
276 niro 20987
277 niro 2 mconfigure()
278     {
279     local abi
280     local abis_to_run="${MULTILIB_ABIS}"
281    
282     # respect MULTILIB_ONLY_ABI variable
283     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
284    
285     for abi in ${abis_to_run}
286     do
287 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
288 niro 2 abi-${abi} oldmconfigure $@ || die
289     done
290     }
291 niro 20987 fi
292 niro 2
293 niro 4780 if [[ ! -z $(typeset -f cmake_configure) ]]
294     then
295     # rename the old one
296     old_cmake_configure=old$(typeset -f cmake_configure)
297 niro 4783 eval "${old_cmake_configure}"
298 niro 20987
299 niro 4780 cmake_configure()
300     {
301     local abi
302     local abis_to_run="${MULTILIB_ABIS}"
303    
304     # respect MULTILIB_ONLY_ABI variable
305     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
306    
307     local saved_SRCDIR="${SRCDIR}"
308     for abi in ${abis_to_run}
309     do
310     SRCDIR="${saved_SRCDIR}-${abi}"
311 niro 21293 # honor inside and outside build-dir builds
312     if [ -d ${BUILDDIR}/build-${abi} ]
313     then
314     cd ${BUILDDIR}/build-${abi}
315     else
316 niro 22068 cd ${SRCDIR}
317 niro 21293 fi
318 niro 4780 abi-${abi} oldcmake_configure $@ || die
319     done
320 niro 9367 # restore SRCDIR
321     SRCDIR="${saved_SRCDIR}"
322 niro 4780 }
323 niro 20987 fi
324 niro 4780
325 niro 20977 if [[ ! -z $(typeset -f cmake_src_compile) ]]
326     then
327     # rename the old one
328     old_cmake_src_compile=old$(typeset -f cmake_src_compile)
329     eval "${old_cmake_src_compile}"
330 niro 20987
331 niro 20977 cmake_src_compile()
332     {
333     local abi
334     local abis_to_run="${MULTILIB_ABIS}"
335    
336     # respect MULTILIB_ONLY_ABI variable
337     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
338    
339     for abi in ${abis_to_run}
340     do
341     # remove build dir if exist
342     [[ -d ${BUILDDIR}/build-${abi} ]] && rm -rf ${BUILDDIR}/build-${abi}
343    
344     # build outside of the source dir
345     install -d ${BUILDDIR}/build-${abi} || die
346     cd ${BUILDDIR}/build-${abi}
347     done
348    
349     cmake_configure || die
350    
351     for abi in ${abis_to_run}
352     do
353     cd ${BUILDDIR}/build-${abi}
354     abi-${abi} oldmmake $@ || die
355     done
356     }
357 niro 20987 fi
358 niro 20977
359 niro 20978 if [[ ! -z $(typeset -f cmake_src_check) ]]
360     then
361     # rename the old one
362     old_cmake_src_check=old$(typeset -f cmake_src_check)
363     eval "${old_cmake_check}"
364 niro 20987
365 niro 20978 cmake_src_check()
366     {
367     local abi
368     local abis_to_run="${MULTILIB_ABIS}"
369    
370     # respect MULTILIB_ONLY_ABI variable
371     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
372    
373     for abi in ${abis_to_run}
374     do
375 niro 22066 # honor inside and outside build-dir builds
376     if [ -d ${BUILDDIR}/build-${abi} ]
377     then
378     cd ${BUILDDIR}/build-${abi}
379     else
380 niro 22067 cd ${SRCDIR}-${abi}
381 niro 22066 fi
382 niro 20978 mmake -j1 -k check || die
383     done
384     }
385 niro 20987 fi
386 niro 20978
387 niro 20977 if [[ ! -z $(typeset -f cmake_src_install) ]]
388     then
389     # rename the old one
390     old_cmake_src_install=old$(typeset -f cmake_src_install)
391     eval "${old_cmake_install}"
392 niro 20987
393 niro 20977 cmake_src_install()
394     {
395     local abi
396     local abis_to_run="${MULTILIB_ABIS}"
397    
398     # respect MULTILIB_ONLY_ABI variable
399     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
400    
401     for abi in ${abis_to_run}
402     do
403 niro 22066 # honor inside and outside build-dir builds
404     if [ -d ${BUILDDIR}/build-${abi} ]
405     then
406     cd ${BUILDDIR}/build-${abi}
407     else
408 niro 22067 cd ${SRCDIR}-${abi}
409 niro 22066 fi
410 niro 20977 abi-${abi} oldmmake DESTDIR=${BINDIR} $@ install || die
411     done
412     }
413 niro 20987 fi
414 niro 20977
415 niro 3671 if [[ ! -z $(typeset -f munpack) ]]
416     then
417     # rename the old one
418     old_munpack=old$(typeset -f munpack)
419     eval "${old_munpack}"
420 niro 20987
421 niro 2 munpack()
422     {
423     local abi
424     local abis_to_run="${MULTILIB_ABIS}"
425    
426     # respect MULTILIB_ONLY_ABI variable
427     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
428    
429     for abi in ${abis_to_run}
430     do
431     echo -e "${COLBLUE}*** ${COLGREEN}unpacking for ABI -${abi}${COLDEFAULT}"
432 niro 13488 oldmunpack $@ || die
433 niro 2 mv ${SRCDIR} ${SRCDIR}-${abi} || die
434     done
435     }
436 niro 20987 fi
437 niro 2
438 niro 3671 if [[ ! -z $(typeset -f mmake) ]]
439     then
440     # rename the old one
441     old_mmake=old$(typeset -f mmake)
442     eval "${old_mmake}"
443 niro 20987
444 niro 2 mmake()
445     {
446     local abi
447     local abis_to_run="${MULTILIB_ABIS}"
448    
449     # respect MULTILIB_ONLY_ABI variable
450     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
451    
452     for abi in ${abis_to_run}
453     do
454     echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}"
455 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
456 niro 2 abi-${abi} oldmmake $@ || die
457     done
458     }
459 niro 20987 fi
460 niro 2
461 niro 3671 if [[ ! -z $(typeset -f minstall) ]]
462     then
463     # rename the old one
464     old_minstall=old$(typeset -f minstall)
465     eval "${old_minstall}"
466 niro 20987
467 niro 2 minstall()
468     {
469     local abi
470     local abis_to_run="${MULTILIB_ABIS}"
471    
472     # respect MULTILIB_ONLY_ABI variable
473     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
474    
475     for abi in ${abis_to_run}
476     do
477     echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}"
478 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
479 niro 2 abi-${abi} oldminstall $@ || die
480     done
481     }
482 niro 20987 fi
483 niro 2
484     minstall_destdir()
485     {
486     local abi
487     local abis_to_run="${MULTILIB_ABIS}"
488    
489     # respect MULTILIB_ONLY_ABI variable
490     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
491    
492     for abi in ${abis_to_run}
493     do
494     echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}"
495 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
496 niro 2 make DESTDIR=${BINDIR} $@ install || die
497     done
498     }
499    
500 niro 3671 if [[ ! -z $(typeset -f mpatch) ]]
501     then
502     # rename the old one
503     old_mpatch=old$(typeset -f mpatch)
504     eval "${old_mpatch}"
505 niro 20987
506 niro 2 mpatch()
507     {
508     local abi
509     local abis_to_run="${MULTILIB_ABIS}"
510    
511     # respect MULTILIB_ONLY_ABI variable
512     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
513    
514     for abi in ${abis_to_run}
515     do
516     echo -e "${COLBLUE}*** ${COLGREEN}appling patch for ABI -${abi}${COLDEFAULT}"
517 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
518 niro 2 oldmpatch $@ || die
519     done
520     }
521 niro 20987 fi
522 niro 2
523 niro 3671 if [[ ! -z $(typeset -f mlibtoolize) ]]
524     then
525     # rename the old one
526     old_mlibtoolize=old$(typeset -f mlibtoolize)
527     eval "${old_mlibtoolize}"
528 niro 20987
529 niro 2 mlibtoolize()
530     {
531     local abi
532     local abis_to_run="${MULTILIB_ABIS}"
533    
534     # respect MULTILIB_ONLY_ABI variable
535     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
536    
537     for abi in ${abis_to_run}
538     do
539     echo -e "${COLBLUE}*** ${COLGREEN}running mlibtoolize for ABI -${abi}${COLDEFAULT}"
540 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
541 niro 2 oldmlibtoolize $@ || die
542     done
543     }
544 niro 20987 fi
545 niro 2
546 niro 9334 if [[ ! -z $(typeset -f mautoreconf) ]]
547     then
548     # rename the old one
549     old_mautoreconf=old$(typeset -f mautoreconf)
550     eval "${old_mautoreconf}"
551 niro 20987
552 niro 9334 mautoreconf()
553     {
554     local abi
555     local abis_to_run="${MULTILIB_ABIS}"
556    
557     # respect MULTILIB_ONLY_ABI variable
558     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
559    
560     for abi in ${abis_to_run}
561     do
562     echo -e "${COLBLUE}*** ${COLGREEN}running mautoreconf for ABI -${abi}${COLDEFAULT}"
563 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
564 niro 9334 oldmautoreconf $@ || die
565     done
566     }
567 niro 20987 fi
568 niro 9334
569 niro 9333 if [[ ! -z $(typeset -f minstalldocs) ]]
570     then
571     # rename the old one
572     old_minstalldocs=old$(typeset -f minstalldocs)
573     eval "${old_minstalldocs}"
574 niro 20987
575 niro 2 minstalldocs()
576     {
577     local abi
578     local docfiles
579    
580     local abis_to_run="${MULTILIB_ABIS}"
581    
582     # respect MULTILIB_ONLY_ABI variable
583     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
584    
585     for abi in ${abis_to_run}
586     do
587 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
588 niro 9756 oldminstalldocs $@ || die
589 niro 2 done
590     }
591 niro 20987 fi
592 niro 2
593     ##
594     # multilib mbuild wrappers
595     ##
596     multilib_src_prepare()
597     {
598 niro 20903 munpack ${SRCFILE} || die
599 niro 2 }
600    
601     multilib_src_compile()
602     {
603 niro 20977 if [[ ! -z $(typeset -f cmake_src_compile) ]]
604     then
605     cmake_src_compile || die
606     else
607     mconfigure || die
608     mmake || die
609     fi
610 niro 2 }
611    
612 niro 9902 multilib_src_check()
613     {
614 niro 20977 if [[ ! -z $(typeset -f cmake_src_check) ]]
615     then
616     cmake_src_check || die
617     else
618     mmake -j1 -k check || die
619     fi
620 niro 9902 }
621    
622 niro 2 multilib_src_install()
623     {
624 niro 20977 if [[ ! -z $(typeset -f cmake_src_install) ]]
625     then
626 niro 20980 cmake_src_install || die
627 niro 20977 else
628     mmake DESTDIR=${BINDIR} install || die
629     fi
630 niro 2
631     local i
632     for abi in ${MULTILIB_ABIS}
633     do
634 niro 11522 cd ${SRCDIR}-${abi}/${SRCSUBDIR}
635 niro 2 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
636     FAQ LICENSE NEWS README TODO
637     do
638     if [ -f ${SRCDIR}-${abi}/${i} ]
639     then
640     minstalldocs ${i} || die
641     fi
642     done
643     done
644     }
645    
646 niro 9902 export_inherits multilib src_prepare src_compile src_check src_install