New ebuild for proprietary Mali driver

This commit is contained in:
nemunaire 2015-06-17 23:47:02 +02:00
parent 452bdf8dd2
commit 9fc204161d
5 changed files with 117 additions and 0 deletions

View File

@ -5,3 +5,4 @@ This overlay includes ebuilds for the following packages:
* `dev-embedded/u-boot-tools-odroidc1`: Odroid C1 U-Boot (https://github.com/hardkernel/u-boot) * `dev-embedded/u-boot-tools-odroidc1`: Odroid C1 U-Boot (https://github.com/hardkernel/u-boot)
* `sys-kernel/odroidc1-sources`: Linux source for Odroid devices (https://github.com/hardkernel/linux) * `sys-kernel/odroidc1-sources`: Linux source for Odroid devices (https://github.com/hardkernel/linux)
* `x11-libs/odroidc1-mali`: Closed source drivers for Mali (https://github.com/mdrjr/c1_mali_libs)

View File

@ -0,0 +1,3 @@
AUX 0001-Fix-Makefiles.patch 1512 SHA256 ac91975f3fc47b57f99501bdaee655984e558f34acea1bbe49729f13d0c13cf2 SHA512 97bc9b11fbe01f4c1fe7c36e6e7414864e0b3b9947fbc770823d06790bd6435f09f5b779131fa74c8e7d8b507fe9faacf12409c6dc77a15bbf4d1f791b27f474 WHIRLPOOL 4d9e9ff416cd6aba9bf0a5e921d7a6c0fecb96b958c767ebe6d11603af6c18819417db521a22a3256ade98ec4dc3e45b89209e28cd0263c6ab8c43b10f07020d
AUX 99-mali-drivers.rules 63 SHA256 615fad11fd169a46adb7508b6df61eab2420b10073cf71c8fd223774c26f5043 SHA512 775d70687d492b6285a43a6c0c9225c19c9fd4d9108b53154c094576ffba29dd52f3f2591ee16071e0c4edc34590a0cdf7053b4a918b89a80b4fad9eb5538fc4 WHIRLPOOL 74e236e1918bd27ec7b8d8f475ad250ee5d862d572517aea596cbd5d8384a1e74910495f8cd46e7be8fb136f9263ef953dab300a06608d5fc40507758b830a15
EBUILD odroidc1-mali-9999.ebuild 1253 SHA256 4bb2587949034d2f94220e82e6d0c3ab44f9d35e178ece24a3e4dc6516c9054c SHA512 567b68e22b793f058f879b15651c274ca89f98b93734f5d97fcf5844171d6d6d1bd04f5d91d4c88f12ddb8b085372fdd24d385da34a1318306dabd8a8c2de614 WHIRLPOOL 4588d235d1ca5987563cef60be6e82c6f8c6e2b2437be28881ae00463c6b83248a36e8b3bf3391886c2d2d391ee2377cebcc9f20c6d437d562f64c711d13cfd9

View File

@ -0,0 +1,56 @@
diff --git a/fbdev/Makefile b/fbdev/Makefile
index 020bf6b..baf7273 100644
--- a/fbdev/Makefile
+++ b/fbdev/Makefile
@@ -1,6 +1,6 @@
-libdir := /usr/lib/arm-linux-gnueabihf/
-includedir := /usr/include
-pkgconfigdir := $(libdir)/pkgconfig
+libdir ?= /usr/lib/arm-linux-gnueabihf/
+includedir ?= /usr/include
+pkgconfigdir ?= $(libdir)/pkgconfig
install:
# Mali Binaries
@@ -10,11 +10,4 @@ install:
# Mali Headers
rm -rf $(includedir)/EGL $(includedir)/GLES $(includedir)/GLES2 $(includedir)/ump $(includedir)/umplock
- cp -aRP mali_headers/* /usr/include
-
- # PKG Config
- rm -fr $(pkgconfigdir)/glesv*.pc $(pkgconfigdir)/egl.pc
- cp -aRP ../pkgconfig/* $(pkgconfigdir)
-
-
-
\ No newline at end of file
+ cp -aRP mali_headers/* $(includedir)
diff --git a/x11/Makefile b/x11/Makefile
index cd1db76..a26d4ef 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -1,6 +1,6 @@
-libdir := /usr/lib/arm-linux-gnueabihf/
-includedir := /usr/include
-pkgconfigdir := $(libdir)/pkgconfig
+libdir ?= /usr/lib/arm-linux-gnueabihf/
+includedir ?= /usr/include
+pkgconfigdir ?= $(libdir)/pkgconfig
install:
# Mali Binaries
@@ -11,11 +11,4 @@ install:
# Mali Headers
rm -rf $(includedir)/EGL $(includedir)/GLES $(includedir)/GLES2 $(includedir)/ump $(includedir)/umplock
- cp -aRP mali_headers/* /usr/include
-
- # PKG Config
- rm -fr $(pkgconfigdir)/glesv*.pc $(pkgconfigdir)/egl.pc
- cp -aRP ../pkgconfig/* $(pkgconfigdir)
-
-
-
\ No newline at end of file
+ cp -aRP mali_headers/* $(includedir)

View File

@ -0,0 +1,2 @@
KERNEL=="mali", GROUP="video"
KERNEL=="ump", GROUP="video"

View File

@ -0,0 +1,55 @@
EAPI=5
inherit git-r3
EGIT_REPO_URI="git://github.com/mdrjr/c1_mali_libs.git"
DESCRIPTION="Closed source drivers for Mali-400 Odroid-C1"
HOMEPAGE="https://github.com/mdrjr/c1_mali_libs.git"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="
>=app-eselect/eselect-opengl-1.2.6"
RDEPEND="${DEPEND}
media-libs/mesa[gles1,gles2]"
src_prepare() {
epatch "${FILESDIR}/0001-Fix-Makefiles.patch"
}
src_compile() {
touch .gles-only
}
src_install() {
local opengl_imp="mali"
local opengl_dir="/usr/$(get_libdir)/opengl/${opengl_imp}"
dodir "${opengl_dir}/lib" "${opengl_dir}/include" "${opengl_dir}/extensions"
emake "libdir=${D}/${opengl_dir}/lib" "includedir=${D}/${opengl_dir}/include" -C x11 install
# udev rules to get the right ownership/permission for /dev/ump and /dev/mali
insinto /lib/udev/rules.d
doins "${FILESDIR}"/99-mali-drivers.rules
insinto "${opengl_dir}"
doins .gles-only
}
pkg_postinst() {
elog "You must be in the video group to use the Mali 3D acceleration."
elog
elog "To use the Mali OpenGL ES libraries, run \"eselect opengl set mali\""
}
pkg_prerm() {
"${ROOT}"/usr/bin/eselect opengl set --use-old --ignore-missing xorg-x11
}
pkg_postrm() {
"${ROOT}"/usr/bin/eselect opengl set --use-old --ignore-missing xorg-x11
}