blob: 92b6083648751eabad980349b4882b57f5d69533 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "OpenGL extension loading library"
2DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
3HOMEPAGE = "http://glew.sourceforge.net/"
4BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
Patrick Williams213cb262021-08-07 19:21:33 -05009 file://0001-Fix-build-race-in-Makefile.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050010 file://no-strip.patch"
11
12SRC_URI[md5sum] = "3579164bccaef09e36c0af7f4fd5c7c7"
13SRC_URI[sha256sum] = "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1"
14
15UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
16UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
17
18inherit lib_package pkgconfig features_check
19
20REQUIRED_DISTRO_FEATURES = "opengl"
21
22PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
23
24# The opengl and egl-XXX options are exclusive, enable only one.
25PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu,,,egl-gles2"
26PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2,,,opengl"
27
28CFLAGS += "-D_GNU_SOURCE"
29# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
30# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
31# variable and safely overwritten.
32EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
33 CC='${CC}' LD='${CC}' STRIP='' \
34 LDFLAGS.EXTRA='${LDFLAGS}' \
35 POPT='${CFLAGS}' \
36 GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
37 LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
38
39do_compile() {
40 oe_runmake
41}
42
43do_install() {
44 oe_runmake 'DESTDIR=${D}' install.all
45}