2019-05-04 11:33:12 +02:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2019-05-04 11:06:33 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2019-05-04 11:33:12 +02:00
|
|
|
EAPI=2
|
2019-05-04 11:06:33 +02:00
|
|
|
|
2019-05-04 11:33:12 +02:00
|
|
|
inherit eutils flag-o-matic linux-info multilib
|
2019-05-04 11:06:33 +02:00
|
|
|
|
|
|
|
DESCRIPTION="A daemon to run x86 code in an emulated environment"
|
|
|
|
HOMEPAGE="https://dev.gentoo.org/~spock/projects/uvesafb/"
|
2019-05-04 11:33:12 +02:00
|
|
|
#SRC_URI="https://dev.gentoo.org/~spock/projects/uvesafb/archive/${P/_/-}.tar.bz2"
|
|
|
|
SRC_URI="https://moriya.zapto.org/attachments/2398f657-3213-4e79-a42d-c23588db399a -> ${P/_/-}.tar.bz2"
|
2019-05-04 11:06:33 +02:00
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE="debug x86emu"
|
|
|
|
|
|
|
|
DEPEND="dev-libs/klibc"
|
|
|
|
RDEPEND=""
|
|
|
|
|
2019-05-04 11:33:12 +02:00
|
|
|
S="${WORKDIR}/${P//_*/}"
|
2019-05-04 11:06:33 +02:00
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
linux-info_pkg_setup
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
if [ -z "$(grep V86D ${ROOT}/usr/$(get_libdir)/klibc/include/linux/connector.h)" ]; then
|
|
|
|
eerror "You need to compile klibc against a kernel tree patched with uvesafb"
|
|
|
|
eerror "prior to merging this package."
|
|
|
|
die "Kernel not patched with uvesafb."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
./configure --with-klibc $(use_with debug) $(use_with x86emu) || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
# Disable stack protector, as it does not work with klibc (bug #346397).
|
|
|
|
filter-flags -fstack-protector -fstack-protector-all
|
|
|
|
emake KDIR="${KV_DIR}" || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
emake DESTDIR="${D}" install || die
|
|
|
|
|
|
|
|
dodoc README ChangeLog
|
|
|
|
|
|
|
|
insinto /usr/share/${PN}
|
|
|
|
doins misc/initramfs
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
elog "If you wish to place v86d into an initramfs image, you might want to use"
|
|
|
|
elog "'/usr/share/${PN}/initramfs' in your kernel's CONFIG_INITRAMFS_SOURCE."
|
|
|
|
}
|