| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.5 2006/04/25 16:35:47 flameeyes Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.8 2007/07/23 05:19:00 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org> |
5 | # Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org> |
| 6 | # Diego Pettenò <flameeyes@gentoo.org> |
6 | # Diego Pettenò <flameeyes@gentoo.org> |
| 7 | # Benigno B. Junior <bbj@gentoo.org> |
7 | # Benigno B. Junior <bbj@gentoo.org> |
| 8 | |
8 | |
| … | |
… | |
| 32 | mkmake() { |
32 | mkmake() { |
| 33 | [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" |
33 | [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" |
| 34 | |
34 | |
| 35 | tc-export CC CXX LD RANLIB |
35 | tc-export CC CXX LD RANLIB |
| 36 | |
36 | |
| 37 | ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= "$@" |
37 | ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@" |
| 38 | } |
38 | } |
| 39 | |
39 | |
| 40 | mkinstall() { |
40 | mkinstall() { |
| 41 | [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" |
41 | [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" |
| 42 | |
42 | |
|
|
43 | # STRIP= will replace the default value of -s, leaving to portage the |
|
|
44 | # task of stripping executables. |
| 43 | ${BMAKE} ${mymakeopts} NO_WERROR= DESTDIR="${D}" "$@" install |
45 | ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install |
| 44 | } |
46 | } |
| 45 | |
47 | |
| 46 | #### dummy_mk <dirnames> |
48 | #### dummy_mk <dirnames> |
| 47 | # removes the specified subdirectories and creates a dummy makefile in them |
49 | # removes the specified subdirectories and creates a dummy makefile in them |
| 48 | # useful to remove the need for "minimal" patches |
50 | # useful to remove the need for "minimal" patches |
| … | |
… | |
| 52 | for dir in $@; do |
54 | for dir in $@; do |
| 53 | echo ".include <bsd.lib.mk>" > ${dir}/Makefile |
55 | echo ".include <bsd.lib.mk>" > ${dir}/Makefile |
| 54 | done |
56 | done |
| 55 | } |
57 | } |
| 56 | |
58 | |
| 57 | #### fix_lazy_bindings <dirnames> |
|
|
| 58 | # set LDFLAGS in order to fix lazy binding warnings in binaries |
|
|
| 59 | # |
|
|
| 60 | ############################################################################ |
|
|
| 61 | fix_lazy_bindings() { |
|
|
| 62 | for dir in $@; do |
|
|
| 63 | echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile |
|
|
| 64 | done |
|
|
| 65 | } |
|
|
| 66 | |
|
|
| 67 | bsdmk_src_compile() { |
59 | bsdmk_src_compile() { |
| 68 | mkmake || die "make failed" |
60 | mkmake || die "make failed" |
| 69 | } |
61 | } |
| 70 | |
62 | |
| 71 | bsdmk_src_install() { |
63 | bsdmk_src_install() { |