summaryrefslogtreecommitdiff
path: root/dev-libs/libx86
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/libx86
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/libx86')
-rw-r--r--dev-libs/libx86/Manifest10
-rw-r--r--dev-libs/libx86/files/libx86-0.99-ifmask.patch21
-rw-r--r--dev-libs/libx86/files/libx86-1.1-makefile.patch28
-rw-r--r--dev-libs/libx86/files/libx86-1.1-x86emu.patch38
-rw-r--r--dev-libs/libx86/libx86-1.1-r2.ebuild36
-rw-r--r--dev-libs/libx86/libx86-1.1-r3.ebuild46
-rw-r--r--dev-libs/libx86/libx86-1.1-r4.ebuild50
-rw-r--r--dev-libs/libx86/metadata.xml8
8 files changed, 237 insertions, 0 deletions
diff --git a/dev-libs/libx86/Manifest b/dev-libs/libx86/Manifest
new file mode 100644
index 000000000000..2cd8a618dd0c
--- /dev/null
+++ b/dev-libs/libx86/Manifest
@@ -0,0 +1,10 @@
+AUX libx86-0.99-ifmask.patch 584 SHA256 b8070e57c5d267b3736b133e4c3c92965cc5a62e72466b705b506ad2ce39dd25 SHA512 781ea16e535ca1c0a54552b51d67b0901102f20ab63ff5ff39f9f2bb513abb53867eb5e52089e72afa6c313380b2033881f17cfe233b09a38ed5a9e95ad8d5f8 WHIRLPOOL 148e94477662dd91e654972f8ad475808574e006677e3858346c864b580776ec203457d1011f05d984ba82231f8ebdddac46e8f9bd1e1650e831268c7abe0b66
+AUX libx86-1.1-makefile.patch 853 SHA256 ce7c23404e1ba95343418cc0256c7ad2db702b79518e4cda77c802dfbbce306f SHA512 a61e21ab31b1f22d898799ecc3db57e6816146488d436d3d33817f0ac19d420562830411111bacd8ca4c80a446c088fb931ee293522828076d0a1cae6e7ee0a6 WHIRLPOOL 80d8a599a7fa6aa54f3a65076c5642f5281e79eb283215ced4da9e5523f74c21e17a26eb75b8957757b96f71b7f0a3eee5a0098b46099df2ac193c2577853a7e
+AUX libx86-1.1-x86emu.patch 1194 SHA256 055bda3bdb19f05107230b685001fef9f624e452211749ad094a10a4d6a78860 SHA512 476d0bc7d3e903c1b1dff75577ea0caa80a5dd06618a08b24300367031ccb578322fcc267746285bcb671583407f22bfb7165374eeb2301ed67177ee18ec549e WHIRLPOOL 87c975b934c9446c57d124e6ac57d1939a1d5d31ac037ea80f9ece03608aeedcec18de4d80c22e31eb94315f13eb0bb4171cf7425b9e0479924dfe9167e50d08
+DIST libx86-1.1.tar.gz 87428 SHA256 5bf13104cb327472b5cb65643352a9138646becacc06763088d83001d832d048 SHA512 b946555a45405a06fdf00b3e2522fc99dd7c61349c32726221aa60117a8d3da6da4b44188b1ebb208368e12b396f26055437cebcc8a0e6df10c7a006182c9280 WHIRLPOOL 778dae64fb0a21988debb12ca43ca6eed94fc34ab8d0e012aa30914053f57e6817fc7bbec42f6a85a0be4399263c035f981708036804cb756875143f91fe227c
+EBUILD libx86-1.1-r2.ebuild 816 SHA256 d15d8ce2269a42e98f6a2d6b06aeac0f665cb2f1bcab3c3413c0bd2e000e51be SHA512 ec280eba45ccd55b8d7246ab8c1ae16207a6d45112c3205ce06bbe638af6bc1e72205ee43d40af38e4d0a187e89b58f6b690f1e600040d6b82f0478f210d2cd3 WHIRLPOOL 54f91744d91971893d14ae01c50bf70e8b393498a0db9c0cf5e6befa84523cf9bfbb86f73e88fb1f3b488ba1b55f373044ebae76d0c67c3e81f6366aa9b9ab0b
+EBUILD libx86-1.1-r3.ebuild 1129 SHA256 af3236e93d11f3e12588b465dd9f08d1d69c0aecb5257e8e3aded8ea6b853287 SHA512 fd5a51b0385cbcf4709c627fea93936b13fa1826435e78a758d08783f2b13f93a987bf1d44189bf14073c7d2bee92f44b8919f37dcb7332354b5e8b9a7859c5e WHIRLPOOL 486331fd435cd14006dfa4186b072767e3ff3ff9b9d212b3dedb73e9c507d7f3ee19afb14489bb958c0916159204becce94fae8798393e74f928333331848bb6
+EBUILD libx86-1.1-r4.ebuild 1232 SHA256 bc2d1904e0239a2d62075e90ee91be2d826e192319ca1ae62f82d27b834a011b SHA512 7306a96a739463d3066bd765b9dd2a8644db90faf19126b4b58ac19f1062725dc035da3778446c58545fb7e4d461c2791975b148f40d71aa66b846bfc81a5c4d WHIRLPOOL 3ae7583c120d73561ba24f8ce1f82d8094b4a933bcf4174c7d388f4fd0dd53132eacf848f78a34cac5b2f9061895a9956b2d04bcd959e647da38ed169570c041
+MISC ChangeLog 2846 SHA256 79345c9dc2b4d0af4e2c47c618507db086de97cc5e7b4d4f18198c61109d8e30 SHA512 016536790e5cccb4e25486b214079ddeecedbde3d1300b4ebb9d805f9f6f147e6256fd1c28e5c33071d4df9f82c5f9e93a683a10a3660e8c17a7208315bc539d WHIRLPOOL 69949a70b005b91b17edacfbf618c7c3f020414e80f2876fa9226c11a40538ca6433195d3d4eb8bc53a0935a1faac94fb611ccc02e30e46bf254eef660dbf9ac
+MISC ChangeLog-2015 3104 SHA256 279a3b4a4d63f4703fdea67ac8381e730a82e74c9d5af424528d7b996405544f SHA512 db6c59484fc9d2b9771b1ae94c4b36916a9fe97359eff37682422548ec07575a939fc115516aaf8ba5d9166ec134e94c54f9804cb59abf19a2186e3ca5afa880 WHIRLPOOL 0a0a560262770a20a4634e86ddafcecd198c2e5fd7bcf647785e94d850e1ff88db14a940a0580ce87dcbb3c9bfc0a90bddb9f8f8bdcc2ab95155526fbcc87474
+MISC metadata.xml 247 SHA256 fb925313d1ae70feaa6db91150f34a2157b48e884e8f47d773640af149e3744b SHA512 96c55c2979dd6a4c4761fce9b5a0be387b11fcf197ef903d8680ae82f01a2caea93b1238bed1ac96d3eb250744e2149a507e0424ac017b4324f0806a54e72c4a WHIRLPOOL 142b4295733faec48b0ca9eb6d3561799ff743481aabf2b74ecf6d717d972b4961979c7b6bf32b9840cb34e47d22fe2befb9b0ef8ec0d3f28f6416069128d3c7
diff --git a/dev-libs/libx86/files/libx86-0.99-ifmask.patch b/dev-libs/libx86/files/libx86-0.99-ifmask.patch
new file mode 100644
index 000000000000..c99eeb819f72
--- /dev/null
+++ b/dev-libs/libx86/files/libx86-0.99-ifmask.patch
@@ -0,0 +1,21 @@
+--- lrmi.c.orig 2008-09-06 12:24:36.070136428 +0200
++++ lrmi.c 2008-09-06 12:28:10.584287458 +0200
+@@ -55,6 +55,18 @@ OTHER DEALINGS IN THE SOFTWARE.
+ #include "x86-common.h"
+
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#endif
++#ifndef IF_MASK
++#define IF_MASK X86_EFLAGS_IF
++#endif
++#ifndef IOPL_MASK
++#define IOPL_MASK X86_EFLAGS_IOPL
++#endif
++#ifndef VIF_MASK
++#define VIF_MASK X86_EFLAGS_VIF
++#endif
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
diff --git a/dev-libs/libx86/files/libx86-1.1-makefile.patch b/dev-libs/libx86/files/libx86-1.1-makefile.patch
new file mode 100644
index 000000000000..471c3fbc78fd
--- /dev/null
+++ b/dev-libs/libx86/files/libx86-1.1-makefile.patch
@@ -0,0 +1,28 @@
+--- Makefile.orig 2013-02-11 16:35:56.834368910 +0400
++++ Makefile 2013-02-11 16:36:02.587369368 +0400
+@@ -22,7 +22,7 @@
+ $(AR) cru libx86.a $(OBJECTS)
+
+ shared: $(OBJECTS)
+- $(CC) $(CFLAGS) -o libx86.so.1 -shared -Wl,-soname,libx86.so.1 $(OBJECTS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o libx86.so.1 -shared -Wl,-soname,libx86.so.1 $(OBJECTS)
+
+ objclean:
+ $(MAKE) -C x86emu clean
+@@ -31,8 +31,14 @@
+ clean: objclean
+ rm -f *.so.1 *.a
+
+-install: libx86.so.1
++install-shared: libx86.so.1
+ install -D libx86.so.1 $(DESTDIR)$(LIBDIR)/libx86.so.1
+- install -D libx86.a $(DESTDIR)$(LIBDIR)/libx86.a
+ ln -sf libx86.so.1 $(DESTDIR)$(LIBDIR)/libx86.so
++
++install-header:
+ install -p -m 0644 -D lrmi.h $(DESTDIR)/usr/include/libx86.h
++
++install-static:
++ install -D libx86.a $(DESTDIR)$(LIBDIR)/libx86.a
++
++install: install-shared install-static install-header
diff --git a/dev-libs/libx86/files/libx86-1.1-x86emu.patch b/dev-libs/libx86/files/libx86-1.1-x86emu.patch
new file mode 100644
index 000000000000..7b4fe428e1b3
--- /dev/null
+++ b/dev-libs/libx86/files/libx86-1.1-x86emu.patch
@@ -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;
diff --git a/dev-libs/libx86/libx86-1.1-r2.ebuild b/dev-libs/libx86/libx86-1.1-r2.ebuild
new file mode 100644
index 000000000000..72c2285dadff
--- /dev/null
+++ b/dev-libs/libx86/libx86-1.1-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+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=""
+
+src_prepare() {
+ # fix compile failure with linux-headers-2.6.26, bug 235599
+ epatch "${FILESDIR}"/${PN}-0.99-ifmask.patch
+ sed -i 's:\($(CC) $(CFLAGS)\)\( -o libx86.so.1\):\1 $(LDFLAGS)\2:' \
+ Makefile || die #236888
+ tc-export CC AR
+}
+
+src_compile() {
+ local ARGS
+ use amd64 && ARGS="BACKEND=x86emu"
+ emake ${ARGS}
+}
+
+src_install() {
+ emake \
+ LIBDIR="/usr/$(get_libdir)" \
+ DESTDIR="${D}" \
+ install
+}
diff --git a/dev-libs/libx86/libx86-1.1-r3.ebuild b/dev-libs/libx86/libx86-1.1-r3.ebuild
new file mode 100644
index 000000000000..7bc72dd56ee3
--- /dev/null
+++ b/dev-libs/libx86/libx86-1.1-r3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib 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
+ epatch "${FILESDIR}"/${PN}-0.99-ifmask.patch
+ # Patch for bugs #236888 and #456648
+ epatch "${FILESDIR}"/${P}-makefile.patch
+}
+
+src_configure() {
+ tc-export CC AR
+ append-flags -fno-delete-null-pointer-checks #523276
+}
+
+src_compile() {
+ local ARGS
+ use amd64 && 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}
+}
diff --git a/dev-libs/libx86/libx86-1.1-r4.ebuild b/dev-libs/libx86/libx86-1.1-r4.ebuild
new file mode 100644
index 000000000000..962e86942828
--- /dev/null
+++ b/dev-libs/libx86/libx86-1.1-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~arm ~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}
+}
diff --git a/dev-libs/libx86/metadata.xml b/dev-libs/libx86/metadata.xml
new file mode 100644
index 000000000000..5b159fbcadd1
--- /dev/null
+++ b/dev-libs/libx86/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>