From fc7be90f14c3da68805b97790d7f38ed2cd2d1c0 Mon Sep 17 00:00:00 2001 From: Dmitrij S. Kryzhevich Date: Apr 18 2013 05:01:54 +0000 Subject: Add examples installation. Fix pdf-s generation. --- diff --git a/mathgl-2.1.2-examples.patch b/mathgl-2.1.2-examples.patch new file mode 100644 index 0000000..19f0201 --- /dev/null +++ b/mathgl-2.1.2-examples.patch @@ -0,0 +1,41 @@ +diff -urp mathgl-2.1.2/examples/CMakeLists.txt mathgl-2.1.2-examples/examples/CMakeLists.txt +--- mathgl-2.1.2/examples/CMakeLists.txt 2013-01-28 18:34:13.000000000 +0700 ++++ mathgl-2.1.2-examples/examples/CMakeLists.txt 2013-04-18 11:02:02.069110414 +0700 +@@ -4,22 +4,26 @@ endif(MGL_HAVE_GSL) + + add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp) + target_link_libraries(mgl_example mgl) ++SET(MGL_INSTALL_EXAMPLES_LIST mgl_example) + + if(MGL_HAVE_FLTK) + include_directories(${FLTK_INCLUDE_DIR}) + add_executable(mgl_fltk_example wnd_samples.cpp fltk_example.cpp) + target_link_libraries(mgl_fltk_example mgl-fltk) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_fltk_example) + endif(MGL_HAVE_FLTK) + + if(MGL_HAVE_GLUT) + add_executable(mgl_glut_example wnd_samples.cpp glut_example.cpp) + target_link_libraries(mgl_glut_example mgl-glut) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_glut_example) + endif(MGL_HAVE_GLUT) + + if(MGL_HAVE_WX) + include(${wxWidgets_USE_FILE}) + add_executable(mgl_wx_example wnd_samples.cpp wx_example.cpp) + target_link_libraries(mgl_wx_example mgl-wx) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_wx_example) + endif(MGL_HAVE_WX) + + if(MGL_HAVE_QT) +@@ -27,4 +31,10 @@ if(MGL_HAVE_QT) + qt_wrap_cpp(mgl_qt_example MGL_MOC_EX_FILES ../include/mgl2/qt.h) + add_executable(mgl_qt_example wnd_samples.cpp qt_example.cpp ${MGL_MOC_EX_FILES}) + target_link_libraries(mgl_qt_example mgl-qt) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qt_example) + endif(MGL_HAVE_QT) ++ ++install( ++ TARGETS ${MGL_INSTALL_EXAMPLES_LIST} ++ RUNTIME DESTINATION bin ++) diff --git a/mathgl.spec b/mathgl.spec index 365c6bd..37b5195 100644 --- a/mathgl.spec +++ b/mathgl.spec @@ -1,6 +1,6 @@ Name: mathgl Version: 2.1.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Cross-platform library for making high-quality scientific graphics Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken Summary(ru): Библиотека для осуществления высококачественной визуализации данных @@ -26,6 +26,9 @@ Patch3: mathgl-fix-overflow.patch # Fix udav.desktop: Encoding and Icon keys Patch4: mathgl-2.1.2-udav_desktop.patch +# Install binaries for generation examples of illustrations +Patch5: mathgl-2.1.2-examples.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{name}-common = %{version}-%{release} @@ -106,11 +109,21 @@ UDAV - это кроссплатформенное приложение для � %package common Summary: Common files for %{name} Group: Applications/Engineering +BuildArch: noarch Requires: %{name} = %{version}-%{release} %description common %{summary}. +%package examples +Summary: Example illustration generators for %{name} +Group: Applications/Engineering +Requires: %{name} = %{version}-%{release} + +%description examples +Binaries for generation examples of illustrations that could be +prepared by %{name}. + %package openmpi Summary: OpenMPI version of %{name} library Group: Applications/Engineering @@ -163,25 +176,33 @@ done %patch2 %patch3 %patch4 -p1 +%patch5 -p1 # Fix hardcoded paths sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, udav/udav_wnd.h sed -i s,/usr/local/share/udav/,%{_datadir}/udav/, udav/udav_wnd.cpp # There are few .png that can't be generated on Fedora koji +# (i686 , memory?) # There are disabled for now for pic in contf table; do sed -i s", $pic , ," texinfo/CMakeLists.txt + for file in ex_mgl_en.texi ex_mgl_ru.texi example_en.texi example_ru.texi; + do + grep -v "@pfig{${pic}," texinfo/${file} > texinfo/${file}.n + touch -r texinfo/${file} texinfo/${file}.n + mv texinfo/${file}.n texinfo/${file} + done done %build %define building() \ -BUILD_MPI="-Denable-mpi=on" %buildcommon +BUILD_MPI="-Denable-mpi=on -Denable-doc=off" %buildcommon %define building_serial() \ -BUILD_MPI="-Denable-mpi=off" %buildcommon +BUILD_MPI="-Denable-mpi=off -Denable-doc=on" %buildcommon %define buildcommon() \ mkdir -p %{_target_platform}_$MPI_COMPILER_NAME; \ @@ -190,7 +211,6 @@ pushd %{_target_platform}_$MPI_COMPILER_NAME; \ -DMGL_LIB_INSTALL_DIR=%{_libdir} \\\ -Denable-all=on \\\ -Denable-hdf4=off \\\ - -Denable-doc=on \\\ -Denable-all-swig=on \\\ -Denable-all-widgets=on \\\ $BUILD_MPI \\\ @@ -255,8 +275,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/udav.desktop # Maintain l18n for udav %find_lang udav --with-qt -%post -/sbin/ldconfig +%post -p /sbin/ldconfig %post common /sbin/install-info %{_infodir}/%{name}_en.info %{_infodir}/dir || : @@ -303,6 +322,10 @@ rm -rf %{buildroot} %{_infodir}/%{name}*.gz %{_mandir}/man5/mgl.5.gz +%files examples +%defattr(-,root,root,-) +%{_bindir}/mgl_*example + %files openmpi %defattr(-,root,root,-) %doc COPYING @@ -324,6 +347,9 @@ rm -rf %{buildroot} %{_includedir}/mpich2-%{_arch}/mgl2/ %changelog +* Thu Apr 18 2013 Dmitrij S. Kryzhevich - 2.1.2-5 +- Install binaries used for generation of examples of illustrations. + * Wed Apr 17 2013 Dmitrij S. Kryzhevich - 2.1.2-4 - Disable some .png generation for -doc.