98e6a77
Name: mathgl
D Haley 329d1cc
Version: 2.1.2
Dmitrij S. Kryzhevich f69c1f8
Release: 2%{?dist}
98e6a77
Summary: Cross-platform library for making high-quality scientific graphics
builder 3c3761f
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
98e6a77
Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных
98e6a77
License: GPLv2+
98e6a77
Group: Development/Libraries
98e6a77
Url: http://mathgl.sourceforge.net
builder 3c3761f
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
98e6a77
D Haley 329d1cc
#Mathgl's enable all tries to use hdf4 and 5 at the same time
D Haley 329d1cc
Patch0: mathgl-no-hdf4-and-hdf5-simultaneously.patch
D Haley 329d1cc
D Haley 329d1cc
#CMake looks for "FLUID" - the fltk UI designer. 
D Haley 329d1cc
#This is not needed - instruct cmake to skip it at build time
D Haley 329d1cc
Patch1: mathgl-fltk-skip-fluid.patch
D Haley 329d1cc
D Haley 329d1cc
#Mathgl hardcodes the libdir as lib, then puts it in a var. 
D Haley 329d1cc
# we will simply pass it as an arg to cmake.
D Haley 329d1cc
Patch2: mathgl-disable-lib-installdir.patch
98e6a77
D Haley 2571047
#Fix segfault due to overflow when initalising textures
D Haley 2571047
Patch3: mathgl-fix-overflow.patch
D Haley 2571047
98e6a77
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
98e6a77
98e6a77
# mandatory packages
D Haley 329d1cc
BuildRequires: gsl-devel libpng-devel 
98e6a77
98e6a77
# optional packages
mycae 336e63d
BuildRequires: freeglut-devel hdf-devel hdf5-static libjpeg-devel libtiff-devel fltk-devel qt4-devel
D Haley 39f9fd1
BuildRequires: wxGTK-devel giflib-devel 
D Haley 329d1cc
BuildRequires: libharu-devel
D Haley 329d1cc
BuildRequires: swig octave-devel
D Haley 329d1cc
BuildRequires: libXmu-devel
D Haley 329d1cc
BuildRequires: python2-devel numpy
D Haley 329d1cc
BuildRequires: cmake
98e6a77
98e6a77
98e6a77
Requires(post): info
98e6a77
Requires(preun): info
98e6a77
98e6a77
%description
98e6a77
Mathgl is a cross-platform library for making high-quality scientific
98e6a77
graphics. It provides fast data plotting and handling of large data
98e6a77
arrays, as well as  window and console modes and for easy embedding
98e6a77
into other programs. Mathgl integrates into fltk, qt and
98e6a77
opengl applications
98e6a77
Dmitrij S. Kryzhevich f69c1f8
%description -l ru
Dmitrij S. Kryzhevich f69c1f8
Mathgl - это кроссплатформенная библиотека для подготовки высококачественных
Dmitrij S. Kryzhevich f69c1f8
научных иллюстраций. Библиотека обладает возможностью работы с большими
Dmitrij S. Kryzhevich f69c1f8
массивами данных, быстрой отрисовки, при этом работая как в консольном, так и
Dmitrij S. Kryzhevich f69c1f8
оконном режимах, легко интегрируясь в другие приложения. Mathgl может быть
Dmitrij S. Kryzhevich f69c1f8
использована в FLTK, Qt и OpenGL приложениях.
Dmitrij S. Kryzhevich f69c1f8
98e6a77
%package devel
98e6a77
Summary: Libraries and header files for %{name} library
98e6a77
Group: Development/Libraries
98e6a77
Requires: %{name} = %{version}-%{release}
mycae ed8f03b
Requires: gsl-devel
98e6a77
98e6a77
%description devel
98e6a77
The %{name}-devel package contains libraries and header files for
98e6a77
developing applications that use %{name}.
98e6a77
98e6a77
%description devel -l ru
98e6a77
Пакет %{name}-devel содержит библиотеки и файлы заголовков необходимые 
98e6a77
для разработки приложений с использованием %{name}.
98e6a77
98e6a77
%package doc
98e6a77
Group:		Documentation
98e6a77
Summary:	HTML documentation and tutorial for the %{name} applications
98e6a77
BuildArch:	noarch
98e6a77
BuildRequires:	texi2html texinfo-tex	
98e6a77
98e6a77
%description doc
98e6a77
This package contains the documentation in the HTML format of the %{name}
98e6a77
package.
98e6a77
D Haley 329d1cc
%package udav
D Haley 329d1cc
Summary: UDAV viewer and editor for mathgl graphs
D Haley 329d1cc
Group: Applications/Engineering
D Haley 329d1cc
Requires: %{name} = %{version}-%{release}
D Haley 329d1cc
Dmitrij S. Kryzhevich f69c1f8
D Haley 329d1cc
UDAV is cross-platform program for interactive data array visualization
D Haley 329d1cc
using the MathGL library. UDAV works as a front-end to the mathgl
D Haley 329d1cc
scripting engine, allowing for the generation of a wide variety of
D Haley 329d1cc
scientific graph styles.
D Haley 329d1cc
Dmitrij S. Kryzhevich f69c1f8
%description udav -l ru
Dmitrij S. Kryzhevich f69c1f8
UDAV - это кроссплатформенное приложение для интерактивной визуализации массивов
Dmitrij S. Kryzhevich f69c1f8
данных с применением библиотеки MathGL. UDAV, как GUI для MathGL может быть
Dmitrij S. Kryzhevich f69c1f8
использован для формирования различного вида научных иллюстраций.
D Haley 329d1cc
98e6a77
%prep
98e6a77
%setup -q
98e6a77
e2e9797
98e6a77
#convert EOL encodings, maintaining timestames
D Haley 329d1cc
for file in AUTHORS ChangeLog.txt README ; do
98e6a77
	sed 's/\r//' $file > $file.new && \
