mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-12-26 13:08:21 +01:00
sunxi-mali: install .pc files, add patches
Add installation of .pc and header files. Add compile patches to fix errors. Original fix by raoulh, already included in meta-sunxi dora branch by naguirre. Ported to master branch and no not switch away from sunxi-mali git repo, instead just add the needed patches on top of it. Signed-off-by: Jens Lucius <info@jenslucius.com>
This commit is contained in:
parent
8f1c8f67cf
commit
0a2034bb3c
@ -0,0 +1,136 @@
|
|||||||
|
From 15d91ef25234ff402f4288273989693f2d402d9d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Raoul Hecky <raoul.hecky@gmail.com>
|
||||||
|
Date: Fri, 10 Jan 2014 14:44:53 +0100
|
||||||
|
Subject: [PATCH] Add missing GLchar definition, some gl/gles apps needs that
|
||||||
|
to compile correctly
|
||||||
|
|
||||||
|
Build pkg-config files for gles and egl and install them
|
||||||
|
|
||||||
|
Fix .pc creation
|
||||||
|
|
||||||
|
add correct driver version in .pc
|
||||||
|
---
|
||||||
|
.gitignore | 1 +
|
||||||
|
Makefile | 1 +
|
||||||
|
Makefile.pc | 21 +++++++++++++++++++++
|
||||||
|
egl.pc.in | 11 +++++++++++
|
||||||
|
gles_cm.pc.in | 11 +++++++++++
|
||||||
|
glesv2.pc.in | 11 +++++++++++
|
||||||
|
include/GLES/gl.h | 1 +
|
||||||
|
include/GLES2/gl2.h | 1 +
|
||||||
|
8 files changed, 58 insertions(+)
|
||||||
|
create mode 100644 Makefile.pc
|
||||||
|
create mode 100644 egl.pc.in
|
||||||
|
create mode 100644 gles_cm.pc.in
|
||||||
|
create mode 100644 glesv2.pc.in
|
||||||
|
|
||||||
|
diff --git a/.gitignore b/.gitignore
|
||||||
|
index 6865abf..e8a3713 100644
|
||||||
|
--- a/.gitignore
|
||||||
|
+++ b/.gitignore
|
||||||
|
@@ -1,2 +1,3 @@
|
||||||
|
config.mk
|
||||||
|
*~
|
||||||
|
+*.pc
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 60d4a0f..94845ea 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -21,6 +21,7 @@ clean:
|
||||||
|
install: config.mk
|
||||||
|
$(MAKE) -C lib install
|
||||||
|
$(MAKE) -C include install
|
||||||
|
+ $(MAKE) -f Makefile.pc
|
||||||
|
|
||||||
|
test: config.mk
|
||||||
|
$(MAKE) -C test test
|
||||||
|
diff --git a/Makefile.pc b/Makefile.pc
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..01097fd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/Makefile.pc
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+include Makefile.setup
|
||||||
|
+include config.mk
|
||||||
|
+
|
||||||
|
+all:
|
||||||
|
+ echo "prefix=$(prefix)" > egl.pc
|
||||||
|
+ cat egl.pc.in >> egl.pc
|
||||||
|
+ sed -i "s/MVERSION/$MALI_VERSION/g" egl.pc
|
||||||
|
+ echo "prefix=$(prefix)" > gles_cm.pc
|
||||||
|
+ cat gles_cm.pc.in >> gles_cm.pc
|
||||||
|
+ sed -i "s/MVERSION/$MALI_VERSION/g" gles_cm.pc
|
||||||
|
+ echo "prefix=$(prefix)" > glesv2.pc
|
||||||
|
+ cat glesv2.pc.in >> glesv2.pc
|
||||||
|
+ sed -i "s/MVERSION/$MALI_VERSION/g" glesv2.pc
|
||||||
|
+
|
||||||
|
+install: egl.pc gles_cm.pc glesv2.pc
|
||||||
|
+ $(MKDIR) $(libdir)/pkgconfig
|
||||||
|
+ $(INSTALL_DATA) $^ $(libdir)/pkgconfig
|
||||||
|
+
|
||||||
|
+clean:
|
||||||
|
+ $(RM) egl.pc gles_cm.pc glesv2.pc
|
||||||
|
+
|
||||||
|
diff --git a/egl.pc.in b/egl.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..0697183
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/egl.pc.in
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+exec_prefix=${prefix}
|
||||||
|
+libdir=${prefix}/lib
|
||||||
|
+includedir=${prefix}/include
|
||||||
|
+
|
||||||
|
+Name: egl
|
||||||
|
+Description: Mali EGL library
|
||||||
|
+Requires.private:
|
||||||
|
+Version: MVERSION
|
||||||
|
+Libs: -L${libdir} -lEGL
|
||||||
|
+Libs.private: -lm -lpthread -ldl
|
||||||
|
+Cflags: -I${includedir}
|
||||||
|
diff --git a/gles_cm.pc.in b/gles_cm.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..22bc348
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gles_cm.pc.in
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+exec_prefix=${prefix}
|
||||||
|
+libdir=${prefix}/lib
|
||||||
|
+includedir=${prefix}/include
|
||||||
|
+
|
||||||
|
+Name: gles_cm
|
||||||
|
+Description: Mali OpenGL ES 1.1 CM library
|
||||||
|
+Requires.private:
|
||||||
|
+Version: MVERSION
|
||||||
|
+Libs: -L${libdir} -lGLES_CM
|
||||||
|
+Libs.private: -lm -lpthread -ldl
|
||||||
|
+Cflags: -I${includedir}
|
||||||
|
diff --git a/glesv2.pc.in b/glesv2.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..efef2ed
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/glesv2.pc.in
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+exec_prefix=${prefix}
|
||||||
|
+libdir=${prefix}/lib
|
||||||
|
+includedir=${prefix}/include
|
||||||
|
+
|
||||||
|
+Name: glesv2
|
||||||
|
+Description: Mali OpenGL ES 2.0 library
|
||||||
|
+Requires.private:
|
||||||
|
+Version: MVERSION
|
||||||
|
+Libs: -L${libdir} -lGLESv2
|
||||||
|
+Libs.private: -lm -lpthread -ldl
|
||||||
|
+Cflags: -I${includedir}
|
||||||
|
diff --git a/include/GLES/gl.h b/include/GLES/gl.h
|
||||||
|
index 858f394..a6bb591 100644
|
||||||
|
--- a/include/GLES/gl.h
|
||||||
|
+++ b/include/GLES/gl.h
|
||||||
|
@@ -29,6 +29,7 @@ typedef float GLfloat;
|
||||||
|
typedef float GLclampf;
|
||||||
|
typedef signed int GLfixed;
|
||||||
|
typedef signed int GLclampx;
|
||||||
|
+typedef char GLchar;
|
||||||
|
|
||||||
|
typedef int * GLintptr;
|
||||||
|
typedef int * GLsizeiptr;
|
@ -0,0 +1,30 @@
|
|||||||
|
From 95bbd40135f96b473d4c713317e485d0049580cd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Raoul Hecky <raoul.hecky@gmail.com>
|
||||||
|
Date: Tue, 8 Apr 2014 08:10:12 +0200
|
||||||
|
Subject: [PATCH] Fix sed to replace by the correct var
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile.pc | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.pc b/Makefile.pc
|
||||||
|
index 01097fd..c51d18c 100644
|
||||||
|
--- a/Makefile.pc
|
||||||
|
+++ b/Makefile.pc
|
||||||
|
@@ -4,13 +4,13 @@ include config.mk
|
||||||
|
all:
|
||||||
|
echo "prefix=$(prefix)" > egl.pc
|
||||||
|
cat egl.pc.in >> egl.pc
|
||||||
|
- sed -i "s/MVERSION/$MALI_VERSION/g" egl.pc
|
||||||
|
+ sed -i "s/MVERSION/${MALI_VERSION}/g" egl.pc
|
||||||
|
echo "prefix=$(prefix)" > gles_cm.pc
|
||||||
|
cat gles_cm.pc.in >> gles_cm.pc
|
||||||
|
- sed -i "s/MVERSION/$MALI_VERSION/g" gles_cm.pc
|
||||||
|
+ sed -i "s/MVERSION/${MALI_VERSION}/g" gles_cm.pc
|
||||||
|
echo "prefix=$(prefix)" > glesv2.pc
|
||||||
|
cat glesv2.pc.in >> glesv2.pc
|
||||||
|
- sed -i "s/MVERSION/$MALI_VERSION/g" glesv2.pc
|
||||||
|
+ sed -i "s/MVERSION/${MALI_VERSION}/g" glesv2.pc
|
||||||
|
|
||||||
|
install: egl.pc gles_cm.pc glesv2.pc
|
||||||
|
$(MKDIR) $(libdir)/pkgconfig
|
@ -4,7 +4,6 @@ LICENSE = "Proprietary"
|
|||||||
LIC_FILES_CHKSUM = "file://README;md5=1b81a178e80ee888ee4571772699ab2c"
|
LIC_FILES_CHKSUM = "file://README;md5=1b81a178e80ee888ee4571772699ab2c"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)"
|
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)"
|
||||||
DEPENDS = "virtual/libx11 libxau libxdmcp libdrm dri2proto libdri2 libump"
|
|
||||||
|
|
||||||
# These libraries shouldn't get installed in world builds unless something
|
# These libraries shouldn't get installed in world builds unless something
|
||||||
# explicitly depends upon them.
|
# explicitly depends upon them.
|
||||||
@ -16,7 +15,10 @@ REQUIRED_DISTRO_FEATURES = "opengl"
|
|||||||
|
|
||||||
SRCREV_pn-${PN} = "d343311efc8db166d8371b28494f0f27b6a58724"
|
SRCREV_pn-${PN} = "d343311efc8db166d8371b28494f0f27b6a58724"
|
||||||
SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \
|
SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \
|
||||||
file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch"
|
file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \
|
||||||
|
file://0002-Add-missing-GLchar-definition.patch \
|
||||||
|
file://0003-Fix-sed-to-replace-by-the-correct-var.patch \
|
||||||
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
@ -26,6 +28,8 @@ PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${@
|
|||||||
PACKAGECONFIG[wayland] = "EGL_TYPE=framebuffer,,,"
|
PACKAGECONFIG[wayland] = "EGL_TYPE=framebuffer,,,"
|
||||||
PACKAGECONFIG[x11] = "EGL_TYPE=x11,,virtual/libx11 libxau libxdmcp libdri2,"
|
PACKAGECONFIG[x11] = "EGL_TYPE=x11,,virtual/libx11 libxau libxdmcp libdri2,"
|
||||||
|
|
||||||
|
# Inhibit warnings about files being stripped, we can't do anything about it.
|
||||||
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
INHIBIT_PACKAGE_STRIP = "1"
|
INHIBIT_PACKAGE_STRIP = "1"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
@ -33,6 +37,24 @@ do_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
make -f Makefile.pc
|
||||||
|
|
||||||
|
# install headers
|
||||||
|
install -d -m 0755 ${D}${includedir}/EGL
|
||||||
|
install -m 0755 ${S}/include/EGL/*.h ${D}${includedir}/EGL/
|
||||||
|
install -d -m 0755 ${D}${includedir}/GLES
|
||||||
|
install -m 0755 ${S}/include/GLES/*.h ${D}${includedir}/GLES/
|
||||||
|
install -d -m 0755 ${D}${includedir}/GLES2
|
||||||
|
install -m 0755 ${S}/include/GLES2/*.h ${D}${includedir}/GLES2/
|
||||||
|
install -d -m 0755 ${D}${includedir}/KHR
|
||||||
|
install -m 0755 ${S}/include/KHR/*.h ${D}${includedir}/KHR/
|
||||||
|
|
||||||
|
# Copy the .pc files
|
||||||
|
install -d -m 0755 ${D}${libdir}/pkgconfig
|
||||||
|
install -m 0644 ${S}/egl.pc ${D}${libdir}/pkgconfig/
|
||||||
|
install -m 0644 ${S}/gles_cm.pc ${D}${libdir}/pkgconfig/
|
||||||
|
install -m 0644 ${S}/glesv2.pc ${D}${libdir}/pkgconfig/
|
||||||
|
|
||||||
install -d ${D}${libdir}
|
install -d ${D}${libdir}
|
||||||
install -d ${D}${includedir}
|
install -d ${D}${includedir}
|
||||||
|
|
||||||
@ -53,6 +75,6 @@ do_install() {
|
|||||||
|
|
||||||
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
|
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
|
||||||
FILES_${PN} += "${libdir}/lib*.so"
|
FILES_${PN} += "${libdir}/lib*.so"
|
||||||
FILES_${PN}-dev = "${includedir}"
|
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig/*"
|
||||||
# These are closed binaries generated elsewhere so don't check ldflags & text relocations
|
# These are closed binaries generated elsewhere so don't check ldflags & text relocations
|
||||||
INSANE_SKIP_${PN} = "dev-so ldflags textrel"
|
INSANE_SKIP_${PN} = "dev-so ldflags textrel"
|
Loading…
Reference in New Issue
Block a user