Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "OpenGL extension loading library" |
| 2 | DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library." |
| 3 | HOMEPAGE = "http://glew.sourceforge.net/" |
| 4 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586" |
| 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2" |
| 7 | |
| 8 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | file://0001-Fix-build-race-in-Makefile.patch \ |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 10 | file://notempdir.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | file://no-strip.patch" |
| 12 | |
| 13 | SRC_URI[md5sum] = "3579164bccaef09e36c0af7f4fd5c7c7" |
| 14 | SRC_URI[sha256sum] = "d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1" |
| 15 | |
| 16 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew" |
| 17 | UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/" |
| 18 | |
| 19 | inherit lib_package pkgconfig features_check |
| 20 | |
| 21 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 22 | |
| 23 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}" |
| 24 | |
| 25 | # The opengl and egl-XXX options are exclusive, enable only one. |
| 26 | PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu,,,egl-gles2" |
| 27 | PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2,,,opengl" |
| 28 | |
| 29 | CFLAGS += "-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. |
| 33 | EXTRA_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 | |
| 40 | do_compile() { |
| 41 | oe_runmake |
| 42 | } |
| 43 | |
| 44 | do_install() { |
| 45 | oe_runmake 'DESTDIR=${D}' install.all |
| 46 | } |