1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils toolchain-funcs flag-o-matic
8 DESCRIPTION="A hardware-independent library for executing real-mode x86 code"
9 HOMEPAGE="https://www.codon.org.uk/~mjg59/libx86/"
10 SRC_URI="https://www.codon.org.uk/~mjg59/${PN}/downloads/${P}.tar.gz"
14 KEYWORDS="amd64 ~arm x86"
18 # fix compile failure with linux-headers-2.6.26, bug 235599
19 eapply -p0 "${FILESDIR}/${PN}-0.99-ifmask.patch"
20 # Patch for bugs #236888 and #456648
21 eapply -p0 "${FILESDIR}/${P}-makefile.patch"
22 # Wider arch compatibility, bug #579682
23 eapply -p2 "${FILESDIR}/${P}-x86emu.patch"
30 append-flags -fno-delete-null-pointer-checks #523276
35 use x86 || ARGS="BACKEND=x86emu"
36 emake ${ARGS} LIBRARY=shared shared
37 if use static-libs; then
38 emake ${ARGS} objclean
39 emake ${ARGS} LIBRARY=static static
45 use static-libs && install_static='install-static'
47 LIBDIR="/usr/$(get_libdir)" \
49 install-header install-shared ${install_static}