recipes-graphics: add recipes from meta-fsl-bsp-release layer

Some of these recipes might not be strictly necessary for xwayland to work, but
they are related, so I have added them just in case.

https://jira.digi.com/browse/DEL-6104

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2018-08-10 17:19:56 +02:00
parent a2a8491140
commit c82ee2be42
73 changed files with 3042 additions and 0 deletions

View File

@ -0,0 +1,5 @@
PACKAGECONFIG_imxgpu3d ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', \
bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', \
'', d), d)} \
"

View File

@ -0,0 +1,5 @@
PACKAGECONFIG_imxgpu3d ??= " \
cogl-pango gles2 \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', \
bb.utils.contains('DISTRO_FEATURES', 'x11', 'egl-x11', \
'', d), d)}"

View File

@ -0,0 +1,56 @@
From e6bd4205b0b546afe991ae6f72256645f4404ad4 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Mon, 5 Sep 2016 14:41:37 +0300
Subject: [PATCH libdrm] configure.ac: Allow explicit enabling of cunit tests
Add --with-cunit to make it easier to do reproducible builds. Default
is still to probe cunit and build opportunistically.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Submitted [mailing list]
---
configure.ac | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e3048c7..918d21d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs,
[Install test programs (default: no)]),
[INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
+AC_ARG_WITH([cunit],
+ [AS_HELP_STRING([--with-cunit],
+ [Build tests that use cunit (default: auto)])],
+ [],
+ [with_cunit=auto])
+
dnl ===========================================================================
dnl check compiler flags
AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then
AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
fi
-if test "x$AMDGPU" != xno; then
+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then
# Detect cunit library
PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
# If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then
AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
if test "x$have_cunit" = "xno"; then
- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
+ if test "x$with_cunit" = "xyes"; then
+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given])
+ elif test "x$with_cunit" = "xauto"; then
+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
+ fi
fi
fi
--
2.1.4

View File

@ -0,0 +1,24 @@
drmdevice.c: define _GNU_SOURCE
Include config.h to fix this build error with uclibc:
libdrm-2.4.66/tests/drmdevice.c: In function 'main':
libdrm-2.4.66/tests/drmdevice.c:96:60: error:
'O_CLOEXEC' undeclared (first use in this function)
fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0);
Upstream-Status: Pending
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
--- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200
+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200
@@ -21,6 +21,7 @@
*
*/
+#include <config.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -0,0 +1,25 @@
From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Tue, 21 Feb 2017 14:37:52 +0200
Subject: [PATCH] tests: also install test apps
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
tests/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0355a92..b4882cd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,3 +45,4 @@ TESTS = \
check_PROGRAMS = \
$(TESTS) \
drmdevice
+bin_PROGRAMS = $(check_PROGRAMS)
--
2.1.4

View File

@ -0,0 +1,35 @@
Add ARM support into xf86arm.h. This provides support for Xorg interface.
Without this the vivante samples will hang during close requiring a reboot
Upstream-Status: Pending
Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
diff --git a/xf86drm.h b/xf86drm.h
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -461,6 +461,23 @@ do { register unsigned int __old __asm("
: "cr0", "memory"); \
} while (0)
+#elif defined(__arm__)
+ #undef DRM_DEV_MODE
+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
+
+ #define DRM_CAS(lock,old,new,__ret) \
+ do { \
+ __asm__ __volatile__ ( \
+ "1: ldrex %0, [%1]\n" \
+ " teq %0, %2\n" \
+ " ite eq\n" \
+ " strexeq %0, %3, [%1]\n" \
+ " movne %0, #1\n" \
+ : "=&r" (__ret) \
+ : "r" (lock), "r" (old), "r" (new) \
+ : "cc","memory"); \
+ } while (0)
+
#endif /* architecture */
#endif /* __GNUC__ >= 2 */

View File

