From 98e6a77bcae664dca7d2b0b2a734d91e1e24d98c Mon Sep 17 00:00:00 2001 From: mycae Date: Sep 14 2009 10:51:23 +0000 Subject: - devel import --- diff --git a/.cvsignore b/.cvsignore index e69de29..4ec90f1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +mathgl-1.9.tgz diff --git a/import.log b/import.log new file mode 100644 index 0000000..7d801a7 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mathgl-1_9-6_fc10:HEAD:mathgl-1.9-6.fc10.src.rpm:1252925836 diff --git a/mathgl-info.patch b/mathgl-info.patch new file mode 100644 index 0000000..b7b1c20 --- /dev/null +++ b/mathgl-info.patch @@ -0,0 +1,20 @@ +Index: mathgl/texinfo/mathgl.texi +=================================================================== +--- texinfo/mathgl.texi 2009-03-04 13:22:15.000000000 +0000 ++++ texinfo/mathgl.texi 2009-05-27 17:39:59.000000000 +0100 +@@ -25,10 +25,10 @@ + @end quotation + @end copying + +-@c @dircategory MathGL documentation system +-@c @direntry +-@c * MathGL: (mathgl). The library for scientific graphics. +-@c @end direntry ++@dircategory MathGL documentation system ++@direntry ++* MathGL: (mathgl). The library for scientific graphics. ++@end direntry + + @titlepage + @title MathGL + diff --git a/mathgl-io.patch b/mathgl-io.patch new file mode 100644 index 0000000..df2f8e0 --- /dev/null +++ b/mathgl-io.patch @@ -0,0 +1,33 @@ +--- mgl/mgl_data_io.cpp 2009-07-02 01:49:42.000000000 +1000 ++++ mgl/mgl_data_io.cpp.new 2009-07-25 12:16:55.000000000 +1000 +@@ -918,7 +918,7 @@ + hid_t hf,hd,hs; + hsize_t dims[3]; + long rank = 3, res; +- H5Eset_auto(0,0); ++ H5Eset_auto2(0,0,0); + res=H5Fis_hdf5(fname); + if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); + else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); +@@ -928,10 +928,10 @@ + else { rank = 3; dims[0] = nz; dims[1] = ny; dims[2] = nx; } + hs = H5Screate_simple(rank, dims, 0); + #if(MGL_USE_DOUBLE==1) +- hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT); ++ hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT,H5P_DEFAULT); + H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a); + #else +- hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT); ++ hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); + H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a); + #endif + H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); +@@ -943,7 +943,7 @@ + hsize_t dims[3]; + long rank; + hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); +- hd = H5Dopen(hf,data); ++ hd = H5Dopen(hf,data,H5P_DEFAULT); + hs = H5Dget_space(hd); + rank = H5Sget_simple_extent_ndims(hs); + if(rank>0 && rank<=3) diff --git a/mathgl-no-mglwx.patch b/mathgl-no-mglwx.patch new file mode 100644 index 0000000..573f460 --- /dev/null +++ b/mathgl-no-mglwx.patch @@ -0,0 +1,36 @@ +--- widgets/Makefile.am.orig 2009-08-15 12:35:36.000000000 +1000 ++++ widgets/Makefile.am 2009-08-15 12:35:27.000000000 +1000 +@@ -18,11 +18,11 @@ + endif + + if USE_WX +-lib_LTLIBRARIES += libmgl-wx.la +-libmgl_wx_la_LDFLAGS = -no-undefined -version-info $(MGL_CURRENT):$(MGL_REVISION):$(MGL_AGE) +-libmgl_wx_la_LIBADD = $(WX_LIBS) $(top_builddir)/mgl/libmgl.la +-libmgl_wx_la_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS) +-libmgl_wx_la_SOURCES = mgl_wx.cpp ++#lib_LTLIBRARIES += libmgl-wx.la ++#libmgl_wx_la_LDFLAGS = -no-undefined -version-info $(MGL_CURRENT):$(MGL_REVISION):$(MGL_AGE) ++#libmgl_wx_la_LIBADD = $(WX_LIBS) $(top_builddir)/mgl/libmgl.la ++#libmgl_wx_la_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS) ++#libmgl_wx_la_SOURCES = mgl_wx.cpp + endif + + if USE_QT +--- examples/Makefile.am.orig 2009-08-15 12:55:36.000000000 +1000 ++++ examples/Makefile.am 2009-08-15 12:55:29.000000000 +1000 +@@ -24,10 +24,10 @@ + endif + + if USE_WX +-bin_PROGRAMS += mgl_wx_example +-mgl_wx_example_LDADD = $(WX_LIBS) $(top_builddir)/widgets/libmgl-wx.la +-mgl_wx_example_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS) +-mgl_wx_example_SOURCES = wx_example.cpp ++#bin_PROGRAMS += mgl_wx_example ++#mgl_wx_example_LDADD = $(WX_LIBS) $(top_builddir)/widgets/libmgl-wx.la ++#mgl_wx_example_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS) ++#mgl_wx_example_SOURCES = wx_example.cpp + endif + + if USE_QT diff --git a/mathgl-png.patch b/mathgl-png.patch new file mode 100644 index 0000000..9cd6f48 --- /dev/null +++ b/mathgl-png.patch @@ -0,0 +1,11 @@ +--- texinfo/png/Makefile.am 2009-07-02 01:50:09.000000000 +1000 ++++ texinfo/png/Makefile.am.new 2009-07-25 12:36:15.000000000 +1000 +@@ -18,7 +18,7 @@ + type2.png vect3.png vectc3.png vectc.png vect.png + + pngdir = $(docdir)/png +-png_DATA = all.png $(png_images) ++png_DATA = all.png + CLEANFILES = all.png $(png_images) + all.png: hotdogs.pts + $(top_builddir)/examples/mgl_example diff --git a/mathgl.spec b/mathgl.spec new file mode 100644 index 0000000..904c094 --- /dev/null +++ b/mathgl.spec @@ -0,0 +1,282 @@ +%{!?octave_api:%global octave_api %(octave-config -p API_VERSION || echo 0)} +Name: mathgl +Version: 1.9 +Release: 6%{?dist} +Summary: Cross-platform library for making high-quality scientific graphics +Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных +License: GPLv2+ +Group: Development/Libraries +Url: http://mathgl.sourceforge.net +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz + +#Fix missing default parameter in hdf5 code +Patch0: %{name}-io.patch +#Patch to fix parallel build issue (from debian pts) +Patch1: %{name}-png.patch +#Uncomment mathgl dif listing (fix warning) also from pts +Patch2: %{name}-info.patch +#Remove empty libmgl-wx from compilation +Patch3: %{name}-no-mglwx.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# mandatory packages +BuildRequires: gsl-devel libpng-devel libtool-ltdl-devel libtool +BuildRequires: swig + +# optional packages +BuildRequires: freeglut-devel hdf5-devel libjpeg-devel libtiff-devel fltk-devel qt4-devel +BuildRequires: wxGTK-devel giflib-devel octave-devel + +#For autoreconf (required for patch1, libtool) +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +Requires(post): info +Requires(preun): info + +Requires: octave(api) = %{octave_api} + +%description +Mathgl is a cross-platform library for making high-quality scientific +graphics. It provides fast data plotting and handling of large data +arrays, as well as window and console modes and for easy embedding +into other programs. Mathgl integrates into fltk, qt and +opengl applications + +%package devel +Summary: Libraries and header files for %{name} library +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%description devel -l ru +Пакет %{name}-devel содержит библиотеки и файлы заголовков необходимые +для разработки приложений с использованием %{name}. + +%package doc +Group: Documentation +Summary: HTML documentation and tutorial for the %{name} applications + +BuildArch: noarch +BuildRequires: texi2html texinfo-tex + + +%description doc +This package contains the documentation in the HTML format of the %{name} +package. + +%prep +%setup -q + +#convert EOL encodings, maintaining timestames +for file in AUTHORS ChangeLog.txt README COPYRIGHT; do + sed 's/\r//' $file > $file.new && \ + touch -r $file $file.new && \ + mv $file.new $file +done + +%patch0 +%patch1 +%patch2 +%patch3 + +autoreconf + + +%build +#configure looks for * not *-qt4 +QMAKE=/usr/bin/qmake-qt4 +LUPDATE=/usr/bin/lupdate-qt4 +LRELEASE=/usr/bin/lrelease-qt4 + +%configure --disable-static \ + --enable-shared \ + --enable-all --enable-octave --disable-rpath + +#Force strip rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/widgets/.libs/:`pwd`/mgl/.libs + +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" + +#Trash the .la files that get generated anyway (faulty configure? Doesn't appear up without --disable-ltdtl-install) +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la + + +#Fix up octave .oct file install +mkdir -p temp-octave + +pushd . +cd temp-octave +#Decompress tarballed "oct" file and remove tarball +tar -zxf $RPM_BUILD_ROOT/%{_datadir}/%{name}/octave/%{name}.tar.gz +rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/octave/%{name}.tar.gz + +#Copy the .oct file and supporting files to octave packages dir +mkdir -p $RPM_BUILD_ROOT/%{_prefix}/libexec/octave/packages/%{name}-1.9.0/ +#Remove empty INDEX file +rm %{name}/INDEX + +#We cannot use version macro with octave package search, +# as pkg.m assumes a x.y.z format for packages. Failing +# to do this renders the plugin inoperable +cp -pR %{name}/inst/* $RPM_BUILD_ROOT/%{_prefix}/libexec/octave/packages/%{name}-1.9.0/ + +#packinfo dir is required, or octave will not find the dir in recursive search +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/octave/packages/%{name}-1.9.0/packinfo +cp -p %{name}/[A-Z]* $RPM_BUILD_ROOT/%{_datadir}/octave/packages/%{name}-1.9.0/packinfo + +popd + + + +pushd . +#Lets build a "docs" dir to maintain the dir relationships needed for html files +mkdir -p texinfo/docs +cd texinfo/docs/ +cp -pr ../mathgl.html . +cp -pr ../png_static . +cp -pr ../png/ . + +#remove zero length faux PNG file +rm -f png/all.png + +popd + +#remove installed docs, which we are installing via doc macro +rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name} + +#remove misplaced info "dir" file +rm -f $RPM_BUILD_ROOT/%{_infodir}/dir + +%post +/sbin/ldconfig +/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : +octave -q -H --no-site-file --eval "pkg('rebuild');" + +%preun +if [ $1 = 0 ] ; then + /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : +fi + +%postun +/sbin/ldconfig +octave -q -H --no-site-file --eval "pkg('rebuild');" + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog.txt README COPYING COPYRIGHT NEWS TODO +%{_libdir}/*.so.* +%{_bindir}/mgl* +%{_datadir}/%{name}/ +%{_prefix}/libexec/octave/packages/%{name}-1.9.0/ +%{_datadir}/octave/packages/%{name}-1.9.0/ +%{_infodir}/%{name}.*.gz + + +%files devel +%defattr(-,root,root,-) +%{_includedir}/mgl/ +%{_libdir}/*.so + +%files doc +%defattr(-,root,root,-) +%doc texinfo/docs/* + +%changelog +* Mon Sep 14 2009 1.9-6 +- Add COPYING to doc + +* Sat Sep 12 2009 1.9-5 +- Removed the word "static" from devel description, as doesn't have static +- Fonts now owned at datadir/name level +- Added COPYRIGHT NEWS and TODO + +* Sat Aug 15 2009 1.9-4 +- Fix octave installation method +- Remove wx lib, which doesn't have meaningful code. + +* Sun Aug 02 2009 1.9-3 +- Fix texinfo install (mv to main & add pre/post) +- Remove chrpath, as we now autoreconf +- Add octave pkg rebuild commands + +* Tue Jul 21 2009 1.9-2 +- Fix rpath for build on x86_64. +- remove unrecognized configure options: --enable-tiff, --disable-ltdl-install +- Switch to --enable-all --enable-octave +- Add hdf5 patch +- Add doc subpackage + +* Thu Jul 09 2009 1.9-1 +- Update to 1.9 +- Drop explicit Requires +- Perserve timestamps on EOL conversion +- Added patch to disable unused gsl cblas link + +* Fri May 02 2009 1.8.1-1 +- Update to 1.8.1 + +* Wed Jan 28 2009 1.8-3 +- Ensure timestamps are preserved during make install +- Modify defattr +- Remove UDAV from package summary + +* Mon Dec 29 2008 1.8-2 +- Remove redundant and erroneous licence field in devel section +- Fix files from mgl/*h to mgl/ +- Removed Requires, per bugzilla recommendation. +- Disabled static library generation +- Removed libltdl from build +- Added libtool-ltdl as BuildRequires + +* Mon Dec 29 2008 1.8-1 +- Updated to version 1.8 +- Added QT env. vars for fedora +- Cleaned up description +- Change licence field from GPL to GPLv2 + +* Wed Jun 4 2008 Nik +- disabled hdf5 support according to developer request + +* Tue Jun 3 2008 Nik +- updated to version 1.7.1 + +* Sun Jun 2 2008 Nik +- updated to version 1.7 + +* Sat Apr 5 2008 Nik +- updated to version 1.6.2 + +* Thu Mar 13 2008 Nik +- updated to version 1.6 +- added fltk(-devel) to requres list + +* Tue Mar 11 2008 Nik +- tiff bug fixed +- enable-all option added + +* Sat Mar 1 2008 Nik +- spec cleanup +- --enable(jpeg, tiff, hdf5) features added +- enable-tiff leads to make error, submitted to author. Feature disabled. + +* Fri Feb 29 2008 Nik +- initial build of version 1.5 + + diff --git a/sources b/sources index e69de29..80dfbea 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9aa6b5f8c4a6f7d5b8708b8565b17b63 mathgl-1.9.tgz