Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | file://no-strip.patch \ |
| 10 | file://0001-Fixed-compilation-with-current-mesa-versions.patch" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | |
| 12 | SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980" |
| 13 | SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95" |
| 14 | |
| 15 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew" |
| 16 | UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/" |
| 17 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 18 | inherit lib_package pkgconfig features_check |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | |
| 20 | REQUIRED_DISTRO_FEATURES = "opengl" |
| 21 | |
| 22 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}" |
| 23 | |
| 24 | # The opengl and egl-XXX options are exclusive, enable only one. |
| 25 | PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu" |
| 26 | PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2" |
| 27 | |
| 28 | CFLAGS += "-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. |
| 32 | EXTRA_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 | |
| 39 | do_compile() { |
| 40 | oe_runmake |
| 41 | } |
| 42 | |
| 43 | do_install() { |
| 44 | oe_runmake 'DESTDIR=${D}' install.all |
| 45 | } |