diff --git a/mingw-w64-osgocean-svn/PKGBUILD b/mingw-w64-osgocean-git/PKGBUILD similarity index 53% rename from mingw-w64-osgocean-svn/PKGBUILD rename to mingw-w64-osgocean-git/PKGBUILD index 05e6027d6b..8a0a939ebf 100644 --- a/mingw-w64-osgocean-svn/PKGBUILD +++ b/mingw-w64-osgocean-git/PKGBUILD @@ -1,40 +1,39 @@ # Maintainer: Alexey Pavlov _realname=osgocean -pkgbase=mingw-w64-${_realname}-svn -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn") +pkgbase=mingw-w64-${_realname}-git +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-git" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-git") _ver_base=1.0.1 -pkgver=r258 -pkgrel=2 +pkgver=1.0.1.r147 +pkgrel=1 pkgdesc="An ocean rendering nodekit for OpenSceneGraph (mingw-w64)" arch=('any') license=('LGPL') url="https://code.google.com/p/osgocean/" depends=("${MINGW_PACKAGE_PREFIX}-fftw" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph") -makedepends=("subversion" 'unrar' "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") +makedepends=("git" 'unrar' "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") options=(!strip staticlibs !buildflags) -source=("${_realname}"::"svn+http://osgocean.googlecode.com/svn/trunk/" +source=("${_realname}"::"git+https://github.com/kbale/osgocean.git" "https://osgocean.googlecode.com/files/osgOcean-Resources-1.0.1.rar" "mingw-w64-cmake.patch" - "osg-3.3.x.patch") + "osg-3.5.patch") sha256sums=('SKIP' 'b3093a48259c3df5af99841934be0468691e506cfbb82eae76eadba4ab71faaf' '6d87aae193bbd49c696aa3e78cf8f98c1df6a5459ffd100acb2db748f6f602f7' - '8a71437eac94f5aa193f8915783b6c3a78d1208dc1ff9ccee18ed32cc69d2edd') + '3ac2e6f7ea9bce213893449bfc3c9d2268dc7c7fb01c04b35faa82b48439428d') noextract=( 'osgOcean-Resources-1.0.1.rar' ) pkgver() { - cd "$srcdir/$_realname" - local ver="$(svnversion)" - printf "r%s" "${ver//[[:alpha:]]}" + cd "${srcdir}/${_realname}" + printf "%s.r%s" "${_ver_base}" "$(git rev-list --count HEAD)" } prepare() { - cd "$srcdir/${_realname}"/resources - yes | unrar x "$startdir/osgOcean-Resources-1.0.1.rar" + cd "${srcdir}/${_realname}"/resources + yes | unrar x "${srcdir}/osgOcean-Resources-1.0.1.rar" cd ../ patch -p1 -i ${srcdir}/mingw-w64-cmake.patch - patch -p1 -i ${srcdir}/osg-3.3.x.patch + patch -p1 -i ${srcdir}/osg-3.5.patch } build() { @@ -43,59 +42,63 @@ build() { package_release() { provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") - conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-svn") + replaces=(${MINGW_PACKAGE_PREFIX}-${_realname}-svn) [[ -d ${srcdir}/build-release ]] && rm -rf ${srcdir}/build-release mkdir -p ${srcdir}/build-release && cd ${srcdir}/build-release + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_FFTW3=ON \ -DUSE_FFTSS=OFF \ ../${_realname} make - make install + make DESTDIR=${pkgdir} install } package_debug() { - depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn=$pkgver" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") + depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-git=${pkgver}" "${MINGW_PACKAGE_PREFIX}-OpenSceneGraph-debug") provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") - conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug") + conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-debug" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn") + replaces=(${MINGW_PACKAGE_PREFIX}-${_realname}-debug-svn) [[ -d ${srcdir}/build-debug ]] && rm -rf ${srcdir}/build-debug mkdir -p ${srcdir}/build-debug && cd ${srcdir}/build-debug + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX:PATH=${pkgdir}${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=Debug \ -DUSE_FFTW3=ON \ -DUSE_FFTSS=OFF \ ../${_realname} make - make install + make DESTDIR=${pkgdir} install rm -rf ${pkgdir}${MINGW_PREFIX}/include rm -rf ${pkgdir}${MINGW_PREFIX}/bin/resources rm -rf ${pkgdir}${MINGW_PREFIX}/bin/*.exe } -package_mingw-w64-i686-osgocean-svn() { +package_mingw-w64-i686-osgocean-git() { package_release } -package_mingw-w64-i686-osgocean-debug-svn() { +package_mingw-w64-i686-osgocean-debug-git() { package_debug } -package_mingw-w64-x86_64-osgocean-svn() { +package_mingw-w64-x86_64-osgocean-git() { package_release } -package_mingw-w64-x86_64-osgocean-debug-svn() { +package_mingw-w64-x86_64-osgocean-debug-git() { package_debug } diff --git a/mingw-w64-osgocean-svn/mingw-w64-cmake.patch b/mingw-w64-osgocean-git/mingw-w64-cmake.patch similarity index 100% rename from mingw-w64-osgocean-svn/mingw-w64-cmake.patch rename to mingw-w64-osgocean-git/mingw-w64-cmake.patch diff --git a/mingw-w64-osgocean-git/osg-3.5.patch b/mingw-w64-osgocean-git/osg-3.5.patch new file mode 100644 index 0000000000..68417be5b5 --- /dev/null +++ b/mingw-w64-osgocean-git/osg-3.5.patch @@ -0,0 +1,117 @@ +commit 57adc9df906ba9c06196e29b14a68a84f8159a01 +Author: Tony Vasile +Date: Tue Dec 15 00:02:54 2015 +1100 + + Modified to compile against OpenSceneGraph 3.5.0 + +diff -Naur osgocean/include/osgOcean/Cylinder osgocean-patched/include/osgOcean/Cylinder +--- a/include/osgOcean/Cylinder 2014-05-25 20:39:33.715800000 +0400 ++++ b/include/osgOcean/Cylinder 2014-06-07 20:49:58.658400000 +0400 +@@ -16,13 +16,14 @@ + */ + + #pragma once ++#include + #include + #include + + namespace osgOcean + { + +-class Cylinder : public osg::Geometry ++class OSGOCEAN_EXPORT Cylinder : public osg::Geometry + { + protected: + osg::ref_ptr _colorArray; +diff --git a/include/osgOcean/MipmapGeometryVBO b/include/osgOcean/MipmapGeometryVBO +index beb4615..3cbfb0c 100644 +--- a/include/osgOcean/MipmapGeometryVBO ++++ b/include/osgOcean/MipmapGeometryVBO +@@ -144,7 +144,7 @@ namespace osgOcean + * Rather than use standard computeBound() this computes the bounding box + * using the offset and the worldSize. + */ +- osg::BoundingBox computeBound( void ) const; ++ osg::BoundingSphere computeBound( void ) const; + + /** + * Set the tile offset for shader positioning. +@@ -164,7 +164,7 @@ namespace osgOcean + } + + dirtyBound(); +- setBound( computeBound() ); ++ setBound( getBoundingBox() ); + } + + /** +diff --git a/src/osgOcean/MipmapGeometryVBO.cpp b/src/osgOcean/MipmapGeometryVBO.cpp +index 6faa71f..69b354d 100644 +--- a/src/osgOcean/MipmapGeometryVBO.cpp ++++ b/src/osgOcean/MipmapGeometryVBO.cpp +@@ -83,8 +83,9 @@ namespace osgOcean + { + } + +- osg::BoundingBox MipmapGeometryVBO::computeBound( void ) const ++ osg::BoundingSphere MipmapGeometryVBO::computeBound( void ) const + { ++/* + osg::BoundingBox bb; + + bb.xMin() = _offset.x(); +@@ -95,6 +96,8 @@ namespace osgOcean + bb.zMax() = 5.f; + + return bb; ++*/ ++ return osg::BoundingSphere(getBoundingBox()); + } + + bool MipmapGeometryVBO::updatePrimitives( unsigned int level, unsigned int levelRight, unsigned int levelBelow ) +diff --git a/src/osgOcean/OceanScene.cpp b/src/osgOcean/OceanScene.cpp +index d6ddc42..a6612b7 100644 +--- a/src/osgOcean/OceanScene.cpp ++++ b/src/osgOcean/OceanScene.cpp +@@ -881,7 +881,7 @@ void OceanScene::traverse( osg::NodeVisitor& nv ) + + bool surfaceVisible = _oceanSurface->isVisible(*cv, eyeAboveWater); + +- (*_oceanSurface->getCullCallback())(_oceanSurface.get(), &nv); ++ (*_oceanSurface->getCullCallback()).run(_oceanSurface.get(), &nv); + + preRenderCull(*cv, eyeAboveWater, surfaceVisible); // reflections/refractions + +diff --git a/src/osgOcean/SiltEffect.cpp b/src/osgOcean/SiltEffect.cpp +index 7ab41cd..2623d89 100644 +--- a/src/osgOcean/SiltEffect.cpp ++++ b/src/osgOcean/SiltEffect.cpp +@@ -22,6 +22,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -648,7 +649,7 @@ void SiltEffect::SiltDrawable::drawImplementation(osg::RenderInfo& renderInfo) c + { + if (!_geometry) return; + +- const osg::Geometry::Extensions* extensions = osg::Geometry::getExtensions(renderInfo.getContextID(),true); ++ const osg::GLExtensions* extensions = renderInfo.getState()->get(); + + glPushMatrix(); + +diff -Naur osgocean/src/osgOcean/GodRays.cpp osgocean-patched/src/osgOcean/GodRays.cpp +--- osgocean/src/osgOcean/GodRays.cpp 2014-05-25 20:39:34.199400000 +0400 ++++ osgocean-patched/src/osgOcean/GodRays.cpp 2014-06-07 19:51:10.892400000 +0400 +@@ -302,7 +302,7 @@ + + // If the eye isn't contained withing the god ray volume, + // we need to recompute the bounds or they get clipped. +- if(!getDrawable(0)->getBound().contains( eye )){ ++ if(!getDrawable(0)->getBoundingBox().contains( eye )){ + getDrawable(0)->dirtyBound(); + getDrawable(1)->dirtyBound(); + } diff --git a/mingw-w64-osgocean-svn/osg-3.3.x.patch b/mingw-w64-osgocean-svn/osg-3.3.x.patch deleted file mode 100644 index fed230bb0e..0000000000 --- a/mingw-w64-osgocean-svn/osg-3.3.x.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naur osgocean/include/osgOcean/Cylinder osgocean-patched/include/osgOcean/Cylinder ---- osgocean/include/osgOcean/Cylinder 2014-05-25 20:39:33.715800000 +0400 -+++ osgocean-patched/include/osgOcean/Cylinder 2014-06-07 20:49:58.658400000 +0400 -@@ -16,13 +16,14 @@ - */ - - #pragma once -+#include - #include - #include - - namespace osgOcean - { - --class Cylinder : public osg::Geometry -+class OSGOCEAN_EXPORT Cylinder : public osg::Geometry - { - protected: - osg::ref_ptr _colorArray; -diff -Naur osgocean/include/osgOcean/MipmapGeometryVBO osgocean-patched/include/osgOcean/MipmapGeometryVBO ---- osgocean/include/osgOcean/MipmapGeometryVBO 2014-05-25 20:39:33.684600000 +0400 -+++ osgocean-patched/include/osgOcean/MipmapGeometryVBO 2014-06-07 19:49:02.267400000 +0400 -@@ -144,7 +144,7 @@ - * Rather than use standard computeBound() this computes the bounding box - * using the offset and the worldSize. - */ -- osg::BoundingBox computeBound( void ) const; -+ osg::BoundingBox computeBoundingBox( void ) const; - - /** - * Set the tile offset for shader positioning. -@@ -164,7 +164,7 @@ - } - - dirtyBound(); -- setBound( computeBound() ); -+ setBound( computeBoundingBox() ); - } - - /** -diff -Naur osgocean/src/osgOcean/GodRays.cpp osgocean-patched/src/osgOcean/GodRays.cpp ---- osgocean/src/osgOcean/GodRays.cpp 2014-05-25 20:39:34.199400000 +0400 -+++ osgocean-patched/src/osgOcean/GodRays.cpp 2014-06-07 19:51:10.892400000 +0400 -@@ -302,7 +302,7 @@ - - // If the eye isn't contained withing the god ray volume, - // we need to recompute the bounds or they get clipped. -- if(!getDrawable(0)->getBound().contains( eye )){ -+ if(!getDrawable(0)->getBoundingBox().contains( eye )){ - getDrawable(0)->dirtyBound(); - getDrawable(1)->dirtyBound(); - } -diff -Naur osgocean/src/osgOcean/MipmapGeometryVBO.cpp osgocean-patched/src/osgOcean/MipmapGeometryVBO.cpp ---- osgocean/src/osgOcean/MipmapGeometryVBO.cpp 2014-05-25 20:39:34.199400000 +0400 -+++ osgocean-patched/src/osgOcean/MipmapGeometryVBO.cpp 2014-06-07 19:52:04.940400000 +0400 -@@ -83,7 +83,7 @@ - { - } - -- osg::BoundingBox MipmapGeometryVBO::computeBound( void ) const -+ osg::BoundingBox MipmapGeometryVBO::computeBoundingBox( void ) const - { - osg::BoundingBox bb; - ---- osgocean/src/osgOcean/OceanScene.cpp.orig 2014-12-08 08:02:04.720600000 +0300 -+++ osgocean/src/osgOcean/OceanScene.cpp 2014-12-08 08:02:29.867800000 +0300 -@@ -881,7 +881,8 @@ - - bool surfaceVisible = _oceanSurface->isVisible(*cv, eyeAboveWater); - -- (*_oceanSurface->getCullCallback())(_oceanSurface.get(), &nv); -+ osg::Callback* callback = _oceanSurface->getCullCallback(); -+ if (callback) callback->run(_oceanSurface.get(), &nv); - - preRenderCull(*cv, eyeAboveWater, surfaceVisible); // reflections/refractions -