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

Diff of /eclass/bsdmk.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.9
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2008 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.8 2007/07/23 05:19:00 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.9 2008/08/08 21:16:24 aballier Exp $
4# 4
5# @ECLASS: bsdmk.eclass
6# @MAINTAINER:
5# Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org> 7# Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org>
6# Diego Pettenò <flameeyes@gentoo.org> 8# Diego Pettenò <flameeyes@gentoo.org>
7# Benigno B. Junior <bbj@gentoo.org> 9# Benigno B. Junior <bbj@gentoo.org>
10# @BLURB: Some functions for BSDmake
8 11
9inherit toolchain-funcs portability flag-o-matic 12inherit toolchain-funcs portability flag-o-matic
10 13
11EXPORT_FUNCTIONS src_compile src_install 14EXPORT_FUNCTIONS src_compile src_install
12 15
14# this should actually be BDEPEND, but this works. 17# this should actually be BDEPEND, but this works.
15DEPEND="virtual/pmake" 18DEPEND="virtual/pmake"
16 19
17ESED="/usr/bin/sed" 20ESED="/usr/bin/sed"
18 21
19#### append-opt <options> 22# @ECLASS-VARIABLE: mymakeopts
23# @DESCRIPTION:
24# Options for bsd-make
25
26# @FUNCTION: append-opt
27# @USAGE: < options >
28# @DESCRIPTION:
20# append options to enable or disable features 29# append options to enable or disable features
21#
22###########################################################################
23append-opt() { 30append-opt() {
24 mymakeopts="${mymakeopts} $@" 31 mymakeopts="${mymakeopts} $@"
25} 32}
26 33
27#### mkmake <options> 34# @FUNCTION: mkmake
35# @USAGE: [ options ]
36# @DESCRIPTION:
28# calls bsd-make command with the given options, passing ${mymakeopts} to 37# calls bsd-make command with the given options, passing ${mymakeopts} to
29# enable ports to useflags bridge. 38# enable ports to useflags bridge.
30#
31###########################################################################
32mkmake() { 39mkmake() {
33 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" 40 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
34 41
35 tc-export CC CXX LD RANLIB 42 tc-export CC CXX LD RANLIB
36 43
37 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@" 44 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
38} 45}
39 46
47# @FUNCTION: mkinstall
48# @USAGE: [ options ]
49# @DESCRIPTION:
50# Calls "bsd-make install" with the given options, passing ${mamakeopts} to
51# enable ports to useflags bridge
40mkinstall() { 52mkinstall() {
41 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" 53 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
42 54
43 # STRIP= will replace the default value of -s, leaving to portage the 55 # STRIP= will replace the default value of -s, leaving to portage the
44 # task of stripping executables. 56 # task of stripping executables.
45 ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install 57 ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= MANSUBDIR= DESTDIR="${D}" "$@" install
46} 58}
47 59
48#### dummy_mk <dirnames> 60# @FUNCTION: dummy_mk
61# @USAGE: < dirnames >
62# @DESCRIPTION:
49# removes the specified subdirectories and creates a dummy makefile in them 63# removes the specified subdirectories and creates a dummy makefile in them
50# useful to remove the need for "minimal" patches 64# useful to remove the need for "minimal" patches
51#
52############################################################################
53dummy_mk() { 65dummy_mk() {
54 for dir in $@; do 66 for dir in $@; do
55 echo ".include <bsd.lib.mk>" > ${dir}/Makefile 67 echo ".include <bsd.lib.mk>" > ${dir}/Makefile
56 done 68 done
57} 69}
58 70
71# @FUNCTION: bsdmk_src_compile
72# @DESCRIPTION:
73# The bsdmk src_compile function, which is exported
59bsdmk_src_compile() { 74bsdmk_src_compile() {
60 mkmake || die "make failed" 75 mkmake || die "make failed"
61} 76}
62 77
78# @FUNCTION: bsdmk_src_install
79# @DESCRIPTION:
80# The bsdmk src_install function, which is exported
63bsdmk_src_install() { 81bsdmk_src_install() {
64 mkinstall || die "install failed" 82 mkinstall || die "install failed"
65} 83}

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20