@ -0,0 +1,55 @@
SUMMARY = "Userspace interface to the kernel DRM services"
DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
stands for \"Direct Rendering Manager\", which is the kernel portion of the \
\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
accelerated OpenGL drivers."
HOMEPAGE = "http://dri.freedesktop.org"
SECTION = "x11/base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
PROVIDES = "drm"
DEPENDS = "libpthread-stubs libpciaccess"
SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
file://installtests.patch \
file://fix_O_CLOEXEC_undeclared.patch \
file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
"
SRC_URI[md5sum] = "35b9544bc2ad864acd1abaa1a2b99092"
SRC_URI[sha256sum] = "7ae9c24d91139ac9a2cdee06fe46dbe1c401a1eda1c0bd2a6d1ecf72f479e0aa"
# IMX: Remove manpages which is added in pyro
#inherit autotools pkgconfig manpages
inherit autotools pkgconfig
EXTRA_OECONF += "--disable-cairo-tests \
--without-cunit \
--enable-omap-experimental-api \
--enable-etnaviv-experimental-api \
--enable-install-test-programs \
--disable-valgrind \
"
# IMX: Remove manpages which is added in pyro
#PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
EXTRA_OECONF += "--disable-manpages"
ALLOW_EMPTY_${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
FILES_${PN}-tests = "${bindir}/*"
FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
FILES_${PN}-kms = "${libdir}/libkms*.so.*"
FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"

View File

@ -0,0 +1,22 @@
SUMMARY = "OpenGL Mathematics Library"
DESCRIPTION = "OpenGL Mathematics (GLM) is a header only C++ \
mathematics library for graphics software based on the OpenGL \
Shading Language (GLSL) specifications."
HOMEPAGE = "https://glm.g-truc.net"
BUGTRACKER = "https://github.com/g-truc/glm/issues"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://copying.txt;md5=4431606d144252143c9c3df384a74cad"
SRC_URI = "git://github.com/g-truc/glm;protocol=https"
SRCREV = "5dcc56489e1b66dfd5bca751fa9b8dc68059e008"
S = "${WORKDIR}/git"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake"
RDEPENDS_${PN}-dev = ""

View File

@ -0,0 +1,6 @@
SRC_URI_remove = " \
file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
"
EXTRA_OECONF_remove = "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"

View File

@ -0,0 +1,37 @@
matchbox-wm: Fix to support closing windows in multi-touch panels
In many applications, the close is not recognized because the sub window class is NULL
This calculates coordinates to track close touch actions in the area to respond.
Upstream Status: Not applicable
diff --git a/src/client_common.c b/src/client_common.c
index 2b62024..30724c1 100644
--- a/src/client_common.c
+++ b/src/client_common.c
@@ -779,10 +779,24 @@ client_get_button_list_item_from_event(Client *c, XButtonEvent *e)
{
struct list_item *l = c->buttons;
MBClientButton *b = NULL;
-
+ int dx, dy;
while (l != NULL)
{
b = (MBClientButton *)l->data;
+ if (e->subwindow == 0)
+ {
+ dx = (e->x - b->x - b->w/2) > 0 ? \
+ (e->x - b->x - b->w/2) : \
+ (b->x + b->w/2 - e->x);
+
+ dy = (e->y - b->y - b->h/2) > 0 ? \
+ (e->y - b->y - b->h/2) : \
+ (b->y + b->h/2 - e->y);
+
+ if (dx <= b->w/2 && dy <= b->h/2)
+ return l;
+ }
+
if (b->win == e->subwindow)
{
return l;

View File

@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " file://fix-close-button-do-not-response-to-multitouch.patch"

View File

@ -0,0 +1,84 @@
From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
Date: Thu, 9 Apr 2015 15:47:21 -0500
Subject: [PATCH] Add OpenVG demos to support wayland.
Upstream-Status: Pending
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
---
src/egl/Makefile.am | 6 +++---
src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 7 deletions(-)
Index: mesa-demos-8.2.0/src/egl/Makefile.am
===================================================================
--- mesa-demos-8.2.0.orig/src/egl/Makefile.am 2016-05-09 11:45:51.479100180 -0500
+++ mesa-demos-8.2.0/src/egl/Makefile.am 2016-05-09 11:45:51.475100160 -0500
@@ -26,10 +26,10 @@
eglut \
opengles1 \
opengles2 \
- oes_vg
+ oes_vg \
+ openvg
if HAVE_GLU
SUBDIRS += \
- opengl \
- openvg
+ opengl
endif
Index: mesa-demos-8.2.0/src/egl/openvg/Makefile.am
===================================================================
--- mesa-demos-8.2.0.orig/src/egl/openvg/Makefile.am 2016-05-09 11:45:51.479100180 -0500
+++ mesa-demos-8.2.0/src/egl/openvg/Makefile.am 2016-05-09 12:39:30.000000000 -0500
@@ -47,13 +47,26 @@
endif
endif
+if HAVE_WAYLAND
+EGL_WL_DEMOS = \
+ lion_wayland \
+ sp_wayland
+
+if HAVE_FREETYPE2
+EGL_WL_DEMOS += \
+ vgtext_wayland
+endif
+endif
+
if HAVE_EGL
if HAVE_VG
bin_PROGRAMS = \
- $(EGL_X11_DEMOS)
+ $(EGL_X11_DEMOS) \
+ $(EGL_WL_DEMOS)
endif
endif
+if HAVE_X11
lion_x11_SOURCES = lion.c lion-render.c lion-render.h
sp_x11_SOURCES = sp.c
@@ -63,6 +76,20 @@
text_SOURCES = text.c
text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la
+endif
+
+if HAVE_WAYLAND
+lion_wayland_SOURCES = lion.c lion-render.c lion-render.h
+lion_wayland_LDADD = ../eglut/libeglut_wayland.la
+
+sp_wayland_SOURCES = sp.c
+sp_wayland_LDADD = ../eglut/libeglut_wayland.la
+
+vgtext_wayland_SOURCES = text.c
+vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
+vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la
+
+endif
SUBDIRS = \
trivial

View File

@ -0,0 +1,28 @@
From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
Date: Tue, 7 Apr 2015 17:58:45 -0500
Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling
Upstream Status: Pending
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
---
src/egl/eglut/eglut_wayland.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c
index 968b33f..5664d35 100644
--- a/src/egl/eglut/eglut_wayland.c
+++ b/src/egl/eglut/eglut_wayland.c
@@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time)
if (win->display_cb)
win->display_cb();
- eglSwapBuffers(_eglut->dpy, win->surface);
+ /*eglSwapBuffers(_eglut->dpy, win->surface);*/
if (callback)
wl_callback_destroy(callback);
--
2.3.5

View File

@ -0,0 +1,355 @@
From 757649a766f90e745f24df1d191caeef15c71399 Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Tue, 4 Jun 2013 09:28:51 -0300
Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i
Vivante libGL does not provide the glWindowPos2iARB symbol, but
glWindowPos2i. Use this instead.
Upstream-Status: Inapropriate [embedded specific]
Reported-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
src/demos/copypix.c | 4 ++--
src/demos/engine.c | 2 +-
src/demos/fogcoord.c | 4 ++--
src/glsl/shadow_sampler.c | 2 +-
src/tests/auxbuffer.c | 2 +-
src/tests/copypixrate.c | 2 +-
src/tests/drawbuffers.c | 2 +-
src/tests/drawbuffers2.c | 2 +-
src/tests/fbotest1.c | 2 +-
src/tests/fbotest2.c | 4 ++--
src/tests/fbotest3.c | 2 +-
src/tests/readrate.c | 10 +++++-----
src/tests/viewmemory.c | 2 +-
src/trivial/clear-fbo-scissor.c | 2 +-
src/trivial/clear-fbo-tex.c | 2 +-
src/trivial/clear-fbo.c | 2 +-
src/trivial/readpixels.c | 2 +-
src/trivial/tri-fbo.c | 2 +-
src/xdemos/glxsnoop.c | 2 +-
src/xdemos/wincopy.c | 4 ++--
20 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/demos/copypix.c b/src/demos/copypix.c
index 286c5a9..041b567 100644
--- a/src/demos/copypix.c
+++ b/src/demos/copypix.c
@@ -54,7 +54,7 @@ static void Display( void )
glClear( GL_COLOR_BUFFER_BIT );
/* draw original image */
- glWindowPos2iARB(dx, dy);
+ glWindowPos2i(dx, dy);
glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
if (Scissor)
@@ -71,7 +71,7 @@ static void Display( void )
/* draw copy */
glPixelZoom(Xzoom, Yzoom);
- glWindowPos2iARB(Xpos, Ypos);
+ glWindowPos2i(Xpos, Ypos);
glCopyPixels(dx, dy, ImgWidth, ImgHeight, GL_COLOR);
glPixelZoom(1, 1);
diff --git a/src/demos/engine.c b/src/demos/engine.c
index 928fcbb..beace4c 100644
--- a/src/demos/engine.c
+++ b/src/demos/engine.c
@@ -971,7 +971,7 @@ Draw(void)
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glColor3f(1, 1 , 1);
- glWindowPos2iARB(10, 10);
+ glWindowPos2i(10, 10);
PrintString(s);
if (lit)
glEnable(GL_LIGHTING);
diff --git a/src/demos/fogcoord.c b/src/demos/fogcoord.c
index 567eec0..e833009 100644
--- a/src/demos/fogcoord.c
+++ b/src/demos/fogcoord.c
@@ -68,14 +68,14 @@ PrintInfo(void)
sprintf(s, "Mode(m): %s Start(s/S): %g End(e/E): %g Density(d/D): %g",
ModeStr, fogStart, fogEnd, fogDensity);
- glWindowPos2iARB(5, 20);
+ glWindowPos2i(5, 20);
PrintString(s);
sprintf(s, "Arrays(a): %s glFogCoord(c): %s EyeZ(z/z): %g",
(Arrays ? "Yes" : "No"),
(fogCoord ? "Yes" : "No"),
camz);
- glWindowPos2iARB(5, 5);
+ glWindowPos2i(5, 5);
PrintString(s);
}
diff --git a/src/glsl/shadow_sampler.c b/src/glsl/shadow_sampler.c
index b830030..eb82d8b 100644
--- a/src/glsl/shadow_sampler.c
+++ b/src/glsl/shadow_sampler.c
@@ -85,7 +85,7 @@ Redisplay(void)
glPopMatrix();
glUseProgram(0);
- glWindowPos2iARB(80, 20);
+ glWindowPos2i(80, 20);
PrintString("white black white black");
{
diff --git a/src/tests/auxbuffer.c b/src/tests/auxbuffer.c
index 5fa399a..0cd5f47 100644
--- a/src/tests/auxbuffer.c
+++ b/src/tests/auxbuffer.c
@@ -419,7 +419,7 @@ event_loop(Display *dpy, Window win)
/* Copy aux buffer image to back color buffer */
glReadBuffer(GL_AUX0);
glDrawBuffer(GL_BACK);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDisable(GL_DEPTH_TEST);
glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR);
glEnable(GL_DEPTH_TEST);
diff --git a/src/tests/copypixrate.c b/src/tests/copypixrate.c
index 2f64e0a..df1f9b0 100644
--- a/src/tests/copypixrate.c
+++ b/src/tests/copypixrate.c
@@ -91,7 +91,7 @@ BlitOne(void)
else
#endif
{
- glWindowPos2iARB(x, y);
+ glWindowPos2i(x, y);
glCopyPixels(0, 0, ImgWidth, ImgHeight, GL_COLOR);
}
}
diff --git a/src/tests/drawbuffers.c b/src/tests/drawbuffers.c
index fa2f8a7..cd5033f 100644
--- a/src/tests/drawbuffers.c
+++ b/src/tests/drawbuffers.c
@@ -88,7 +88,7 @@ Display(void)
glUseProgram(0);
glDisable(GL_DEPTH_TEST);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/tests/drawbuffers2.c b/src/tests/drawbuffers2.c
index 5bcf0b2..84d444b 100644
--- a/src/tests/drawbuffers2.c
+++ b/src/tests/drawbuffers2.c
@@ -112,7 +112,7 @@ Display(void)
glUseProgram(0);
glDisable(GL_DEPTH_TEST);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/tests/fbotest1.c b/src/tests/fbotest1.c
index 161903c..5930a6d 100644
--- a/src/tests/fbotest1.c
+++ b/src/tests/fbotest1.c
@@ -61,7 +61,7 @@ Display( void )
/* draw to window */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/tests/fbotest2.c b/src/tests/fbotest2.c
index 6ef7f12..11c867e 100644
--- a/src/tests/fbotest2.c
+++ b/src/tests/fbotest2.c
@@ -72,7 +72,7 @@ Display( void )
glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glCopyPixels(0, 0, Width, Height, GL_COLOR);
}
else if (blitPix) {
@@ -95,7 +95,7 @@ Display( void )
/* draw to window */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/tests/fbotest3.c b/src/tests/fbotest3.c
index 19f684d..e6d7710 100644
--- a/src/tests/fbotest3.c
+++ b/src/tests/fbotest3.c
@@ -79,7 +79,7 @@ Display( void )
/* draw to window */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/tests/readrate.c b/src/tests/readrate.c
index 3859cf4..81eb8a3 100644
--- a/src/tests/readrate.c
+++ b/src/tests/readrate.c
@@ -85,7 +85,7 @@ MeasureFormat(struct format_type *fmt, GLint width, GLint height, GLuint pbo)
glEnd();
#if DRAW
- glWindowPos2iARB(0,0);
+ glWindowPos2i(0,0);
glDrawPixels(width, height,
fmt->Format, fmt->Type, Buffer);
glFinish();
@@ -137,21 +137,21 @@ Draw(void)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glWindowPos2iARB(10, y);
+ glWindowPos2i(10, y);
sprintf(str, "ReadPixels size: %d x %d", width, height);
PrintString(str);
y -= 14;
- glWindowPos2iARB(10, y);
+ glWindowPos2i(10, y);
PrintString("Press up/down/left/right to change image size.");
y -= 14;
- glWindowPos2iARB(10, y);
+ glWindowPos2i(10, y);
PrintString("Press 'b' to run benchmark test.");
y -= 14;
if (Benchmark) {
- glWindowPos2iARB(10, y);
+ glWindowPos2i(10, y);
PrintString("Testing...");
}
diff --git a/src/tests/viewmemory.c b/src/tests/viewmemory.c
index 16044b9..3584c33 100644
--- a/src/tests/viewmemory.c
+++ b/src/tests/viewmemory.c
@@ -95,7 +95,7 @@ Draw(void)
glDisable(GL_TEXTURE_2D);
glColor3f(0, 1, 0);
- glWindowPos2iARB(10, 10);
+ glWindowPos2i(10, 10);
PrintString(s);
glutSwapBuffers();
diff --git a/src/trivial/clear-fbo-scissor.c b/src/trivial/clear-fbo-scissor.c
index a30935c..5c15200 100644
--- a/src/trivial/clear-fbo-scissor.c
+++ b/src/trivial/clear-fbo-scissor.c
@@ -182,7 +182,7 @@ Draw(void)
/* draw to window */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/trivial/clear-fbo-tex.c b/src/trivial/clear-fbo-tex.c
index de84f98..f0fbdf6 100644
--- a/src/trivial/clear-fbo-tex.c
+++ b/src/trivial/clear-fbo-tex.c
@@ -140,7 +140,7 @@ static void Draw( void )
glClearColor(0.8, 0.8, 0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- glWindowPos2iARB(30, 30);
+ glWindowPos2i(30, 30);
glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/trivial/clear-fbo.c b/src/trivial/clear-fbo.c
index 10d830b..3fee3e3 100644
--- a/src/trivial/clear-fbo.c
+++ b/src/trivial/clear-fbo.c
@@ -116,7 +116,7 @@ Draw(void)
glClearColor(0.8, 0.8, 0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- glWindowPos2iARB(30, 30);
+ glWindowPos2i(30, 30);
glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
free(buffer);
diff --git a/src/trivial/readpixels.c b/src/trivial/readpixels.c
index ccce4ed..74e0546 100644
--- a/src/trivial/readpixels.c
+++ b/src/trivial/readpixels.c
@@ -71,7 +71,7 @@ static void Draw(void)
printf("Pixel(0,0) = %f, %f, %f, %f\n",
image[0], image[1], image[2], image[3]);
/* draw to right half of window */
- glWindowPos2iARB(Width, 0);
+ glWindowPos2i(Width, 0);
glPixelZoom(Zoom, Zoom);
glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image);
free(image);
diff --git a/src/trivial/tri-fbo.c b/src/trivial/tri-fbo.c
index d5800b2..dd1f21a 100644
--- a/src/trivial/tri-fbo.c
+++ b/src/trivial/tri-fbo.c
@@ -119,7 +119,7 @@ static void Draw( void )
glClearColor(0.8, 0.8, 0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- glWindowPos2iARB(30, 30);
+ glWindowPos2i(30, 30);
glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
diff --git a/src/xdemos/glxsnoop.c b/src/xdemos/glxsnoop.c
index 2215cfd..13d2b2d 100644
--- a/src/xdemos/glxsnoop.c
+++ b/src/xdemos/glxsnoop.c
@@ -91,7 +91,7 @@ redraw(Display *dpy, Window srcWin, Window dstWin )
}
glXMakeCurrent(dpy, dstWin, Context);
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glDrawBuffer(GL_FRONT);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, image);
glFlush();
diff --git a/src/xdemos/wincopy.c b/src/xdemos/wincopy.c
index f670983..d010085 100644
--- a/src/xdemos/wincopy.c
+++ b/src/xdemos/wincopy.c
@@ -156,11 +156,11 @@ Redraw(void)
glClear(GL_COLOR_BUFFER_BIT);
if (TestClipping) {
- glWindowPos2iARB(-2, -2);
+ glWindowPos2i(-2, -2);
glCopyPixels(-2, -2, Width[0] + 4, Height[0] + 4, GL_COLOR);
}
else {
- glWindowPos2iARB(0, 0);
+ glWindowPos2i(0, 0);
glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);
}
--
1.8.1

View File

@ -0,0 +1,17 @@
mesa-demos: Add extension header to fix build break now that gl1 is removed
Upstream Status: Pending
diff --git a/src/egl/opengles1/clear.c b/src/egl/opengles1/clear.c
index 9fe1b5291e1905fd6fe572063ed707d59ce45a81..ca9954a21b5f475709dbdef07f90b900962fcbc7 100644
--- a/src/egl/opengles1/clear.c
+++ b/src/egl/opengles1/clear.c
@@ -34,7 +34,7 @@
#include <stdio.h>
#include <EGL/egl.h>
#include <GLES/gl.h>
-
+#include <GLES/glext.h>
#include "eglut.h"
typedef void (GL_APIENTRY *type_ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);

View File

@ -0,0 +1,24 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS = "mesa"
SRC_URI_append_imxgpu = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \
file://fix-clear-build-break.patch \
file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \
file://Add-OpenVG-demos-to-support-wayland.patch"
PACKAGECONFIG_IMX_REMOVE_IF_2D_ONLY = ""
PACKAGECONFIG_IMX_REMOVE_IF_2D_ONLY_imxgpu2d = "gles1 gles2"
PACKAGECONFIG_IMX_REMOVE_IF_2D_ONLY_imxgpu3d = ""
PACKAGECONFIG_remove_imxgpu = " \
${PACKAGECONFIG_IMX_REMOVE_IF_2D_ONLY} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'glu x11', '', d)} \
"
PACKAGECONFIG_append_imxgpu = " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glut', '', d)} \
"
PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut"

