diff --git a/.cvsignore b/.cvsignore index e69de29..1905503 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,3 @@ +ad3dsfilter-0.8.1.tar.gz +imtex-1.4.0.tar.gz +mm3d-1.3.7.tar.gz diff --git a/mm3d-1.3.6-sighandler.patch b/mm3d-1.3.6-sighandler.patch new file mode 100644 index 0000000..a16c70b --- /dev/null +++ b/mm3d-1.3.6-sighandler.patch @@ -0,0 +1,30 @@ +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.7-autoconf.patch b/mm3d-1.3.7-autoconf.patch new file mode 100644 index 0000000..8666dcd --- /dev/null +++ b/mm3d-1.3.7-autoconf.patch @@ -0,0 +1,22 @@ +From 01515d4e0849c5be4425584cdd2a7d0c3e33310a Mon Sep 17 00:00:00 2001 +From: Dan Horak +Date: Wed, 2 Jul 2008 08:52:01 +0200 +Subject: [PATCH] make autoconf happy + + +diff --git a/acinclude.m4 b/acinclude.m4 +index 5ee3a82..1aa53bf 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1080,7 +1080,7 @@ EOF + ]) + DLOPEN_LIBS="$ksw_cv_DLOPEN_LIBS" + have_dlopen="$ksw_cv_have_dlopen" +- AC_SUBST( DLOPEN_LIBS ) ++ AC_SUBST(DLOPEN_LIBS) + if test x"$have_dlopen" = "xyes"; then + AC_DEFINE( [HAVE_DLOPEN], [], [Define when you have dlopen function] ) + fi +-- +1.5.4.1 + diff --git a/mm3d-ad3dsfilter-make.patch b/mm3d-ad3dsfilter-make.patch new file mode 100644 index 0000000..b257f5d --- /dev/null +++ b/mm3d-ad3dsfilter-make.patch @@ -0,0 +1,35 @@ +--- plugins/ad3dsfilter/Makefile.orig 2008-02-16 10:48:40.000000000 +0100 ++++ plugins/ad3dsfilter/Makefile 2008-02-16 10:52:34.000000000 +0100 +@@ -2,28 +2,20 @@ + ad3dsfilter.so \ + + LFLAGS = -g -Wall +-CFLAGS = -g -Wall -DMM3D_EDIT -I../../src -I../../src/libmm3d -I../../src/mm3dcore -I../.. -Ilib3ds -DPLUGIN ++CPPFLAGS = -fPIC -DMM3D_EDIT -I../../src -I../../src/libmm3d -I../../src/mm3dcore -I../.. -DPLUGIN + + # Mac OS X flags. Uncomment the following line to compile on Mac OS X + #LFLAGS = -g -Wall -undefined suppress -bundle -flat_namespace + +-all: lib3ds_lib ${PLUGINS} ++all: ${PLUGINS} + +-lib3ds_lib: lib3ds/Makefile +- make -C lib3ds all +- +-lib3ds/Makefile: lib3ds/configure.in +- cd lib3ds && ./configure && cd .. +- + %.o: %.cc +- g++ ${CFLAGS} -c $< ++ g++ ${CPPFLAGS} ${CXXFLAGS} -c $< + + %.so: %.o +- g++ ${LFLAGS} -shared -o $*.so $< lib3ds/lib3ds/lib3ds.a ++ g++ ${LFLAGS} -shared -o $*.so $< -l3ds + + distclean: clean +- make -C lib3ds distclean + + clean: + rm -rf *.o *.so core core.* +- make -C lib3ds clean diff --git a/mm3d-imtex-gcc43.patch b/mm3d-imtex-gcc43.patch new file mode 100644 index 0000000..bbe0e01 --- /dev/null +++ b/mm3d-imtex-gcc43.patch @@ -0,0 +1,10 @@ +--- plugins/imtex/imtex.cc.orig 2008-02-24 13:58:53.000000000 +0100 ++++ plugins/imtex/imtex.cc 2008-02-24 13:59:04.000000000 +0100 +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/mm3d-imtex-make.patch b/mm3d-imtex-make.patch new file mode 100644 index 0000000..c3e4825 --- /dev/null +++ b/mm3d-imtex-make.patch @@ -0,0 +1,26 @@ +--- plugins/imtex/Makefile.orig 2008-02-16 11:13:07.000000000 +0100 ++++ plugins/imtex/Makefile 2008-02-16 11:14:59.000000000 +0100 +@@ -1,8 +1,8 @@ + PLUGINS = \ + imtex.so \ + +-LFLAGS = -O2 -Wall -lImlib2 +-CFLAGS = -O2 -Wall -DMM3D_EDIT -I../../src -I../../src/libmm3d -I../../src/mm3dcore -I../.. -DPLUGIN ++LFLAGS = -g -Wall ++CPPFLAGS = -fPIC -DMM3D_EDIT -I../../src -I../../src/libmm3d -I../../src/mm3dcore -I../.. -DPLUGIN + + # Mac OS X flags. Uncomment the following line to compile on Mac OS X + #LFLAGS = -O2 -Wall -lImlib2 -undefined suppress -bundle -flat_namespace +@@ -10,10 +10,10 @@ + all: ${PLUGINS} + + %.o: %.cc +- g++ ${CFLAGS} -c $< ++ g++ ${CPPFLAGS} ${CXXFLAGS} -c $< + + %.so: %.o +- g++ ${LFLAGS} -shared -o $*.so $< ++ g++ ${LFLAGS} -shared -o $*.so $< -lImlib2 + + clean: + rm -rf *.o *.so core core.* diff --git a/mm3d.desktop b/mm3d.desktop new file mode 100644 index 0000000..d7bc8d1 --- /dev/null +++ b/mm3d.desktop @@ -0,0 +1,12 @@ + +[Desktop Entry] +Type=Application +Exec=mm3d %U +Icon=mm3d +GenericName=3D Modeler +Comment=3D modeling program +Terminal=false +Name=mm3d +MimeType=application/x-mm3d; +Categories=Qt;Graphics; +X-Desktop-File-Install-Version=0.13 diff --git a/mm3d.spec b/mm3d.spec new file mode 100644 index 0000000..a3ae511 --- /dev/null +++ b/mm3d.spec @@ -0,0 +1,125 @@ +%define plugin_3ds_ver 0.8.1 +%define plugin_imtex_ver 1.4.0 +%define mm3d_plugins ad3dsfilter imtex +%define major_version 1.3 + +Name: mm3d +Version: 1.3.7 +Release: 2%{?dist} +Summary: 3D model editor + +Group: Applications/Multimedia +License: GPLv2+ +URL: http://www.misfitcode.com/misfitmodel3d +Source0: http://downloads.sourceforge.net/%{name}/%{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.7-autoconf.patch +Patch10: mm3d-ad3dsfilter-make.patch +Patch11: mm3d-imtex-make.patch +Patch12: mm3d-imtex-gcc43.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: dos2unix libtool qt4-devel libXmu-devel lua-devel perl-HTML-Template +BuildRequires: lib3ds-devel imlib2-devel +BuildRequires: desktop-file-utils + + +%description +Misfit 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 +is included. It is designed to be easy to use and easy to extend +with plugins and scripts. + + +%prep +%setup -q -a 10 -a 11 + +%patch0 -b .sigh +%patch1 -p1 -b .autoconf + +%patch10 -b .ad3ds +%patch11 -b .imtex +%patch12 -b .gcc43 + +autoreconf + +for i in AUTHORS COPYING ChangeLog INSTALL README TODO doc/html/TODO +do + dos2unix -q --keepdate $i +done + + +%build +export CPPFLAGS="-DDOC_ROOT=\\\"%{_docdir}/%{name}-%{version}/html\\\" -DSHARED_PLUGINS=\\\"%{_libdir}/%{name}\\\"" +%configure --with-lua-dir=%{_usr} --with-lualib-dir=%{_usr} --with-lualib-lib=lua --enable-debug +make %{?_smp_mflags} "CFLAGS=$RPM_OPT_FLAGS" "CXXFLAGS=$RPM_OPT_FLAGS" + +cd plugins +for d in %{mm3d_plugins} +do + pushd $d + make "CFLAGS=$RPM_OPT_FLAGS" "CXXFLAGS=$RPM_OPT_FLAGS" + popd +done + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_datadir}/doc/%{name}-%{version}/html + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/%{major_version} +for d in %{mm3d_plugins} +do + install -p -m 0755 plugins/$d/$d.so $RPM_BUILD_ROOT%{_libdir}/%{name}/%{major_version} +done +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins + +desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1} + +# docs +#rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/html +#rm -f doc/html/Makefile* +cp -p AUTHORS COPYING ChangeLog INSTALL README TODO $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version} + +# remove unnecessary qt4 translation +rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/i18n/qt_*.qm + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +update-desktop-database &> /dev/null || : + +%postun +update-desktop-database &> /dev/null || : + + +%files +%defattr(-,root,root,-) +%doc %{_datadir}/doc/%{name}-%{version} +#%doc AUTHORS COPYING ChangeLog INSTALL README TODO +%{_bindir}/%{name} +%{_libdir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/* +%{_datadir}/mimelnk/application/* +%{_datadir}/%{name} +%{_mandir}/man1/* + + +%changelog +* Fri Jun 4 2008 Dan Horak 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 Horak 1.3.7-1 +- initial Fedora version diff --git a/sources b/sources index e69de29..4e0c358 100644 --- a/sources +++ b/sources @@ -0,0 +1,3 @@ +d0d7be8bd51e912f1ef8bd4e122855d1 ad3dsfilter-0.8.1.tar.gz +4b26d78210d251bc4f9fc392123ea02a imtex-1.4.0.tar.gz +6a5467d03d61a23af1ab51c47109c4d5 mm3d-1.3.7.tar.gz