98e6a77
Name: mathgl
builder 3c3761f
Version: 1.11.2
mycae 336e63d
Release: 4%{?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
98e6a77
#Uncomment mathgl dif listing (fix warning) also from pts
aa0e9b7
Patch0: %{name}-info.patch
84f1386
#Fltk uses /usr/include/FL
builder 3c3761f
Patch1: %{name}-%{version}-fltk.patch
98e6a77
98e6a77
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
98e6a77
98e6a77
# mandatory packages
98e6a77
BuildRequires: gsl-devel libpng-devel libtool-ltdl-devel libtool 
98e6a77
BuildRequires: swig 
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 
98e6a77
e2e9797
#For autoreconf (required for patches, libtool)
98e6a77
BuildRequires:	autoconf
98e6a77
BuildRequires:	automake
98e6a77
BuildRequires:	libtool
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
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
98e6a77
BuildArch:	noarch
98e6a77
BuildRequires:	texi2html texinfo-tex	
98e6a77
98e6a77
98e6a77
%description doc
98e6a77
This package contains the documentation in the HTML format of the %{name}
98e6a77
package.
98e6a77
98e6a77
%prep
98e6a77
%setup -q
98e6a77
e2e9797
98e6a77
#convert EOL encodings, maintaining timestames
98e6a77
for file in AUTHORS ChangeLog.txt README COPYRIGHT; do
98e6a77
	sed 's/\r//' $file > $file.new && \
98e6a77
	touch -r $file $file.new && \
98e6a77
	mv $file.new $file
98e6a77
done
98e6a77
98e6a77
%patch0
builder 3c3761f
%patch1 -p1
98e6a77
98e6a77
98e6a77
98e6a77
%build
98e6a77
#configure looks for * not *-qt4
98e6a77
QMAKE=/usr/bin/qmake-qt4
98e6a77
LUPDATE=/usr/bin/lupdate-qt4
98e6a77
LRELEASE=/usr/bin/lrelease-qt4
98e6a77
D Haley b8b8f21
export LDFLAGS="-L/usr/lib64/hdf/ -L/usr/lib/hdf"
98e6a77
%configure	--disable-static \
98e6a77
		--enable-shared \
D Haley 39f9fd1
		--enable-all
98e6a77
98e6a77
#Force strip rpath
98e6a77
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
98e6a77
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
98e6a77
98e6a77
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/widgets/.libs/:`pwd`/mgl/.libs
98e6a77
98e6a77
make %{?_smp_mflags} 
98e6a77
98e6a77
%install
98e6a77
rm -rf $RPM_BUILD_ROOT
98e6a77
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
98e6a77
98e6a77
#Trash the .la files that get generated anyway (faulty configure? Doesn't appear up without --disable-ltdtl-install)
98e6a77
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
98e6a77
98e6a77
pushd .
98e6a77
#Lets build a "docs" dir to maintain the dir relationships needed for html files
98e6a77
mkdir -p  texinfo/docs
98e6a77
cd texinfo/docs/
aa0e9b7
cp -pr ../mathgl_en.html .
98e6a77
cp -pr ../png/ .
98e6a77
98e6a77
#remove zero length faux PNG file
98e6a77
rm -f png/all.png
98e6a77
98e6a77
popd
98e6a77
98e6a77
#remove installed docs, which we are installing via doc macro
98e6a77
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}
98e6a77
98e6a77
#remove misplaced info "dir" file
98e6a77
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
98e6a77
43329e3
pushd $RPM_BUILD_ROOT/%{_infodir}
43329e3
43329e3
#move to _en info files
43329e3
for i in mathgl_en.info*;
43329e3
do
43329e3
	mv $i `echo $i | sed s/mathgl_en/mathgl/`
43329e3
done
43329e3
D Haley b8b8f21
rm mgl_*.info*
D Haley b8b8f21
43329e3
popd
43329e3
98e6a77
%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
98e6a77
%postun
98e6a77
/sbin/ldconfig
98e6a77
98e6a77
%clean
98e6a77
rm -rf $RPM_BUILD_ROOT
98e6a77
98e6a77
98e6a77
%files
98e6a77
%defattr(-,root,root,-)
98e6a77
%doc AUTHORS ChangeLog.txt README COPYING COPYRIGHT NEWS TODO
98e6a77
%{_libdir}/*.so.*
98e6a77
%{_bindir}/mgl*
98e6a77
%{_datadir}/%{name}/
43329e3
%{_infodir}/%{name}.*.gz
aa0e9b7
%{_infodir}/%{name}_ru.*.gz
98e6a77
98e6a77
98e6a77
%files devel
98e6a77
%defattr(-,root,root,-)
98e6a77
%{_includedir}/mgl/
98e6a77
%{_libdir}/*.so
98e6a77
98e6a77
%files doc
98e6a77
%defattr(-,root,root,-)
98e6a77
%doc texinfo/docs/*
98e6a77
98e6a77
%changelog
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