View File

@ -0,0 +1 @@
COMPATIBLE_MACHINE_mx8 = "(-)"

View File

@ -0,0 +1,38 @@
From 4801a057730632225337d7f6d26b9335e6b9b078 Mon Sep 17 00:00:00 2001
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Thu, 31 Mar 2016 00:20:15 +0200
Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
---
3rdparty/ippicv/ippicv.cmake | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
index d601da4bb..f6fc1098c 100644
--- a/3rdparty/ippicv/ippicv.cmake
+++ b/3rdparty/ippicv/ippicv.cmake
@@ -39,18 +39,5 @@ function(download_ippicv root_var)
endif()
set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
- ocv_download(FILENAME ${OPENCV_ICV_NAME}
- HASH ${OPENCV_ICV_HASH}
- URL
- "${OPENCV_IPPICV_URL}"
- "$ENV{OPENCV_IPPICV_URL}"
- "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
- DESTINATION_DIR "${THE_ROOT}"
- ID IPPICV
- STATUS res
- UNPACK RELATIVE_URL)
-
- if(res)
- set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
- endif()
+ set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
endfunction()
--
2.13.4

View File

@ -0,0 +1,26 @@
From 2bc6bb9831d07f035fea74ea745cea43dd5f9ef9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 9 Sep 2017 23:48:31 -0700
Subject: [PATCH] Dont use isystem
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
cmake/OpenCVPCHSupport.cmake | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Index: git/cmake/OpenCVPCHSupport.cmake
===================================================================
--- git.orig/cmake/OpenCVPCHSupport.cmake
+++ git/cmake/OpenCVPCHSupport.cmake
@@ -17,7 +17,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2.0")
SET(PCHSupport_FOUND TRUE)
ENDIF()
-
+ SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-I")
+ SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-I")
SET(_PCH_include_prefix "-I")
SET(_PCH_isystem_prefix "-isystem")
SET(_PCH_define_prefix "-D")

View File

@ -0,0 +1,13 @@
Index: git/modules/core/src/command_line_parser.cpp
===================================================================
--- git.orig/modules/core/src/command_line_parser.cpp 2017-01-24 09:21:45.900724275 -0600
+++ git/modules/core/src/command_line_parser.cpp 2017-01-24 10:34:17.000000000 -0600
@@ -10,7 +10,7 @@
static String cat_string(const String& str)
{
int left = 0, right = (int)str.length();
- while( left <= right && str[left] == ' ' )
+ while( left < right && str[left] == ' ' )
left++;
while( right > left && str[right-1] == ' ' )
right--;

View File

@ -0,0 +1,25 @@
diff --git a/modules/core/src/ovx.cpp b/modules/core/src/ovx.cpp
index a53f553..6fb9bce 100644
--- a/modules/core/src/ovx.cpp
+++ b/modules/core/src/ovx.cpp
@@ -17,6 +17,12 @@ namespace cv
bool haveOpenVX()
{
#ifdef HAVE_OPENVX
+ char *p;
+ p = getenv("NO_OPENVX");
+ if((p != NULL) && (p[0] == '1'))
+ {
+ return false;
+ }
static int g_haveOpenVX = -1;
if(g_haveOpenVX < 0)
{
@@ -45,6 +51,7 @@ bool useOpenVX()
{
#ifdef HAVE_OPENVX
CoreTLSData* data = getCoreTlsData().get();
+ if(!haveOpenVX()) return false;
if( data->useOpenVX < 0 )
{
// enabled (if available) by default

View File

@ -0,0 +1,11 @@
diff --git a/samples/openvx/CMakeLists.txt b/samples/openvx/CMakeLists.txt
index fd9165b..85fe948 100644
--- a/samples/openvx/CMakeLists.txt
+++ b/samples/openvx/CMakeLists.txt
@@ -21,5 +21,5 @@ add_definitions(-DIVX_HIDE_INFO_WARNINGS)
file(GLOB_RECURSE cpp_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
foreach(sample_filename ${cpp_samples})
ocv_define_sample(tgt ${sample_filename} openvx)
- ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS})
+ ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS} ${OPENVX_LIBRARIES})
endforeach()

View File

@ -0,0 +1,14 @@
diff --git a/modules/python/bindings/CMakeLists.txt b/modules/python/bindings/CMakeLists.txt
index 73c67aa..a71c297 100644
--- a/modules/python/bindings/CMakeLists.txt
+++ b/modules/python/bindings/CMakeLists.txt
@@ -20,7 +20,8 @@ endforeach()
set(opencv_hdrs "")
set(opencv_userdef_hdrs "")
foreach(m ${OPENCV_PYTHON_MODULES})
- ocv_list_filter(OPENCV_MODULE_${m}_HEADERS "${OPENCV_MODULE_${m}_LOCATION}/include" __hdrs)
+ string(REPLACE "+" "\\\\+" __pattern "${OPENCV_MODULE_${m}_LOCATION}/include")
+ ocv_list_filter(OPENCV_MODULE_${m}_HEADERS "${__pattern}" __hdrs)
list(APPEND opencv_hdrs ${__hdrs})
file(GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp)
list(APPEND opencv_userdef_hdrs ${userdef_hdrs})

View File

@ -0,0 +1,29 @@
diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
index 425c0fa..9123dc6 100644
--- a/cmake/OpenCVGenPkgconfig.cmake
+++ b/cmake/OpenCVGenPkgconfig.cmake
@@ -31,7 +31,7 @@ macro(fix_prefix lst isown)
get_filename_component(libdir "${item}" PATH)
get_filename_component(_libname "${item}" NAME)
ocv_get_libname(libname "${_libname}")
- list(APPEND _lst "-L${libdir}" "-l${libname}")
+ list(APPEND _lst "-l${libname}")
else()
list(APPEND _lst "-l${item}")
endif()
@@ -125,10 +125,14 @@ ocv_list_unique(_3rdparty)
set(OPENCV_PC_LIBS
"-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
+ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
"${_modules}"
)
if(BUILD_SHARED_LIBS)
- set(OPENCV_PC_LIBS_PRIVATE "${_extra}")
+ set(OPENCV_PC_LIBS_PRIVATE
+ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
+ "${_extra}"
+ )
else()
set(OPENCV_PC_LIBS_PRIVATE
"-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"

View File

@ -0,0 +1,57 @@
Upstream-status: Inappropriate [OE specific]
Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
diff --git a/cmake/OpenCVFindLibProtobuf.cmake b/cmake/OpenCVFindLibProtobuf.cmake
index b6ce1e7fd56b..e916ec0df2a6 100644
--- a/cmake/OpenCVFindLibProtobuf.cmake
+++ b/cmake/OpenCVFindLibProtobuf.cmake
@@ -7,21 +7,21 @@ OCV_OPTION(BUILD_PROTOBUF "Force to build libprotobuf from sources" ON)
OCV_OPTION(PROTOBUF_UPDATE_FILES "Force to rebuild .proto files" OFF)
if(PROTOBUF_UPDATE_FILES)
- if(NOT DEFINED Protobuf_PROTOC_EXECUTABLE)
+ if(NOT DEFINED PROTOBUF_PROTOC_EXECUTABLE)
find_package(Protobuf QUIET)
endif()
- if(DEFINED Protobuf_PROTOC_EXECUTABLE AND EXISTS ${Protobuf_PROTOC_EXECUTABLE})
- message(STATUS "The protocol buffer compiler is found (${Protobuf_PROTOC_EXECUTABLE})")
+ if(DEFINED PROTOBUF_PROTOC_EXECUTABLE AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE})
+ message(STATUS "The protocol buffer compiler is found (${PROTOBUF_PROTOC_EXECUTABLE})")
else()
- message(FATAL_ERROR "The protocol buffer compiler is not found (Protobuf_PROTOC_EXECUTABLE='${Protobuf_PROTOC_EXECUTABLE}')")
+ message(FATAL_ERROR "The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='${PROTOBUF_PROTOC_EXECUTABLE}')")
endif()
endif()
-if(NOT BUILD_PROTOBUF AND NOT (DEFINED Protobuf_INCLUDE_DIRS AND DEFINED Protobuf_LIBRARIES))
+if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
find_package(Protobuf QUIET)
endif()
-if(Protobuf_FOUND)
+if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
# nothing
else()
set(Protobuf_LIBRARIES libprotobuf)
diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
index 2a71568d1a44..c6329a742263 100644
--- a/modules/dnn/CMakeLists.txt
+++ b/modules/dnn/CMakeLists.txt
@@ -7,7 +7,7 @@ if(DEFINED BUILD_opencv_dnn AND NOT BUILD_opencv_dnn)
endif()
include(${OpenCV_SOURCE_DIR}/cmake/OpenCVFindLibProtobuf.cmake)
-if(NOT Protobuf_FOUND)
+if(NOT PROTOBUF_FOUND)
ocv_module_disable(opencv_dnn)
endif()
@@ -72,7 +72,7 @@ ocv_source_group("Src\\protobuf" FILES ${Protobuf_SRCS} ${Protobuf_HDRS})
ocv_module_include_directories(include ${Protobuf_INCLUDE_DIRS})
ocv_glob_module_sources(${Protobuf_SRCS} ${Protobuf_HDRS} ${CBLAS_H_PROXY_PATH})
-ocv_create_module(${Protobuf_LIBRARIES} ${LAPACK_LIBRARIES})
+ocv_create_module(${PROTOBUF_LIBRARIES} ${LAPACK_LIBRARIES})
ocv_add_samples()
ocv_add_accuracy_tests()
ocv_add_perf_tests()

View File

@ -0,0 +1,34 @@
Upstream-status: Inappropriate [OE specific]
Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
diff --git a/modules/dnn_modern/CMakeLists.txt b/modules/dnn_modern/CMakeLists.txt
index 79b64b12160b..ba06a0a163e4 100644
--- a/modules/dnn_modern/CMakeLists.txt
+++ b/modules/dnn_modern/CMakeLists.txt
@@ -15,24 +15,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# MODULE REQUIREMENTS
# ----------------------------------------------------------------------------
-set(TINY_DNN_CPP_PATH "${OpenCV_BINARY_DIR}/3rdparty/tinydnn")
-set(TINY_DNN_CPP_ROOT "${TINY_DNN_CPP_PATH}/tiny-dnn-1.0.0a3")
-ocv_download(FILENAME "v1.0.0a3.tar.gz"
- HASH "adb1c512e09ca2c7a6faef36f9c53e59"
- URL
- "${OPENCV_TINY_DNN_URL}"
- "$ENV{OPENCV_TINY_DNN_URL}"
- "https://github.com/tiny-dnn/tiny-dnn/archive/"
- DESTINATION_DIR "${TINY_DNN_CPP_PATH}"
- STATUS TINY_DNN_DOWNLOAD_SUCCESS
- ID "tiny-dnn"
- UNPACK RELATIVE_URL)
-
-if(NOT TINY_DNN_DOWNLOAD_SUCCESS)
- message(STATUS "Failed to download tiny-dnn sources")
-endif()
-
-find_package(TinyDNN QUIET)
+set(TINYDNN_INCLUDE_DIRS "${OpenCV_SOURCE_DIR}/3rdparty/tinydnn/tiny-dnn-1.0.0a3")
+set(TinyDNN_FOUND TRUE)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)

View File

@ -0,0 +1,20 @@
diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt
index e1755595..c7009c47 100644
--- a/modules/xfeatures2d/CMakeLists.txt
+++ b/modules/xfeatures2d/CMakeLists.txt
@@ -5,10 +5,10 @@ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d openc
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake)
set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d")
-download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
-download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
-if(NOT boost_status OR NOT vgg_status)
- ocv_module_disable(xfeatures2d)
-endif()
+#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
+#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
+#if(NOT boost_status OR NOT vgg_status)
+# ocv_module_disable(xfeatures2d)
+#endif()
ocv_module_include_directories("${DOWNLOAD_DIR}")

