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

Contents of /eclass/bsdmk.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Tue Apr 25 16:35:47 2006 UTC (8 years, 3 months ago) by flameeyes
Branch: MAIN
Changes since 1.4: +2 -6 lines
Use virtual/pmake instead of specifying all the possible packages.

1 flameeyes 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 flameeyes 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.4 2006/04/22 21:14:50 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.5 DEPEND="virtual/pmake"
16 flameeyes 1.1
17 flameeyes 1.4 ESED="/usr/bin/sed"
18    
19 flameeyes 1.1 #### append-opt <options>
20     # append options to enable or disable features
21     #
22     ###########################################################################
23     append-opt() {
24     mymakeopts="${mymakeopts} $@"
25     }
26    
27     #### mkmake <options>
28     # calls bsd-make command with the given options, passing ${mymakeopts} to
29     # enable ports to useflags bridge.
30     #
31     ###########################################################################
32     mkmake() {
33     [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
34    
35     tc-export CC CXX LD RANLIB
36    
37     ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= "$@"
38     }
39    
40     mkinstall() {
41     [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
42    
43     ${BMAKE} ${mymakeopts} NO_WERROR= DESTDIR="${D}" "$@" install
44     }
45    
46     #### dummy_mk <dirnames>
47     # removes the specified subdirectories and creates a dummy makefile in them
48     # useful to remove the need for "minimal" patches
49     #
50     ############################################################################
51     dummy_mk() {
52     for dir in $@; do
53     echo ".include <bsd.lib.mk>" > ${dir}/Makefile
54     done
55     }
56    
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 flameeyes 1.2 echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile
64 flameeyes 1.1 done
65     }
66    
67     bsdmk_src_compile() {
68     mkmake || die "make failed"
69     }
70    
71     bsdmk_src_install() {
72     mkinstall || die "install failed"
73     }

  ViewVC Help
Powered by ViewVC 1.1.20