mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/libx86: revision bump
Port to EAPI 6, bring wider arch support Reported-by: Oleg <oleg@funtoo.org> Gentoo-Bug: 579682 Package-Manager: portage-2.2.28
This commit is contained in:
38
dev-libs/libx86/files/libx86-1.1-x86emu.patch
Normal file
38
dev-libs/libx86/files/libx86-1.1-x86emu.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
diff -Naur libx86-1.1+ds1.orig/Makefile libx86-1.1+ds1/Makefile
|
||||
--- a/libx86-1.1/Makefile 2008-05-19 12:28:59.000000000 +0300
|
||||
+++ b/libx86-1.1/Makefile 2012-02-20 01:32:03.750068423 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
ifeq ($(BACKEND),x86emu)
|
||||
OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
|
||||
x86emu/ops.o x86emu/ops2.o x86emu/prim_ops.o x86emu/sys.o
|
||||
+ CFLAGS += -DX86EMU
|
||||
else
|
||||
OBJECTS += lrmi.o
|
||||
endif
|
||||
diff -Naur libx86-1.1+ds1.orig/thunk.c libx86-1.1+ds1/thunk.c
|
||||
--- a/libx86-1.1+ds1.orig/thunk.c 2008-04-03 03:48:00.000000000 +0300
|
||||
+++ b/libx86-1.1/thunk.c 2012-02-20 01:12:56.468820192 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
+#ifndef X86EMU
|
||||
#define __BUILDIO(bwl,bw,type) \
|
||||
static inline void out##bwl##_local(unsigned long port, unsigned type value) { __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
|
||||
}\
|
||||
@@ -44,6 +45,15 @@
|
||||
__BUILDIO(b,b,char)
|
||||
__BUILDIO(w,w,short)
|
||||
__BUILDIO(l,,int)
|
||||
+#else
|
||||
+/* use libc functions */
|
||||
+#define inb_local inb
|
||||
+#define inw_local inw
|
||||
+#define inl_local inl
|
||||
+#define outb_local outb
|
||||
+#define outw_local outw
|
||||
+#define outl_local outl
|
||||
+#endif /* X86EMU */
|
||||
|
||||
|
||||
char *mmap_addr = SHMERRORPTR;
|
||||
51
dev-libs/libx86/libx86-1.1-r4.ebuild
Normal file
51
dev-libs/libx86/libx86-1.1-r4.ebuild
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
DESCRIPTION="A hardware-independent library for executing real-mode x86 code"
|
||||
HOMEPAGE="http://www.codon.org.uk/~mjg59/libx86"
|
||||
SRC_URI="http://www.codon.org.uk/~mjg59/${PN}/downloads/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="static-libs"
|
||||
|
||||
src_prepare() {
|
||||
# fix compile failure with linux-headers-2.6.26, bug 235599
|
||||
eapply -p0 "${FILESDIR}/${PN}-0.99-ifmask.patch"
|
||||
# Patch for bugs #236888 and #456648
|
||||
eapply -p0 "${FILESDIR}/${P}-makefile.patch"
|
||||
# Wider arch compatibility, bug #579682
|
||||
eapply -p2 "${FILESDIR}/${P}-x86emu.patch"
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC AR
|
||||
append-flags -fno-delete-null-pointer-checks #523276
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local ARGS
|
||||
use x86 || ARGS="BACKEND=x86emu"
|
||||
emake ${ARGS} LIBRARY=shared shared
|
||||
if use static-libs; then
|
||||
emake ${ARGS} objclean
|
||||
emake ${ARGS} LIBRARY=static static
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local install_static;
|
||||
use static-libs && install_static='install-static'
|
||||
emake \
|
||||
LIBDIR="/usr/$(get_libdir)" \
|
||||
DESTDIR="${D}" \
|
||||
install-header install-shared ${install_static}
|
||||
}
|
||||
Reference in New Issue
Block a user