summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/glew
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-graphics/glew
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-graphics/glew')
-rw-r--r--meta/recipes-graphics/glew/glew/autotools.patch149
-rw-r--r--meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch46
-rw-r--r--meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch25
-rw-r--r--meta/recipes-graphics/glew/glew_1.11.0.bb21
4 files changed, 241 insertions, 0 deletions
diff --git a/meta/recipes-graphics/glew/glew/autotools.patch b/meta/recipes-graphics/glew/glew/autotools.patch
new file mode 100644
index 0000000000..7dfe087d52
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/autotools.patch
@@ -0,0 +1,149 @@
1
2Upstream-Status: Inappropriate [configuration]
3
4Index: glew/Makefile.am
5===================================================================
6--- /dev/null 1970-01-01 00:00:00.000000000 +0000
7+++ glew/Makefile.am 2009-12-02 00:30:23.296641663 +0100
8@@ -0,0 +1,5 @@
9+
10+ACLOCAL_AMFLAGS = -I m4 --install
11+
12+SUBDIRS = include src
13+
14Index: glew/configure.ac
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ glew/configure.ac 2009-12-02 00:30:23.296641663 +0100
18@@ -0,0 +1,67 @@
19+# -*- Autoconf -*-
20+# Process this file with autoconf to produce a configure script.
21+
22+AC_PREREQ([2.62])
23+AC_INIT([glew], [1.9.0], [BUG-REPORT-ADDRESS])
24+AC_CONFIG_SRCDIR([src/glew.c])
25+AC_CONFIG_HEADERS([config.h])
26+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
27+AC_CONFIG_MACRO_DIR([m4])
28+
29+LT_INIT
30+
31+# Checks for programs.
32+AC_PROG_CC
33+AC_PROG_INSTALL
34+AC_PROG_LN_S
35+
36+# Checks for libraries.
37+
38+# Checks for header files.
39+AC_CHECK_HEADERS([inttypes.h stddef.h stdint.h stdlib.h string.h])
40+
41+# Checks for typedefs, structures, and compiler characteristics.
42+AC_TYPE_INT32_T
43+AC_TYPE_INT64_T
44+AC_TYPE_UINT64_T
45+AC_CHECK_TYPES([ptrdiff_t])
46+
47+# Checks for library functions.
48+AC_FUNC_MALLOC
49+AC_CHECK_FUNCS([strtol])
50+
51+# Check for pkgconfig libs
52+
53+PKG_CHECK_MODULES([X11], [x11])
54+AC_SUBST([X11_LIBS])
55+AC_SUBST([X11_CFLAGS])
56+
57+PKG_CHECK_MODULES([XMU], [xmu])
58+AC_SUBST([XMU_LIBS])
59+AC_SUBST([XMU_CFLAGS])
60+
61+PKG_CHECK_MODULES([XI], [xi])
62+AC_SUBST([XI_LIBS])
63+AC_SUBST([XI_CFLAGS])
64+
65+PKG_CHECK_MODULES([XEXT], [xext])
66+AC_SUBST([XEXT_LIBS])
67+AC_SUBST([XEXT_CFLAGS])
68+
69+# Check for GLU is enough and imples gl so no doubled -lGL in LDFLAGS
70+PKG_CHECK_MODULES([GLU], [glu])
71+AC_SUBST([GLU_LIBS])
72+AC_SUBST([GLU_CFLAGS])
73+
74+# ENABLE option for Multiple Rendering Contexts support
75+AC_CHECK_ENABLE_GLEWMX
76+
77+# for now we use the same version as the package, but that should be avoided
78+# in the future
79+
80+AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
81+
82+AC_CONFIG_FILES([Makefile
83+ include/Makefile
84+ src/Makefile])
85+AC_OUTPUT
86Index: glew/src/Makefile.am
87===================================================================
88--- /dev/null 1970-01-01 00:00:00.000000000 +0000
89+++ glew/src/Makefile.am 2009-12-02 00:33:48.690786110 +0100
90@@ -0,0 +1,35 @@
91+
92+AM_CPPFLAGS = -I$(top_srcdir)/include
93+
94+if ENABLE_GLEWMX
95+AM_CPPFLAGS += -DGLEW_MX
96+endif
97+
98+AM_CFLAGS = @X11_CFLAGS@ \
99+ @XMU_CFLAGS@ \
100+ @XI_CFLAGS@ \
101+ @XEXT_CFLAGS@ \
102+ @GLU_CFLAGS@
103+
104+lib_LTLIBRARIES = libGLEW.la
105+
106+libGLEW_la_SOURCES = glew.c
107+
108+libGLEW_la_LIBADD = @X11_LIBS@ \
109+ @XMU_LIBS@ \
110+ @XI_LIBS@ \
111+ @XEXT_LIBS@ \
112+ @GLU_LIBS@
113+
114+libGLEW_la_LDFLAGS = -version-number @LIBGLEW_SO_VERSION@
115+
116+bin_PROGRAMS = glewinfo visualinfo
117+
118+glewinfo_SOURCES = glewinfo.c
119+
120+glewinfo_LDADD = libGLEW.la
121+
122+visualinfo_SOURCES = visualinfo.c
123+
124+visualinfo_LDADD = libGLEW.la
125+
126Index: glew/m4/glewmx.m4
127===================================================================
128--- /dev/null 1970-01-01 00:00:00.000000000 +0000
129+++ glew/m4/glewmx.m4 2009-12-02 00:30:23.296641663 +0100
130@@ -0,0 +1,11 @@
131+
132+AC_DEFUN([AC_CHECK_ENABLE_GLEWMX],[
133+AC_MSG_CHECKING([whether to include Multiple Rendering Contexts support])
134+AC_ARG_ENABLE([glewmx],
135+ [AS_HELP_STRING([--enable-glewmx], [enable GLEW Multiple Rendering Contexts (default is no)])],
136+ [ENABLE_GLEWMX="$enableval"],
137+ [ENABLE_GLEWMX="no"])
138+AC_MSG_RESULT([${ENABLE_GLEWMX}])
139+AM_CONDITIONAL([ENABLE_GLEWMX], [test x"${ENABLE_GLEWMX}" = "xyes"])
140+])
141+
142Index: glew/include/Makefile.am
143===================================================================
144--- /dev/null 1970-01-01 00:00:00.000000000 +0000
145+++ glew/include/Makefile.am 2009-12-02 00:30:23.296641663 +0100
146@@ -0,0 +1,3 @@
147+
148+nobase_include_HEADERS = GL/glew.h GL/glxew.h GL/wglew.h
149+
diff --git a/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
new file mode 100644
index 0000000000..70a99aeeee
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
@@ -0,0 +1,46 @@
1
2We maintain the autotools configure.ac and Makefile.am, to correctly
3provide the glew.pc, the following patch is needed.
4
5Upstream-Status: Inappropriate
6
7Signed-off-by: Saul Wold <sgw@linux.intel.com>
8
9Index: glew-1.11.0/Makefile.am
10===================================================================
11--- glew-1.11.0.orig/Makefile.am
12+++ glew-1.11.0/Makefile.am
13@@ -3,3 +3,5 @@ ACLOCAL_AMFLAGS = -I m4 --install
14
15 SUBDIRS = include src
16
17+pkgconfigdir = $(libdir)/pkgconfig
18+pkgconfig_DATA = glew.pc
19Index: glew-1.11.0/configure.ac
20===================================================================
21--- glew-1.11.0.orig/configure.ac
22+++ glew-1.11.0/configure.ac
23@@ -66,5 +66,6 @@ AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
24
25 AC_CONFIG_FILES([Makefile
26 include/Makefile
27- src/Makefile])
28+ src/Makefile
29+ glew.pc])
30 AC_OUTPUT
31Index: glew-1.11.0/glew.pc.in
32===================================================================
33--- glew-1.11.0.orig/glew.pc.in
34+++ glew-1.11.0/glew.pc.in
35@@ -5,7 +5,7 @@ includedir=${prefix}/include/GL
36
37 Name: glew
38 Description: The OpenGL Extension Wrangler library
39-Version: @version@
40-Cflags: -I${includedir} @cflags@
41-Libs: -L${libdir} -l@libname@
42-Requires: @requireslib@
43+Version: @VERSION@
44+Cflags: -I${includedir} @CFLAGS@
45+Libs: -L${libdir} -lGLEW
46+Requires: glu
diff --git a/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..0707efba26
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Pending
2
3This patch fixes following issue with automake 1.12
4
5| automake: warnings are treated as errors
6| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libGLEW.la': linking libtool libraries using a non-POSIX
7| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/03
11
12Index: glew-1.7.0/configure.ac
13===================================================================
14--- glew-1.7.0.orig/configure.ac
15+++ glew-1.7.0/configure.ac
16@@ -14,6 +14,9 @@ LT_INIT
17 AC_PROG_CC
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
21+m4_pattern_allow([AM_PROG_AR])
22+AM_PROG_AR
23
24 # Checks for libraries.
25
diff --git a/meta/recipes-graphics/glew/glew_1.11.0.bb b/meta/recipes-graphics/glew/glew_1.11.0.bb
new file mode 100644
index 0000000000..4231320dbd
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew_1.11.0.bb
@@ -0,0 +1,21 @@
1SUMMARY = "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"
5SECTION = "x11"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
8
9DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
10
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
13 file://autotools.patch \
14 file://glew_fix_for_automake-1.12.patch \
15 file://fix-glew.pc-install.patch \
16 "
17
18SRC_URI[md5sum] = "f6d72c7426a5f66580ad09e50816450a"
19SRC_URI[sha256sum] = "69bbce306ac281c4fa806a7a7d02c0596281a2d8f9d70690e98126f23ba513d6"
20
21inherit autotools lib_package pkgconfig