View File

@ -0,0 +1,13 @@
diff --git a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
index eb2a729cc2eb..8717736484de 100644
--- a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
+++ b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
@@ -24,7 +24,7 @@ if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF
find_package(Protobuf QUIET)
endif()
-if(PROTOBUF_FOUND)
+if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
# nothing
else()
include(${CMAKE_CURRENT_LIST_DIR}/download_protobuf.cmake)

View File

@ -0,0 +1,192 @@
SUMMARY = "Opencv : The Open Computer Vision Library"
HOMEPAGE = "http://opencv.org/"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=62d89c5dcb0583609ea919c56be0ee76"
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
SRCREV_opencv = "6ffc48769ac60d53c4bd1913eac15117c9b1c9f7"
SRCREV_contrib = "ced5aa760688dd2ec867ebf7bd4f0c2341d2fde5"
SRCREV_ipp = "a62e20676a60ee0ad6581e217fe7e4bada3b95db"
SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
def ipp_filename(d):
import re
arch = d.getVar('TARGET_ARCH', True)
if re.match("i.86$", arch):
return "ippicv_2017u2_lnx_ia32_20170418.tgz"
else:
return "ippicv_2017u2_lnx_intel64_20170418.tgz"
def ipp_md5sum(d):
import re
arch = d.getVar('TARGET_ARCH', True)
if re.match("i.86$", arch):
return "f2cece00d802d4dea86df52ed095257e"
else:
return "808b791a6eac9ed78d32a7666804320e"
IPP_FILENAME = "${@ipp_filename(d)}"
IPP_MD5 = "${@ipp_md5sum(d)}"
SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20170418;destsuffix=ipp;name=ipp \
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \
file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
file://fixpkgconfig.patch \
file://uselocalxfeatures.patch;patchdir=../contrib/ \
file://tinydnn.patch;patchdir=../contrib/ \
file://0001-Dont-use-isystem.patch \
file://javagen.patch \
"
PV = "3.4.1+git${SRCPV}"
S = "${WORKDIR}/git"
do_unpack_extra() {
mkdir -p ${S}/3rdparty/tinydnn/
tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
}
addtask unpack_extra after do_unpack before do_patch
EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
-DWITH_1394=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DOPENCV_ICV_HASH=${IPP_MD5} \
-DIPPROOT=${WORKDIR}/ippicv_lnx \
${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
"
EXTRA_OECMAKE_append_x86 = " -DX86=ON"
PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}"
PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas,"
PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft,"
PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native,"
PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog,"
PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype,"
PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2,"
PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base,"
PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3,"
PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native,"
PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd,"
PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native,"
PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"
PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
inherit pkgconfig cmake
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)}
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}"
export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java"
export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native"
export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/"
TARGET_CC_ARCH += "-I${S}/include "
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \
${PN}-apps"
python populate_packages_prepend () {
cv_libdir = d.expand('${libdir}')
do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
pn = d.getVar('PN')
metapkg = pn + '-dev'
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
blacklist = [ metapkg ]
metapkg_rdepends = [ ]
packages = d.getVar('PACKAGES').split()
for pkg in packages[1:]:
if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
metapkg_rdepends.append(pkg)
d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
metapkg = pn
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
blacklist = [ metapkg, "libopencv-ts" ]
metapkg_rdepends = [ ]
for pkg in packages[1:]:
if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'):
metapkg_rdepends.append(pkg)
d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
}
PACKAGES_DYNAMIC += "^libopencv-.*"
FILES_${PN} = ""
FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*"
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${datadir}/OpenCV/*.cmake"
FILES_${PN}-staticdev += "${datadir}/OpenCV/3rdparty/lib/*.a"
FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
FILES_${PN}-java = "${datadir}/OpenCV/java"
FILES_${PN}-samples = "${datadir}/OpenCV/samples/"
INSANE_SKIP_${PN}-java = "libdir"
INSANE_SKIP_${PN}-dbg = "libdir"
ALLOW_EMPTY_${PN} = "1"
SUMMARY_python-opencv = "Python bindings to opencv"
FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
RDEPENDS_python-opencv = "python-core python-numpy"
SUMMARY_python3-opencv = "Python bindings to opencv"
FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
RDEPENDS_python3-opencv = "python3-core python3-numpy"
do_install_append() {
cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
# Move Python files into correct library folder (for multilib build)
if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then
mv ${D}/usr/lib/* ${D}/${libdir}/
rm -rf ${D}/usr/lib
fi
if ${@bb.utils.contains("PACKAGECONFIG", "samples", "true", "false", d)}; then
install -d ${D}${datadir}/OpenCV/samples/bin/
cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/
fi
}

View File

@ -0,0 +1,70 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# Specify the opencv_extra source. The version should match the overall opencv version.
# Recording the opencv_extra version here allows us to raise a fatal error if the
# package version is updated but this section is not.
SRC_URI += "git://github.com/opencv/opencv_extra.git;destsuffix=opencv_extra;name=opencv_extra"
SRCREV_opencv_extra = "c533012eb214ec3db851586f74f9dc43ea20c065"
OPENCV_EXTRA_VERSION = "3.4.1"
SRC_URI_remove = "file://javagen.patch"
SRC_URI += "file://fix_openvx_samples.patch"
SRC_URI += "file://fix_python_bindings.patch"
PACKAGECONFIG_remove_imx = "eigen"
PACKAGECONFIG_remove_mx8 = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'gtk', '', d)}"
PACKAGECONFIG_append_mx8 = " opencl dnn text"
PACKAGECONFIG_append_mx8dv = " openvx"
PACKAGECONFIG_append_mx8qm = " openvx"
PACKAGECONFIG[openvx] = " \
-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU', \
-DWITH_OPENVX=OFF, \
virtual/libopenvx, \
\
"
PACKAGECONFIG[qt5] = " \
-DWITH_QT=ON -DWITH_GTK=OFF \
-DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE}/qt5 \
-DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake, \
-DWITH_QT=OFF, \
qtbase qtbase-native, \
\
"
PACKAGECONFIG[test] = " \
-DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../opencv_extra/testdata, \
-DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF, \
"
do_check_opencv_extra_version() {
OPENCV_VERSION=`echo ${PV} | cut -d '+' -f 1`
if [ "${OPENCV_EXTRA_VERSION}" != "${OPENCV_VERSION}" ]; then
bbfatal "The opencv_extra version ${OPENCV_EXTRA_VERSION} does not match the recipe version ${OPENCV_VERSION}."
fi
}
addtask check_opencv_extra_version before do_fetch
do_compile_prepend() {
# A build break occurs if dnn and python3 are configured. Work around
# the problem by building opencv_dnn first. See
# https://github.com/opencv/opencv/issues/10474.
if ${@bb.utils.contains("PACKAGECONFIG", "dnn python3", "true", "false", d)}; then
bbnote VERBOSE=1 cmake --build '${B}' --target opencv_dnn -- ${PARALLEL_MAKE}
VERBOSE=1 cmake --build '${B}' --target opencv_dnn -- ${PARALLEL_MAKE}
fi
}
do_install_append() {
if ${@bb.utils.contains("PACKAGECONFIG", "samples", "true", "false", d)}; then
install -d ${D}${datadir}/OpenCV/samples/data
cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data
install -d ${D}${datadir}/OpenCV/samples/bin/
cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/
fi
}
RDEPENDS_opencv-apps += \
"${@bb.utils.contains('PACKAGECONFIG', 'test', 'bash', '', d)}"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -0,0 +1,20 @@
# Fix up the fonts to the right location
# Install the ttf files into /usr/lib/fonts directory
PATH_TTF_FONTS="${libdir}/fonts"
do_install_append() {
if [ ! -d ${D}/${PATH_TTF_FONTS} ]; then
mkdir -p ${D}/${PATH_TTF_FONTS}
cp -d ${S}/* ${D}/${PATH_TTF_FONTS}
chown -R root:root ${D}/${PATH_TTF_FONTS}
fi
}
FILES_${PN}-sans += "${PATH_TTF_FONTS}/DejaVuSans.ttf ${PATH_TTF_FONTS}/DejaVuSans-*.ttf"
FILES_${PN}-sans-mono += "${PATH_TTF_FONTS}/DejaVuSansMono*.ttf"
FILES_${PN}-sans-condensed += "${PATH_TTF_FONTS}/DejaVuSansCondensed*.ttf"
FILES_${PN}-serif += "${PATH_TTF_FONTS}/DejaVuSerif.ttf ${PATH_TTF_FONTS}/DejaVuSerif-*.ttf"
FILES_${PN}-serif-condensed += "${PATH_TTF_FONTS}/DejaVuSerifCondensed*.ttf"
FILES_${PN}-mathtexgyre += "${PATH_TTF_FONTS}/DejaVuMathTeXGyre.ttf"

View File

@ -0,0 +1,20 @@
DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \
various well-known 3D model formats in a uniform manner."
HOMEPAGE = "http://www.assimp.org/"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271"
DEPENDS = "zlib"
SRC_URI = "git://github.com/assimp/assimp.git"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
SRCREV = "80799bdbf90ce626475635815ee18537718a05b1"
S = "${WORKDIR}/git"
inherit cmake
EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"

View File

@ -0,0 +1,3 @@
# The line is in the 4.0.0 recipe but removed for some reason in
# the 4.1.0 recipe. It seems to still be needed.
FILES_${PN}-dev += "${libdir}/cmake/"

View File

@ -0,0 +1,82 @@
From 372422ed8ce32e1085cd524156c687df65095237 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Tue, 25 Oct 2016 14:44:20 +0500
Subject: [PATCH] CMakeLists.txt: obey CMAKE_INSTALL_LIBDIR
Not using the exact path that is set through cmake
will end up in a mixed configuration setup where
files are installed on hard-coded locations.
Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
OGLCompilersDLL/CMakeLists.txt | 2 +-
SPIRV/CMakeLists.txt | 2 +-
glslang/CMakeLists.txt | 2 +-
glslang/OSDependent/Unix/CMakeLists.txt | 2 +-
glslang/OSDependent/Windows/CMakeLists.txt | 2 +-
hlsl/CMakeLists.txt | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
index 4954db9..6b518d9 100644
--- a/OGLCompilersDLL/CMakeLists.txt
+++ b/OGLCompilersDLL/CMakeLists.txt
@@ -8,4 +8,4 @@ if(WIN32)
endif(WIN32)
install(TARGETS OGLCompiler
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index 48a6c46..c657d56 100755
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -41,4 +41,4 @@ if(WIN32)
endif(WIN32)
install(TARGETS SPIRV SPVRemapper
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index ff91135..efb7f15 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -89,4 +89,4 @@ if(WIN32)
endif(WIN32)
install(TARGETS glslang
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
index 174cc91..d98057b 100644
--- a/glslang/OSDependent/Unix/CMakeLists.txt
+++ b/glslang/OSDependent/Unix/CMakeLists.txt
@@ -2,4 +2,4 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h)
set_property(TARGET OSDependent PROPERTY FOLDER glslang)
install(TARGETS OSDependent
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
index 399760c..744bcbb 100644
--- a/glslang/OSDependent/Windows/CMakeLists.txt
+++ b/glslang/OSDependent/Windows/CMakeLists.txt
@@ -14,4 +14,4 @@ if(WIN32)
endif(WIN32)
install(TARGETS OSDependent
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
index c7537e2..5111661 100755
--- a/hlsl/CMakeLists.txt
+++ b/hlsl/CMakeLists.txt
@@ -23,4 +23,4 @@ if(WIN32)
endif(WIN32)
install(TARGETS HLSL
- ARCHIVE DESTINATION lib)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
--
1.9.1

View File

@ -0,0 +1,39 @@
SUMMARY = "An OpenGL and OpenGL ES shader front end and validator."
DESCRIPTION = "Glslang is the official reference compiler front end \
for the OpenGL ES and OpenGL shading languages. It \
implements a strict interpretation of the specifications \
for these languages. It is open and free for anyone to use, \
either from a command line or programmatically."
SECTION = "graphics"
HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler"
inherit cmake
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://glslang/Include/Types.h;beginline=1;endline=36;md5=6639a5f9543e833d71e2f4e4ff52f34b"
S = "${WORKDIR}/git"
SRCREV = "81cd764b5ffc475bc73f1fb35f75fd1171bb2343"
SRC_URI = "git://github.com/KhronosGroup/glslang \
file://0001-CMakeLists.txt-obey-CMAKE_INSTALL_LIBDIR.patch"
FILES_${PN} += "${libdir}/*"
BBCLASSEXTEND = "native nativesdk"
do_install_append() {
# Some of the vulkan samples/test require these headers
install -d ${D}${includedir}/SPIRV
cp -f ${S}/SPIRV/GlslangToSpv.h ${D}${includedir}/SPIRV
cp -f ${S}/SPIRV/Logger.h ${D}${includedir}/SPIRV
cp -f ${S}/SPIRV/SPVRemapper.h ${D}${includedir}/SPIRV
cp -f ${S}/SPIRV/spvIR.h ${D}${includedir}/SPIRV
install -d ${D}${includedir}/glslang/Include
cp -f ${S}/glslang/Include/*.h ${D}${includedir}/glslang/Include
install -d ${D}${includedir}/glslang/Public
cp -f ${S}/glslang/Public/*.h ${D}${includedir}/glslang/Public
install -d ${D}${includedir}/glslang/MachineIndependent
cp -f ${S}/glslang/MachineIndependent/Versions.h ${D}${includedir}/glslang/MachineIndependent
}

View File

@ -0,0 +1,24 @@
From 93a770330aa21c91a9b7fce798b73d31cad8f16a Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Tue, 25 Oct 2016 16:12:08 +0500
Subject: [PATCH] spirv-lesspipe.sh: allow using generic shells
The script is harmless for any type of shell and
shouldn't be tied with bash to allow catering
more possibilities.
Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
tools/lesspipe/spirv-lesspipe.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: git/tools/lesspipe/spirv-lesspipe.sh
===================================================================
--- git.orig/tools/lesspipe/spirv-lesspipe.sh 2018-05-01 13:37:34.294579393 -0500
+++ git/tools/lesspipe/spirv-lesspipe.sh 2018-05-01 13:38:35.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) 2016 The Khronos Group Inc.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -0,0 +1,32 @@
SUMMARY = "SPIR-V Tools"
DESCRIPTION = "SPIR-V is a binary intermediate language for representing \
graphical-shader stages and compute kernels for multiple \
Khronos APIs, such as OpenCL, OpenGL, and Vulkan."
SECTION = "graphics"
HOMEPAGE = "https://www.khronos.org/registry/spir-v"
inherit cmake python3native
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
S = "${WORKDIR}/git"
SPIRV_HEADERS_LOCATION = "${S}/external/spirv-headers"
HEADERS_VERSION = "1.1"
SRCREV_spirv-tools = "2c0ce872103d676bf8de5dc87a03ad2c32e215a2"
SRCREV_spirv-headers = "3a4dbdde9a9b2cf23736694ba70262dce27fbeaa"
SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools;protocol=http;name=spirv-tools \
git://github.com/KhronosGroup/SPIRV-Headers;name=spirv-headers;destsuffix=${SPIRV_HEADERS_LOCATION} \
file://0002-spirv-lesspipe.sh-allow-using-generic-shells.patch"
do_install_append() {
if test -d ${SPIRV_HEADERS_LOCATION}/include/spirv/${HEADERS_VERSION}; then
install -d ${D}/${includedir}/SPIRV
install -m 0644 ${SPIRV_HEADERS_LOCATION}/include/spirv/${HEADERS_VERSION}/* ${D}/${includedir}/SPIRV
fi
}
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/libSPIRV*"
INSANE_SKIP_${PN} = "dev-so"

View File

@ -0,0 +1,38 @@
SUMMARY = "Vulkan benchmarking suite."
DESCRIPTION = "vkmark is an extensible Vulkan benchmarking suite with \
targeted, configurable scenes."
SECTION = "graphics"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
inherit meson
S = "${WORKDIR}/git"
SRCREV = "${AUTOREV}"
SRC_URI = "git://github.com/vkmark/vkmark;protocol=https"
VKMARK_INSTALL_DIR = "${WORKDIR}/vm-install"
DEPENDS = " vulkan imx-gpu-viv assimp glm ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
bb.utils.contains('DISTRO_FEATURES', 'x11', ' libxcb','libdrm libgbm', d), d)}"
do_compile() {
ninja -C ${WORKDIR}/build
}
do_install() {
DESTDIR=${VKMARK_INSTALL_DIR} ninja -C ${WORKDIR}/build install
install -d ${D}${bindir}
install -d ${D}${datadir}
install -d ${D}${libdir}
cp -r ${VKMARK_INSTALL_DIR}${bindir}/* ${D}${bindir}/
cp -r ${VKMARK_INSTALL_DIR}${datadir}/* ${D}${datadir}/
cp -r ${VKMARK_INSTALL_DIR}${libdir}/* ${D}${libdir}/
}
FILES_${PN} += "${bindir} ${datadir}"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,2 @@
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,27 @@
From 5d967d036c49a4d609dec979c21fc34159788008 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Mon, 30 Apr 2018 13:52:36 -0500
Subject: [PATCH] CMakeLists.txt: Modify the library path to point to
/usr/lib/libVK<validation layer>.so in json files
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
layers/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 35a1b41..3af3975 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -92,7 +92,7 @@ if(UNIX)
add_custom_target(${config_file}-staging-json ALL
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/staging-json
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.json ${CMAKE_CURRENT_BINARY_DIR}/staging-json
- COMMAND sed -i -e "/\"library_path\":/s$./libVkLayer$libVkLayer$" ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${config_file}.json
+ COMMAND sed -i -e "/\"library_path\":/s$./libVkLayer$$(libdir)/libVkLayer$" ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${config_file}.json
VERBATIM
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.json
)
--
1.9.1

View File

@ -0,0 +1,7 @@
{
"file_format_version": "1.0.0",
"ICD": {
"library_path": "/usr/lib/vulkan/libvulkan_VSI.so",
"api_version": "1.0.30"
}
}

View File

@ -0,0 +1,32 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI += " \
file://icd_VSI.json \
file://0001-CMakeLists.txt-Modify-the-library-path-to-point-to-u.patch \
"
# choose wayland
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}"
DEPENDS = "virtual/egl glslang spirv-tools"
RDEPENDS_${PN} += "libvulkan-imx"
EXTRA_OECMAKE_remove = "-DBUILD_LAYERS=OFF"
# Enable validation layers
EXTRA_OECMAKE_append = " -DBUILD_LAYERS=ON"
do_install_append () {
install -d ${D}${sysconfdir}/vulkan/icd.d
cp ${WORKDIR}/icd_VSI.json ${D}${sysconfdir}/vulkan/icd.d
sed -i "s,/usr/lib,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json
sed -i "s,1.0.30,${PV}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json
# Use some vulkan headers from imx-gpu-viv
rm -rf ${D}${includedir}/vulkan/vk_*
}
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/libvulkan.so ${libdir}/libVkLayer_*.so"
INSANE_SKIP_${PN} = "dev-so"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,7 @@
PACKAGECONFIG_X11 = ""
PACKAGECONFIG_X11_append_imxgpu3d = " x11-egl glx"
PACKAGECONFIG_imxgpu = " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'gbm wayland', \
bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_X11}', \
'', d), d)} \
"

View File

@ -0,0 +1,72 @@
This is a workaround upstream suggests for use with kernel 4.1.
Upstream-Status: Inappropriate [temporary work-around]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Aug 3 18:23:12 PDT 2015
Subject: [PATCH v3 libinput] touchpad: serial synaptics need to fake new touches on TRIPLETAP
On the 4.1 kernels synaptics pretends to have 3 slots (the serial fw only does
2). This was added to avoid cursor jumps but has since been reverted for 4.2
(kernel commit dbf3c37086, 4.1.3 is still buggy). In some cases a TRIPLETAP
may be triggered without slot 2 ever activating.
While there are still those kernels out there, work around this bug by opening
a new touch point where none exists if the fake finger count exceeds the slot
count.
Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Tested-by: Jan Alexander Steffens <jan.steffens at gmail.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
---
Changes to v2:
- split out the handling instead of having a tmp state variable, see Hans'
comments from v2
Mainly sending this to the list again so I have a link to point people to.
If you're on 4.1.x add this patch to your distribution package.
src/evdev-mt-touchpad.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a683d9a..5ef03d5 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -369,13 +369,23 @@ tp_restore_synaptics_touches(struct tp_dispatch *tp,
for (i = 0; i < tp->num_slots; i++) {
struct tp_touch *t = tp_get_touch(tp, i);
- if (t->state != TOUCH_END)
+ switch(t->state) {
+ case TOUCH_HOVERING:
+ case TOUCH_BEGIN:
+ case TOUCH_UPDATE:
continue;
-
- /* new touch, move it through begin to update immediately */
- tp_new_touch(tp, t, time);
- tp_begin_touch(tp, t, time);
- t->state = TOUCH_UPDATE;
+ case TOUCH_NONE:
+ /* new touch, move it through to begin immediately */
+ tp_new_touch(tp, t, time);
+ tp_begin_touch(tp, t, time);
+ break;
+ case TOUCH_END:
+ /* touch just ended ,we need need to restore it to update */
+ tp_new_touch(tp, t, time);
+ tp_begin_touch(tp, t, time);
+ t->state = TOUCH_UPDATE;
+ break;
+ }
}
}
--
2.4.3

