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

Contents of /eclass/bsdmk.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Wed Apr 19 01:13:24 2006 UTC (8 years, 5 months ago) by flameeyes
Branch: MAIN
Changes since 1.2: +1 -3 lines
Don't forcefully enter ${S} as we might want to build in a subdir.

1 flameeyes 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 flameeyes 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.2 2006/04/01 15:49:11 flameeyes Exp $
4 flameeyes 1.1 #
5     # Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org>
6     # Diego Pettenò <flameeyes@gentoo.org>
7     # Benigno B. Junior <bbj@gentoo.org>
8    
9 flameeyes 1.2 inherit toolchain-funcs portability flag-o-matic
10 flameeyes 1.1
11     EXPORT_FUNCTIONS src_compile src_install
12    
13 flameeyes 1.2 RDEPEND=""
14 flameeyes 1.1 # this should actually be BDEPEND, but this works.
15 flameeyes 1.2 DEPEND="|| (
16     sys-devel/pmake
17     sys-freebsd/freebsd-ubin
18     sys-openbsd/openbsd-ubin
19     )"
20 flameeyes 1.1
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 flameeyes 1.2 echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile
66 flameeyes 1.1 done
67     }
68    
69     bsdmk_src_compile() {
70     mkmake || die "make failed"
71     }
72    
73     bsdmk_src_install() {
74     mkinstall || die "install failed"
75     }

  ViewVC Help
Powered by ViewVC 1.1.20