diff --git a/.gitignore b/.gitignore index f0397da..4cb00e4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,3 @@ ogre-1.6.4-clean.tar.bz2 /ogre-1.7.4-clean.tar.bz2 /ogre-1.8.1-clean.tar.bz2 /ogre-1.9.0-clean.tar.bz2 -/ogre-1.12.6.tar.gz -/imgui-1.76.tar.gz -/ogre-1.12.9-clean.tar.xz -/imgui-1.77.tar.gz diff --git a/ogre-1.7.2-fix-ppc-build.patch b/ogre-1.7.2-fix-ppc-build.patch new file mode 100644 index 0000000..6415f21 --- /dev/null +++ b/ogre-1.7.2-fix-ppc-build.patch @@ -0,0 +1,19 @@ +diff -up ogre-1.7.2/OgreMain/src/nedmalloc/malloc.c.h.ppc ogre-1.7.2/OgreMain/src/nedmalloc/malloc.c.h +--- ogre-1.7.2/OgreMain/src/nedmalloc/malloc.c.h.ppc 2010-11-03 14:24:47.000000000 -0400 ++++ ogre-1.7.2/OgreMain/src/nedmalloc/malloc.c.h 2010-12-20 14:44:49.467800002 -0500 +@@ -1838,6 +1838,7 @@ static MLOCK_T malloc_global_mutex = PTH + + /* Cope with old-style linux recursive lock initialization by adding */ + /* skipped internal declaration from pthread.h */ ++/* + #ifdef linux + #if !defined (PTHREAD_MUTEX_RECURSIVE) && defined (PTHREAD_MUTEX_RECURSIVE_NP) + extern int pthread_mutexattr_setkind_np __P ((pthread_mutexattr_t *__attr, +@@ -1846,6 +1847,7 @@ extern int pthread_mutexattr_setkind_np + #define pthread_mutexattr_settype(x,y) pthread_mutexattr_setkind_np(x,y) + #endif + #endif ++*/ + + static int pthread_init_lock (MLOCK_T *sl) { + pthread_mutexattr_t attr; diff --git a/ogre-1.9.0-build-rcapsdump.patch b/ogre-1.9.0-build-rcapsdump.patch new file mode 100644 index 0000000..39efb56 --- /dev/null +++ b/ogre-1.9.0-build-rcapsdump.patch @@ -0,0 +1,22 @@ +diff -uNr ogre-1.9.0/Tools/CMakeLists.txt ogre-1.9.0.rcapsdump/Tools/CMakeLists.txt +--- ogre-1.9.0/Tools/CMakeLists.txt 2013-12-01 21:28:12.000000000 +0400 ++++ ogre-1.9.0.rcapsdump/Tools/CMakeLists.txt 2014-06-07 22:09:58.310761427 +0400 +@@ -14,3 +14,5 @@ + add_subdirectory(XMLConverter) + add_subdirectory(MeshUpgrader) + endif (NOT OGRE_BUILD_PLATFORM_APPLE_IOS AND NOT OGRE_BUILD_PLATFORM_WINRT) ++ ++add_subdirectory(rcapsdump) +diff -uNr ogre-1.9.0/Tools/rcapsdump/CMakeLists.txt ogre-1.9.0.rcapsdump/Tools/rcapsdump/CMakeLists.txt +--- ogre-1.9.0/Tools/rcapsdump/CMakeLists.txt 1970-01-01 03:00:00.000000000 +0300 ++++ ogre-1.9.0.rcapsdump/Tools/rcapsdump/CMakeLists.txt 2014-06-07 22:10:45.999350666 +0400 +@@ -0,0 +1,9 @@ ++# Configure rcapsdump ++ ++set(SOURCE_FILES ++ src/main.cpp ++) ++ ++add_executable(rcapsdump ${SOURCE_FILES}) ++target_link_libraries(rcapsdump ${OGRE_LIBRARIES}) ++ogre_config_tool(rcapsdump) diff --git a/ogre-1.9.0-cmake-freetype.patch b/ogre-1.9.0-cmake-freetype.patch new file mode 100644 index 0000000..03ce0d3 --- /dev/null +++ b/ogre-1.9.0-cmake-freetype.patch @@ -0,0 +1,12 @@ +diff -uNr ogre-1.9.0/CMake/Packages/FindFreetype.cmake ogre-1.9.0.cmake-freetype/CMake/Packages/FindFreetype.cmake +--- ogre-1.9.0/CMake/Packages/FindFreetype.cmake 2013-12-01 21:28:12.000000000 +0400 ++++ ogre-1.9.0.cmake-freetype/CMake/Packages/FindFreetype.cmake 2014-06-07 22:29:30.518295328 +0400 +@@ -43,7 +43,7 @@ + findpkg_framework(FREETYPE) + message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") + +-find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2) ++find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype2/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2) + find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS}) + + find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) diff --git a/ogre-1.9.0-cmake_build-fix.patch b/ogre-1.9.0-cmake_build-fix.patch new file mode 100644 index 0000000..a98c5b1 --- /dev/null +++ b/ogre-1.9.0-cmake_build-fix.patch @@ -0,0 +1,14 @@ +diff -uNr ogre-1.9.0/Samples/Browser/CMakeLists.txt ogre-1.9.0.cmake_build-fix/Samples/Browser/CMakeLists.txt +--- ogre-1.9.0/Samples/Browser/CMakeLists.txt 2013-12-01 21:28:12.000000000 +0400 ++++ ogre-1.9.0.cmake_build-fix/Samples/Browser/CMakeLists.txt 2014-06-07 22:59:19.423900980 +0400 +@@ -339,8 +339,8 @@ + + foreach(FWK ${FRAMEWORKS}) + add_custom_command(TARGET SampleBrowser POST_BUILD +- COMMAND ARGS if [ -d ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ]\; then ln -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/${FWK}.framework\; fi +- ) ++ COMMAND ARGS if test -d ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework\; then ln -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/${FWK}.framework\; fi ++ ) + endforeach(FWK) + + # Add links for the sample plugins diff --git a/ogre-1.9.0-dynlib-allow-no-so.patch b/ogre-1.9.0-dynlib-allow-no-so.patch new file mode 100644 index 0000000..c02387b --- /dev/null +++ b/ogre-1.9.0-dynlib-allow-no-so.patch @@ -0,0 +1,23 @@ +diff -uNr ogre-1.9.0/OgreMain/src/OgreDynLib.cpp ogre-1.9.0.dynlib-allow-no-so/OgreMain/src/OgreDynLib.cpp +--- ogre-1.9.0/OgreMain/src/OgreDynLib.cpp 2013-12-01 21:28:12.000000000 +0400 ++++ ogre-1.9.0.dynlib-allow-no-so/OgreMain/src/OgreDynLib.cpp 2014-06-07 22:22:44.500257614 +0400 +@@ -76,7 +76,9 @@ + String name = mName; + #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_NACL + // dlopen() does not add .so to the filename, like windows does for .dll +- if (name.find(".so") == String::npos) ++ mInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() ); ++ // Only add .so if open without it failed ++ if ((!mInst) && (name.find(".so") == String::npos)) + { + name += ".so."; + name += StringConverter::toString(OGRE_VERSION_MAJOR) + "."; +@@ -93,7 +95,7 @@ + if (name.substr(name.length() - 4, 4) != ".dll") + name += ".dll"; + #endif +- mInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() ); ++ if( !mInst ) mInst = (DYNLIB_HANDLE)DYNLIB_LOAD( name.c_str() ); + #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE + if(!mInst) + { diff --git a/ogre-1.9.0-glew.patch b/ogre-1.9.0-glew.patch new file mode 100644 index 0000000..06922db --- /dev/null +++ b/ogre-1.9.0-glew.patch @@ -0,0 +1,133 @@ +diff -uNr ogre-1.9.0/RenderSystems/GL/include/GL/glew.h ogre-1.9.0.glew/RenderSystems/GL/include/GL/glew.h +--- ogre-1.9.0/RenderSystems/GL/include/GL/glew.h 2014-06-07 21:12:14.000000000 +0400 ++++ ogre-1.9.0.glew/RenderSystems/GL/include/GL/glew.h 2014-06-07 21:45:03.422493324 +0400 +@@ -109,6 +109,11 @@ + #define __GLEXT_H_ + #define __gl_ATI_h_ + ++// SJS ++// Build statically ++#define GLEW_STATIC ++// SJS ++ + #if defined(_WIN32) + + /* +diff -uNr ogre-1.9.0/RenderSystems/GL/src/glew.cpp ogre-1.9.0.glew/RenderSystems/GL/src/glew.cpp +--- ogre-1.9.0/RenderSystems/GL/src/glew.cpp 2014-06-07 21:12:16.000000000 +0400 ++++ ogre-1.9.0.glew/RenderSystems/GL/src/glew.cpp 2014-06-07 21:48:09.519775784 +0400 +@@ -29,6 +29,10 @@ + ** THE POSSIBILITY OF SUCH DAMAGE. + */ + ++// SJS ++#include "OgreGLSupport.h" ++// SJS ++ + #include + + #if defined(_WIN32) +@@ -57,13 +61,21 @@ + # endif /* _WIN32 */ + # define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx + #else /* GLEW_MX */ +-# define GLEW_CONTEXT_ARG_DEF_INIT void +-# define GLEW_CONTEXT_ARG_VAR_INIT +-# define GLEW_CONTEXT_ARG_DEF_LIST void +-# define WGLEW_CONTEXT_ARG_DEF_INIT void +-# define WGLEW_CONTEXT_ARG_DEF_LIST void +-# define GLXEW_CONTEXT_ARG_DEF_INIT void +-# define GLXEW_CONTEXT_ARG_DEF_LIST void ++// SJS ++# define GLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport ++# define GLEW_CONTEXT_ARG_VAR_INIT glSupport ++# define GLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport ++# define WGLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport ++# define WGLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport ++# define GLXEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport ++# define GLXEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport ++//# define GLEW_CONTEXT_ARG_DEF_INIT void ++//# define GLEW_CONTEXT_ARG_VAR_INIT ++//# define GLEW_CONTEXT_ARG_DEF_LIST void ++//# define WGLEW_CONTEXT_ARG_DEF_INIT void ++//# define WGLEW_CONTEXT_ARG_DEF_LIST void ++//# define GLXEW_CONTEXT_ARG_DEF_INIT void ++//# define GLXEW_CONTEXT_ARG_DEF_LIST void + #endif /* GLEW_MX */ + + #if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX) +@@ -137,7 +149,7 @@ + #endif + } + /* prepend a '_' for the Unix C symbol mangling convention */ +- symbolName = malloc(strlen((const char*)name) + 2); ++ symbolName = (char*)malloc(strlen((const char*)name) + 2); + strcpy(symbolName+1, (const char*)name); + symbolName[0] = '_'; + symbol = NULL; +@@ -9481,9 +9493,11 @@ + + /* ------------------------------------------------------------------------- */ + +-#ifndef GLEW_MX +-static +-#endif ++// SJS ++//#ifndef GLEW_MX ++//static ++//#endif ++// SJS + GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) + { + const GLubyte* s; +@@ -12543,7 +12557,14 @@ + { + GLboolean r = GL_FALSE; + +- r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; ++ // SJS ++ // FB: Patched to allow Ogre to overload glXGetCurrentDisplay ++ if (glXGetCurrentDisplay == NULL) ++ { ++ r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; ++ } ++ //r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; ++ // SJS + + return r; + } +@@ -13476,19 +13497,21 @@ + extern GLenum GLEWAPIENTRY glxewContextInit (void); + #endif /* _WIN32 */ + +-GLenum GLEWAPIENTRY glewInit (void) +-{ +- GLenum r; +- r = glewContextInit(); +- if ( r != 0 ) return r; +-#if defined(_WIN32) +- return wglewContextInit(); +-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */ +- return glxewContextInit(); +-#else +- return r; +-#endif /* _WIN32 */ +-} ++// SJS ++//GLenum GLEWAPIENTRY glewInit (void) ++//{ ++// GLenum r; ++// r = glewContextInit(); ++// if ( r != 0 ) return r; ++//#if defined(_WIN32) ++// return wglewContextInit(); ++//#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */ ++// return glxewContextInit(); ++//#else ++// return r; ++//#endif /* _WIN32 */ ++//} ++// End SJS + + #endif /* !GLEW_MX */ + #ifdef GLEW_MX diff --git a/ogre-1.9.0-sysctl.patch b/ogre-1.9.0-sysctl.patch new file mode 100644 index 0000000..9e66710 --- /dev/null +++ b/ogre-1.9.0-sysctl.patch @@ -0,0 +1,11 @@ +--- ogre-1.9.0/OgreMain/src/OgrePlatformInformation.cpp~ 2020-05-28 22:26:51.798696996 +0100 ++++ ogre-1.9.0/OgreMain/src/OgrePlatformInformation.cpp 2020-05-28 22:27:24.901691518 +0100 +@@ -42,7 +42,7 @@ + + #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID + #include +- #elif OGRE_CPU == OGRE_CPU_ARM ++ #elif OGRE_CPU == OGRE_CPU_ARM && OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS + #include + #if __MACH__ + #include diff --git a/ogre-aarch64.patch b/ogre-aarch64.patch new file mode 100644 index 0000000..d5abe67 --- /dev/null +++ b/ogre-aarch64.patch @@ -0,0 +1,13 @@ +Index: ogre-1.9.0/OgreMain/include/OgrePlatform.h +=================================================================== +--- ogre-1.9.0.orig/OgreMain/include/OgrePlatform.h ++++ ogre-1.9.0/OgreMain/include/OgrePlatform.h +@@ -166,7 +166,7 @@ namespace Ogre { + #endif + + /* Find the arch type */ +-#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__arm64__) || defined(_aarch64_) || defined(__mips64) || defined(__mips64_) ++#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__arm64__) || defined(__aarch64__) || defined(__mips64) || defined(__mips64_) + # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_64 + #else + # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_32 diff --git a/ogre-make-clean.sh b/ogre-make-clean.sh index 0152bdb..a0d1db9 100755 --- a/ogre-make-clean.sh +++ b/ogre-make-clean.sh @@ -3,32 +3,31 @@ set -e set -x -version=1.12.9 +version=1.9.0 -[ ! -e ogre-${version} ] && wget -c https://github.com/OGRECave/ogre/archive/v${version}/ogre-${version}.tar.gz +[ ! -e ogre-${version} ] + +rpm -q mercurial +hg clone https://bitbucket.org/sinbad/ogre ogre-${version} +hg archive -R ogre-${version} -r v$(echo ${version} | tr . -) -t tbz2 ogre-${version}.tar.bz2 +rm -rf ogre-${version} # Clean up -tar xf ogre-${version}.tar.gz +tar xjf ogre-${version}.tar.bz2 pushd ogre-${version} # - Non-free licensed headers under RenderSystems/GL/include/GL removed - rm RenderSystems/GL/include/GL/{gl,glext}.h + rm RenderSystems/GL/include/GL/{gl,glext,glxext,glxtokens,wglext}.h # - GLEW sources updated - # not working glew.c:1542:1: error: unknown type name 'PFNGLPROGRAMUNIFORM2IVEXTPROC'; - rpm -q glew-devel glew-debugsource - echo if package glew-debugsource is not installed, please do 'dnf debuginfo-install glew' + rpm -q glew-devel glew-debuginfo cp -f /usr/include/GL/{glew,glxew,wglew}.h RenderSystems/GL/include/GL/ - cp -f /usr/src/debug/glew-*/src/glew.c RenderSystems/GL/src/glew.c + cp -f /usr/src/debug/glew-*/src/glew.c RenderSystems/GL/src/glew.cpp + dos2unix RenderSystems/GL/src/glew.cpp - # https://github.com/OGRECave/ogre/issues/882 # - Non-free chiropteraDM.pk3 under Samples/Media/packs removed - # rm Samples/Media/packs/chiropteraDM.{pk3,txt} - # https://github.com/OGRECave/ogre/commit/d7dc7119720a06f5d373bc6553bae1399ab5fb2e - # Samples: BSP - replace chiropteraDM by OpenArena oa_rpg3dm2 + rm Samples/Media/packs/chiropteraDM.{pk3,txt} # - Non-free textures under Samples/Media/materials/textures/nvidia removed - # rm Samples/Media/materials/textures/nvidia/* - # https://github.com/OGRECave/ogre/commit/302e970e6d56c5642f1879700ff891798c98d3b2 - # Samples: Terrain - replace proprietary nvidia textures by cc0textures + rm Samples/Media/materials/textures/nvidia/* popd -tar cJf ogre-${version}-clean.tar.xz ogre-${version} +tar cjf ogre-${version}-clean.tar.bz2 ogre-${version} diff --git a/ogre.spec b/ogre.spec index 61a4f72..b48f614 100644 --- a/ogre.spec +++ b/ogre.spec @@ -1,8 +1,6 @@ -%undefine __cmake_in_source_build - Name: ogre -Version: 1.12.9 -Release: 1%{?dist} +Version: 1.9.0 +Release: 31%{?dist} Summary: Object-Oriented Graphics Rendering Engine # MIT with exceptions - main library # CC-BY-SA - devel docs @@ -11,43 +9,42 @@ Summary: Object-Oriented Graphics Rendering Engine # Public Domain - Some of the build files, samples and plugins License: MIT with exceptions and CC-BY-SA and Freely redistributable without restriction URL: http://www.ogre3d.org/ -# This is modified http://downloads.sourceforge.net/ogre/ogre-v%%(echo %%{version} | tr . -).tar.bz2 +# This is modified http://downloads.sourceforge.net/ogre/ogre-v%(echo %{version} | tr . -).tar.bz2 # with non-free files striped (see ogre-make-clean.sh): # Update local glew copy # - Non-free licensed headers under RenderSystems/GL/include/GL removed # - Non-free chiropteraDM.pk3 under Samples/Media/packs removed # - Non-free textures under Samples/Media/materials/textures/nvidia -Source0: ogre-%{version}-clean.tar.xz -Source1: https://github.com/ocornut/imgui/archive/v1.77/imgui-1.77.tar.gz +Source0: %{name}-%{version}-clean.tar.bz2 Patch0: ogre-1.7.2-rpath.patch -#Patch5: ogre-1.9.0-build-rcapsdump.patch +Patch1: ogre-1.9.0-glew.patch +Patch3: ogre-1.7.2-fix-ppc-build.patch +Patch5: ogre-1.9.0-build-rcapsdump.patch Patch6: ogre-thread.patch +Patch7: ogre-1.9.0-dynlib-allow-no-so.patch +# FIXME: Patch is bogus on Fedora >= 24 +Patch8: ogre-1.9.0-cmake-freetype.patch +Patch9: ogre-1.9.0-cmake_build-fix.patch +Patch10: ogre-aarch64.patch +# Resolve link errors due to incorrect template creation +# https://bitbucket.org/sinbad/ogre/commits/a24ac4afbbb9dc5ff49a61634af50da11ba8fb97/ +# https://bugzilla.redhat.com/show_bug.cgi?id=1223612 +Patch11: ogre-a24ac4afbbb9dc5ff49a61634af50da11ba8fb97.diff +# Remove unnecessary inclusion of +# https://bugzilla.redhat.com/show_bug.cgi?id=1841324 +Patch12: ogre-1.9.0-sysctl.patch BuildRequires: gcc-c++ -BuildRequires: cmake -BuildRequires: boost-devel -BuildRequires: doxygen -BuildRequires: zziplib-devel -BuildRequires: freetype-devel -BuildRequires: libXaw-devel -BuildRequires: libXrandr-devel -BuildRequires: libXxf86vm-devel -BuildRequires: libGLU-devel -BuildRequires: ois-devel -BuildRequires: freeimage-devel -BuildRequires: openexr-devel +BuildRequires: zziplib-devel freetype-devel +BuildRequires: libXaw-devel libXrandr-devel libXxf86vm-devel libGLU-devel +BuildRequires: ois-devel freeimage-devel openexr-devel BuildRequires: glew-devel +BuildRequires: boost-devel # BuildRequires: poco-devel BuildRequires: tinyxml-devel +BuildRequires: cmake BuildRequires: libatomic BuildRequires: cppunit-devel -BuildRequires: SDL2-devel -BuildRequires: harfbuzz-devel -Buildrequires: qt5-qtbase-devel -#BuildRequires: swig > 3.0.0 -#Buildrequires: python3-devel -#Buildrequires: java-devel -Buildrequires: pugixml-devel -Buildrequires: tinyxml-devel +Provides: bundled(wxScintilla) = 1.69.2 %description OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, @@ -150,26 +147,48 @@ samples. The samples are installed in %{_libdir}/Samples/*.so and can be run using SampleBrowser. %prep -%setup -q -a1 +%setup -q +mkdir build %patch0 -p1 -b .rpath +%patch1 -p1 -b .glew +%patch3 -p1 -b .ppc +%patch5 -p1 -b .build-rcapsdump %patch6 -p0 -b .thread - -%{_fixperms} . +%patch7 -p1 -b .dynlib-allow-no-so +%if (%{?fedora} > 20) && (0%{?fedora} < 24) +# freetype header chaos: +# Fedora <= 20 headers in /usr/include/freetype2/freetype +# Fedora 21,22,23 headers in /usr/include/freetype2 +# Fedora >= 24 headers in /usr/include/freetype2/freetype +%patch8 -p1 -b .cmake-freetype +%endif +%patch9 -p1 -b .cmake_build-fix +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 + +# remove execute bits from src-files for -debuginfo package +chmod -x `find RenderSystems/GL -type f` \ + `find Samples/DeferredShading -type f` Samples/DynTex/src/DynTex.cpp +# Samples/Common/bin/resources.cfg +# Remove spurious execute bits from some Media files +chmod -x `find Samples/Media/DeferredShadingMedia -type f` +# Add mit.txt symlink for links in License.html +rm -r Docs/licenses/* +ln -s ../COPYING Docs/licenses/mit.txt +# remove included tinyxml headers to ensure use of system headers +rm Tools/XMLConverter/include/tiny* %build -%{cmake} -DOGRE_FULL_RPATH=0 -DCMAKE_SKIP_RPATH=1 \ - -DOGRE_BUILD_DOCS:BOOL=OFF \ - -DOGRE_BUILD_DEPENDENCIES=FALSE \ - -DOGRE_BUILD_PLUGIN_CG:BOOL=OFF \ - -DOGRE_INSTALL_SAMPLES:BOOL=ON \ - -DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=ON \ - -DOGRE_CONFIG_MEMTRACK_RELEASE:BOOL=OFF \ - -DIMGUI_DIR=imgui-1.77 \ - -DOGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS=1 -Wno-dev -%{cmake_build} +pushd build + %cmake .. -DOGRE_FULL_RPATH=0 -DCMAKE_SKIP_RPATH=1 -DOGRE_LIB_DIRECTORY=%{_lib} -DOGRE_BUILD_RTSHADERSYSTEM_EXT_SHADERS=1 -DOGRE_BUILD_PLUGIN_CG=0 + make %{?_smp_mflags} +popd %install -%{cmake_install} +pushd build + %make_install +popd # Create config for ldconfig mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d @@ -178,15 +197,15 @@ echo "%{_libdir}/OGRE" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch # Install the samples mkdir -p %{buildroot}%{_libdir}/OGRE/Samples mkdir -p %{buildroot}%{_sysconfdir}/OGRE -for cfg in plugins.cfg resources.cfg samples.cfg; do +for cfg in plugins.cfg quakemap.cfg resources.cfg samples.cfg; do mv %{buildroot}%{_datadir}/OGRE/$cfg %{buildroot}%{_sysconfdir}/OGRE/ done # Swap out reference to non-free quake map that was removed -#cat << EOF > %{buildroot}%{_sysconfdir}/OGRE/quakemap.cfg -#Archive: /usr/share/OGRE/media/packs/ogretestmap.zip -#Map: ogretestmap.bsp -#EOF +cat << EOF > %{buildroot}%{_sysconfdir}/OGRE/quakemap.cfg +Archive: /usr/share/OGRE/media/packs/ogretestmap.zip +Map: ogretestmap.bsp +EOF # Fixing bug with wrong case for media mkdir -p %{buildroot}%{_datadir}/OGRE/ @@ -194,13 +213,7 @@ mv %{buildroot}%{_datadir}/OGRE/Media %{buildroot}%{_datadir}/OGRE/media mv %{buildroot}%{_datadir}/OGRE/media/PCZAppMedia/ROOM_NY.mesh %{buildroot}%{_datadir}/OGRE/media/PCZAppMedia/room_ny.mesh mv %{buildroot}%{_datadir}/OGRE/media/PCZAppMedia/ROOM_PY.mesh %{buildroot}%{_datadir}/OGRE/media/PCZAppMedia/room_py.mesh -rm -f %{buildroot}%{_datadir}/doc/OGRE/CMakeLists.txt -# Add mit.txt symlink for links in License.html -#rm -r Docs/licenses/* -#ln -s ../COPYING Docs/licenses/mit.txt -rm -f Docs/licenses/mit.txt -rm -rf %{buildroot}%{_datadir}/doc/OGRE/licenses/ - +rm -f %{buildroot}%{_datadir}/OGRE/docs/CMakeLists.txt # cmake macros should be in the cmake directory, not an Ogre directory mkdir -p %{buildroot}%{_datadir}/cmake/Modules @@ -211,17 +224,12 @@ mv %{buildroot}%{_libdir}/OGRE/cmake/* %{buildroot}%{_datadir}/cmake/Modules %postun -p /sbin/ldconfig %files -%doc AUTHORS README.md -%license LICENSE Docs/licenses/* +%doc AUTHORS BUGS COPYING +%doc Docs/ChangeLog.html Docs/License.html Docs/licenses Docs/ReadMe.html Docs/style.css Docs/ogre-logo*.gif %{_libdir}/libOgreMain.so.* -%{_libdir}/libOgreBites.so.* -%{_libdir}/libOgreBitesQt.so.* -%{_libdir}/libOgreMeshLodGenerator.so.* -%{_libdir}/libOgreGLSupport.a %{_libdir}/OGRE -%{_bindir}/VRMLConverter + %{_datadir}/OGRE -%{_datadir}/doc/OGRE %dir %{_sysconfdir}/OGRE %exclude %{_bindir}/SampleBrowser %exclude %{_libdir}/OGRE/Samples @@ -250,7 +258,7 @@ mv %{buildroot}%{_libdir}/OGRE/cmake/* %{buildroot}%{_datadir}/cmake/Modules %files utils %{_bindir}/OgreMeshUpgrader %{_bindir}/OgreXMLConverter -#{_bindir}/rcapsdump +%{_bindir}/rcapsdump %files devel %{_libdir}/lib*Ogre*.so @@ -263,21 +271,12 @@ mv %{buildroot}%{_libdir}/OGRE/cmake/* %{buildroot}%{_datadir}/cmake/Modules %{_libdir}/OGRE/Samples %{_datadir}/OGRE/media %{_sysconfdir}/OGRE/plugins.cfg -#{_sysconfdir}/OGRE/quakemap.cfg +%{_sysconfdir}/OGRE/quakemap.cfg %{_sysconfdir}/OGRE/resources.cfg %{_sysconfdir}/OGRE/samples.cfg %changelog -* Mon Nov 23 2020 Sérgio Basto - 1.12.9-1 -- Update to 1.12.9 - -* Sun Nov 22 2020 Sérgio Basto - 1.12.6-1 -- Update to 1.12.6 -- Fix cmake build -- Use upstream source and simply remove the GL headers in %prep. -- Add Bitwise.patch for build on s390x - * Sat Aug 01 2020 Fedora Release Engineering - 1.9.0-31 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 8e9e24d..e8b7a57 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (ogre-1.12.9-clean.tar.xz) = a58176c328b41a3e1b89755ed4447d8cd47f1cbaf1aefb41929cd2b1a5ece5a77775a1be4333bd6f5dc5403f4b5d1e5c1fc0a60fc5f4d8bf38016c919099f972 -SHA512 (imgui-1.77.tar.gz) = d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546 +6a3ffaa8389e6a4323fc505263137bfd ogre-1.9.0-clean.tar.bz2