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

Contents of /eclass/bsdmk.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Mon Jul 23 05:19:00 2007 UTC (7 years ago) by vapier
Branch: MAIN
Changes since 1.7: +1 -11 lines
bindnow-flags is going away, so punt fix_lazy_bindings since no one is using it

1 flameeyes 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.8 # $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.7 2006/12/01 02:58:32 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 flameeyes 1.6 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
38 flameeyes 1.1 }
39    
40     mkinstall() {
41     [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
42    
43 flameeyes 1.6 # STRIP= will replace the default value of -s, leaving to portage the
44     # task of stripping executables.
45 flameeyes 1.7 ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install
46 flameeyes 1.1 }
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     bsdmk_src_compile() {
60     mkmake || die "make failed"
61     }
62    
63     bsdmk_src_install() {
64     mkinstall || die "install failed"
65     }

  ViewVC Help
Powered by ViewVC 1.1.20