View File

@ -0,0 +1,25 @@
SUMMARY = "Library to handle input devices in Wayland compositors"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
DEPENDS = "libevdev udev mtdev"
SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
"
SRC_URI[md5sum] = "7e282344f8ed7ec5cf87ca9fc22674fb"
SRC_URI[sha256sum] = "9d816f13eee63bcca0e9c3bb652c52ab55f39be4d1b90b54e4bfd1dc92ef55a8"
inherit autotools pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
UDEVDIR = "`pkg-config --variable=udevdir udev`"
EXTRA_OECONF += "--with-udev-dir=${UDEVDIR}"

View File

@ -0,0 +1,20 @@
SUMMARY = "Collection of additional Wayland protocols"
DESCRIPTION = "Wayland protocols that add functionality not \
available in the Wayland core protocol. Such protocols either add \
completely new functionality, or extend the functionality of some other \
protocol either in Wayland core, or some other protocol in \
wayland-protocols."
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
"
SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d"
SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38"
inherit allarch autotools pkgconfig
PACKAGES = "${PN}"
FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"

View File

@ -0,0 +1,5 @@
WAYLAND_PROTOCOLS_SRC ?= "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https"
SRCBRANCH = "master"
SRC_URI = "${WAYLAND_PROTOCOLS_SRC};branch=${SRCBRANCH} "
SRCREV = "d5ded4ddaf68b161fec23d75204d2153232c3a47"
S = "${WORKDIR}/git"

