diff --git a/README.md b/README.md index 73fe121..a438f28 100644 --- a/README.md +++ b/README.md @@ -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. + diff --git a/libx86-0.99-ifmask.patch b/libx86-0.99-ifmask.patch new file mode 100644 index 0000000..c99eeb8 --- /dev/null +++ b/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/libx86.spec b/libx86.spec new file mode 100644 index 0000000..79314b4 --- /dev/null +++ b/libx86.spec @@ -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 +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 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 1.1-1mamba +- automatic update by autodist + +* Tue Jan 08 2008 Silvan Calarco 0.99-1mamba +- package created by autospec +