Merge lp:~saiarcot895/ubuntu/trusty/openscenegraph/armhf-support into lp:ubuntu/trusty/openscenegraph

Proposed by Saikrishna Arcot
Status: Approved
Approved by: Iain Lane
Approved revision: 41
Proposed branch: lp:~saiarcot895/ubuntu/trusty/openscenegraph/armhf-support
Merge into: lp:ubuntu/trusty/openscenegraph
Diff against target: 299 lines (+223/-4)
7 files modified
debian/changelog (+12/-0)
debian/control (+8/-4)
debian/patches/change-typedef.patch (+13/-0)
debian/patches/dont-build-osgframerenderer-on-gles.patch (+24/-0)
debian/patches/osgDB_freetype.so_no_longer_built (+152/-0)
debian/patches/series (+3/-0)
debian/rules (+11/-0)
To merge this branch: bzr merge lp:~saiarcot895/ubuntu/trusty/openscenegraph/armhf-support
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+230835@code.launchpad.net

Description of the change

Bug #1284190:
This adds support for building on Ubuntu armhf by building OpenSceneGraph with OpenGL ES 2.0. To do this, two build dependencies needed to be added: libegl1-mesa-dev and libgles2-mesa-dev. libgl1-mesa-dev isn't needed for OpenGL ES, and so it has been excluded from armhf.

In addition, a patch that changes the method of selecting what version of OpenGL/OpenGL ES contained a change that excluded one of the examples from being built under certain conditions. That part of the change is included here (as it would otherwise cause a build failure).

Finally, a typedef conflict for GLdouble between this package and Qt has been fixed in this merge as well.

Bug #1339264:
This fixes the freetype library detection, therefore allowing the freetype plugin to be built and for freetype support to be restored.

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks, uploaded to SRU review queue.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

I should have mentioned that a rebuild for any armhf packages dependent on openscenegraph needs to happen as well. Will this happen automatically?

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Yes, the rebuild will happen automatically once the package is accepted.

40. By Saikrishna Arcot <email address hidden>

