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

Diff of /eclass/bsdmk.eclass

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

Revision 1.1 Revision 1.6
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.1 2006/04/01 15:24:18 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.6 2006/11/21 14:28:31 flameeyes Exp $
4# 4#
5# Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org> 5# Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org>
6# Diego Pettenò <flameeyes@gentoo.org> 6# Diego Pettenò <flameeyes@gentoo.org>
7# Benigno B. Junior <bbj@gentoo.org> 7# Benigno B. Junior <bbj@gentoo.org>
8 8
9inherit toolchain-funcs portability 9inherit toolchain-funcs portability flag-o-matic
10 10
11EXPORT_FUNCTIONS src_compile src_install 11EXPORT_FUNCTIONS src_compile src_install
12 12
13RDEPEND=""
13# this should actually be BDEPEND, but this works. 14# this should actually be BDEPEND, but this works.
14DEPEND="!userland_BSD? ( sys-devel/pmake )" 15DEPEND="virtual/pmake"
16
17ESED="/usr/bin/sed"
15 18
16#### append-opt <options> 19#### append-opt <options>
17# append options to enable or disable features 20# append options to enable or disable features
18# 21#
19########################################################################### 22###########################################################################
29mkmake() { 32mkmake() {
30 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" 33 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
31 34
32 tc-export CC CXX LD RANLIB 35 tc-export CC CXX LD RANLIB
33 36
34 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= "$@" 37 ${BMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= STRIP= "$@"
35} 38}
36 39
37mkinstall() { 40mkinstall() {
38 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)" 41 [[ -z ${BMAKE} ]] && BMAKE="$(get_bmake)"
39 42
43 # STRIP= will replace the default value of -s, leaving to portage the
44 # task of stripping executables.
40 ${BMAKE} ${mymakeopts} NO_WERROR= DESTDIR="${D}" "$@" install 45 ${BMAKE} ${mymakeopts} NO_WERROR= STRIP= DESTDIR="${D}" "$@" install
41} 46}
42 47
43#### dummy_mk <dirnames> 48#### dummy_mk <dirnames>
44# removes the specified subdirectories and creates a dummy makefile in them 49# removes the specified subdirectories and creates a dummy makefile in them
45# useful to remove the need for "minimal" patches 50# useful to remove the need for "minimal" patches
55# set LDFLAGS in order to fix lazy binding warnings in binaries 60# set LDFLAGS in order to fix lazy binding warnings in binaries
56# 61#
57############################################################################ 62############################################################################
58fix_lazy_bindings() { 63fix_lazy_bindings() {
59 for dir in $@; do 64 for dir in $@; do
60 echo "LDFLAGS+= -Wl,-z,now" >> ${dir}/Makefile 65 echo "LDFLAGS+= $(bindnow-flags)" >> ${dir}/Makefile
61 done 66 done
62} 67}
63 68
64bsdmk_src_compile() { 69bsdmk_src_compile() {
65 cd ${S}
66 mkmake || die "make failed" 70 mkmake || die "make failed"
67} 71}
68 72
69bsdmk_src_install() { 73bsdmk_src_install() {
70 cd ${S}
71 mkinstall || die "install failed" 74 mkinstall || die "install failed"
72} 75}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20