diff options
Diffstat (limited to 'sys-libs/lrmi')
-rw-r--r-- | sys-libs/lrmi/Manifest | 5 | ||||
-rw-r--r-- | sys-libs/lrmi/files/lrmi-0.10-kernel-2.6.26.patch | 18 | ||||
-rw-r--r-- | sys-libs/lrmi/files/lrmi-0.10-ldflags.patch | 26 | ||||
-rw-r--r-- | sys-libs/lrmi/lrmi-0.10-r1.ebuild | 38 | ||||
-rw-r--r-- | sys-libs/lrmi/metadata.xml | 11 |
5 files changed, 98 insertions, 0 deletions
diff --git a/sys-libs/lrmi/Manifest b/sys-libs/lrmi/Manifest new file mode 100644 index 000000000000..634cace34495 --- /dev/null +++ b/sys-libs/lrmi/Manifest @@ -0,0 +1,5 @@ +AUX lrmi-0.10-kernel-2.6.26.patch 593 BLAKE2B 52fae57ae84163945c6dfd0e0aacddd03c70eaab1018b6edcd2ac79e6641159c45dfbb725c2e1d6e34ecb85e4ecc6916a249aef66059d16f54898a3a0b18e9a5 SHA512 286d0a0381a8939a6d4b1af695ed2312bf397a21c07607ec589c9ada9c6b2d8bb38227d2b831f1951b090437417f20fe863bae99659f7b70a24a90c3793ed4ad +AUX lrmi-0.10-ldflags.patch 934 BLAKE2B 0d1819cc275ac6e144716921d517f5f70d995a707e750646a10d8781a0927f7004a5e1fe7780f237cab108ded97f12d77195046e412d013f8d4302ed70940e95 SHA512 e00b164b1dd4e44549f3c78602ca5e030b130b5f201bc610652d1befe7ea400edaf0a58754ff9a06b5c4f5c81ddb770eb2ca2acdf3f33b6b38bf4005cae1c3d1 +DIST lrmi-0.10.tar.gz 10271 BLAKE2B 7c8c5856dd3bf7fc977b303db4c0c2a419a6331ddc117ae6356bd48311a6871d6452ac681e3dbb8e32d4fdd99e1d2268604bf29ac52327457467e8bbf2fb5d95 SHA512 61d4f228ab712376cb8d47ef9e1049c89b9916f2fc04723ced03524b716f5e034ffb8ce7aa9b2b4d9d67aa93608020fc7dd1fb7a9778f211eb25a22713a538f1 +EBUILD lrmi-0.10-r1.ebuild 933 BLAKE2B 5875d255ae0b8c4569009e9fe0a6ce6f6b7d6d6b3c5595ad9928ad529744bd69530bf09e0689f9ad0bfea9ffb86456226454df359fca39a8f30df6fff1a918b7 SHA512 b5f78529fd5b2f7903e0864a8bf40bf9bf5add00393c12bfadf4ec3cb9d48d9f0479c5c1aed124cdf220fb89b22a6f190aec09f9ecc22a1ea943004944cd6939 +MISC metadata.xml 324 BLAKE2B 8ab6c94e9f9fa8fd2b77dfa267818dedd511389346b8fe45f3f1f494f8921671a0e9577f6038d3feafef74ec37bb6dbc12e0e2f9bc431bc29c639a5d44fc08e3 SHA512 74a5d88a930a6b5367b61de0a0587a8438ee8d83e19a85bc9832db44481532e3a491da16b2788ae70164bf370280ed44a8245eb1505d113b8a293a3d38c6a5e1 diff --git a/sys-libs/lrmi/files/lrmi-0.10-kernel-2.6.26.patch b/sys-libs/lrmi/files/lrmi-0.10-kernel-2.6.26.patch new file mode 100644 index 000000000000..9547439376a3 --- /dev/null +++ b/sys-libs/lrmi/files/lrmi-0.10-kernel-2.6.26.patch @@ -0,0 +1,18 @@ +diff -Naurp lrmi-0.10-orig/lrmi.c lrmi-0.10/lrmi.c +--- lrmi-0.10-orig/lrmi.c 2008-08-23 14:39:44.000000000 +0200 ++++ lrmi-0.10/lrmi.c 2008-08-23 14:40:25.000000000 +0200 +@@ -61,6 +61,14 @@ OTHER DEALINGS IN THE SOFTWARE. + + #include "lrmi.h" + ++/* 2.6.26+ kernels don't define the legacy masks. */ ++#if defined(__linux__) && !defined(TF_MASK) ++ #define TF_MASK X86_EFLAGS_TF ++ #define IF_MASK X86_EFLAGS_IF ++ #define VIF_MASK X86_EFLAGS_VIF ++ #define IOPL_MASK X86_EFLAGS_IOPL ++#endif ++ + #define REAL_MEM_BASE ((void *)0x10000) + #define REAL_MEM_SIZE 0x40000 + #define REAL_MEM_BLOCKS 0x100 diff --git a/sys-libs/lrmi/files/lrmi-0.10-ldflags.patch b/sys-libs/lrmi/files/lrmi-0.10-ldflags.patch new file mode 100644 index 000000000000..b23bd9c5cdf8 --- /dev/null +++ b/sys-libs/lrmi/files/lrmi-0.10-ldflags.patch @@ -0,0 +1,26 @@ +diff -Naurp lrmi-0.10-orig/Makefile lrmi-0.10/Makefile +--- lrmi-0.10-orig/Makefile 2010-08-20 15:03:17.093144820 +0200 ++++ lrmi-0.10/Makefile 2010-08-20 15:03:47.761144267 +0200 +@@ -2,6 +2,7 @@ LIBDIR ?= /usr/local/lib + INCDIR ?= /usr/local/include + + CFLAGS = -g -Wall ++LDFLAGS = + + sources = lrmi.c + objects = lrmi.o +@@ -26,12 +27,12 @@ liblrmi.a: $(objects) + + liblrmi.so: $(pic_objects) + # $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -shared -o $@ $^ +- $(CC) $(CPPFLAGS) $(CFLAGS) -Wl,-soname,$(LIBNAME).so.$(MAJOR) -fPIC -shared -o $(LIBNAME).so.$(VERSION) $^ ++ $(CC) $(CPPFLAGS) $(CFLAGS) -Wl,-soname,$(LIBNAME).so.$(MAJOR) $(LDFLAGS) -fPIC -shared -o $(LIBNAME).so.$(VERSION) $^ + ln -sf $(LIBNAME).so.$(VERSION) $(LIBNAME).so.$(MAJOR) + ln -sf $(LIBNAME).so.$(MAJOR) $(LIBNAME).so + + vbetest: vbetest.c liblrmi.a +- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + install: + mkdir -p $(LIBDIR) diff --git a/sys-libs/lrmi/lrmi-0.10-r1.ebuild b/sys-libs/lrmi/lrmi-0.10-r1.ebuild new file mode 100644 index 000000000000..5968e63998d3 --- /dev/null +++ b/sys-libs/lrmi/lrmi-0.10-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +inherit eutils toolchain-funcs + +DESCRIPTION="library for calling real mode BIOS routines under Linux" +HOMEPAGE="http://www.sourceforge.net/projects/lrmi/" +SRC_URI="mirror://sourceforge/lrmi/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="x86" +IUSE="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-kernel-2.6.26.patch + epatch "${FILESDIR}"/${P}-ldflags.patch +} + +src_compile() { + tc-export CC AR RANLIB + emake CFLAGS="${CFLAGS} -Wall" LDFLAGS="${LDFLAGS}" || die "emake failed." +} + +src_install() { + dobin vbetest || die "dobin failed." + dolib.a liblrmi.a || die "dolib.a failed." + dolib.so liblrmi.so.${PV} || die "dolib.so failed." + dosym liblrmi.so.${PV} /usr/lib/liblrmi.so + dosym liblrmi.so.${PV} /usr/lib/liblrmi.so.${PV%%.*} + + insinto /usr/include + doins lrmi.h vbe.h || die "doins failed." +} diff --git a/sys-libs/lrmi/metadata.xml b/sys-libs/lrmi/metadata.xml new file mode 100644 index 000000000000..89ed3cff124d --- /dev/null +++ b/sys-libs/lrmi/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +<upstream> + <remote-id type="sourceforge">lrmi</remote-id> +</upstream> +</pkgmetadata> |