From 6cc5892d40f01a6c8fc0140518a8b9fc7731eeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 31 Oct 2015 15:34:37 +0100 Subject: [PATCH] New package: flightgear-3.4.0 --- srcpkgs/flightgear-data | 1 + srcpkgs/flightgear/files/flightgear.png | Bin 0 -> 5849 bytes .../patches/fix-link_with_x11.patch | 36 ++++ srcpkgs/flightgear/patches/musl-fenv.patch | 19 ++ .../flightgear/patches/musl-fix_error_h.patch | 14 ++ .../flightgear/patches/musl-fix_fpos_t.patch | 17 ++ srcpkgs/flightgear/template | 42 ++++ .../simgear/patches/fix-osg_versions.patch | 187 ++++++++++++++++++ srcpkgs/simgear/patches/musl-u_types.patch | 107 ++++++++++ srcpkgs/simgear/template | 22 +++ 10 files changed, 445 insertions(+) create mode 120000 srcpkgs/flightgear-data create mode 100644 srcpkgs/flightgear/files/flightgear.png create mode 100644 srcpkgs/flightgear/patches/fix-link_with_x11.patch create mode 100644 srcpkgs/flightgear/patches/musl-fenv.patch create mode 100644 srcpkgs/flightgear/patches/musl-fix_error_h.patch create mode 100644 srcpkgs/flightgear/patches/musl-fix_fpos_t.patch create mode 100644 srcpkgs/flightgear/template create mode 100644 srcpkgs/simgear/patches/fix-osg_versions.patch create mode 100644 srcpkgs/simgear/patches/musl-u_types.patch create mode 100644 srcpkgs/simgear/template diff --git a/srcpkgs/flightgear-data b/srcpkgs/flightgear-data new file mode 120000 index 0000000000..78d6c8c1a0 --- /dev/null +++ b/srcpkgs/flightgear-data @@ -0,0 +1 @@ +flightgear \ No newline at end of file diff --git a/srcpkgs/flightgear/files/flightgear.png b/srcpkgs/flightgear/files/flightgear.png new file mode 100644 index 0000000000000000000000000000000000000000..00992f1baf3f46665c03fafab401a926cfa5e2f9 GIT binary patch literal 5849 zcmV;~7AEP5P)WFU8GbZ8({Xk{QrNlj4iWF>9@02Vz-L_t(|+D)2StZms< zp1(2YT+Lp)JNtCEtEzje%5|&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C3s+czu_Q4=qrzBXx^x%B4qeZfFhRLKpRqG5i7{fGqpcf`&o`VjE%K=^zM`|e z8C#1P&MJow&$##Q6ErE-8K$!d&pdyX6rgXz5A45uWbs`jc%|$5p#hy6tT9y6lJPVr zMMb0X#`o^?{Eh1@W>a2&>m3fymso4aa>saFF<(?v;|iAz6Zc-R&Qf66%5wI{UF literal 0 HcmV?d00001 diff --git a/srcpkgs/flightgear/patches/fix-link_with_x11.patch b/srcpkgs/flightgear/patches/fix-link_with_x11.patch new file mode 100644 index 0000000000..bdd101194d --- /dev/null +++ b/srcpkgs/flightgear/patches/fix-link_with_x11.patch @@ -0,0 +1,36 @@ +From 04ca64edc46cfb54ecff5bddf12370b2c7a0f192 Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Tue, 17 Feb 2015 22:49:50 +0100 +Subject: [PATCH] explicitely link with libX11 + +--- + src/Main/CMakeLists.txt | 1 + + utils/fgviewer/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt +index 12c0961..78c4163 100644 +--- src/Main/CMakeLists.txt ++++ src/Main/CMakeLists.txt +@@ -142,6 +142,7 @@ target_link_libraries(fgfs + ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} + ${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES} + ${PLATFORM_LIBS} ++ ${X11_X11_LIB} + ) + + if(ENABLE_FLITE) +diff --git a/utils/fgviewer/CMakeLists.txt b/utils/fgviewer/CMakeLists.txt +index 165be74..065b8f1 100644 +--- utils/fgviewer/CMakeLists.txt ++++ utils/fgviewer/CMakeLists.txt +@@ -48,5 +48,6 @@ target_link_libraries(fgviewer + ${OPENGL_LIBRARIES} + ${FGVIEWER_RTI_LIBRARIES} + ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ++ ${X11_X11_LIB} + ) + install(TARGETS fgviewer RUNTIME DESTINATION bin) +-- +2.1.0 + diff --git a/srcpkgs/flightgear/patches/musl-fenv.patch b/srcpkgs/flightgear/patches/musl-fenv.patch new file mode 100644 index 0000000000..2192fb9a7d --- /dev/null +++ b/srcpkgs/flightgear/patches/musl-fenv.patch @@ -0,0 +1,19 @@ +Simply disabling the code which enables floating point exceptions +is probably wrong, but I don't have a replacement for the +non-posix functions fegetexcept(3) and feenableexcept(3). + +--- src/Main/bootstrap.cxx 2015-02-18 21:10:05.000000000 +0100 ++++ src/Main/bootstrap.cxx 2015-11-01 01:25:56.665212195 +0100 +@@ -96,8 +96,12 @@ + initFPE (bool fpeAbort) + { ++#if defined(__GLIBC__) + if (fpeAbort) { + int except = fegetexcept(); + feenableexcept(except | FE_DIVBYZERO | FE_INVALID); + } else { + signal(SIGFPE, handleFPE); + } ++#else ++ signal(SIGFPE, handleFPE); ++#endif diff --git a/srcpkgs/flightgear/patches/musl-fix_error_h.patch b/srcpkgs/flightgear/patches/musl-fix_error_h.patch new file mode 100644 index 0000000000..1e3b04e936 --- /dev/null +++ b/srcpkgs/flightgear/patches/musl-fix_error_h.patch @@ -0,0 +1,14 @@ +There is no in musl libc, thus enable the +include only if __GLIB__ is defined. + +--- 3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-02-18 21:10:05.000000000 +0100 ++++ 3rdparty/iaxclient/lib/libiax2/src/iax.c 2015-10-31 17:14:55.477461723 +0100 +@@ -75,7 +75,7 @@ + // FlightGear: Modified to include FreeBSD + #if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__) + #include +-#if !defined(SOLARIS) ++#if !defined(SOLARIS) && defined(__GLIBC__) + #include + #endif + #endif diff --git a/srcpkgs/flightgear/patches/musl-fix_fpos_t.patch b/srcpkgs/flightgear/patches/musl-fix_fpos_t.patch new file mode 100644 index 0000000000..2cf9e559b3 --- /dev/null +++ b/srcpkgs/flightgear/patches/musl-fix_fpos_t.patch @@ -0,0 +1,17 @@ +For musl libc return the file position using +ftell(3) because fpos_t is opaque. + +--- 3rdparty/hts_engine_API/lib/HTS_misc.c 2015-02-18 21:10:05.000000000 +0100 ++++ 3rdparty/hts_engine_API/lib/HTS_misc.c 2015-10-31 17:33:53.946349145 +0100 +@@ -247,8 +247,10 @@ + fgetpos((FILE *) fp->pointer, &pos); + #if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__) + return (size_t) pos; +-#else ++#elif defined(__GLIBC__) + return (size_t) pos.__pos; ++#else ++ return (size_t) ftell(fp->pointer); + #endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */ + } + HTS_error(0, "HTS_ftell: Unknown file type.\n"); diff --git a/srcpkgs/flightgear/template b/srcpkgs/flightgear/template new file mode 100644 index 0000000000..85dacefe28 --- /dev/null +++ b/srcpkgs/flightgear/template @@ -0,0 +1,42 @@ +# Template file for 'flightgear' +pkgname=flightgear +version=3.4.0 +revision=1 +build_style=cmake +configure_args="-DFG_DATA_DIR:STRING=/usr/share/flightgear/fgdata" +hostmakedepends="cmake fltk pkg-config" +makedepends="MesaLib-devel boost-devel freealut-devel glu-devel libfreeglut-devel fltk-devel + libopenal-devel osg-devel plib-devel simgear" +depends="flightgear-data>=${version}" +short_desc="Sophisticated flight wimulator" +maintainer="Jürgen Buchmüller " +license="GPL-3" +homepage="http://www.flightgear.org/" +distfiles=" + http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Source/flightgear-${version}.tar.bz2 + http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Shared/FlightGear-data-${version}.tar.bz2" +checksum=" + b5645d05b50728a89f091292bc557f440d8f8719dd9cebf7f5bf3fa8ea795780 + 8cefa7c323d974d8e51fd23c97ae79dc731e65b81e1729cb1bc9bc1f99df128b" + +if [ "$CROSS_BUILD" ]; then + configure_args+=" -DSIMGEAR_COMPILE_TEST_EXITCODE=0" +fi + +post_install() { + vinstall package/flightgear.desktop 644 usr/share/applications + vinstall package/flightgear.ico 644 usr/share/icons + vinstall ${FILESDIR}/flightgear.png 644 usr/share/pixmaps + vinstall scripts/completion/fg-completion.bash 644 usr/share/bash-completion/completions/fgfs + sed -i ${DESTDIR}/usr/share/applications/flightgear.desktop \ + -e "s;Exec=.*;Exec=fgfs --fg-root=/usr/share/flightgear/fgdata;" +} + +flightgear-data_package() { + short_desc+=" - data files" + noarch=yes + pkg_install() { + vmkdir usr/share/flightgear + mv ${XBPS_BUILDDIR}/fgdata ${PKGDESTDIR}/usr/share/flightgear + } +} diff --git a/srcpkgs/simgear/patches/fix-osg_versions.patch b/srcpkgs/simgear/patches/fix-osg_versions.patch new file mode 100644 index 0000000000..ce60687d3c --- /dev/null +++ b/srcpkgs/simgear/patches/fix-osg_versions.patch @@ -0,0 +1,187 @@ +--- 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(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(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 + #include + #include + #include + #include + #include ++#include + + #include + #include +@@ -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 + } + diff --git a/srcpkgs/simgear/patches/musl-u_types.patch b/srcpkgs/simgear/patches/musl-u_types.patch new file mode 100644 index 0000000000..992abd8e9a --- /dev/null +++ b/srcpkgs/simgear/patches/musl-u_types.patch @@ -0,0 +1,107 @@ +--- 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 + + #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. ++} diff --git a/srcpkgs/simgear/template b/srcpkgs/simgear/template new file mode 100644 index 0000000000..d67768c94a --- /dev/null +++ b/srcpkgs/simgear/template @@ -0,0 +1,22 @@ +# Template file for 'simgear' +pkgname=simgear +version=3.4.0 +revision=1 +# XXX: always keep in sync with flightgear version! +build_style=cmake +configure_args="-DENABLE_TESTS=OFF $(vopt_if svn '-DENABLE_LIBSVN=ON' '-DENABLE_LIBSVN=OFF')" +hostmakedepends="cmake pkg-config" +makedepends="boost-devel expat-devel freetype-devel libjpeg-turbo-devel giflib-devel + libopenal-devel osg-devel plib-devel $(vopt_if svn libsvn)" +short_desc="Simulation engine for FlightGear - static libraries" +maintainer="Jürgen Buchmüller " +license="GPL-2" +homepage="http://www.flightgear.org/" +distfiles="http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/simgear-${version}.tar.bz2" +checksum=927d66fe72aacb9dacced4506430bd5fc7726bc8d3d07d6f1866bc4cb11a5894 + +build_options="svn" +desc_option_svn="Enable support for subversion scenery fetching" +if [ -z "$CROSS_BUILD" ]; then + build_options_default="svn" +fi