View File

@ -0,0 +1,32 @@
Fix wayland-client and wayland-scanner pc files
Upstream-Status: Pending
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Index: wayland-1.14.0/src/wayland-client.pc.in
===================================================================
--- wayland-1.14.0.orig/src/wayland-client.pc.in
+++ wayland-1.14.0/src/wayland-client.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
-pkgdatadir=@datadir@/@PACKAGE@
+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@
libdir=@libdir@
includedir=@includedir@
Index: wayland-1.14.0/src/wayland-scanner.pc.in
===================================================================
--- wayland-1.14.0.orig/src/wayland-scanner.pc.in
+++ wayland-1.14.0/src/wayland-scanner.pc.in
@@ -2,7 +2,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
pkgdatadir=@datadir@/@PACKAGE@
-wayland_scanner=@bindir@/wayland-scanner
+wayland_scanner=wayland-scanner
Name: Wayland Scanner
Description: Wayland scanner

View File

@ -0,0 +1,42 @@
SUMMARY = "Wayland, a protocol between a compositor and clients"
DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
as well as a C library implementation of that protocol. The compositor can be \
a standalone display server running on Linux kernel modesetting and evdev \
input devices, an X application, or a wayland client itself. The clients can \
be traditional applications, X servers (rootless or fullscreen) or other \
display servers."
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
DEPENDS = "expat libxml2 libffi wayland-native"
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://fixpathinpcfiles.patch \
"
SRC_URI[md5sum] = "b7393c17fdce9a8d383edab656c92fd2"
SRC_URI[sha256sum] = "eb3fbebb8559d56a80ad3753ec3db800f587329067962dbf65e14488b4b7aeb0"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-documentation --with-host-scanner"
EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
# Wayland installs a M4 macro for other projects to use, which uses the target
# pkg-config to find files. Replace pkg-config with pkg-config-native.
do_install_append_class-native() {
sed -e 's,PKG_CHECK_MODULES(.*),,g' \
-e 's,$PKG_CONFIG,pkg-config-native,g' \
-i ${D}/${datadir}/aclocal/wayland-scanner.m4
}
sysroot_stage_all_append_class-target () {
rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
}
FILES_${PN} = "${libdir}/*${SOLIBS}"
FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
BBCLASSEXTEND = "native nativesdk"

View File

@ -0,0 +1,23 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
REQUIRED_DISTRO_FEATURES_remove_mx6sl = "opengl"
SRC_URI_append = " file://profile"
SRC_URI_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}"
HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', 'no', d)}"
HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'yes', 'no', d)}"
do_install_append() {
install -Dm0755 ${WORKDIR}/profile ${D}${sysconfdir}/profile.d/weston.sh
if [ "${HAS_SYSTEMD}" = "yes" ]; then
sed -i \
-e 's,/usr/bin,${bindir},g' \
-e 's,/etc,${sysconfdir},g' \
-e 's,/var,${localstatedir},g' \
${D}${systemd_system_unitdir}/weston.service
if [ "${HAS_XWAYLAND}" = "yes" ]; then
install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
fi
fi
}

View File

@ -0,0 +1,3 @@
#!/bin/sh
OPTARGS="--xwayland"
DESKTOP_SHELL_WINDOW=1920x1080

View File

@ -0,0 +1,51 @@
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: weston
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
if test -e /etc/default/weston ; then
. /etc/default/weston
fi
killproc() {
pid=`/bin/pidof $1`
[ "$pid" != "" ] && kill $pid
}
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
weston=false)
echo "Weston disabled"
exit 0;
;;
esac
done
case "$1" in
start)
weston-start -- $OPTARGS
;;
stop)
echo "Stopping Weston"
killproc weston
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 { start | stop | restart }"
;;
esac
exit 0

View File

@ -0,0 +1,7 @@
if test -z "$XDG_RUNTIME_DIR"; then
export XDG_RUNTIME_DIR=/run/user/$USER
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir --parents "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi

View File

