v86d-0.1.10.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=2
  4. inherit eutils flag-o-matic linux-info multilib
  5. DESCRIPTION="A daemon to run x86 code in an emulated environment"
  6. HOMEPAGE="https://dev.gentoo.org/~spock/projects/uvesafb/"
  7. SRC_URI="https://dev.gentoo.org/~spock/projects/uvesafb/archive/${P/_/-}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="debug x86emu"
  12. DEPEND="dev-libs/klibc"
  13. RDEPEND=""
  14. S="${WORKDIR}/${P//_*/}"
  15. pkg_setup() {
  16. linux-info_pkg_setup
  17. }
  18. src_prepare() {
  19. if [ -z "$(grep V86D ${ROOT}/usr/$(get_libdir)/klibc/include/linux/connector.h)" ]; then
  20. eerror "You need to compile klibc against a kernel tree patched with uvesafb"
  21. eerror "prior to merging this package."
  22. die "Kernel not patched with uvesafb."
  23. fi
  24. }
  25. src_configure() {
  26. ./configure --with-klibc $(use_with debug) $(use_with x86emu) || die
  27. }
  28. src_compile() {
  29. # Disable stack protector, as it does not work with klibc (bug #346397).
  30. filter-flags -fstack-protector -fstack-protector-all
  31. emake KDIR="${KV_DIR}" || die
  32. }
  33. src_install() {
  34. emake DESTDIR="${D}" install || die
  35. dodoc README ChangeLog
  36. insinto /usr/share/${PN}
  37. doins misc/initramfs
  38. }
  39. pkg_postinst() {
  40. elog "If you wish to place v86d into an initramfs image, you might want to use"
  41. elog "'/usr/share/${PN}/initramfs' in your kernel's CONFIG_INITRAMFS_SOURCE."
  42. }