osgworks: New package.
This commit is contained in:
102
mingw-w64-osgworks-svn/PKGBUILD
Normal file
102
mingw-w64-osgworks-svn/PKGBUILD
Normal file
@@ -0,0 +1,102 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=osgworks
|
||||
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn")
|
||||
_ver_base=3.1.0
|
||||
pkgver=3.1.0.559
|
||||
pkgrel=1
|
||||
pkgdesc="A toolkit for OpenSceneGraph applications. (mingw-w64)"
|
||||
arch=('any')
|
||||
license=('custom')
|
||||
url="https://code.google.com/p/osgworks/"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-OpenSceneGraph")
|
||||
makedepends=("subversion" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
options=(!strip staticlibs !buildflags)
|
||||
source=("${_realname}"::"svn+http://osgworks.googlecode.com/svn/trunk/"
|
||||
"osg-3.3.x.patch"
|
||||
"mingw-fpc-libs.patch")
|
||||
md5sums=('SKIP'
|
||||
'cc8a517171bcd4c9a080c81a6bd757f0'
|
||||
'c5b52fc01efde31fc87d8ed0450bdd8f')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$_realname"
|
||||
local ver="$(svnversion)"
|
||||
printf "%s.%s" "${_ver_base}" "${ver//[[:alpha:]]}"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$_realname"
|
||||
patch -p1 -i ${srcdir}/osg-3.3.x.patch
|
||||
patch -p1 -i ${srcdir}/mingw-fpc-libs.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
plain "No build step"
|
||||
}
|
||||
|
||||
package_release() {
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
|
||||
[[ -d ${srcdir}/build-release ]] && rm -rf ${srcdir}/build-release
|
||||
mkdir -p ${srcdir}/build-release && cd ${srcdir}/build-release
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
../${_realname}
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
pushd ${pkgdir}${MINGW_PREFIX} > /dev/null
|
||||
export PREFIX_WIN=`pwd -W`
|
||||
popd > /dev/null
|
||||
|
||||
#for ff in ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/*.pc; do
|
||||
# sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i $ff
|
||||
#done
|
||||
}
|
||||
|
||||
package_debug() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn=$pkgver" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug")
|
||||
|
||||
[[ -d ${srcdir}/build-debug ]] && rm -rf ${srcdir}/build-debug
|
||||
mkdir -p ${srcdir}/build-debug && cd ${srcdir}/build-debug
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
../${_realname}
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
rm -rf ${pkgdir}${MINGW_PREFIX}/include
|
||||
rm -rf ${pkgdir}${MINGW_PREFIX}/lib/flagpoll
|
||||
rm -rf ${pkgdir}${MINGW_PREFIX}/lib/*.cmake
|
||||
rm -rf ${pkgdir}${MINGW_PREFIX}/share
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-osgworks-svn() {
|
||||
package_release
|
||||
}
|
||||
|
||||
package_mingw-w64-i686-osgworks-debug-svn() {
|
||||
package_debug
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-osgworks-svn() {
|
||||
package_release
|
||||
}
|
||||
|
||||
package_mingw-w64-x86_64-osgworks-debug-svn() {
|
||||
package_debug
|
||||
}
|
||||
|
||||
23
mingw-w64-osgworks-svn/mingw-fpc-libs.patch
Normal file
23
mingw-w64-osgworks-svn/mingw-fpc-libs.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
--- osgworks/CMakeLists.txt.orig 2014-06-07 18:58:47.209000000 +0400
|
||||
+++ osgworks/CMakeLists.txt 2014-06-07 18:59:06.849400000 +0400
|
||||
@@ -243,17 +243,17 @@
|
||||
|
||||
#
|
||||
# Setup the fpc auto detection files
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND NOT MINGW)
|
||||
set(OSGWORKS_FPC_LIBRARIES "/libpath:\"\${libdir}\" osgwControls.lib osgwMx.lib osgwTools.lib osgwQuery.lib")
|
||||
set(OSGWORKS_FPC_INCLUDES "/I\"\${includedir}\"")
|
||||
-else(WIN32)
|
||||
+else(WIN32 AND NOT MINGW)
|
||||
set(OSGWORKS_FPC_INCLUDES "-I\${includedir}")
|
||||
if(APPLE)
|
||||
set(OSGWORKS_FPC_LIBRARIES "-L\${libdir} -losgwControls -losgwMx -losgwTools -losgwQuery")
|
||||
else(APPLE)
|
||||
set(OSGWORKS_FPC_LIBRARIES "-L\${libdir} -losgwControls -losgwMx -losgwTools -losgwQuery")
|
||||
endif(APPLE)
|
||||
-endif(WIN32)
|
||||
+endif(WIN32 AND NOT MINGW)
|
||||
|
||||
configure_file(extra/osgworks.fpc.in
|
||||
"${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/flagpoll/osgworks.fpc" @ONLY)
|
||||
172
mingw-w64-osgworks-svn/osg-3.3.x.patch
Normal file
172
mingw-w64-osgworks-svn/osg-3.3.x.patch
Normal file
@@ -0,0 +1,172 @@
|
||||
diff -Naur osgworks/apps/osgwbvv/osgwbvv.cpp osgworks-patched/apps/osgwbvv/osgwbvv.cpp
|
||||
--- osgworks/apps/osgwbvv/osgwbvv.cpp 2014-05-23 22:37:00.750400000 +0400
|
||||
+++ osgworks-patched/apps/osgwbvv/osgwbvv.cpp 2014-06-07 18:44:33.422600000 +0400
|
||||
@@ -148,7 +148,7 @@
|
||||
}
|
||||
if( doSphere )
|
||||
{
|
||||
- const osg::BoundingSphere bs( model->getBound() );
|
||||
+ const osg::BoundingSphere bs( (const osg::BoundingSphere&)(model->getBound()) );
|
||||
mt->setMatrix( osg::Matrix::translate( bs._center ) );
|
||||
geode->addDrawable( osgwTools::makeGeodesicSphere( bs._radius, 1 ) );
|
||||
|
||||
diff -Naur osgworks/include/osgwQuery/QueryAPI.h osgworks-patched/include/osgwQuery/QueryAPI.h
|
||||
--- osgworks/include/osgwQuery/QueryAPI.h 2014-05-23 22:37:01.468000000 +0400
|
||||
+++ osgworks-patched/include/osgwQuery/QueryAPI.h 2014-06-07 17:13:58.379200000 +0400
|
||||
@@ -58,6 +58,48 @@
|
||||
# define GL_TIME_ELAPSED 0x88BF
|
||||
#endif
|
||||
|
||||
+#ifndef GLEXT_64_TYPES_DEFINED
|
||||
+/* This code block is duplicated in glxext.h, so must be protected */
|
||||
+#define GLEXT_64_TYPES_DEFINED
|
||||
+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
+/* (as used in the GL_EXT_timer_query extension). */
|
||||
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
+#include <inttypes.h>
|
||||
+#elif defined(__sun__) || defined(__digital__)
|
||||
+#include <inttypes.h>
|
||||
+#if defined(__STDC__)
|
||||
+#if defined(__arch64__) || defined(_LP64)
|
||||
+typedef long int int64_t;
|
||||
+typedef unsigned long int uint64_t;
|
||||
+#else
|
||||
+typedef long long int int64_t;
|
||||
+typedef unsigned long long int uint64_t;
|
||||
+#endif /* __arch64__ */
|
||||
+#endif /* __STDC__ */
|
||||
+#elif defined( __VMS ) || defined(__sgi)
|
||||
+#include <inttypes.h>
|
||||
+#elif defined(__SCO__) || defined(__USLC__)
|
||||
+#include <stdint.h>
|
||||
+#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
+typedef long int int32_t;
|
||||
+typedef long long int int64_t;
|
||||
+typedef unsigned long long int uint64_t;
|
||||
+#elif defined(_WIN32) && defined(__GNUC__)
|
||||
+#include <stdint.h>
|
||||
+#elif defined(_WIN32)
|
||||
+typedef __int32 int32_t;
|
||||
+typedef __int64 int64_t;
|
||||
+typedef unsigned __int64 uint64_t;
|
||||
+#else
|
||||
+/* Fallback if nothing above works */
|
||||
+#include <inttypes.h>
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+#ifndef GL_EXT_timer_query
|
||||
+typedef int64_t GLint64EXT;
|
||||
+typedef uint64_t GLuint64EXT;
|
||||
+#endif
|
||||
|
||||
namespace osgwQuery
|
||||
{
|
||||
diff -Naur osgworks/include/osgwTools/Version.h.in osgworks-patched/include/osgwTools/Version.h.in
|
||||
--- osgworks/include/osgwTools/Version.h.in 2014-05-23 22:37:01.124800000 +0400
|
||||
+++ osgworks-patched/include/osgwTools/Version.h.in 2014-06-07 18:50:18.179800000 +0400
|
||||
@@ -9,6 +9,7 @@
|
||||
#define __${_projectNameUpper}_CMAKE_GENERATED_VERSION_H__ 1
|
||||
|
||||
|
||||
+#include "VersionOSG.h"
|
||||
|
||||
/** \defgroup Version Version utilities */
|
||||
/*@{*/
|
||||
diff -Naur osgworks/include/osgwTools/VersionOSG.h osgworks-patched/include/osgwTools/VersionOSG.h
|
||||
--- osgworks/include/osgwTools/VersionOSG.h 2014-05-23 22:37:01.249600000 +0400
|
||||
+++ osgworks-patched/include/osgwTools/VersionOSG.h 2014-06-07 00:33:01.332200000 +0400
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __OSGWTOOLS_VERSION_OSG_H__ 1
|
||||
|
||||
|
||||
-
|
||||
+#include <osg/Version>
|
||||
/** \addtogroup Version */
|
||||
/*@{*/
|
||||
|
||||
diff -Naur osgworks/src/osgwMx/CameraUpdateCallback.cpp osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp
|
||||
--- osgworks/src/osgwMx/CameraUpdateCallback.cpp 2014-05-23 22:37:02.326000000 +0400
|
||||
+++ osgworks-patched/src/osgwMx/CameraUpdateCallback.cpp 2014-06-07 18:43:57.151200000 +0400
|
||||
@@ -66,7 +66,7 @@
|
||||
if( idx==0 )
|
||||
bs = cam->getChild( idx )->getBound();
|
||||
else
|
||||
- bs.expandBy( cam->getChild( idx )->getBound() );
|
||||
+ bs.expandBy( (const osg::BoundingSphere&)(cam->getChild( idx )->getBound()) );
|
||||
}
|
||||
}
|
||||
|
||||
diff -Naur osgworks/src/osgwQuery/QueryUtils.cpp osgworks-patched/src/osgwQuery/QueryUtils.cpp
|
||||
--- osgworks/src/osgwQuery/QueryUtils.cpp 2014-05-23 22:37:02.419600000 +0400
|
||||
+++ osgworks-patched/src/osgwQuery/QueryUtils.cpp 2014-06-07 17:14:28.290600000 +0400
|
||||
@@ -116,7 +116,7 @@
|
||||
unsigned int idx;
|
||||
for( idx=0; idx < numParents; idx++ )
|
||||
{
|
||||
- osg::Group* parent = node.getParent( idx );
|
||||
+ osg::Group* parent = node.getParent( idx )->asGroup();
|
||||
bool parentIsCamera = ( dynamic_cast< osg::Camera* >( parent ) != NULL );
|
||||
if( parentIsCamera )
|
||||
continue;
|
||||
diff -Naur osgworks/src/osgwTools/CountsVisitor.cpp osgworks-patched/src/osgwTools/CountsVisitor.cpp
|
||||
--- osgworks/src/osgwTools/CountsVisitor.cpp 2014-05-23 22:37:02.076400000 +0400
|
||||
+++ osgworks-patched/src/osgwTools/CountsVisitor.cpp 2014-06-07 16:22:50.522800000 +0400
|
||||
@@ -608,10 +608,10 @@
|
||||
{
|
||||
pushStateSet( node.getStateSet() );
|
||||
|
||||
- osg::Group* grp = node.getParent(0);
|
||||
+ osg::Group* grp = node.getParent(0)->asGroup();
|
||||
osg::Group* gPar = NULL;
|
||||
if (grp)
|
||||
- gPar = grp->getParent(0);
|
||||
+ gPar = grp->getParent(0)->asGroup();
|
||||
apply( node.getStateSet() );
|
||||
|
||||
_pagedLods++;
|
||||
diff -Naur osgworks/src/osgwTools/InsertRemove.cpp osgworks-patched/src/osgwTools/InsertRemove.cpp
|
||||
--- osgworks/src/osgwTools/InsertRemove.cpp 2014-05-23 22:37:02.029600000 +0400
|
||||
+++ osgworks-patched/src/osgwTools/InsertRemove.cpp 2014-06-07 16:27:29.380400000 +0400
|
||||
@@ -37,7 +37,7 @@
|
||||
osg::Node::ParentList::iterator it;
|
||||
for( it = pl.begin(); it != pl.end(); it++ )
|
||||
{
|
||||
- osg::Group* oldParent( *it );
|
||||
+ osg::Group* oldParent( dynamic_cast<osg::Group*>(*it) );
|
||||
oldParent->addChild( newParent );
|
||||
oldParent->removeChild( node );
|
||||
}
|
||||
@@ -68,7 +68,7 @@
|
||||
for( it = pl.begin(); it != pl.end(); it++ )
|
||||
{
|
||||
// Remove 'node' from its parent.
|
||||
- osg::Group* parent( *it );
|
||||
+ osg::Group* parent( dynamic_cast<osg::Group*>(*it) );
|
||||
parent->removeChild( node );
|
||||
|
||||
if( asGrp != NULL )
|
||||
diff -Naur osgworks/src/osgwTools/NodeUtils.cpp osgworks-patched/src/osgwTools/NodeUtils.cpp
|
||||
--- osgworks/src/osgwTools/NodeUtils.cpp 2014-05-23 22:37:01.951600000 +0400
|
||||
+++ osgworks-patched/src/osgwTools/NodeUtils.cpp 2014-06-07 16:28:14.046800000 +0400
|
||||
@@ -44,7 +44,7 @@
|
||||
// add the newGraph to all parents of the existingGraph, and remove existingGraph from them
|
||||
for(unsigned int parentLoop = 0; parentLoop < parentsCopy.size(); parentLoop++)
|
||||
{
|
||||
- osg::Group *existingParent = parentsCopy[parentLoop];
|
||||
+ osg::Group *existingParent = dynamic_cast<osg::Group*>(parentsCopy[parentLoop]);
|
||||
if(existingParent)
|
||||
{
|
||||
existingParent->addChild(newGraph);
|
||||
diff -Naur osgworks/src/osgwTools/Uniqifier.cpp osgworks-patched/src/osgwTools/Uniqifier.cpp
|
||||
--- osgworks/src/osgwTools/Uniqifier.cpp 2014-05-23 22:37:01.998400000 +0400
|
||||
+++ osgworks-patched/src/osgwTools/Uniqifier.cpp 2014-06-07 16:29:32.364400000 +0400
|
||||
@@ -98,7 +98,7 @@
|
||||
{
|
||||
// Make a shallow copy of sourceCandidate and replace parent 1's
|
||||
// sourceCandidate child with the new shallow copy.
|
||||
- uniqify( sourceCandidate, sourceCandidate->getParent( 1 ) );
|
||||
+ uniqify( sourceCandidate, sourceCandidate->getParent( 1 )->asGroup() );
|
||||
|
||||
// sourceCandidate's parent count has now decreased by 1.
|
||||
// Continue looping until the parent count equals 1.
|
||||
Reference in New Issue
Block a user