summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2006-12-20 19:44:13 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2006-12-20 19:44:13 +0000
commitb382c284c53b110c9e980ccce599794d8eb275f2 (patch)
tree0380203851a4db105e2a8249e906acd595eebd46 /sys-fs/dazuko
parentrevbump (diff)
downloadgentoo-2-b382c284c53b110c9e980ccce599794d8eb275f2.tar.gz
gentoo-2-b382c284c53b110c9e980ccce599794d8eb275f2.tar.bz2
gentoo-2-b382c284c53b110c9e980ccce599794d8eb275f2.zip
fbsd support, closes bug#158647, thanks for Timothy Redaelli
(Portage version: 2.1.1-r2)
Diffstat (limited to 'sys-fs/dazuko')
-rw-r--r--sys-fs/dazuko/ChangeLog5
-rw-r--r--sys-fs/dazuko/dazuko-2.3.2-r2.ebuild51
2 files changed, 43 insertions, 13 deletions
diff --git a/sys-fs/dazuko/ChangeLog b/sys-fs/dazuko/ChangeLog
index f24c9517944d..6c431cfdbae3 100644
--- a/sys-fs/dazuko/ChangeLog
+++ b/sys-fs/dazuko/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-fs/dazuko
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/ChangeLog,v 1.14 2006/12/18 16:49:42 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/ChangeLog,v 1.15 2006/12/20 19:44:13 alonbl Exp $
+
+ 20 Dec 2006; Alon Bar-Lev <alonbl@gentoo.org> dazuko-2.3.2-r2.ebuild:
+ fbsd support, closes bug#158647, thanks for Timothy Redaelli
18 Dec 2006; Jeroen Roovers <jer@gentoo.org> dazuko-2.3.2-r2.ebuild:
Marked ~hppa (bug #151630).
diff --git a/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild b/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild
index dc92d6d8f7f1..a460e8d4ffc2 100644
--- a/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild
+++ b/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild
@@ -1,8 +1,7 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild,v 1.2 2006/12/18 16:49:42 jer Exp $
-
-inherit linux-mod
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild,v 1.3 2006/12/20 19:44:13 alonbl Exp $
+inherit linux-mod toolchain-funcs flag-o-matic
DESCRIPTION="Linux kernel module and interface providing file access control"
MY_P="${P/_/-}" # for -preN versions
@@ -11,9 +10,10 @@ SRC_URI="http://www.dazuko.org/files/${MY_P}.tar.gz
HOMEPAGE="http://www.dazuko.org"
LICENSE="GPL-2 BSD"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE=""
-DEPEND=">=virtual/linux-sources-2.2"
+DEPEND="kernel_linux? ( >=virtual/linux-sources-2.2 )"
+RDEPEND=${DEPEND}
S="${WORKDIR}/${MY_P}"
# kernel settings
@@ -21,32 +21,51 @@ CONFIG_CHECK="SECURITY_CAPABILITIES"
MODULE_NAMES="dazuko(misc:)"
BUILD_TARGETS="dummy_rule"
+pkg_setup() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_setup
+}
+
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${PN}-2.3.1-suspend2.patch"
- if kernel_is 2 6 19; then
+ if [ "${KERNEL}" == "linux" ] && kernel_is 2 6 19; then
epatch "${WORKDIR}/${P}-linux-2.6.19.patch"
fi
}
src_compile() {
+ if [ "${KERNEL}" = "FreeBSD" ]; then
+ KERNEL_DIR=/usr/src/sys
+ KBUILD_OUTPUT=/boot/modules
+ MAKE=make
+ fi
./configure \
--without-dep \
--kernelsrcdir="${KERNEL_DIR}" \
--kernelobjdir="${KBUILD_OUTPUT}" \
|| die "configure failed"
- convert_to_m Makefile
- linux-mod_src_compile
- cd library
- emake || die
- cd ..
+ if [ "${KERNEL}" = "linux" ]; then
+ convert_to_m Makefile
+ linux-mod_src_compile
+ else
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ fi
+
+ emake -C library CC="$(tc-getCC)" || die
}
src_install() {
- linux-mod_src_install
+ if [ "${KERNEL}" = "linux" ]; then
+ linux-mod_src_install
+ else
+ insinto /boot/modules
+ doins "${S}"/dazuko.kld
+ exeinto /boot/modules
+ doexe "${S}"/dazuko.ko
+ fi
dolib.a library/libdazuko.a
insinto /usr/include
@@ -58,3 +77,11 @@ src_install() {
dodoc README.trusted
}
+pkg_postinst() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_postrm
+}
+