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

Proposed by Saikrishna Arcot
Status: Merged
Merged at revision: 41
Proposed branch: lp:~saiarcot895/ubuntu/utopic/openscenegraph/armhf-support
Merge into: lp:ubuntu/utopic/openscenegraph
Diff against target: 120 lines (+65/-2)
6 files modified
debian/changelog (+11/-0)
debian/control (+4/-2)
debian/patches/change-typedef.patch (+13/-0)
debian/patches/dont-build-osgframerenderer-on-gles.patch (+24/-0)
debian/patches/series (+2/-0)
debian/rules (+11/-0)
To merge this branch: bzr merge lp:~saiarcot895/ubuntu/utopic/openscenegraph/armhf-support
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+229453@code.launchpad.net

Description of the change

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).

Note that OpenSceneGraph will still FTBFS, but will fail at a later point. This is because one of the examples uses freeglut, which still uses OpenGL. The option of building freeglut with OpenGL ES is still in the trunk and is expected to be released with version 3.0. While this example could be temporarily excluded, any application that uses both openscenegraph and freeglut will still FTBFS. The intention for this MP is so that when freetype 3.0 is released, only that package's packaging will have to be changed.

To post a comment you must log in.
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

In commit 42, there is a build error with regards to typedef'ing GLdouble if it isn't defined. Openscenegraph typedefs it to double, while Qt typedefs it to GLfloat (which will be a float). Because of this, a build error occurs. In addition, Qt uses checks if GLdouble is defined using #ifndef, which returns true (that it's not defined), since the typedef doesn't affect #defines.

Revision history for this message
Daniel Holbach (dholbach) wrote :
review: Needs Fixing
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

(Copied from bug)

Something's odd there. Openscenegraph shouldn't be building with Qt5 in Ubuntu (although it is supported, IIRC). I take it this is not in a chroot?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for pointing this out. This was in a chroot, where Qt5 was installed. I'll upload this to a test ppa which does armhf builds in a bit.

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

That is due to the freeglut dependency not yet supporting OpenGL ES and therefore giving an error (as mentioned in the 3rd paragraph of my description). It looks like freeglut is only used in the examples section, so I'm excluding that dependency for armhf.

