| 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.1 2006/04/01 15:24:18 flameeyes Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.2 2006/04/01 15:49:11 flameeyes 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 | |
| 9 | inherit toolchain-funcs portability |
9 | inherit toolchain-funcs portability flag-o-matic |
| 10 | |
10 | |
| 11 | EXPORT_FUNCTIONS src_compile src_install |
11 | EXPORT_FUNCTIONS src_compile src_install |
| 12 | |
12 | |
|
|
13 | RDEPEND="" |
| 13 | # this should actually be BDEPEND, but this works. |
14 | # this should actually be BDEPEND, but this works. |
| 14 | DEPEND="!userland_BSD? ( sys-devel/pmake )" |
15 | DEPEND="|| ( |
|
|
16 | sys-devel/pmake |
|
|
17 | sys-freebsd/freebsd-ubin |
|
|
18 | sys-openbsd/openbsd-ubin |
|
|
19 | )" |
| 15 | |
20 | |
| 16 | #### append-opt <options> |
21 | #### append-opt <options> |
| 17 | # append options to enable or disable features |
22 | # append options to enable or disable features |
| 18 | # |
23 | # |
| 19 | ########################################################################### |
24 | ########################################################################### |
| … | |
… | |
| 55 | # set LDFLAGS in order to fix lazy binding warnings in binaries |
60 | # set LDFLAGS in order to fix lazy binding warnings in binaries |
| 56 | # |
61 | # |
| 57 | ############################################################################ |
62 | ############################################################################ |
| 58 | fix_lazy_bindings() { |
63 | fix_lazy_bindings() { |
| 59 | for dir in $@; do |
64 | for dir in $@; do |
| 60 | echo "LDFLAGS+= -Wl,-z,now" >> ${dir}/Makefile |
65 | echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile |
| 61 | done |
66 | done |
| 62 | } |
67 | } |
| 63 | |
68 | |
| 64 | bsdmk_src_compile() { |
69 | bsdmk_src_compile() { |
| 65 | cd ${S} |
70 | cd ${S} |