diff --git a/.gitignore b/.gitignore index 0e3f353..d882583 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ ad3dsfilter-0.8.1.tar.gz imtex-1.4.0.tar.gz mm3d-1.3.8a.tar.gz +/mm3d-1.3.11.tar.gz diff --git a/mm3d-1.3.11-lua52.patch b/mm3d-1.3.11-lua52.patch new file mode 100644 index 0000000..e5692db --- /dev/null +++ b/mm3d-1.3.11-lua52.patch @@ -0,0 +1,51 @@ +diff -up mm3d-1.3.11/acinclude.m4.lua52 mm3d-1.3.11/acinclude.m4 +--- mm3d-1.3.11/acinclude.m4.lua52 2019-01-03 03:50:10.000000000 +0100 ++++ mm3d-1.3.11/acinclude.m4 2019-01-03 13:26:29.754513434 +0100 +@@ -234,7 +234,7 @@ EOF + + int main( int argc, char **argv ) + { +- lua_State * L = lua_open(); ++ lua_State * L = luaL_newstate(); + //luaopen_math( L ); + lua_close( L ); + return( 0 ); +@@ -403,7 +403,7 @@ EOF + + int main( int argc, char **argv ) + { +- lua_State * L = lua_open(); ++ lua_State * L = luaL_newstate(); + luaopen_math( L ); + lua_close( L ); + return( 0 ); +diff -up mm3d-1.3.11/src/mm3dcore/luascript.cc.lua52 mm3d-1.3.11/src/mm3dcore/luascript.cc +--- mm3d-1.3.11/src/mm3dcore/luascript.cc.lua52 2019-01-03 03:50:10.000000000 +0100 ++++ mm3d-1.3.11/src/mm3dcore/luascript.cc 2019-01-03 13:27:14.378794779 +0100 +@@ -90,7 +90,7 @@ static const char * _luascript_readchunk + + LuaScript::LuaScript() + { +- m_luaState = lua_open(); ++ m_luaState = luaL_newstate(); + luaopen_math( m_luaState ); + } + +@@ -110,7 +110,7 @@ int LuaScript::runFile( const char * fil + ReadChunkDataT rcd; + rcd.src = NULL; + rcd.filename = filename; +- rval = lua_load( m_luaState, _luascript_readchunk, (void *) &rcd, filename ); ++ rval = lua_load( m_luaState, _luascript_readchunk, (void *) &rcd, filename, NULL ); + + if ( rval == 0 ) + { +@@ -167,7 +167,7 @@ void LuaScript::registerClosure( void * + lua_pushstring( m_luaState, name ); + lua_pushlightuserdata( m_luaState, ptr ); + lua_pushcclosure( m_luaState, func, 1 ); +- lua_settable( m_luaState, LUA_GLOBALSINDEX ); ++ lua_setglobal( m_luaState, name ); + } + + /* diff --git a/mm3d-1.3.11-sighandler.patch b/mm3d-1.3.11-sighandler.patch new file mode 100644 index 0000000..4363f52 --- /dev/null +++ b/mm3d-1.3.11-sighandler.patch @@ -0,0 +1,29 @@ +diff -up mm3d-1.3.11/src/3dm.cc.sigh mm3d-1.3.11/src/3dm.cc +--- mm3d-1.3.11/src/3dm.cc.sigh 2019-01-03 03:50:10.000000000 +0100 ++++ mm3d-1.3.11/src/3dm.cc 2019-01-03 13:33:17.332371800 +0100 +@@ -43,6 +43,7 @@ + #include "transimp.h" + + ++#if 0 + #include + + void segfault_handler( int sig ) +@@ -50,6 +51,7 @@ void segfault_handler( int sig ) + fprintf( stderr, "Segfault. Exiting...\n" ); + exit( 0 ); + } ++#endif + + int free_memory() + { +@@ -74,7 +76,9 @@ int main( int argc, char * argv[] ) + + log_profile_init( "profile_data.txt" ); + ++#if 0 + signal( SIGSEGV, segfault_handler ); ++#endif + + init_sysconf(); + transimp_install_translator(); diff --git a/mm3d-1.3.6-sighandler.patch b/mm3d-1.3.6-sighandler.patch deleted file mode 100644 index a16c70b..0000000 --- a/mm3d-1.3.6-sighandler.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: src/3dm.cc -=================================================================== ---- src/3dm.cc (revision 231) -+++ src/3dm.cc (working copy) -@@ -43,6 +43,7 @@ - #include "transimp.h" - - -+#if 0 - #include - - void segfault_handler( int sig ) -@@ -50,6 +51,7 @@ - fprintf( stderr, "Segfault. Exiting...\n" ); - exit( 0 ); - } -+#endif - - int free_memory() - { -@@ -62,7 +64,9 @@ - - log_profile_init( "profile_data.txt" ); - -+#if 0 - signal( SIGSEGV, segfault_handler ); -+#endif - - init_sysconf(); - transimp_install_translator(); diff --git a/mm3d-1.3.8-gcc47.patch b/mm3d-1.3.8-gcc47.patch deleted file mode 100644 index 0c45364..0000000 --- a/mm3d-1.3.8-gcc47.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up mm3d-1.3.8a/src/libmm3d/sorted_list.h.gcc47 mm3d-1.3.8a/src/libmm3d/sorted_list.h ---- mm3d-1.3.8a/src/libmm3d/sorted_list.h.gcc47 2012-01-15 12:21:45.000000000 +0100 -+++ mm3d-1.3.8a/src/libmm3d/sorted_list.h 2012-01-15 12:24:16.000000000 +0100 -@@ -55,7 +55,7 @@ template void sorted_listsize(); - if ( len == 0 || (*this)[len-1] < val ) - { -- push_back( val ); -+ this->push_back( val ); - } - else - { -@@ -128,7 +128,7 @@ template void sorted_ptr_li - unsigned len = this->size(); - if ( len == 0 || *((*this)[len-1]) < *val ) - { -- push_back( val ); -+ this->push_back( val ); - } - else - { diff --git a/mm3d-1.3.8-lua52.patch b/mm3d-1.3.8-lua52.patch deleted file mode 100644 index fd26fea..0000000 --- a/mm3d-1.3.8-lua52.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 850a0b2aabd6e2e78f175743fd3aaf4d5922e3de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dan=20Hor=C3=A1k?= -Date: Mon, 19 Aug 2013 16:19:42 +0200 -Subject: [PATCH] port to Lua 5.2 - ---- - acinclude.m4 | 4 ++-- - src/mm3dcore/luascript.cc | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index c301288..34c5d72 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -233,7 +233,7 @@ EOF - - int main( int argc, char **argv ) - { -- lua_State * L = lua_open(); -+ lua_State * L = luaL_newstate(); - //luaopen_math( L ); - lua_close( L ); - return( 0 ); -@@ -402,7 +402,7 @@ EOF - - int main( int argc, char **argv ) - { -- lua_State * L = lua_open(); -+ lua_State * L = luaL_newstate(); - luaopen_math( L ); - lua_close( L ); - return( 0 ); -diff --git a/src/mm3dcore/luascript.cc b/src/mm3dcore/luascript.cc -index 64d8fe4..148cb27 100644 ---- a/src/mm3dcore/luascript.cc -+++ b/src/mm3dcore/luascript.cc -@@ -82,7 +82,7 @@ static const char * _luascript_readchunk( lua_State * L, void * data, size_t * s - - LuaScript::LuaScript() - { -- m_luaState = lua_open(); -+ m_luaState = luaL_newstate(); - luaopen_math( m_luaState ); - } - -@@ -102,7 +102,7 @@ int LuaScript::runFile( const char * filename ) - ReadChunkDataT rcd; - rcd.fp = NULL; - rcd.filename = filename; -- rval = lua_load( m_luaState, _luascript_readchunk, (void *) &rcd, filename ); -+ rval = lua_load( m_luaState, _luascript_readchunk, (void *) &rcd, filename, NULL ); - - if ( rval == 0 ) - { -@@ -159,7 +159,7 @@ void LuaScript::registerClosure( void * ptr, const char * name, lua_CFunction fu - lua_pushstring( m_luaState, name ); - lua_pushlightuserdata( m_luaState, ptr ); - lua_pushcclosure( m_luaState, func, 1 ); -- lua_settable( m_luaState, LUA_GLOBALSINDEX ); -+ lua_setglobal( m_luaState, name ); - } - - /* --- -1.8.1.4 - diff --git a/mm3d-1.3.8-unistd.patch b/mm3d-1.3.8-unistd.patch deleted file mode 100644 index 71d8849..0000000 --- a/mm3d-1.3.8-unistd.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mm3d-1.3.8a/src/libmm3d/misc.cc.unistd mm3d-1.3.8a/src/libmm3d/misc.cc ---- mm3d-1.3.8a/src/libmm3d/misc.cc.unistd 2012-01-15 12:18:43.000000000 +0100 -+++ mm3d-1.3.8a/src/libmm3d/misc.cc 2012-01-15 12:18:53.000000000 +0100 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - using std::string; - diff --git a/mm3d.spec b/mm3d.spec index af72ade..100b490 100644 --- a/mm3d.spec +++ b/mm3d.spec @@ -4,32 +4,39 @@ %global major_version 1.3 Name: mm3d -Version: 1.3.8a -Release: 19%{?dist} +Version: 1.3.11 +Release: 1%{?dist} Summary: 3D model editor -Group: Applications/Multimedia License: GPLv2+ -URL: http://www.misfitcode.com/misfitmodel3d -Source0: http://downloads.sourceforge.net/misfitmodel3d/%{name}-%{version}.tar.gz +URL: https://clover.moe/mm3d +Source0: https://github.com/zturtleman/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: %{name}.desktop Source10: http://www.misfitcode.com/misfitmodel3d/download/plugins/ad3dsfilter-%{plugin_3ds_ver}.tar.gz Source11: http://www.misfitcode.com/misfitmodel3d/download/plugins/imtex-%{plugin_imtex_ver}.tar.gz -Patch0: mm3d-1.3.6-sighandler.patch -Patch1: mm3d-1.3.8-unistd.patch -Patch2: mm3d-1.3.8-gcc47.patch -Patch3: mm3d-1.3.8-lua52.patch +Patch0: mm3d-1.3.11-sighandler.patch +Patch1: mm3d-1.3.11-lua52.patch Patch10: mm3d-ad3dsfilter-make.patch Patch11: mm3d-imtex-make.patch Patch12: mm3d-imtex-gcc43.patch -BuildRequires: dos2unix libtool qt4-devel libXmu-devel lua-devel perl-HTML-Template -BuildRequires: lib3ds-devel imlib2-devel +BuildRequires: dos2unix +BuildRequires: libtool +# for Qt5Core Qt5Gui Qt5Widgets Qt5OpenGL +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-linguist +BuildRequires: libXmu-devel +BuildRequires: libGLU-devel +BuildRequires: lua-devel +BuildRequires: perl(HTML::Template) BuildRequires: desktop-file-utils +# for plugins +BuildRequires: lib3ds-devel +BuildRequires: imlib2-devel %description -Misfit Model 3D is an OpenGL-based 3D model editor that works with +Maverick Model 3D is an OpenGL-based 3D model editor that works with triangle-based models. It supports multi-level undo, skeletal animations, simple texturing, scripting, command-line batch processing, and a plugin system for adding new model and image filters. Complete online help @@ -40,10 +47,8 @@ with plugins and scripts. %prep %setup -q -a 10 -a 11 -%patch0 -b .sigh -%patch1 -p1 -b .unistd -%patch2 -p1 -b .gcc47 -%patch3 -p1 -b .lua52 +%patch0 -p1 -b .sigh +%patch1 -p1 -b .lua52 %patch10 -b .ad3ds %patch11 -b .imtex @@ -56,9 +61,13 @@ do dos2unix -q --keepdate $i done +# remove bundled lib3ds +rm -rf plugins/ad3ds/lib3ds + + %build export CPPFLAGS="-DSHARED_PLUGINS=\\\"%{_libdir}/%{name}\\\"" -%configure --with-lua-dir=%{_usr} --with-lualib-dir=%{_usr} --with-lualib-lib=lua --enable-debug +%configure --with-Qt-include-dir=%{_qt5_includedir} --with-Qt-bin-dir=%{_qt5_bindir} --with-lua-dir=%{_usr} --with-lualib-dir=%{_usr} --with-lualib-lib=lua make %{?_smp_mflags} "CFLAGS=$RPM_OPT_FLAGS" "CXXFLAGS=$RPM_OPT_FLAGS" cd plugins @@ -85,29 +94,22 @@ desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1} # docs cp -p AUTHORS COPYING ChangeLog README TODO $RPM_BUILD_ROOT%{_datadir}/doc/%{name} -# remove unnecessary qt4 translation -rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/i18n/qt_*.qm - - -%post -update-desktop-database &> /dev/null || : - -%postun -update-desktop-database &> /dev/null || : - %files %doc %{_datadir}/doc/%{name} %{_bindir}/%{name} -%{_libdir}/%{name} +%{_libdir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/* %{_datadir}/mimelnk/application/* -%{_datadir}/%{name} +%{_datadir}/%{name}/ %{_mandir}/man1/* %changelog +* Thu Jan 03 2019 Dan Horák 1.3.11-1 +- update to 1.3.11 with new upstream + * Fri Jul 13 2018 Fedora Release Engineering - 1.3.8a-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild @@ -179,11 +181,11 @@ update-desktop-database &> /dev/null || : * Thu Feb 19 2009 Dan Horák 1.3.7-3 - fixes for gcc 4.4 -* Fri Jun 4 2008 Dan Horák 1.3.7-2 +* Fri Jul 4 2008 Dan Horák 1.3.7-2 - fix plugin installation directory - change how the docs are installed - fix DocPath in the desktop file - add scriptlets for updating the desktop database -* Tue Jun 1 2008 Dan Horák 1.3.7-1 +* Tue Jul 1 2008 Dan Horák 1.3.7-1 - initial Fedora version diff --git a/sources b/sources index 5a33c49..f7e3f9c 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -d0d7be8bd51e912f1ef8bd4e122855d1 ad3dsfilter-0.8.1.tar.gz -4b26d78210d251bc4f9fc392123ea02a imtex-1.4.0.tar.gz -6324e6c621237f2a02bd0a43f521cafb mm3d-1.3.8a.tar.gz +SHA512 (mm3d-1.3.11.tar.gz) = 8f843dadfcd944b84a9b440f495e535b8adef511dd7c8118a789b5220c83607dc60b00a304337c9a6dadf17a864c1c63d5e56656d3464bb98ee7fa7f2f2fe961