QGIS and simgear (the library for flightgear) might build, but flightgear won't build until freeglut 3.0 is released.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks. Uploaded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-05-17 16:52:38 +0000
+++ debian/changelog 2014-08-12 11:30:57 +0000
@@ -1,3 +1,14 @@
1openscenegraph (3.2.0~rc1-5.1ubuntu1) utopic; urgency=low
2
3 * Add support for building on armhf by building with OpenGL ES 2.0
4 (LP: #1284190).
5 * Backport part of a commit to not build osgframerenderer example.
6 * Add change-typedef.patch to fix conflicting typedefs for GLdouble
7 with OpenGL ES 2.0
8 * Exclude freeglut3-dev from dependencies for armhf
9
10 -- Saikrishna Arcot <saiarcot895@gmail.com> Wed, 06 Aug 2014 17:41:46 -0500
11
1openscenegraph (3.2.0~rc1-5.1) unstable; urgency=low12openscenegraph (3.2.0~rc1-5.1) unstable; urgency=low
213
3 * Non-maintainer upload.14 * Non-maintainer upload.
415
=== modified file 'debian/control'
--- debian/control 2014-05-17 16:52:38 +0000
+++ debian/control 2014-08-12 11:30:57 +0000
@@ -20,8 +20,10 @@
20 libgdal-dev,20 libgdal-dev,
21 libx11-dev,21 libx11-dev,
22 libxmu-dev,22 libxmu-dev,
23 freeglut3-dev,23 freeglut3-dev [!armhf],
24 libgl1-mesa-dev | libgl-dev,24 libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
25 libegl1-mesa-dev [armhf],
26 libgles2-mesa-dev [armhf],
25 libxine2-dev,27 libxine2-dev,
26 libavcodec-dev,28 libavcodec-dev,
27 libswscale-dev,29 libswscale-dev,
2830
=== added file 'debian/patches/change-typedef.patch'
--- debian/patches/change-typedef.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/change-typedef.patch 2014-08-12 11:30:57 +0000
@@ -0,0 +1,13 @@
1Index: openscenegraph/OpenSceneGraph/include/osg/GL
2===================================================================
3--- openscenegraph.orig/OpenSceneGraph/include/osg/GL 2014-08-05 16:58:36.000000000 -0500
4+++ openscenegraph/OpenSceneGraph/include/osg/GL 2014-08-06 06:45:29.857287930 -0500
5@@ -168,7 +168,7 @@
6 // add defines for OpenGL targets that don't define them, just to ease compatibility across targets
7 #ifndef GL_DOUBLE
8 #define GL_DOUBLE 0x140A
9- typedef double GLdouble;
10+ #define GLdouble double
11 #endif
12
13 #ifndef GL_INT
014
=== added file 'debian/patches/dont-build-osgframerenderer-on-gles.patch'
--- debian/patches/dont-build-osgframerenderer-on-gles.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/dont-build-osgframerenderer-on-gles.patch 2014-08-12 11:30:57 +0000
@@ -0,0 +1,24 @@
1Description: Don't build the osgframerenderer example if building for
2 OpenGL ES 1, OpenGL ES 2, or OpenGL 3. This is a portion of the full commit.
3Origin: upstream, https://github.com/openscenegraph/osg/commit/3f812e42c7bb257e1e19604318becd359d21f469
4
5Index: openscenegraph/OpenSceneGraph/examples/CMakeLists.txt
6===================================================================
7--- openscenegraph.orig/OpenSceneGraph/examples/CMakeLists.txt 2014-07-26 08:49:44.583787000 -0500
8+++ openscenegraph/OpenSceneGraph/examples/CMakeLists.txt 2014-08-03 11:41:48.439983802 -0500
9@@ -46,7 +46,6 @@
10 ADD_SUBDIRECTORY(osgfont)
11 ADD_SUBDIRECTORY(osgforest)
12 ADD_SUBDIRECTORY(osgfxbrowser)
13- ADD_SUBDIRECTORY(osgframerenderer)
14 ADD_SUBDIRECTORY(osgoutline)
15 ADD_SUBDIRECTORY(osggameoflife)
16 ADD_SUBDIRECTORY(osggeometry)
17@@ -173,6 +172,7 @@
18
19 IF(NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE)
20 ADD_SUBDIRECTORY(osgscreencapture)
21+ ADD_SUBDIRECTORY(osgframerenderer)
22 ADD_SUBDIRECTORY(osgmotionblur)
23 ADD_SUBDIRECTORY(osgteapot)
24 ENDIF()
025
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-05-17 16:52:38 +0000
+++ debian/patches/series 2014-08-12 11:30:57 +0000
@@ -6,3 +6,5 @@
6fix_for_multithreaded_vrml_loading6fix_for_multithreaded_vrml_loading
7osgDB_freetype.so_no_longer_built7osgDB_freetype.so_no_longer_built
8libav10.patch8libav10.patch
9dont-build-osgframerenderer-on-gles.patch
10change-typedef.patch
911
=== modified file 'debian/rules'
--- debian/rules 2013-07-30 13:07:57 +0000
+++ debian/rules 2014-08-12 11:30:57 +0000
@@ -66,6 +66,16 @@
6666
67LDFLAGS += -Wl,--as-needed67LDFLAGS += -Wl,--as-needed
6868
69ifeq (armhf,$(DEB_HOST_ARCH))
70EGL_LDFLAGS=$(shell pkg-config egl --libs)
71OPENGLES_LDFLAGS=$(shell pkg-config glesv2 --libs)
72ARMHF_DEFINES=-D OSG_GL1_AVAILABLE:BOOL=OFF \
73 -D OSG_GL2_AVAILABLE:BOOL=OFF \
74 -D OSG_GLES2_AVAILABLE:BOOL=ON \
75 -D OPENGL_gl_LIBRARY:STRING="${OPENGLES_LDFLAGS}" \
76 -D OPENGL_egl_LIBRARY:STRING="${EGL_LDFLAGS}"
77endif
78
69#79#
70# Shared libraries version numbers80# Shared libraries version numbers
71#81#
@@ -419,6 +429,7 @@
419 -D CMAKE_INSTALL_PREFIX:PATH=/usr \429 -D CMAKE_INSTALL_PREFIX:PATH=/usr \
420 -D BUILD_OSG_EXAMPLES:BOOL=ON \430 -D BUILD_OSG_EXAMPLES:BOOL=ON \
421 -D LIB_POSTFIX="" \431 -D LIB_POSTFIX="" \
432 ${ARMHF_DEFINES} \
422 ../../${OSG}433 ../../${OSG}
423 ${MAKE} ${PARALLEL_OPTIONS} VERBOSE=1 -C build/osg434 ${MAKE} ${PARALLEL_OPTIONS} VERBOSE=1 -C build/osg
424435

Subscribers

People subscribed via source and target branches