blob: d7a26a3438181415dc6f54f23cc65ce7e5414f83 [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 \
Patrick Williams93c203f2021-10-06 16:15:23 -050010 file://notempdir.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050011 file://no-strip.patch"
12
13SRC_URI[md5sum] = "3579164bccaef09e36c0af7f4fd5c7c7"
14SRC_URI[sha256sum] = "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1"
15
16UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
17UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
18
19inherit lib_package pkgconfig features_check
20
21REQUIRED_DISTRO_FEATURES = "opengl"
22
23PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
24
25# The opengl and egl-XXX options are exclusive, enable only one.
26PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu,,,egl-gles2"
27PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2,,,opengl"
28
29CFLAGS += "-D_GNU_SOURCE"
30# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
31# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
32# variable and safely overwritten.
33EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
34 CC='${CC}' LD='${CC}' STRIP='' \
35 LDFLAGS.EXTRA='${LDFLAGS}' \
36 POPT='${CFLAGS}' \
37 GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
38 LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
39
40do_compile() {
41 oe_runmake
42}
43
44do_install() {
45 oe_runmake 'DESTDIR=${D}' install.all
46}