Add patch to fix FreeType library detection (LP: #1339264).

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Updated to fix bug #1339264.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Can this be sponsored now, or does the corresponding bug have to have the Trusty nomination approved?

41. By Saikrishna Arcot <email address hidden>

Fix Depends for libopenscenegraph-dev

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Anyone? Anyone?

Revision history for this message
Iain Lane (laney) wrote :

Uploaded, thanks

review: Approve

Unmerged revisions

41. By Saikrishna Arcot <email address hidden>

Fix Depends for libopenscenegraph-dev

40. By Saikrishna Arcot <email address hidden>

Add patch to fix FreeType library detection (LP: #1339264).

39. By Saikrishna Arcot <email address hidden>

* Add support for building on armhf by building with OpenGL ES 2.0
  (LP: #1284190).
* Backport part of a commit to not build osgframerenderer example.
* Add change-typedef.patch to fix conflicting typedefs for GLdouble
  with OpenGL ES 2.0
* Exclude freeglut3-dev from dependencies for armhf

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-02-17 23:36:07 +0000
3+++ debian/changelog 2014-08-30 11:39:30 +0000
4@@ -1,3 +1,15 @@
5+openscenegraph (3.2.0~rc1-4ubuntu0.1) trusty; urgency=low
6+
7+ * Add support for building on armhf by building with OpenGL ES 2.0
8+ (LP: #1284190).
9+ * Backport part of a commit to not build osgframerenderer example.
10+ * Add change-typedef.patch to fix conflicting typedefs for GLdouble
11+ with OpenGL ES 2.0
12+ * Exclude freeglut3-dev from dependencies for armhf
13+ * Add patch to fix FreeType library detection (LP: #1339264).
14+
15+ -- Saikrishna Arcot <saiarcot895@gmail.com> Wed, 06 Aug 2014 17:41:46 -0500
16+
17 openscenegraph (3.2.0~rc1-4) unstable; urgency=low
18
19 * Added patch for fixing a multithreading initialization bug in the
20
21=== modified file 'debian/control'
22--- debian/control 2014-01-24 21:09:56 +0000
23+++ debian/control 2014-08-30 11:39:30 +0000
24@@ -1,7 +1,8 @@
25 Source: openscenegraph
26 Section: devel
27 Priority: optional
28-Maintainer: Loic Dachary (OuoU) <loic@debian.org>
29+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
30+XSBC-Original-Maintainer: Loic Dachary (OuoU) <loic@debian.org>
31 Uploaders: Manuel A. Fernandez Montecelo <mafm@debian.org>, Alberto Luaces <aluaces@udc.es>, Ola Lundqvist <opal@debian.org>
32 Build-Depends: debhelper (>= 7.0.0),
33 dpkg-dev (>= 1.16.1~),
34@@ -20,8 +21,10 @@
35 libgdal-dev,
36 libx11-dev,
37 libxmu-dev,
38- freeglut3-dev,
39- libgl1-mesa-dev | libgl-dev,
40+ freeglut3-dev [!armhf],
41+ libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
42+ libegl1-mesa-dev [armhf],
43+ libgles2-mesa-dev [armhf],
44 libxine2-dev,
45 libavcodec-dev,
46 libswscale-dev,
47@@ -70,7 +73,8 @@
48 Architecture: any
49 Depends: ${misc:Depends},
50 libopenthreads-dev,
51- libgl1-mesa-dev | libgl-dev,
52+ libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
53+ libgles2-mesa-dev [armhf],
54 libglu-dev,
55 libopenscenegraph99 (= ${binary:Version})
56 Suggests: openscenegraph-doc,
57
58=== added file 'debian/patches/change-typedef.patch'
59--- debian/patches/change-typedef.patch 1970-01-01 00:00:00 +0000
60+++ debian/patches/change-typedef.patch 2014-08-30 11:39:30 +0000
61@@ -0,0 +1,13 @@
62+Index: openscenegraph/OpenSceneGraph/include/osg/GL
63+===================================================================
64+--- openscenegraph.orig/OpenSceneGraph/include/osg/GL 2014-08-05 16:58:36.000000000 -0500
65++++ openscenegraph/OpenSceneGraph/include/osg/GL 2014-08-06 06:45:29.857287930 -0500
66+@@ -168,7 +168,7 @@
67+ // add defines for OpenGL targets that don't define them, just to ease compatibility across targets
68+ #ifndef GL_DOUBLE
69+ #define GL_DOUBLE 0x140A
70+- typedef double GLdouble;
71++ #define GLdouble double
72+ #endif
73+
74+ #ifndef GL_INT
75
76=== added file 'debian/patches/dont-build-osgframerenderer-on-gles.patch'
77--- debian/patches/dont-build-osgframerenderer-on-gles.patch 1970-01-01 00:00:00 +0000
78+++ debian/patches/dont-build-osgframerenderer-on-gles.patch 2014-08-30 11:39:30 +0000
79@@ -0,0 +1,24 @@
80+Description: Don't build the osgframerenderer example if building for
81+ OpenGL ES 1, OpenGL ES 2, or OpenGL 3. This is a portion of the full commit.
82+Origin: upstream, https://github.com/openscenegraph/osg/commit/3f812e42c7bb257e1e19604318becd359d21f469
83+
84+Index: openscenegraph/OpenSceneGraph/examples/CMakeLists.txt
85+===================================================================
86+--- openscenegraph.orig/OpenSceneGraph/examples/CMakeLists.txt 2014-07-26 08:49:44.583787000 -0500
87++++ openscenegraph/OpenSceneGraph/examples/CMakeLists.txt 2014-08-03 11:41:48.439983802 -0500
88+@@ -46,7 +46,6 @@
89+ ADD_SUBDIRECTORY(osgfont)
90+ ADD_SUBDIRECTORY(osgforest)
91+ ADD_SUBDIRECTORY(osgfxbrowser)
92+- ADD_SUBDIRECTORY(osgframerenderer)
93+ ADD_SUBDIRECTORY(osgoutline)
94+ ADD_SUBDIRECTORY(osggameoflife)
95+ ADD_SUBDIRECTORY(osggeometry)
96+@@ -173,6 +172,7 @@
97+
98+ IF(NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE)
99+ ADD_SUBDIRECTORY(osgscreencapture)
100++ ADD_SUBDIRECTORY(osgframerenderer)
101+ ADD_SUBDIRECTORY(osgmotionblur)
102+ ADD_SUBDIRECTORY(osgteapot)
103+ ENDIF()
104
105=== added file 'debian/patches/osgDB_freetype.so_no_longer_built'
106--- debian/patches/osgDB_freetype.so_no_longer_built 1970-01-01 00:00:00 +0000
107+++ debian/patches/osgDB_freetype.so_no_longer_built 2014-08-30 11:39:30 +0000
108@@ -0,0 +1,152 @@
109+Index: pkg-osg/OpenSceneGraph/CMakeModules/FindFreeType.cmake
110+===================================================================
111+--- pkg-osg.orig/OpenSceneGraph/CMakeModules/FindFreeType.cmake 2014-04-10 20:41:07.000000000 +0200
112++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
113+@@ -1,117 +0,0 @@
114+-# - Locate FreeType library
115+-# This module defines
116+-# FREETYPE_LIBRARY, the library to link against
117+-# FREETYPE_FOUND, if false, do not try to link to FREETYPE
118+-# FREETYPE_INCLUDE_DIRS, where to find headers.
119+-# This is the concatenation of the paths:
120+-# FREETYPE_INCLUDE_DIR_ft2build
121+-# FREETYPE_INCLUDE_DIR_freetype2
122+-#
123+-# $FREETYPE_DIR is an environment variable that would
124+-# correspond to the ./configure --prefix=$FREETYPE_DIR
125+-# used in building FREETYPE.
126+-# Created by Eric Wing.
127+-
128+-# Ugh, FreeType seems to use some #include trickery which
129+-# makes this harder than it should be. It looks like they
130+-# put ft2build.h in a common/easier-to-find location which
131+-# then contains a #include to a more specific header in a
132+-# more specific location (#include <freetype/config/ftheader.h>).
133+-# Then from there, they need to set a bunch of #define's
134+-# so you can do something like:
135+-# #include FT_FREETYPE_H
136+-# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
137+-# wants explicit full paths and this trickery doesn't work too well.
138+-# I'm going to attempt to cut out the middleman and hope
139+-# everything still works.
140+-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
141+- PATHS
142+- $ENV{FREETYPE_DIR}
143+- NO_DEFAULT_PATH
144+- PATH_SUFFIXES include
145+-)
146+-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
147+- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
148+- NO_DEFAULT_PATH
149+- PATH_SUFFIXES include
150+-)
151+-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
152+- PATHS
153+- /usr/local
154+- /usr
155+- /usr/local/X11R6
156+- /usr/local/X11
157+- /usr/X11R6
158+- /usr/X11
159+- /sw
160+- /opt/local
161+- /opt/csw
162+- /opt
163+- /usr/freeware
164+- PATH_SUFFIXES include
165+-)
166+-
167+-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
168+- $ENV{FREETYPE_DIR}/include/freetype2
169+- NO_DEFAULT_PATH
170+-)
171+-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
172+- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
173+- NO_DEFAULT_PATH
174+- PATH_SUFFIXES include/freetype2
175+-)
176+-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
177+- /usr/local/include/freetype2
178+- /usr/include/freetype2
179+- /usr/local/X11R6/include/freetype2
180+- /usr/local/X11/include/freetype2
181+- /usr/X11R6/include/freetype2
182+- /usr/X11/include/freetype2
183+- /sw/include/freetype2
184+- /opt/local/include/freetype2
185+- /opt/csw/include/freetype2
186+- /opt/include/freetype2
187+- /usr/freeware/include/freetype2
188+-)
189+-
190+-FIND_LIBRARY(FREETYPE_LIBRARY
191+- NAMES freetype libfreetype freetype219
192+- PATHS
193+- $ENV{FREETYPE_DIR}
194+- NO_DEFAULT_PATH
195+- PATH_SUFFIXES lib64 lib
196+-)
197+-FIND_LIBRARY(FREETYPE_LIBRARY
198+- NAMES freetype libfreetype freetype219
199+- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
200+- NO_DEFAULT_PATH
201+- PATH_SUFFIXES lib64 lib
202+-)
203+-FIND_LIBRARY(FREETYPE_LIBRARY
204+- NAMES freetype libfreetype freetype219
205+- PATHS
206+- /usr/local
207+- /usr
208+- /usr/local/X11R6
209+- /usr/local/X11
210+- /usr/X11R6
211+- /usr/X11
212+- /sw
213+- /opt/local
214+- /opt/csw
215+- /opt
216+- /usr/freeware
217+- PATH_SUFFIXES lib64 lib
218+-)
219+-
220+-IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
221+- SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
222+-ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
223+-
224+-
225+-SET(FREETYPE_FOUND "NO")
226+-IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
227+- SET(FREETYPE_FOUND "YES")
228+-ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
229+-
230+-
231+Index: pkg-osg/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp
232+===================================================================
233+--- pkg-osg.orig/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp 2014-04-10 20:41:07.000000000 +0200
234++++ pkg-osg/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp 2014-04-10 20:42:27.000000000 +0200
235+@@ -14,8 +14,10 @@
236+ #include "FreeTypeFont.h"
237+ #include "FreeTypeLibrary.h"
238+
239+-#include <freetype/ftoutln.h>
240+-#include <freetype/ftbbox.h>
241++#include <ft2build.h>
242++#include FT_FREETYPE_H
243++#include FT_OUTLINE_H
244++#include FT_BBOX_H
245+
246+ #include <osg/Notify>
247+ #include <osg/io_utils>
248+Index: pkg-osg/OpenSceneGraph/CMakeLists.txt
249+===================================================================
250+--- pkg-osg.orig/OpenSceneGraph/CMakeLists.txt 2014-04-10 20:13:00.488008564 +0200
251++++ pkg-osg/OpenSceneGraph/CMakeLists.txt 2014-04-10 20:45:19.068026311 +0200
252+@@ -512,7 +512,7 @@
253+ ANDROID_3RD_PARTY()
254+ ELSE()
255+ # Common to all platforms except android:
256+- FIND_PACKAGE(FreeType)
257++ FIND_PACKAGE(Freetype)
258+ FIND_PACKAGE(Inventor)
259+ FIND_PACKAGE(Jasper)
260+ FIND_PACKAGE(OpenEXR)
261
262=== modified file 'debian/patches/series'
263--- debian/patches/series 2014-02-17 23:36:07 +0000
264+++ debian/patches/series 2014-08-30 11:39:30 +0000
265@@ -4,3 +4,6 @@
266 osg_libav9.patch
267 Upstream-fix-(b801ae)-for-bug-#736350 -p1
268 fix_for_multithreaded_vrml_loading
269+osgDB_freetype.so_no_longer_built
270+dont-build-osgframerenderer-on-gles.patch
271+change-typedef.patch
272
273=== modified file 'debian/rules'
274--- debian/rules 2013-07-30 13:07:57 +0000
275+++ debian/rules 2014-08-30 11:39:30 +0000
276@@ -66,6 +66,16 @@
277
278 LDFLAGS += -Wl,--as-needed
279
280+ifeq (armhf,$(DEB_HOST_ARCH))
281+EGL_LDFLAGS=$(shell pkg-config egl --libs)
282+OPENGLES_LDFLAGS=$(shell pkg-config glesv2 --libs)
283+ARMHF_DEFINES=-D OSG_GL1_AVAILABLE:BOOL=OFF \
284+ -D OSG_GL2_AVAILABLE:BOOL=OFF \
285+ -D OSG_GLES2_AVAILABLE:BOOL=ON \
286+ -D OPENGL_gl_LIBRARY:STRING="${OPENGLES_LDFLAGS}" \
287+ -D OPENGL_egl_LIBRARY:STRING="${EGL_LDFLAGS}"
288+endif
289+
290 #
291 # Shared libraries version numbers
292 #
293@@ -419,6 +429,7 @@
294 -D CMAKE_INSTALL_PREFIX:PATH=/usr \
295 -D BUILD_OSG_EXAMPLES:BOOL=ON \
296 -D LIB_POSTFIX="" \
297+ ${ARMHF_DEFINES} \
298 ../../${OSG}
299 ${MAKE} ${PARALLEL_OPTIONS} VERBOSE=1 -C build/osg
300

Subscribers

People subscribed via source and target branches