media-libs/odroidc1-mali-fb: pick ebuild from odroidberry, clean it and make it more generic

This commit is contained in:
nemunaire 2017-12-29 19:03:37 +01:00 committed by root
parent 66adeddb1e
commit f9460cf43d
4 changed files with 139 additions and 0 deletions

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-fb-9999.ebuild 1988 SHA256 cd36c132466a92025f9112806a1c4fde1194781e2e2da9737ff05458ed9d8b9f SHA512 c26161fecfc6f288b1935273950637f157bf72abbcee40f3f0022106ab1c5f23610a8c737f8cf74a70e3f96bd78c0d23f91fea3526570e245fa78861d36a01be WHIRLPOOL adc104d3808134052a94f096a9d4f9a1b8e8f917254153e4de833fc7bb9e661a4c8f221e34fc2dd33054bcf52e2dc70d82122c7a6fff0284bf61ba1e49a8ed6a

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,78 @@
EAPI=6
inherit git-r3
EGIT_REPO_URI="git://github.com/mdrjr/c1_mali_libs.git"
DESCRIPTION="Closed source framebuffer drivers for Mali-400 Odroid-C1"
HOMEPAGE="https://github.com/mdrjr/c1_mali_libs.git"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="!x11-libs/odroidc1-mali
!x11-libs/mesa"
PATCHES=(
"${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 /usr/lib
dodir /usr/include
insinto /usr/lib
doins fbdev/mali_libs/libEGL.so
doins fbdev/mali_libs/libEGL.so.1
doins fbdev/mali_libs/libEGL.so.1.4
doins fbdev/mali_libs/libGLESv1_CM.so
doins fbdev/mali_libs/libGLESv1_CM.so.1
doins fbdev/mali_libs/libGLESv1_CM.so.1.1
doins fbdev/mali_libs/libGLESv2.so
doins fbdev/mali_libs/libGLESv2.so.2
doins fbdev/mali_libs/libGLESv2.so.2.0
doins fbdev/mali_libs/libMali.so
insinto /usr/include/EGL
doins fbdev/mali_headers/EGL/egl.h
doins fbdev/mali_headers/EGL/eglext.h
doins fbdev/mali_headers/EGL/eglplatform.h
doins fbdev/mali_headers/EGL/fbdev_window.h
insinto /usr/include/GLES
doins fbdev/mali_headers/GLES/gl.h
doins fbdev/mali_headers/GLES/glext.h
doins fbdev/mali_headers/GLES/glplatform.h
insinto /usr/include/GLES2
doins fbdev/mali_headers/GLES2/gl2.h
doins fbdev/mali_headers/GLES2/gl2ext.h
doins fbdev/mali_headers/GLES2/gl2platform.h
insinto /usr/include/KHR
doins fbdev/mali_headers/KHR/khrplatform.h
#emake "libdir=${D}/${opengl_dir}/lib" "includedir=${D}/${opengl_dir}/include" -C x11 install
# create symlink to libMali and libUMP into /usr/lib
#dosym "opengl/${opengl_imp}/lib/libMali.so" "/usr/$(get_libdir)/libMali.so"
#dosym "opengl/${opengl_imp}/lib/libUMP.so" "/usr/$(get_libdir)/libUMP.so"
# 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
}