98e6a77
	touch -r $file $file.new && \
98e6a77
	mv $file.new $file
98e6a77
done
98e6a77
D Haley 329d1cc
%patch0 
D Haley 3408663
%patch1 
D Haley 329d1cc
%patch2 
D Haley 2571047
%patch3
98e6a77
98e6a77
%build
Dmitrij S. Kryzhevich f69c1f8
mkdir -p %{_target_platform}
Dmitrij S. Kryzhevich f69c1f8
pushd %{_target_platform}
Dmitrij S. Kryzhevich f69c1f8
%{cmake} \
Dmitrij S. Kryzhevich 2f43642
  -DMGL_LIB_INSTALL_DIR=%{_libdir} \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-all=on \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-hdf4=off \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-doc=on \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-all-swig=on \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-all-widgets=on \
Dmitrij S. Kryzhevich f69c1f8
  -Denable-mpi=off \
Dmitrij S. Kryzhevich f69c1f8
  ..
Dmitrij S. Kryzhevich 2f43642
popd
Dmitrij S. Kryzhevich f69c1f8
Dmitrij S. Kryzhevich f69c1f8
make %{?_smp_mflags} -C %{_target_platform}
98e6a77
98e6a77
%install
Dmitrij S. Kryzhevich f69c1f8
rm -rf %{buildroot}
Dmitrij S. Kryzhevich f69c1f8
make install DESTDIR=%{buildroot} -C %{_target_platform} INSTALL="install -p"
98e6a77
D Haley 329d1cc
#Remove symlink to .so file in python dir. Let python find libs normally
Dmitrij S. Kryzhevich f69c1f8
unlink %{buildroot}/%{python_sitelib}/_mathgl.so
98e6a77
D Haley 329d1cc
#Remove static libraries generated by cmake
Dmitrij S. Kryzhevich f69c1f8
rm %{buildroot}/%{_libdir}/*.a
98e6a77
D Haley 329d1cc
#Remove the binary mgl.cgi. Im not convinced about it (eg mem leak in main), and that its really needed
Dmitrij S. Kryzhevich f69c1f8
rm %{buildroot}/%{_bindir}/mgl.cgi
43329e3
D Haley 329d1cc
#Copy info file which is not otherwise installed
Dmitrij S. Kryzhevich f69c1f8
install -p -m 644 texinfo/%{name}_en.info  %{buildroot}/%{_infodir}/%{name}.info
Dmitrij S. Kryzhevich f69c1f8
Dmitrij S. Kryzhevich f69c1f8
# Check .desktop file
Dmitrij S. Kryzhevich f69c1f8
desktop-file-validate %{_datadir}/applications/udav.desktop
Dmitrij S. Kryzhevich f69c1f8
Dmitrij S. Kryzhevich f69c1f8
%post
98e6a77
/sbin/ldconfig
98e6a77
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
98e6a77
98e6a77
%preun
98e6a77
if [ $1 = 0 ] ; then
98e6a77
	/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
98e6a77
fi
98e6a77
D Haley 3408663
%postun -p /sbin/ldconfig
98e6a77
98e6a77
%clean
Dmitrij S. Kryzhevich f69c1f8
rm -rf %{buildroot}
98e6a77
98e6a77
98e6a77
%files
98e6a77
%defattr(-,root,root,-)
D Haley 329d1cc
%doc AUTHORS ChangeLog.txt README COPYING  README_V2
98e6a77
%{_libdir}/*.so.*
98e6a77
%{_bindir}/mgl*
98e6a77
%{_datadir}/%{name}/
D Haley 329d1cc
%{python_sitelib}/*
D Haley 329d1cc
%{_mandir}/man5/mgl.5.gz
D Haley 329d1cc
%{_mandir}/man1/mglconv.1.gz
D Haley 329d1cc
%{_mandir}/man1/mglview.1.gz
D Haley 329d1cc
%{_infodir}/%{name}*.gz
D Haley 329d1cc
D Haley 329d1cc
%files udav
D Haley 329d1cc
%{_bindir}/udav
D Haley 329d1cc
%{_mandir}/man1/udav.1.gz
D Haley 329d1cc
%{_datadir}/applications/udav.desktop
D Haley 329d1cc
%{_datadir}/udav/
D Haley 329d1cc
%{_datadir}/pixmaps/*.png
98e6a77
98e6a77
%files devel
98e6a77
%defattr(-,root,root,-)
D Haley 329d1cc
%{_includedir}/mgl2/
98e6a77
%{_libdir}/*.so
98e6a77
98e6a77
%files doc
98e6a77
%defattr(-,root,root,-)
D Haley 329d1cc
%doc %{_docdir}/%{name}
D Haley 329d1cc
98e6a77
98e6a77
%changelog
Dmitrij S. Kryzhevich f69c1f8
* Mon Apr 15 2013 Dmitrij S. Kryzhevich <krege@land.ru> - 2.1.2-2
Dmitrij S. Kryzhevich f69c1f8
- Fix spec for better cmake use.
Dmitrij S. Kryzhevich f69c1f8
- Make vars in spec be in one style.
Dmitrij S. Kryzhevich f69c1f8
- Add some Russian translation.
Dmitrij S. Kryzhevich f69c1f8
D Haley 329d1cc
* Sun Apr 14 2013 <mycae(a!)gmx.com> 2.1.2-1
D Haley 329d1cc
- Update to upstream 2.1.2
D Haley 329d1cc
- New upstream has entirely different build system
D Haley 329d1cc
a1c28aa
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.3-3
a1c28aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a1c28aa
Adam Tkac e134ad2
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.11.3-2
Adam Tkac e134ad2
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac e134ad2
D Haley 3408663
* Fri Dec 07 2012 <mycae(a!t)yahoo.com> - 1.11.3-1
D Haley 3408663
- Update to 1.11.3
D Haley 3408663
f774830
* Mon Dec 03 2012 Orion Poplawski <orion@cora.nwra.com> - 1.11.2-9
f774830
- Rebuild for hdf5 1.8.10
f774830
152ad15
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.2-8
152ad15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
152ad15
c0ca5b2
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.2-7
c0ca5b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c0ca5b2
D Haley c3bc9e3
* Fri Dec 09 2011 <mycae(a!t)yahoo.com> - 1.11.2-6
D Haley c3bc9e3
- Fix build fail due to libpng no longer including zlib
D Haley c3bc9e3
- Remove no longer needed libtool hack
D Haley c3bc9e3
08e3984
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.11.2-5
08e3984
- Rebuild for new libpng
08e3984
mycae 336e63d
* Thu Jun 23 2011 <mycae(a!t)yahoo.com> - 1.11.2-4
mycae 336e63d
- Recall why we needed hdf-devel. Its to keep configure happy.
mycae 336e63d
mycae 7ceadf8
* Thu Jun 23 2011 <mycae(a!t)yahoo.com> - 1.11.2-3
mycae 7ceadf8
- Bump for build
mycae 7ceadf8
mycae d7d7688
* Thu Jun 23 2011 <mycae(a!t)yahoo.com> - 1.11.2-2
mycae d7d7688
- Fix bug 678856, add hdf-static as buildrequire
mycae d7d7688
builder 3c3761f
* Wed Jun 01 2011 <mycae(a!t)yahoo.com> - 1.11.2-1
builder 3c3761f
- Update to upstream 1.11.2
builder 3c3761f
builder 3c3761f
* Tue May 31 2011 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.11.0.1-6
builder 3c3761f
- Reflect fltk having changed its include directory (Fix FTBS).
builder 3c3761f
- Fix German %%summary.
builder 3c3761f
Orion Poplawski 4cb2271
* Tue May 17 2011 Orion Poplawski <orion@cora.nwra.com> - 1.11.0.1-5
Orion Poplawski 4cb2271
- Rebuild for hdf5 1.8.7 
Orion Poplawski 4cb2271
mycae 76fb802
* Sun Feb 27 2011 <mycae(a!t)yahoo.com> - 1.11.0.1-4
D Haley 39f9fd1
- Remove octave for Bug 679948, and dynamic patch non-functional due
D Haley 39f9fd1
  to swig covariant return type problems with octave_map
D Haley 39f9fd1
mycae 76fb802
* Sat Feb 12 2011 <mycae(a!t)yahoo.com> - 1.11.0.1-3
mycae 76fb802
- Request rebuild -- octave-config needs to emit correct api. 
mycae 76fb802
d2eb92c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.0.1-2
d2eb92c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d2eb92c
D Haley b8b8f21
* Sat Nov 27 2010 <mycae(a!t)yahoo.com> - 1.11.0.1-1
D Haley b8b8f21
- Update to 1.11.0.1
D Haley b8b8f21
mycae ed8f03b
* Sun Aug 08 2010 <mycae(a!t)yahoo.com> - 1.10.2.1-3
mycae ed8f03b
- Add gsl-devel to requires
mycae ed8f03b
e4671c9
* Wed Jul 14 2010 Dan Horák <dan@danny.cz> - 1.10.2.1-2.1
e4671c9
- rebuilt against wxGTK-2.8.11-2
e4671c9
b57396b
* Wed Apr 14 2010 <mycae(a!t)yahoo.com> - 1.10.2.1-1.1
b57396b
- tag bump
b57396b
e2e9797
* Wed Apr 14 2010 <mycae(a!t)yahoo.com> - 1.10.2.1-1
e2e9797
- Update to 1.10.2.1
e2e9797
- Fix linker error due to DSO change (Bug #564982)
e2e9797
43329e3
* Sat Jan 02 2010 <mycae(a!t)yahoo.com> - 1.10-2
43329e3
- Fix octave interface to load on startup
43329e3
- Fix texinfo insatll
43329e3
aa0e9b7
* Sat Jan 02 2010 <mycae(a!t)yahoo.com> - 1.10-1
aa0e9b7
- Update to 1.10
aa0e9b7
c6c8192
* Wed Nov 25 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9-8
c6c8192
- Rebuild for Qt 4.6.0 RC1 in F13 (was built against Beta 1 with unstable ABI)
c6c8192
125906c
* Sun Oct 25 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 1.9-7
125906c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
125906c
98e6a77
* Mon Sep 14 2009 <mycae(a!t)yahoo.com> 1.9-6
98e6a77
- Add COPYING to doc
98e6a77
98e6a77
* Sat Sep 12 2009 <mycae(a!t)yahoo.com> 1.9-5
98e6a77
- Removed the word "static" from devel description, as doesn't have static
98e6a77
- Fonts now owned at datadir/name level
98e6a77
- Added COPYRIGHT NEWS and TODO
98e6a77
98e6a77
* Sat Aug 15 2009 <mycae(a!t)yahoo.com> 1.9-4
98e6a77
- Fix octave installation method
98e6a77
- Remove wx lib, which doesn't have meaningful code.
98e6a77
98e6a77
* Sun Aug 02 2009  <mycae(a!t)yahoo.com> 1.9-3
98e6a77
- Fix texinfo install (mv to main & add pre/post)
98e6a77
- Remove chrpath, as we now autoreconf
98e6a77
- Add octave pkg rebuild commands
98e6a77
98e6a77
* Tue Jul 21 2009  <mycae(a!t)yahoo.com> 1.9-2 
98e6a77
- Fix rpath for build on x86_64. 
98e6a77
- remove unrecognized configure options: --enable-tiff, --disable-ltdl-install
98e6a77
- Switch to --enable-all --enable-octave
98e6a77
- Add hdf5 patch
98e6a77
- Add doc subpackage
98e6a77
98e6a77
* Thu Jul 09 2009 <mycae(a!t)yahoo.com> 1.9-1
98e6a77
- Update to 1.9
98e6a77
- Drop explicit Requires
98e6a77
- Perserve timestamps on EOL conversion
98e6a77
- Added patch to disable unused gsl cblas link
98e6a77
98e6a77
* Fri May 02 2009 <mycae(a!t)yahoo.com> 1.8.1-1
98e6a77
- Update to 1.8.1
98e6a77
98e6a77
* Wed Jan 28 2009 <mycae(a!t)yahoo.com> 1.8-3
98e6a77
- Ensure timestamps are preserved during make install
98e6a77
- Modify defattr
98e6a77
- Remove UDAV from package summary
98e6a77
98e6a77
* Mon Dec 29 2008 <mycae(a!t)yahoo.com> 1.8-2
98e6a77
- Remove redundant and erroneous licence field in devel section
98e6a77
- Fix files from mgl/*h to mgl/
98e6a77
- Removed Requires, per bugzilla recommendation.
98e6a77
- Disabled static library generation
98e6a77
- Removed libltdl from build 
98e6a77
- Added libtool-ltdl as BuildRequires
98e6a77
98e6a77
* Mon Dec 29 2008 <mycae(a!t)yahoo.com> 1.8-1
98e6a77
- Updated to version 1.8
98e6a77
- Added QT env. vars for fedora
98e6a77
- Cleaned up description
98e6a77
- Change licence field from GPL to GPLv2
98e6a77
98e6a77
* Wed Jun 4 2008 Nik <niktr@mail.ru> 
98e6a77
- disabled hdf5 support according to developer request
98e6a77
98e6a77
* Tue Jun 3 2008 Nik <niktr@mail.ru> 
98e6a77
- updated to version 1.7.1
98e6a77
98e6a77
* Sun Jun 2 2008 Nik <niktr@mail.ru> 
98e6a77
- updated to version 1.7
98e6a77
98e6a77
* Sat Apr 5 2008 Nik <niktr@mail.ru> 
98e6a77
- updated to version 1.6.2
98e6a77
98e6a77
* Thu Mar 13 2008 Nik <niktr@mail.ru>
98e6a77
- updated to version 1.6
98e6a77
- added fltk(-devel) to requres list
98e6a77
98e6a77
* Tue Mar 11 2008 Nik <niktr@mail.ru>
98e6a77
- tiff bug fixed
98e6a77
- enable-all option added
98e6a77
98e6a77
* Sat Mar 1 2008 Nik <niktr@mail.ru>
98e6a77
- spec cleanup
98e6a77
- --enable(jpeg, tiff, hdf5) features added
98e6a77
- enable-tiff leads to make error, submitted to author. Feature disabled.
98e6a77
98e6a77
* Fri Feb 29 2008 Nik <niktr@mail.ru>
98e6a77
- initial build of version 1.5
98e6a77
98e6a77