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
=== modified file 'debian/changelog'
--- debian/changelog 2014-02-17 23:36:07 +0000
+++ debian/changelog 2014-08-30 11:39:30 +0000
@@ -1,3 +1,15 @@
1openscenegraph (3.2.0~rc1-4ubuntu0.1) trusty; 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 * Add patch to fix FreeType library detection (LP: #1339264).
10
11 -- Saikrishna Arcot <saiarcot895@gmail.com> Wed, 06 Aug 2014 17:41:46 -0500
12
1openscenegraph (3.2.0~rc1-4) unstable; urgency=low13openscenegraph (3.2.0~rc1-4) unstable; urgency=low
214
3 * Added patch for fixing a multithreading initialization bug in the15 * Added patch for fixing a multithreading initialization bug in the
416
=== modified file 'debian/control'
--- debian/control 2014-01-24 21:09:56 +0000
+++ debian/control 2014-08-30 11:39:30 +0000
@@ -1,7 +1,8 @@
1Source: openscenegraph1Source: openscenegraph
2Section: devel2Section: devel
3Priority: optional3Priority: optional
4Maintainer: Loic Dachary (OuoU) <loic@debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Loic Dachary (OuoU) <loic@debian.org>
5Uploaders: Manuel A. Fernandez Montecelo <mafm@debian.org>, Alberto Luaces <aluaces@udc.es>, Ola Lundqvist <opal@debian.org>6Uploaders: Manuel A. Fernandez Montecelo <mafm@debian.org>, Alberto Luaces <aluaces@udc.es>, Ola Lundqvist <opal@debian.org>
6Build-Depends: debhelper (>= 7.0.0),7Build-Depends: debhelper (>= 7.0.0),
7 dpkg-dev (>= 1.16.1~),8 dpkg-dev (>= 1.16.1~),
@@ -20,8 +21,10 @@
20 libgdal-dev,21 libgdal-dev,
21 libx11-dev,22 libx11-dev,
22 libxmu-dev,23 libxmu-dev,
23 freeglut3-dev,24 freeglut3-dev [!armhf],
24 libgl1-mesa-dev | libgl-dev,25 libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
26 libegl1-mesa-dev [armhf],
27 libgles2-mesa-dev [armhf],
25 libxine2-dev,28 libxine2-dev,
26 libavcodec-dev,29 libavcodec-dev,
27 libswscale-dev,30 libswscale-dev,
@@ -70,7 +73,8 @@
70Architecture: any73Architecture: any
71Depends: ${misc:Depends},74Depends: ${misc:Depends},
72 libopenthreads-dev,75 libopenthreads-dev,
73 libgl1-mesa-dev | libgl-dev,76 libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
77 libgles2-mesa-dev [armhf],
74 libglu-dev,78 libglu-dev,
75 libopenscenegraph99 (= ${binary:Version})79 libopenscenegraph99 (= ${binary:Version})
76Suggests: openscenegraph-doc,80Suggests: openscenegraph-doc,
7781
=== 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-30 11:39:30 +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-30 11:39:30 +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
=== added file 'debian/patches/osgDB_freetype.so_no_longer_built'
--- debian/patches/osgDB_freetype.so_no_longer_built 1970-01-01 00:00:00 +0000
+++ debian/patches/osgDB_freetype.so_no_longer_built 2014-08-30 11:39:30 +0000
@@ -0,0 +1,152 @@
1Index: pkg-osg/OpenSceneGraph/CMakeModules/FindFreeType.cmake
2===================================================================
3--- pkg-osg.orig/OpenSceneGraph/CMakeModules/FindFreeType.cmake 2014-04-10 20:41:07.000000000 +0200
4+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
5@@ -1,117 +0,0 @@
6-# - Locate FreeType library
7-# This module defines
8-# FREETYPE_LIBRARY, the library to link against
9-# FREETYPE_FOUND, if false, do not try to link to FREETYPE
10-# FREETYPE_INCLUDE_DIRS, where to find headers.
11-# This is the concatenation of the paths:
12-# FREETYPE_INCLUDE_DIR_ft2build
13-# FREETYPE_INCLUDE_DIR_freetype2
14-#
15-# $FREETYPE_DIR is an environment variable that would
16-# correspond to the ./configure --prefix=$FREETYPE_DIR
17-# used in building FREETYPE.
18-# Created by Eric Wing.
19-
20-# Ugh, FreeType seems to use some #include trickery which
21-# makes this harder than it should be. It looks like they
22-# put ft2build.h in a common/easier-to-find location which
23-# then contains a #include to a more specific header in a
24-# more specific location (#include <freetype/config/ftheader.h>).
25-# Then from there, they need to set a bunch of #define's
26-# so you can do something like:
27-# #include FT_FREETYPE_H
28-# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
29-# wants explicit full paths and this trickery doesn't work too well.
30-# I'm going to attempt to cut out the middleman and hope
31-# everything still works.
32-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
33- PATHS
34- $ENV{FREETYPE_DIR}
35- NO_DEFAULT_PATH
36- PATH_SUFFIXES include
37-)
38-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
39- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
40- NO_DEFAULT_PATH
41- PATH_SUFFIXES include
42-)
43-FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
44- PATHS
45- /usr/local
46- /usr
47- /usr/local/X11R6
48- /usr/local/X11
49- /usr/X11R6
50- /usr/X11
51- /sw
52- /opt/local
53- /opt/csw
54- /opt
55- /usr/freeware
56- PATH_SUFFIXES include
57-)
58-
59-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
60- $ENV{FREETYPE_DIR}/include/freetype2
61- NO_DEFAULT_PATH
62-)
63-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
64- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
65- NO_DEFAULT_PATH
66- PATH_SUFFIXES include/freetype2
67-)
68-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
69- /usr/local/include/freetype2
70- /usr/include/freetype2
71- /usr/local/X11R6/include/freetype2
72- /usr/local/X11/include/freetype2
73- /usr/X11R6/include/freetype2
74- /usr/X11/include/freetype2
75- /sw/include/freetype2
76- /opt/local/include/freetype2
77- /opt/csw/include/freetype2
78- /opt/include/freetype2
79- /usr/freeware/include/freetype2
80-)
81-
82-FIND_LIBRARY(FREETYPE_LIBRARY
83- NAMES freetype libfreetype freetype219
84- PATHS
85- $ENV{FREETYPE_DIR}
86- NO_DEFAULT_PATH
87- PATH_SUFFIXES lib64 lib
88-)
89-FIND_LIBRARY(FREETYPE_LIBRARY
90- NAMES freetype libfreetype freetype219
91- PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
92- NO_DEFAULT_PATH
93- PATH_SUFFIXES lib64 lib
94-)
95-FIND_LIBRARY(FREETYPE_LIBRARY
96- NAMES freetype libfreetype freetype219
97- PATHS
98- /usr/local
99- /usr
100- /usr/local/X11R6
101- /usr/local/X11
102- /usr/X11R6
103- /usr/X11
104- /sw
105- /opt/local
106- /opt/csw
107- /opt
108- /usr/freeware
109- PATH_SUFFIXES lib64 lib
110-)
111-
112-IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
113- SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
114-ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
115-
116-
117-SET(FREETYPE_FOUND "NO")
118-IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
119- SET(FREETYPE_FOUND "YES")
120-ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
121-
122-
123Index: pkg-osg/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp
124===================================================================
125--- pkg-osg.orig/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp 2014-04-10 20:41:07.000000000 +0200
126+++ pkg-osg/OpenSceneGraph/src/osgPlugins/freetype/FreeTypeFont.cpp 2014-04-10 20:42:27.000000000 +0200
127@@ -14,8 +14,10 @@
128 #include "FreeTypeFont.h"
129 #include "FreeTypeLibrary.h"
130
131-#include <freetype/ftoutln.h>
132-#include <freetype/ftbbox.h>
133+#include <ft2build.h>
134+#include FT_FREETYPE_H
135+#include FT_OUTLINE_H
136+#include FT_BBOX_H
137
138 #include <osg/Notify>
139 #include <osg/io_utils>
140Index: pkg-osg/OpenSceneGraph/CMakeLists.txt
141===================================================================
142--- pkg-osg.orig/OpenSceneGraph/CMakeLists.txt 2014-04-10 20:13:00.488008564 +0200
143+++ pkg-osg/OpenSceneGraph/CMakeLists.txt 2014-04-10 20:45:19.068026311 +0200
144@@ -512,7 +512,7 @@
145 ANDROID_3RD_PARTY()
146 ELSE()
147 # Common to all platforms except android:
148- FIND_PACKAGE(FreeType)
149+ FIND_PACKAGE(Freetype)
150 FIND_PACKAGE(Inventor)
151 FIND_PACKAGE(Jasper)
152 FIND_PACKAGE(OpenEXR)
0153
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-02-17 23:36:07 +0000
+++ debian/patches/series 2014-08-30 11:39:30 +0000
@@ -4,3 +4,6 @@
4osg_libav9.patch4osg_libav9.patch
5Upstream-fix-(b801ae)-for-bug-#736350 -p15Upstream-fix-(b801ae)-for-bug-#736350 -p1
6fix_for_multithreaded_vrml_loading6fix_for_multithreaded_vrml_loading
7osgDB_freetype.so_no_longer_built
8dont-build-osgframerenderer-on-gles.patch
9change-typedef.patch
710
=== modified file 'debian/rules'
--- debian/rules 2013-07-30 13:07:57 +0000
+++ debian/rules 2014-08-30 11:39:30 +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