| 1 |
# Copyright 1999-2006 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header$
|
| 4 |
#
|
| 5 |
# Karol Pasternak, <reb@gentoo.org>
|
| 6 |
|
| 7 |
inherit versionator eutils flag-o-matic bsdmk
|
| 8 |
|
| 9 |
ECLASS=openbsd
|
| 10 |
INHERITED="$INHERITED $ECLASS"
|
| 11 |
|
| 12 |
KEYWORDS="~x86-obsd"
|
| 13 |
LICENSE="BSD"
|
| 14 |
HOMEPAGE="http://www.openbsd.org/"
|
| 15 |
|
| 16 |
# Define global package names
|
| 17 |
LIB="openbsd-lib-${PV}"
|
| 18 |
BIN="openbsd-bin-${PV}"
|
| 19 |
SHARE="openbsd-share-${PV}"
|
| 20 |
UBIN="openbsd-ubin-${PV}"
|
| 21 |
USBIN="openbsd-usbin-${PV}"
|
| 22 |
HEADERS="openbsd-headers-${PV}"
|
| 23 |
LIBEXEC="openbsd-libexec-${PV}"
|
| 24 |
SBIN="openbsd-sbin-${PV}"
|
| 25 |
GNU="openbsd-gnu-${PV}"
|
| 26 |
ETC="openbsd-etc-${PV}"
|
| 27 |
SYS="openbsd-sys-${PV}"
|
| 28 |
INCLUDE="openbsd-include-${PV}"
|
| 29 |
|
| 30 |
#### mkmake <options>
|
| 31 |
# calls bsd-make command with the given options, passing ${mymakeopts} to
|
| 32 |
# enable ports to useflags bridge.
|
| 33 |
# ( using default openbsd make )
|
| 34 |
###########################################################################
|
| 35 |
|
| 36 |
mkmake() {
|
| 37 |
[[ -z ${DMAKE} ]] && DMAKE="/usr/bin/make"
|
| 38 |
|
| 39 |
tc-export CC CXX LD
|
| 40 |
|
| 41 |
${DMAKE} ${MAKEOPTS} ${EXTRA_EMAKE} ${mymakeopts} NO_WERROR= "$@"
|
| 42 |
}
|
| 43 |
|
| 44 |
mkinstall() {
|
| 45 |
[[ -z ${DMAKE} ]] && DMAKE="/usr/bin/make"
|
| 46 |
|
| 47 |
${DMAKE} ${mymakeopts} NO_WERROR= DESTDIR="${D}" "$@" install
|
| 48 |
}
|
| 49 |
|
| 50 |
##########################################################################
|
| 51 |
|
| 52 |
# Release version
|
| 53 |
RV="$(get_version_component_range 1-2)"
|
| 54 |
|
| 55 |
EXPORT_FUNCTIONS src_compile src_install src_unpack
|
| 56 |
|
| 57 |
IUSE="profile"
|
| 58 |
|
| 59 |
openbsd_src_unpack() {
|
| 60 |
unpack ${A}
|
| 61 |
cd ${S}
|
| 62 |
|
| 63 |
dummy_mk ${REMOVE_SUBDIRS}
|
| 64 |
}
|
| 65 |
|
| 66 |
openbsd_src_compile() {
|
| 67 |
use profile && filter-flags "-fomit-frame-pointer"
|
| 68 |
use profile || mymakeopts="${mymakeopts} NOPROFILE= "
|
| 69 |
|
| 70 |
bsdmk_src_compile
|
| 71 |
}
|
| 72 |
|
| 73 |
openbsd_src_install() {
|
| 74 |
use profile || mymakeopts="${mymakeopts} NOPROFILE= "
|
| 75 |
|
| 76 |
bsdmk_src_install
|
| 77 |
}
|