rebuilt with BACKEND=x86emu which makes it portable on non x86 archs (needs retest on x86) [release 1.1-2mamba;Wed Nov 21 2012]

This commit is contained in:
Silvan Calarco 2024-01-06 06:10:00 +01:00
parent 8858033c00
commit d64f01241a
3 changed files with 86 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# libx86
It's often useful to be able to make real-mode x86 BIOS calls from userland. lrmi provides a simple interface to this for x86 machines, but this doesn't help on other platforms. libx86 provides the lrmi interface, but will also run on platforms such as amd64 and alpha.

21
libx86-0.99-ifmask.patch Normal file
View File

@ -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)

63
libx86.spec Normal file
View File

@ -0,0 +1,63 @@
Name: libx86
Version: 1.1
Release: 2mamba
Summary: A hardware-independent library for executing real-mode x86 code
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.codon.org.uk/~mjg59/libx86/
Source: http://www.codon.org.uk/%7Emjg59/libx86/downloads/libx86-%{version}.tar.gz
Patch0: %{name}-0.99-ifmask.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
It's often useful to be able to make real-mode x86 BIOS calls from userland. lrmi provides a simple interface to this for x86 machines, but this doesn't help on other platforms. libx86 provides the lrmi interface, but will also run on platforms such as amd64 and alpha.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
It's often useful to be able to make real-mode x86 BIOS calls from userland. lrmi provides a simple interface to this for x86 machines, but this doesn't help on other platforms. libx86 provides the lrmi interface, but will also run on platforms such as amd64 and alpha.
This package contains the development files for %{name}.
%prep
%setup -q
%patch0 -p0
%build
%make LIBDIR=%{_libdir} BACKEND=x86emu
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall LIBDIR=%{_libdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_libdir}/libx86.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/libx86.a
%{_libdir}/libx86.so
%{_includedir}/libx86.h
%changelog
* Wed Nov 21 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1-2mamba
- rebuilt with BACKEND=x86emu which makes it portable on non x86 archs (needs retest on x86)
* Mon May 18 2009 Automatic Build System <autodist@mambasoft.it> 1.1-1mamba
- automatic update by autodist
* Tue Jan 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99-1mamba
- package created by autospec