/[gentoo-x86]/eclass/bsdmk.eclass
Gentoo

Contents of /eclass/bsdmk.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Apr 1 15:49:11 2006 UTC (8 years, 5 months ago) by flameeyes
Branch: MAIN
Changes since 1.1: +9 -4 lines
Change depend to avoid using userland_BSD, don't use -Wl,-z,now but rather bindnow-flags for portability.

1 # Copyright 1999-2004 Gentoo Foundation
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 $
4 #
5 # Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org>
6 # Diego Pettenò <flameeyes@gentoo.org>
7 # Benigno B. Junior <bbj@gentoo.org>
8
9 inherit toolchain-funcs portability flag-o-matic
10
11 EXPORT_FUNCTIONS src_compile src_install
12
13 RDEPEND=""
14 # this should actually be BDEPEND, but this works.
15 DEPEND="|| (
16 sys-devel/pmake
17 sys-freebsd/freebsd-ubin
18 sys-openbsd/openbsd-ubin
19 )"
20
21 #### append-opt <options>
22 # append options to enable or disable features
23 #
24 ###########################################################################
25 append-opt() {
26 mymakeopts="${mymakeopts} $@"
27 }
28
29 #### mkmake <options>
30 # calls bsd-make command with the given options, passing ${mymakeopts} to
31 # enable ports to useflags bridge.
32 #
33 ###########################################################################
34 mkmake() {
35 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
36
37 tc-export CC CXX LD RANLIB
38
39 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= "$@"
40 }
41
42 mkinstall() {
43 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
44
45 ${BMAKE} ${mymakeopts} NO_WERROR= DESTDIR="${D}" "$@" install
46 }
47
48 #### dummy_mk <dirnames>
49 # removes the specified subdirectories and creates a dummy makefile in them
50 # useful to remove the need for "minimal" patches
51 #
52 ############################################################################
53 dummy_mk() {
54 for dir in $@; do
55 echo ".include <bsd.lib.mk>" > ${dir}/Makefile
56 done
57 }
58
59 #### fix_lazy_bindings <dirnames>
60 # set LDFLAGS in order to fix lazy binding warnings in binaries
61 #
62 ############################################################################
63 fix_lazy_bindings() {
64 for dir in $@; do
65 echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile
66 done
67 }
68
69 bsdmk_src_compile() {
70 cd ${S}
71 mkmake || die "make failed"
72 }
73
74 bsdmk_src_install() {
75 cd ${S}
76 mkinstall || die "install failed"
77 }

  ViewVC Help
Powered by ViewVC 1.1.20