summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild')
-rw-r--r--sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild90
1 files changed, 90 insertions, 0 deletions
diff --git a/sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild b/sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild
new file mode 100644
index 000000000000..f03029bb21d9
--- /dev/null
+++ b/sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/win4lin-sources/win4lin-sources-2.6.5-r1.ebuild,v 1.1 2004/04/15 07:30:13 plasmaroo Exp $
+# OKV=original kernel version, KV=patched kernel version. They can be the same.
+
+inherit eutils
+
+OKV=${PV}
+KV=${PV}-win4lin-r1
+S=${WORKDIR}/linux-${OKV}
+
+ETYPE="sources"
+DESCRIPTION="Full sources for the Development Branch of the Linux kernel"
+IUSE=""
+
+SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${OKV}.tar.bz2
+ http://www.netraverse.com/member/downloads/files/mki-adapter26_1_3_4.patch
+ http://www.netraverse.com/member/downloads/files/Kernel-Win4Lin3-${OKV}.patch"
+
+HOMEPAGE="http://www.kernel.org/ http://www.netraverse.com/"
+LICENSE="GPL-2"
+SLOT="${KV}"
+KEYWORDS="~x86"
+PROVIDE="virtual/linux-sources virtual/alsa"
+
+if [ $ETYPE = "sources" ] && [ -z "`use build`" ]
+then
+ DEPEND=">=sys-devel/binutils-2.11.90.0.31"
+ RDEPEND=">=sys-libs/ncurses-5.2 dev-lang/perl
+ sys-devel/make
+ sys-apps/module-init-tools"
+fi
+
+[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include"
+
+src_unpack() {
+ cd ${WORKDIR}
+ unpack linux-${OKV}.tar.bz2
+ cd ${S}
+
+ epatch ${DISTDIR}/Kernel-Win4Lin3-${OKV}.patch || die "Error: Failed to appky Win4Lin3 patch!"
+ ebegin "Applying mki-adapter26_1_3_3.patch"
+ patch -Np1 -i ${DISTDIR}/mki-adapter26_1_3_3.patch > /dev/null 2>&1 || die "Error: Failed to apply mki-adapter patch!"
+ eend $?
+ epatch ${FILESDIR}/${P}.CAN-2004-0109.patch || die "Failed to patch CAN-2004-0109 vulnerability!"
+
+ unset ARCH
+ # Sometimes we have icky kernel symbols; this seems to get rid of them
+ make mrproper || die
+
+ # Fix silly permissions in tarball
+ cd ${WORKDIR}
+ chown -R 0:0 *
+ chmod -R a+r-w+X,u+w *
+}
+
+src_install() {
+
+ dodir /usr/src
+ echo ">>> Copying sources..."
+ mv ${WORKDIR}/linux-${OKV} ${WORKDIR}/linux-${KV}
+ mv ${WORKDIR}/* ${D}/usr/src
+
+}
+
+pkg_postinst() {
+
+ [ ! -e "${ROOT}usr/src/linux-beta" ] && ln -sf linux-${OKV} ${ROOT}/usr/src/linux-beta
+ [ ! -e "${ROOT}usr/src/linux" ] && ln -sf linux-${OKV} ${ROOT}/usr/src/linux
+ mkdir -p ${ROOT}sys
+
+ echo
+ ewarn "Please note that ptyfs support has been removed from devfs"
+ ewarn "and you have to compile it in now, or else you will get"
+ ewarn "errors when trying to open a pty. The option is:"
+ ewarn "File systems -> Pseudo filesystems -> /dev/pts filesystem."
+ echo
+ ewarn "Also, note that you must compile in support for"
+ ewarn "input devices (Input device support->Input devices),"
+ ewarn "the virtual terminal (Character Devices->Virtual terminal),"
+ ewarn "vga_console (Graphics Support->Console...->VGA text console)"
+ ewarn "and the vt_console (Character Devices->Support for console...)."
+ ewarn "Otherwise, you will get the dreaded \"Uncompressing the Kernel\""
+ ewarn "error."
+ echo
+ ewarn "PLEASE NOTE THIS IS NOT OFFICIALLY SUPPORTED BY GENTOO!"
+ sleep 5
+ echo
+
+}