@ -0,0 +1,68 @@
#!/bin/sh
# Copyright (C) 2016 O.S. Systems Software LTDA.
# Copyright 2016 Freescale Semiconductor
if [ "$USER" = "" ]; then
export USER=`id -un`
fi
if [ "$HOME" = "/" ]; then
export HOME=/home/$USER
fi
cd
. /etc/profile
usage() {
cat <<EOF
$0 [<openvt arguments>] [-- <weston options>]
EOF
}
## Module support
modules_dir=@DATADIR@/weston-start
# Add weston extra argument
add_weston_argument() {
weston_args="$weston_args $1"
}
# Add openvt extra argument
add_openvt_argument() {
openvt_args="$openvt_args $1"
}
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
exit 1
fi
if [ -n "$DISPLAY" ]; then
launcher="weston"
else
launcher="weston-launch --"
fi
openvt_args="-s"
while [ -n "$1" ]; do
if [ "$1" = "--" ]; then
shift
break
fi
openvt_args="$openvt_args $1"
shift
done
weston_args=$*
# Load and run modules
if [ -d "$modules_dir" ]; then
for m in "$modules_dir"/*; do
# Skip backup files
if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
continue
fi
# process module
. $m
done
fi
exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log

View File

@ -0,0 +1,2 @@
#!/bin/sh
OPTARGS="--xwayland"

View File

@ -0,0 +1,38 @@
[Unit]
Description=Weston Wayland Compositor (on tty7)
RequiresMountsFor=/run
Conflicts=getty@tty7.service plymouth-quit.service
After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
[Service]
User=root
PermissionsStartOnly=true
# Log us in via PAM so we get our XDG & co. environment and
# are treated as logged in so we can use the tty:
PAMName=login
# Grab tty7
UtmpIdentifier=tty7
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
# stderr to journal so our logging doesn't get thrown into /dev/null
StandardOutput=tty
StandardInput=tty
StandardError=journal
EnvironmentFile=-/etc/default/weston
# Weston does not successfully change VT, nor does systemd place us on
# the VT it just activated for us. Switch manually:
ExecStartPre=/usr/bin/chvt 7
ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS
IgnoreSIGPIPE=no
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,70 @@
From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 May 2015 20:56:00 -0700
Subject: [PATCH weston] make error() portable
error() is not posix but gnu extension so may not be available on all
kind of systemsi e.g. musl.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
configure.ac | 2 ++
libweston/weston-error.h | 20 ++++++++++++++++++++
libweston/weston-launch.c | 2 +-
3 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 src/weston-error.h
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[[#include <time.h>]])
AC_CHECK_HEADERS([execinfo.h])
+AC_CHECK_HEADERS([error.h])
+
AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
--- /dev/null
+++ b/libweston/weston-error.h
@@ -0,0 +1,20 @@
+#ifndef _WESTON_ERROR_H
+#define _WESTON_ERROR_H
+
+#if defined(HAVE_ERROR_H)
+#include <error.h>
+#else
+#include <err.h>
+#include <string.h>
+#define _weston_error(S, E, F, ...) do { \
+ if (E) \
+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
+ else \
+ err(S, F, ##__VA_ARGS__); \
+} while(0)
+
+#define error _weston_error
+#endif
+
+#endif
+
--- a/libweston/weston-launch.c
+++ b/libweston/weston-launch.c
@@ -33,7 +33,6 @@
#include <poll.h>
#include <errno.h>
-#include <error.h>
#include <getopt.h>
#include <sys/types.h>
@@ -59,6 +58,7 @@
#endif
#include "weston-launch.h"
+#include "weston-error.h"
#define DRM_MAJOR 226

View File

@ -0,0 +1,172 @@
From 8ff6ed03ec4079f32e9b34085414e57be4730e04 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Feb 2017 15:53:30 +0200
Subject: [PATCH] weston-launch: Provide a default version that doesn't require
PAM
weston-launch requires PAM for starting weston as a non-root user.
Since starting weston as root is a valid use case by itself, if
PAM is not available, provide a default version of weston-launch
without non-root-user support.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
configure.ac | 9 +++++++--
libweston/weston-launch.c | 20 ++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
Index: git/configure.ac
===================================================================
--- git.orig/configure.ac 2018-02-08 14:04:40.807286171 -0600
+++ git/configure.ac 2018-02-08 14:04:40.807286171 -0600
@@ -472,13 +472,17 @@
AS_IF([test "x$enable_resize_optimization" = "xyes"],
[AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
+AC_ARG_WITH(pam,
+ AS_HELP_STRING([--with-pam], [Use PAM]),
+ [use_pam=$withval], [use_pam=yes])
AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes)
-if test x$enable_weston_launch = xyes; then
+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
if test x$have_pam = xno; then
- AC_ERROR([weston-launch requires pam])
+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
fi
+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
fi
AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
@@ -744,6 +748,7 @@
Enable developer documentation ${enable_devdocs}
weston-launch utility ${enable_weston_launch}
+ PAM support ${use_pam}
systemd-login support ${have_systemd_login}
systemd notify support ${enable_systemd_notify}
Index: git/libweston/weston-launch.c
===================================================================
--- git.orig/libweston/weston-launch.c 2018-02-08 14:04:40.807286171 -0600
+++ git/libweston/weston-launch.c 2018-02-08 14:08:10.000000000 -0600
@@ -51,7 +51,9 @@
#include <pwd.h>
#include <grp.h>
+#ifdef HAVE_PAM
#include <security/pam_appl.h>
+#endif
#ifdef HAVE_SYSTEMD_LOGIN
#include <systemd/sd-login.h>
@@ -101,8 +103,10 @@
#endif
struct weston_launch {
+#ifdef HAVE_PAM
struct pam_conv pc;
pam_handle_t *ph;
+#endif
int tty;
int ttynr;
int sock[2];
@@ -189,6 +193,7 @@
return false;
}
+#ifdef HAVE_PAM
static int
pam_conversation_fn(int msg_count,
const struct pam_message **messages,
@@ -229,6 +234,7 @@
return 0;
}
+#endif
static int
setup_launcher_socket(struct weston_launch *wl)
@@ -422,6 +428,7 @@
close(wl->signalfd);
close(wl->sock[0]);
+#ifdef HAVE_PAM
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
@@ -429,6 +436,7 @@
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
+#endif
if (ioctl(wl->tty, KDSKBMUTE, 0) &&
ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
@@ -608,6 +616,7 @@
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
+#ifdef HAVE_PAM
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
@@ -616,6 +625,7 @@
}
free(env);
}
+#endif
/*
* We open a new session, so it makes sense
@@ -683,8 +693,10 @@
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
+#ifdef HAVE_PAM
fprintf(stderr, " -u, --user Start session as specified username,\n"
" e.g. -u joe, requires root.\n");
+#endif
fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
" e.g. -t /dev/tty4, requires -u option.\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
@@ -698,7 +710,9 @@
int i, c;
char *tty = NULL;
struct option opts[] = {
+#ifdef HAVE_PAM
{ "user", required_argument, NULL, 'u' },
+#endif
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
@@ -710,9 +724,13 @@
while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
switch (c) {
case 'u':
+#ifdef HAVE_PAM
wl.new_user = optarg;
if (getuid() != 0)
error(1, 0, "Permission denied. -u allowed for root only");
+#else
+ error(1, 0, "-u is unsupported in this weston-launch build");
+#endif
break;
case 't':
tty = optarg;
@@ -753,8 +771,10 @@
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
+#ifdef HAVE_PAM
if (wl.new_user && setup_pam(&wl) < 0)
exit(EXIT_FAILURE);
+#endif
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);

View File

@ -0,0 +1,155 @@
From b9c05520c4ff688c6488d8ca1e1defc592449d49 Mon Sep 17 00:00:00 2001
From: Neena Busireddy <neenareddy.busireddy@nxp.com>
Date: Wed, 2 May 2018 11:51:45 -0500
Subject: [PATCH] weston.ini.in: Modify paths to point to right directories
Signed-off-by: Neena Busireddy <neenareddy.busireddy@nxp.com>
---
Makefile.am | 2 ++
ivi-shell/weston.ini.in | 56 ++++++++++++++++++++++++-------------------------
2 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 870e347..427cb5b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,7 @@ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
-e 's|@libexecdir[@]|$(libexecdir)|g' \
+ -e 's|@datadir[@]|$(datadir)|g' \
-e 's|@plugin_prefix[@]||g' \
$< > $@
@@ -43,6 +44,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/protocol \
-DLIBWESTON_MODULEDIR='"$(libweston_moduledir)"' \
-DLIBEXECDIR='"$(libexecdir)"' \
+ -DDATADIR='"$(datadir)"' \
-DBINDIR='"$(bindir)"'
CLEANFILES = weston.ini \
diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
index 3f11e1c..d0efd03 100644
--- a/ivi-shell/weston.ini.in
+++ b/ivi-shell/weston.ini.in
@@ -3,7 +3,7 @@ shell=@plugin_prefix@ivi-shell.so
modules=@plugin_prefix@hmi-controller.so
[ivi-shell]
-ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-interface
+ivi-shell-user-interface=@libexecdir@/weston-ivi-shell-user-interface
#developermode=true
@@ -19,20 +19,20 @@ application-layer-id=4000
transition-duration=300
-background-image=@abs_top_srcdir@/data/background.png
+background-image=@datadir@/weston/background.png
background-id=1001
-panel-image=@abs_top_srcdir@/data/panel.png
+panel-image=@datadir@/weston/panel.png
panel-id=1002
surface-id-offset=10
-tiling-image=@abs_top_srcdir@/data/tiling.png
+tiling-image=@datadir@/weston/tiling.png
tiling-id=1003
-sidebyside-image=@abs_top_srcdir@/data/sidebyside.png
+sidebyside-image=@datadir@/weston/sidebyside.png
sidebyside-id=1004
-fullscreen-image=@abs_top_srcdir@/data/fullscreen.png
+fullscreen-image=@datadir@/weston/fullscreen.png
fullscreen-id=1005
-random-image=@abs_top_srcdir@/data/random.png
+random-image=@datadir@/weston/random.png
random-id=1006
-home-image=@abs_top_srcdir@/data/home.png
+home-image=@datadir@/weston/home.png
home-id=1007
workspace-background-color=0x99000000
workspace-background-id=2001
@@ -43,59 +43,59 @@ path=@libexecdir@/weston-keyboard
[ivi-launcher]
workspace-id=0
icon-id=4001
-icon=@abs_top_srcdir@/data/icon_ivi_flower.png
-path=@abs_top_builddir@/weston-flower
+icon=@datadir@/weston/icon_ivi_flower.png
+path=@bindir@/weston-flower
[ivi-launcher]
workspace-id=0
icon-id=4002
-icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png
-path=@abs_top_builddir@/weston-clickdot
+icon=@datadir@/weston/icon_ivi_clickdot.png
+path=@bindir@/weston-clickdot
[ivi-launcher]
workspace-id=1
icon-id=4003
-icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png
-path=@abs_top_builddir@/weston-simple-egl
+icon=@datadir@/weston/icon_ivi_simple-egl.png
+path=@bindir@/weston-simple-egl
[ivi-launcher]
workspace-id=1
icon-id=4004
-icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png
-path=@abs_top_builddir@/weston-simple-shm
+icon=@datadir@/weston/icon_ivi_simple-shm.png
+path=@bindir@/weston-simple-shm
[ivi-launcher]
workspace-id=2
icon-id=4005
-icon=@abs_top_srcdir@/data/icon_ivi_smoke.png
-path=@abs_top_builddir@/weston-smoke
+icon=@datadir@/weston/icon_ivi_smoke.png
+path=@bindir@/weston-smoke
[ivi-launcher]
workspace-id=3
icon-id=4006
-icon=@abs_top_srcdir@/data/icon_ivi_flower.png
-path=@abs_top_builddir@/weston-flower
+icon=@datadir@/weston/icon_ivi_flower.png
+path=@bindir@/weston-flower
[ivi-launcher]
workspace-id=3
icon-id=4007
-icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png
-path=@abs_top_builddir@/weston-clickdot
+icon=@datadir@/weston/icon_ivi_clickdot.png
+path=@bindir@/weston-clickdot
[ivi-launcher]
workspace-id=3
icon-id=4008
-icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png
-path=@abs_top_builddir@/weston-simple-egl
+icon=@datadir@/weston/icon_ivi_simple-egl.png
+path=@bindir@/weston-simple-egl
[ivi-launcher]
workspace-id=3
icon-id=4009
-icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png
-path=@abs_top_builddir@/weston-simple-shm
+icon=@datadir@/weston/icon_ivi_simple-shm.png
+path=@bindir@/weston-simple-shm
[ivi-launcher]
workspace-id=3
icon-id=4010
-icon=@abs_top_srcdir@/data/icon_ivi_smoke.png
-path=@abs_top_builddir@/weston-smoke
+icon=@datadir@/weston/icon_ivi_smoke.png
+path=@bindir@/weston-smoke
--
1.9.1

View File

@ -0,0 +1,55 @@
Multi-plane sub-sampled textures have partial width/height, e.g.
YUV420/I420 has a full-size Y plane, followed by a half-width/height U
plane, and a half-width/height V plane.
zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
plane, but for wl_shm this must be inferred. gl-renderer was correctly
accounting for the width and height when subsampling, but the pitch was
being taken as the pitch for the first plane.
This does not match the requirements for GStreamer's waylandsink, in
particular, as well as other clients. Fix the SHM upload path to
correctly set the pitch for each plane, according to subsampling.
Tested with:
$ gst-launch-1.0 videotestsrc ! waylandsink
Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/180767/]
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
---
libweston/gl-renderer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index 244ce309..40bf0bb6 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
goto done;
}
- glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
-
if (gs->needs_full_upload) {
glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
wl_shm_buffer_begin_access(buffer->shm_buffer);
for (j = 0; j < gs->num_textures; j++) {
glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
glTexImage2D(GL_TEXTURE_2D, 0,
gs->gl_format[j],
gs->pitch / gs->hsub[j],
@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
for (j = 0; j < gs->num_textures; j++) {
glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
glTexSubImage2D(GL_TEXTURE_2D, 0,
r.x1 / gs->hsub[j],
r.y1 / gs->vsub[j],

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Weston
Comment=Wayland Compostitor
Exec=weston
Icon=weston
Terminal=false
Categories=Utility;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,7 @@
#!/bin/sh
if type Xwayland >/dev/null 2>/dev/null; then
mkdir -p /tmp/.X11-unix
add_weston_argument "--modules=xwayland.so"
fi

View File

@ -0,0 +1,116 @@
SUMMARY = "Weston, a Wayland compositor"
DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
HOMEPAGE = "http://wayland.freedesktop.org"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://0001-make-error-portable.patch \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
file://fix-missing-header.patch \
"
SRC_URI[md5sum] = "33709aa4d5916f89643fca0fc0064b39"
SRC_URI[sha256sum] = "a0fc0ae7ef83dfbed12abfe9b8096a24a7dd00705e86fa0db1e619ded18b4b58"
inherit autotools pkgconfig useradd distro_features_check
# depends on virtual/egl
REQUIRED_DISTRO_FEATURES = "opengl"
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
EXTRA_OECONF = "--enable-setuid-install \
--disable-rdp-compositor \
"
EXTRA_OECONF_append_qemux86 = "\
WESTON_NATIVE_BACKEND=fbdev-backend.so \
"
EXTRA_OECONF_append_qemux86-64 = "\
WESTON_NATIVE_BACKEND=fbdev-backend.so \
"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
clients launch"
#
# Compositor choices
#
# Weston on KMS
PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
# Weston on Wayland (nested Weston)
PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
# Weston on X11
PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
# Headless Weston
PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
# Weston on framebuffer
PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
# weston-launch
PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
# VA-API desktop recorder
PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
# Weston with EGL support
PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
# Weston with cairo glesv2 support
PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
# Weston with lcms support
PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
# Weston with webp support
PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
# Weston with unwinding support
PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
# Weston with systemd-login support
PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
# Weston with Xwayland support (requires X11 and Wayland)
PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
# colord CMS support
PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
# Clients support
PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
# Weston with PAM support
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
rm -f ${D}/${libdir}/libweston-4/*.la
# If X11, ship a desktop file to launch it
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" ]; then
install -d ${D}${datadir}/applications
install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
install -d ${D}${datadir}/icons/hicolor/48x48/apps
install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
fi
if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
fi
}
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
libweston-4 ${PN}-examples"
FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
FILES_libweston-4 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-4/*.so"
SUMMARY_libweston-4 = "Helper library for implementing 'wayland window managers'."
FILES_${PN}-examples = "${bindir}/*"
FILES_${PN}-xwayland = "${libdir}/libweston-4/xwayland.so"
RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
RDEPENDS_${PN} += "xkeyboard-config"
RRECOMMENDS_${PN} = "liberation-fonts"
RRECOMMENDS_${PN}-dev += "wayland-protocols"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system weston-launch"

View File

@ -0,0 +1,52 @@
SUMMARY_append = " (with i.MX support)"
DEPENDS_append_imxgpu2d = " virtual/libg2d"
# Use i.MX fork of weston for customizations.
SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
SRC_URI_remove = "file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch"
SRC_URI_remove = "file://fix-missing-header.patch"
SRC_URI += "file://0001-weston.ini.in-Modify-paths-to-point-to-right-directo.patch"
WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https"
SRCBRANCH = "weston-imx-4.0"
SRC_URI_prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
SRCREV = "a400f041e68b25da8ef9f6376d30209e43b507fb"
S = "${WORKDIR}/git"
EXTRA_OECONF_append_imxfbdev = " WESTON_NATIVE_BACKEND=fbdev-backend.so"
# Disable OpenGL for parts with GPU support for 2D but not 3D
IMX_REQUIRED_DISTRO_FEATURES_REMOVE = ""
IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl"
IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = ""
REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}"
IMX_EXTRA_OECONF_OPENGL = ""
IMX_EXTRA_OECONF_OPENGL_imxgpu2d = " --disable-opengl"
IMX_EXTRA_OECONF_OPENGL_imxgpu3d = ""
EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_OPENGL}"
# Disable G2D for parts without GPU support for 2D
IMX_EXTRA_OECONF_G2D = " --disable-imxg2d"
IMX_EXTRA_OECONF_G2D_imxgpu2d = ""
EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_G2D}"
# drm is not supported on mx6/mx7
PACKAGECONFIG_remove_mx6 = "kms"
PACKAGECONFIG_remove_mx7 = "kms"
PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2"
do_install_append() {
if [ "${@bb.utils.filter('BBFILE_COLLECTIONS', 'ivi', d)}" ]; then
WESTON_INI_SRC=${B}/ivi-shell/weston.ini
else
WESTON_INI_SRC=${B}/weston.ini
fi
WESTON_INI_DEST_DIR=${D}${sysconfdir}/xdg/weston
install -d ${WESTON_INI_DEST_DIR}
install -m 0644 ${WESTON_INI_SRC} ${WESTON_INI_DEST_DIR}
}
FILES_${PN} += "${sysconfdir}/xdg/weston"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -0,0 +1,15 @@
Section "Device"
Identifier "i.MX Accelerated DRM Device"
Driver "vivante"
Option "kmsdev" "/dev/dri/card0"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "Xinerama" "off"
Option "Clone" "on"
Option "SWcursor" "true"
EndSection

View File

@ -0,0 +1,14 @@
Section "Device"
Identifier "i.MX Accelerated Framebuffer Device"
Driver "vivante"
Option "fbdev" "/dev/fb0"
Option "vivante_fbdev" "/dev/fb0"
Option "HWcursor" "false"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

View File

@ -0,0 +1,12 @@
Section "Device"
Identifier "Kernel Framebuffer Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

View File

@ -0,0 +1,15 @@
Section "Device"
Identifier "i.MX Accelerated Framebuffer Device"
Driver "vivante"
Option "fbdev" "/dev/fb0"
Option "vivante_fbdev" "/dev/fb0"
Option "HWcursor" "false"
Option "VivCacheMem" "false"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

View File

@ -0,0 +1,2 @@
# Append path for freescale layer to include bsp xorg.conf
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1,30 @@
From 8360595a2c350d985db38e2bc9eff5c80893d660 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Mon, 17 Jul 2017 16:44:23 -0500
Subject: [PATCH] glamor: Use CFLAGS for EGL and GBM
Glamor uses both EGL and GBM, so use CFLAGS for these.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
glamor/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glamor/Makefile.am b/glamor/Makefile.am
index 8c79994..3f0f592 100644
--- a/glamor/Makefile.am
+++ b/glamor/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libglamor.la libglamor_egl_stubs.la
libglamor_la_LIBADD = $(GLAMOR_LIBS)
-AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(GLAMOR_CFLAGS)
+AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(EGL_CFLAGS) $(GBM_CFLAGS) $(GLAMOR_CFLAGS)
libglamor_la_SOURCES = \
glamor.c \
--
1.9.1

View File

@ -0,0 +1,262 @@
From 1c99ec67c526b21f6cde697c8efece82a7884a15 Mon Sep 17 00:00:00 2001
From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Date: Tue, 18 Jul 2017 09:49:06 -0500
Subject: [PATCH] glamor_egl: Automatically choose a GLES2 context if desktop
GL fails.
Backport from xserver 1.19.x for Pyro
GLES2 support has been requested multiple times, and we've had this
code laying around trying to implement it. The GLES2 implementation
is not quite there yet (some pixel transfer failures), but it
shouldn't take much fixing at this point.
Upstream-Status: Inappropriate
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
---
glamor/glamor_egl.c | 143 ++++++++++++++++++++++++++--------------------------
1 file changed, 71 insertions(+), 72 deletions(-)
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 4bde637..d6fd9c5 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -73,7 +73,7 @@ struct glamor_egl_screen_private {
#endif
int has_gem;
int gl_context_depth;
- int dri3_capable;
+
CloseScreenProcPtr saved_close_screen;
DestroyPixmapProcPtr saved_destroy_pixmap;
@@ -307,7 +307,7 @@ glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
glamor_make_current(glamor_priv);
image = eglCreateImageKHR(glamor_egl->display,
- glamor_egl->context,
+ EGL_NO_CONTEXT,
EGL_NATIVE_PIXMAP_KHR, bo, NULL);
if (image == EGL_NO_IMAGE_KHR) {
glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY);
@@ -447,6 +447,7 @@ glamor_egl_dri3_fd_name_from_tex(ScreenPtr screen,
glamor_get_name_from_bo(glamor_egl->fd, bo, &fd);
}
else {
+ /*fixed from Xserver 1.19.x*/
fd = gbm_bo_get_fd(bo);
}
*stride = pixmap->devKind;
@@ -477,9 +478,6 @@ glamor_back_pixmap_from_fd(PixmapPtr pixmap,
glamor_egl = glamor_egl_get_screen_private(scrn);
- if (!glamor_egl->dri3_capable)
- return FALSE;
-
if (bpp != 32 || !(depth == 24 || depth == 32) || width == 0 || height == 0)
return FALSE;
@@ -669,7 +667,7 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
glamor_ctx->make_current = glamor_egl_make_current;
#ifdef DRI3
- if (glamor_egl->dri3_capable) {
+ {
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
/* Tell the core that we have the interfaces for import/export
* of pixmaps.
@@ -733,25 +731,8 @@ Bool
glamor_egl_init(ScrnInfoPtr scrn, int fd)
{
struct glamor_egl_screen_private *glamor_egl;
- const char *version;
- EGLint config_attribs[] = {
-#ifdef GLAMOR_GLES2
- EGL_CONTEXT_CLIENT_VERSION, 2,
-#endif
- EGL_NONE
- };
- static const EGLint config_attribs_core[] = {
- EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
- EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
- EGL_CONTEXT_MAJOR_VERSION_KHR,
- GLAMOR_GL_CORE_VER_MAJOR,
- EGL_CONTEXT_MINOR_VERSION_KHR,
- GLAMOR_GL_CORE_VER_MINOR,
- EGL_NONE
- };
- glamor_identify(0);
glamor_egl = calloc(sizeof(*glamor_egl), 1);
if (glamor_egl == NULL)
return FALSE;
@@ -760,41 +741,26 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
scrn->privates[xf86GlamorEGLPrivateIndex].ptr = glamor_egl;
glamor_egl->fd = fd;
-#ifdef GLAMOR_HAS_GBM
+
glamor_egl->gbm = gbm_create_device(glamor_egl->fd);
if (glamor_egl->gbm == NULL) {
ErrorF("couldn't get display device\n");
goto error;
}
- glamor_egl->display = glamor_egl_get_display(EGL_PLATFORM_GBM_MESA,
- glamor_egl->gbm);
+ glamor_egl->display = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_KHR, glamor_egl->gbm, NULL);
if (!glamor_egl->display) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglGetDisplay() failed\n");
goto error;
}
-#else
- glamor_egl->display = eglGetDisplay((EGLNativeDisplayType) (intptr_t) fd);
-#endif
- glamor_egl->has_gem = glamor_egl_check_has_gem(fd);
+ if (!eglInitialize(glamor_egl->display, NULL, NULL)) {
- if (!eglInitialize
- (glamor_egl->display, &glamor_egl->major, &glamor_egl->minor)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglInitialize() failed\n");
glamor_egl->display = EGL_NO_DISPLAY;
goto error;
}
-#ifndef GLAMOR_GLES2
- eglBindAPI(EGL_OPENGL_API);
-#else
- eglBindAPI(EGL_OPENGL_ES_API);
-#endif
-
- version = eglQueryString(glamor_egl->display, EGL_VERSION);
- xf86Msg(X_INFO, "%s: EGL version %s:\n", glamor_name, version);
-
#define GLAMOR_CHECK_EGL_EXTENSION(EXT) \
if (!epoxy_has_egl_extension(glamor_egl->display, "EGL_" #EXT)) { \
ErrorF("EGL_" #EXT " required.\n"); \
@@ -808,30 +774,66 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
goto error; \
}
- GLAMOR_CHECK_EGL_EXTENSION(MESA_drm_image);
- GLAMOR_CHECK_EGL_EXTENSION(KHR_gl_renderbuffer_image);
-#ifdef GLAMOR_GLES2
- GLAMOR_CHECK_EGL_EXTENSIONS(KHR_surfaceless_context, KHR_surfaceless_gles2);
-#else
- GLAMOR_CHECK_EGL_EXTENSIONS(KHR_surfaceless_context,
- KHR_surfaceless_opengl);
-#endif
+ GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_context);
+
+ if (eglBindAPI(EGL_OPENGL_API)) {
+ static const EGLint config_attribs_core[] = {
+ EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
+ EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
+ EGL_CONTEXT_MAJOR_VERSION_KHR,
+ GLAMOR_GL_CORE_VER_MAJOR,
+ EGL_CONTEXT_MINOR_VERSION_KHR,
+ GLAMOR_GL_CORE_VER_MINOR,
+ EGL_NONE
+ };
+ static const EGLint config_attribs[] = {
+ EGL_NONE
+ };
-#ifndef GLAMOR_GLES2
- glamor_egl->context = eglCreateContext(glamor_egl->display,
- NULL, EGL_NO_CONTEXT,
- config_attribs_core);
-#else
- glamor_egl->context = NULL;
-#endif
- if (!glamor_egl->context) {
glamor_egl->context = eglCreateContext(glamor_egl->display,
NULL, EGL_NO_CONTEXT,
- config_attribs);
- if (glamor_egl->context == EGL_NO_CONTEXT) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create EGL context\n");
+ config_attribs_core);
+
+
+ if (glamor_egl->context == EGL_NO_CONTEXT)
+ glamor_egl->context = eglCreateContext(glamor_egl->display,
+ NULL, EGL_NO_CONTEXT,
+ config_attribs);
+ }
+ if (glamor_egl->context == EGL_NO_CONTEXT) {
+ static const EGLint context_attribs[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+ };
+ EGLint numconfigs;
+ EGLBoolean ret;
+ EGLConfig eglConfig;
+ static const EGLint config_attribs[] = {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_RED_SIZE, 1,
+ EGL_GREEN_SIZE, 1,
+ EGL_BLUE_SIZE, 1,
+ EGL_ALPHA_SIZE, 1,
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL_NONE
+ };
+
+ if (!eglBindAPI(EGL_OPENGL_ES_API)) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "glamor: Failed to bind either GL or GLES APIs.\n");
goto error;
}
+
+ ret = eglChooseConfig(glamor_egl->display, config_attribs, &eglConfig, 1, &numconfigs);
+
+ glamor_egl->context = eglCreateContext(glamor_egl->display,
+ eglConfig, EGL_NO_CONTEXT,
+ context_attribs);
+ }
+ if (glamor_egl->context == EGL_NO_CONTEXT) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "glamor: Failed to create GL or GLES2 contexts\n");
+ goto error;
}
if (!eglMakeCurrent(glamor_egl->display,
@@ -845,21 +847,18 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
* (in case of multiple GPUs using glamor)
*/
lastGLContext = NULL;
-#ifdef GLAMOR_HAS_GBM
- if (epoxy_has_egl_extension(glamor_egl->display,
- "EGL_KHR_gl_texture_2D_image") &&
- epoxy_has_gl_extension("GL_OES_EGL_image"))
- glamor_egl->dri3_capable = TRUE;
-#endif
+
+ if (!epoxy_has_gl_extension("GL_OES_EGL_image")) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "glamor acceleration requires GL_OES_EGL_image\n");
+ goto error;
+ }
+
+ xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor X acceleration enabled on %s\n",
+ glGetString(GL_RENDERER));
glamor_egl->saved_free_screen = scrn->FreeScreen;
scrn->FreeScreen = glamor_egl_free_screen;
-#ifdef GLAMOR_GLES2
- xf86DrvMsg(scrn->scrnIndex, X_INFO, "Using GLES2.\n");
- xf86DrvMsg(scrn->scrnIndex, X_WARNING,
- "Glamor is using GLES2 but GLX needs GL. "
- "Indirect GLX may not work correctly.\n");
-#endif
return TRUE;
error:
--
2.7.4

View File

@ -0,0 +1,11 @@
# REPLACE meta-nxp-mx8
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI += "file://0001-glamor-Use-CFLAGS-for-EGL-and-GBM.patch \
file://0002-glamor_egl-Automatically-choose-a-GLES2-context-if-d.patch"
SRC_URI_remove = "file://0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch"
PACKAGECONFIG_append_mx8 = " glamor"
PACKAGECONFIG_append_imxgpu = " dri3 xshmfence dri glx"
EXTRA_OECONF_remove = "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"