osg: revbump to rebuild for arm*

This commit is contained in:
Jürgen Buchmüller 2016-06-18 16:07:05 +02:00
parent 03b9ce32db
commit 539ee855c5
4 changed files with 4 additions and 298 deletions

View file

@ -1,7 +1,7 @@
# Template file for 'osg' # Template file for 'osg'
pkgname=osg pkgname=osg
version=3.4.0 version=3.4.0
revision=1 revision=2
wrksrc=OpenSceneGraph-${version} wrksrc=OpenSceneGraph-${version}
build_style=cmake build_style=cmake
# don't use /usr/lib64 on 64bit platforms # don't use /usr/lib64 on 64bit platforms

View file

@ -1,187 +0,0 @@
--- simgear/canvas/elements/CanvasText.cxx 2015-02-18 21:10:39.000000000 +0100
+++ simgear/canvas/elements/CanvasText.cxx 2015-10-31 11:45:28.423416396 +0100
@@ -159,13 +159,17 @@
if( empty() )
return pos;
-
+#if OSG_VERSION_LESS_THAN(3,3,5)
GlyphQuads::Coords2 const& coords = _quads->_coords;
+#else
+ GlyphQuads::Coords2 refCoords = _quads->_coords;
+ GlyphQuads::Coords2::element_type &coords = *refCoords.get();
+#endif
size_t global_i = _begin + i;
if( global_i == _begin )
// before first character of line
pos.x() = coords[_begin * 4].x();
else if( global_i == _end )
// After Last character of line
pos.x() = coords[(_end - 1) * 4 + 2].x();
@@ -194,7 +198,12 @@
return cursorPos(0);
GlyphQuads::Glyphs const& glyphs = _quads->_glyphs;
+#if OSG_VERSION_LESS_THAN(3,3,5)
GlyphQuads::Coords2 const& coords = _quads->_coords;
+#else
+ GlyphQuads::Coords2 refCoords = _quads->_coords;
+ GlyphQuads::Coords2::element_type &coords = *refCoords.get();
+#endif
float const HIT_FRACTION = 0.6;
float const character_width = _text->getCharacterHeight()
@@ -627,7 +636,12 @@
const GlyphQuads& quads = _textureGlyphQuadMap.begin()->second;
const GlyphQuads::Glyphs& glyphs = quads._glyphs;
- const GlyphQuads::Coords2& coords = quads._coords;
+#if OSG_VERSION_LESS_THAN(3,3,5)
+ GlyphQuads::Coords2 const& coords = quads._coords;
+#else
+ GlyphQuads::Coords2 refCoords = quads._coords;
+ GlyphQuads::Coords2::element_type &coords = *refCoords.get();
+#endif
const GlyphQuads::LineNumbers& line_numbers = quads._lineNumbers;
float wr = _characterHeight / getCharacterAspectRatio();
--- simgear/scene/material/Technique.cxx 2015-02-18 21:10:39.000000000 +0100
+++ simgear/scene/material/Technique.cxx 2015-10-31 11:50:38.266385757 +0100
@@ -326,9 +326,15 @@
= GL2Extensions::Get(static_cast<unsigned>(contextId), true);
if (!extensions)
return;
+#if OSG_VERSION_LESS_THAN(3,3,4)
if (!extensions->isGlslSupported())
return;
value = extensions->getLanguageVersion();
+#else
+ if (!extensions->isGlslSupported)
+ return;
+ value = extensions->glslLanguageVersion;
+#endif
}
};
@@ -357,7 +363,11 @@
= GL2Extensions::Get(static_cast<unsigned>(contextId), true);
if (!extensions)
return;
+#if OSG_VERSION_LESS_THAN(3,3,4)
value = extensions->isGlslSupported();
+#else
+ value = extensions->isGlslSupported;
+#endif
}
};
--- simgear/scene/sky/CloudShaderGeometry.cxx 2015-02-18 21:10:39.000000000 +0100
+++ simgear/scene/sky/CloudShaderGeometry.cxx 2015-10-31 11:53:28.855368888 +0100
@@ -128,7 +128,11 @@
sortData.frameSorted = frameNumber;
}
+#if OSG_VERSION_LESS_THAN(3,3,4)
const Extensions* extensions = getExtensions(state.getContextID(),true);
+#else
+ const GLExtensions* extensions = GLExtensions::Get(state.getContextID(),true);
+#endif
GLfloat ua1[3] = { (GLfloat) alpha_factor,
(GLfloat) shade_factor,
(GLfloat) cloud_height };
--- simgear/scene/tgdb/ShaderGeometry.cxx 2015-02-18 21:10:39.000000000 +0100
+++ simgear/scene/tgdb/ShaderGeometry.cxx 2015-10-31 11:55:05.748359307 +0100
@@ -47,7 +47,11 @@
void ShaderGeometry::drawImplementation(osg::RenderInfo& renderInfo) const
{
State& state = *renderInfo.getState();
+#if OSG_VERSION_LESS_THAN(3,3,4)
const Extensions* extensions = getExtensions(state.getContextID(), true);
+#else
+ const GLExtensions* extensions = GLExtensions::Get(state.getContextID(), true);
+#endif
Vec4Array::const_iterator citer = _posScaleArray->begin();
Vec4Array::const_iterator cend = _posScaleArray->end();
FloatArray::const_iterator viter = _vertexAttribArray->begin();
--- simgear/scene/util/SGSceneFeatures.cxx 2015-02-18 21:10:39.000000000 +0100
+++ simgear/scene/util/SGSceneFeatures.cxx 2015-10-31 12:02:22.654316104 +0100
@@ -25,11 +25,13 @@
#include "SGSceneFeatures.hxx"
+#include <osg/Version>
#include <osg/FragmentProgram>
#include <osg/VertexProgram>
#include <osg/Point>
#include <osg/PointSprite>
#include <osg/Texture>
+#include <osg/GLExtensions>
#include <OpenThreads/Mutex>
#include <OpenThreads/ScopedLock>
@@ -84,12 +84,18 @@
bool
SGSceneFeatures::getHavePointSprites(unsigned contextId) const
{
+#if OSG_VERSION_LESS_THAN(3,3,4)
return osg::PointSprite::isPointSpriteSupported(contextId);
+#else
+ const osg::GLExtensions* ex = osg::GLExtensions::Get(contextId, true);
+ return ex && ex->isPointSpriteSupported;
+#endif
}
bool
SGSceneFeatures::getHaveFragmentPrograms(unsigned contextId) const
{
+#if OSG_VERSION_LESS_THAN(3,3,4)
const osg::FragmentProgram::Extensions* fpe;
fpe = osg::FragmentProgram::getExtensions(contextId, true);
if (!fpe)
@@ -98,11 +104,16 @@
return false;
return true;
+#else
+ const osg::GLExtensions* ex = osg::GLExtensions::Get(contextId, true);
+ return ex && ex->isFragmentProgramSupported;
+#endif
}
bool
SGSceneFeatures::getHaveVertexPrograms(unsigned contextId) const
{
+#if OSG_VERSION_LESS_THAN(3,3,4)
const osg::VertexProgram::Extensions* vpe;
vpe = osg::VertexProgram::getExtensions(contextId, true);
if (!vpe)
@@ -111,6 +122,10 @@
return false;
return true;
+#else
+ const osg::GLExtensions* ex = osg::GLExtensions::Get(contextId, true);
+ return ex && ex->isVertexProgramSupported;
+#endif
}
bool
@@ -124,6 +139,7 @@
bool
SGSceneFeatures::getHavePointParameters(unsigned contextId) const
{
+#if OSG_VERSION_LESS_THAN(3,3,4)
const osg::Point::Extensions* pe;
pe = osg::Point::getExtensions(contextId, true);
if (!pe)
@@ -131,5 +147,9 @@
if (!pe->isPointParametersSupported())
return false;
return true;
+#else
+ const osg::GLExtensions* ex = osg::GLExtensions::Get(contextId, true);
+ return ex && ex->isPointParametersSupported;
+#endif
}

View file

@ -1,107 +0,0 @@
--- simgear/package/md5.h 2015-02-18 21:10:39.000000000 +0100
+++ simgear/package/md5.h 2015-11-01 01:47:16.218143005 +0100
@@ -19,27 +19,23 @@
extern "C" {
#endif
-#if defined(_MSC_VER)
-typedef unsigned char u_int8_t;
-typedef unsigned int u_int32_t;
-typedef unsigned __int64 u_int64_t;
-#endif
+#include <stdint.h>
#define MD5_BLOCK_LENGTH 64
#define MD5_DIGEST_LENGTH 16
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1)
typedef struct MD5Context {
- u_int32_t state[4]; /* state */
- u_int64_t count; /* number of bits, mod 2^64 */
- u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
+ uint32_t state[4]; /* state */
+ uint64_t count; /* number of bits, mod 2^64 */
+ uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
} SG_MD5_CTX;
void SG_MD5Init(SG_MD5_CTX *);
-void SG_MD5Update(SG_MD5_CTX *, const u_int8_t *, size_t);
+void SG_MD5Update(SG_MD5_CTX *, const uint8_t *, size_t);
void SG_MD5Pad(SG_MD5_CTX *);
-void SG_MD5Final(u_int8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
-void SG_MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]);
+void SG_MD5Final(uint8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
+void SG_MD5Transform(uint32_t [4], const uint8_t [MD5_BLOCK_LENGTH]);
#ifdef __cplusplus
} // of extern C
@@ -49,4 +45,4 @@
-
\ Kein Zeilenumbruch am Dateiende.
+
--- simgear/package/md5.c 2015-02-18 21:10:39.000000000 +0100
+++ simgear/package/md5.c 2015-11-01 01:46:42.843144810 +0100
@@ -39,7 +39,7 @@
(cp)[1] = (value) >> 8; \
(cp)[0] = (value); } while (0)
-static u_int8_t PADDING[MD5_BLOCK_LENGTH] = {
+static uint8_t PADDING[MD5_BLOCK_LENGTH] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -73,7 +73,7 @@
need = MD5_BLOCK_LENGTH - have;
/* Update bitcount */
- ctx->count += (u_int64_t)len << 3;
+ ctx->count += (uint64_t)len << 3;
if (len >= need) {
if (have != 0) {
@@ -104,7 +104,7 @@
void
SG_MD5Pad(SG_MD5_CTX *ctx)
{
- u_int8_t count[8];
+ uint8_t count[8];
size_t padlen;
/* Convert count to 8 bytes in little endian order. */
@@ -154,19 +154,19 @@
* the data and converts bytes into longwords for this routine.
*/
void
-SG_MD5Transform(u_int32_t state[4], const u_int8_t block[MD5_BLOCK_LENGTH])
+SG_MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_LENGTH])
{
- u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
+ uint32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
#ifndef WORDS_BIGENDIAN
memcpy(in, block, sizeof(in));
#else
for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {
- in[a] = (u_int32_t)(
- (u_int32_t)(block[a * 4 + 0]) |
- (u_int32_t)(block[a * 4 + 1]) << 8 |
- (u_int32_t)(block[a * 4 + 2]) << 16 |
- (u_int32_t)(block[a * 4 + 3]) << 24);
+ in[a] = (uint32_t)(
+ (uint32_t)(block[a * 4 + 0]) |
+ (uint32_t)(block[a * 4 + 1]) << 8 |
+ (uint32_t)(block[a * 4 + 2]) << 16 |
+ (uint32_t)(block[a * 4 + 3]) << 24);
}
#endif
@@ -247,4 +247,4 @@
state[1] += b;
state[2] += c;
state[3] += d;
-}
\ Kein Zeilenumbruch am Dateiende.
+}

View file

@ -1,6 +1,6 @@
# Template file for 'simgear' # Template file for 'simgear'
pkgname=simgear pkgname=simgear
version=3.4.0 version=2016.2.1
revision=2 revision=2
# XXX: always keep in sync with flightgear version! # XXX: always keep in sync with flightgear version!
build_style=cmake build_style=cmake
@ -12,8 +12,8 @@ short_desc="Simulation engine for FlightGear - static libraries"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>" maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2" license="GPL-2"
homepage="http://www.flightgear.org/" homepage="http://www.flightgear.org/"
distfiles="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/simgear-${version}.tar.bz2" distfiles="$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/${pkgname}-${version}.tar.bz2"
checksum=927d66fe72aacb9dacced4506430bd5fc7726bc8d3d07d6f1866bc4cb11a5894 checksum=601d4ef75a7f9e7012f85d6f63219f3e2ef90f98249eaa5d16cc6b1a3c737a0a
build_options="svn" build_options="svn"
desc_option_svn="Enable support for subversion scenery fetching" desc_option_svn="Enable support for subversion scenery fetching"