From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] glew: build for EGL in non-X11 distros
Date: Sun, 18 Dec 2016 09:02:36 -0800 [thread overview]
Message-ID: <1482080556-4642-1-git-send-email-armccurdy@gmail.com> (raw)
The glew 2.0.0 release added support for building for EGL:
http://glew.sourceforge.net/log.html
Add PACKAGECONFIG options for 'opengl' (ie the previous default, with
dependencies on opengl and X11) and 'egl', which depends on EGL only
and allows glew to be built for non-X11 distros.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
.../glew/glew/linux-egl-no-libGL.patch | 38 ++++++++++++++++++++++
meta/recipes-graphics/glew/glew_2.0.0.bb | 22 ++++++++-----
2 files changed, 51 insertions(+), 9 deletions(-)
create mode 100644 meta/recipes-graphics/glew/glew/linux-egl-no-libGL.patch
diff --git a/meta/recipes-graphics/glew/glew/linux-egl-no-libGL.patch b/meta/recipes-graphics/glew/glew/linux-egl-no-libGL.patch
new file mode 100644
index 0000000..48fab16
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/linux-egl-no-libGL.patch
@@ -0,0 +1,38 @@
+From b1317a2faff15ba91b38c2fe5fed24e18003c198 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Sun, 18 Dec 2016 07:01:12 -0800
+Subject: [PATCH] linux-egl no libGL
+
+libGL is not required when building with -DGLEW_EGL
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ config/Makefile.linux-clang-egl | 2 +-
+ config/Makefile.linux-egl | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/config/Makefile.linux-clang-egl b/config/Makefile.linux-clang-egl
+index ca06419..ea8c703 100644
+--- a/config/Makefile.linux-clang-egl
++++ b/config/Makefile.linux-clang-egl
+@@ -1,4 +1,4 @@
+ include config/Makefile.linux-clang
+
+-LDFLAGS.GL = -lEGL -lGL
++LDFLAGS.GL = -lEGL
+ CFLAGS.EXTRA += -DGLEW_EGL
+diff --git a/config/Makefile.linux-egl b/config/Makefile.linux-egl
+index bcdc3cb..3bee77b 100644
+--- a/config/Makefile.linux-egl
++++ b/config/Makefile.linux-egl
+@@ -1,4 +1,4 @@
+ include config/Makefile.linux
+
+-LDFLAGS.GL = -lEGL -lGL
++LDFLAGS.GL = -lEGL
+ CFLAGS.EXTRA += -DGLEW_EGL
+--
+1.9.1
+
diff --git a/meta/recipes-graphics/glew/glew_2.0.0.bb b/meta/recipes-graphics/glew/glew_2.0.0.bb
index 489dd7c..e5bf3cb 100644
--- a/meta/recipes-graphics/glew/glew_2.0.0.bb
+++ b/meta/recipes-graphics/glew/glew_2.0.0.bb
@@ -2,14 +2,13 @@ SUMMARY = "OpenGL extension loading library"
DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
HOMEPAGE = "http://glew.sourceforge.net/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-SECTION = "x11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-
SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
- file://no-strip.patch"
+ file://no-strip.patch \
+ file://linux-egl-no-libGL.patch \
+"
SRC_URI[md5sum] = "2a2cd7c98f13854d2fcddae0d2b20411"
SRC_URI[sha256sum] = "c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764"
@@ -19,12 +18,17 @@ UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
inherit lib_package pkgconfig distro_features_check
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl', d)}"
+
+PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+PACKAGECONFIG[egl] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU',,virtual/egl"
-# Override SYSTEM to avoid calling config.guess, we're cross-compiling. Pass
-# our CFLAGS via POPT as that's the optimisation variable and safely
-# overwritten.
-EXTRA_OEMAKE = "SYSTEM='linux' \
+# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
+# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
+# variable and safely overwritten.
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
CC='${CC}' LD='${CC}' STRIP='' \
LDFLAGS.EXTRA='${LDFLAGS}' \
POPT='${CFLAGS}' \
--
1.9.1
next reply other threads:[~2016-12-18 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-18 17:02 Andre McCurdy [this message]
2016-12-19 11:46 ` [PATCH] glew: build for EGL in non-X11 distros Burton, Ross
2016-12-19 11:51 ` Andre McCurdy
2016-12-20 10:23 ` Burton, Ross
2016-12-20 11:20 ` Andre McCurdy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482080556-4642-1-git-send-email-armccurdy@gmail.com \
--to=armccurdy@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox