summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Bogusz2012-01-30 20:30:17 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commitbe8d1911aa73a7e97300cf06882c2c3aa0738979 (patch)
treefa27d154eed32d0d2f98ddccd86cab51733b340b
downloadmatio-be8d1911aa73a7e97300cf06882c2c3aa0738979.zip
matio-be8d1911aa73a7e97300cf06882c2c3aa0738979.tar.gz
- new; fortran interface built as separate library to avoid extra deps in main packageauto/th/matio-1_3_4-1
Changed files: matio-ac.patch -> 1.1 matio-link.patch -> 1.1 matio-separate-fortran.patch -> 1.1 matio.spec -> 1.1
-rw-r--r--matio-ac.patch22
-rw-r--r--matio-link.patch10
-rw-r--r--matio-separate-fortran.patch17
-rw-r--r--matio.spec193
4 files changed, 242 insertions, 0 deletions
diff --git a/matio-ac.patch b/matio-ac.patch
new file mode 100644
index 0000000..abe6376
--- /dev/null
+++ b/matio-ac.patch
@@ -0,0 +1,22 @@
+--- matio-1.3.4/configure.ac.orig 2010-03-30 17:05:53.000000000 +0200
++++ matio-1.3.4/configure.ac 2012-01-29 19:38:20.187928466 +0100
+@@ -5,7 +5,7 @@
+ AC_INIT([MATIO],[1.3.4],[cch@isl-inc.com],[])
+ AC_CONFIG_SRCDIR([src/matio.h])
+ AC_CONFIG_AUX_DIR(config)
+-AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_MACRO_DIR([config])
+ dnl AM_INIT_AUTOMAKE([-no-undefined])
+ AM_INIT_AUTOMAKE
+ AM_MAINTAINER_MODE
+--- matio-1.3.4/Makefile.am.orig 2010-03-30 16:48:00.000000000 +0200
++++ matio-1.3.4/Makefile.am 2012-01-29 19:40:02.501265224 +0100
+@@ -3,7 +3,7 @@
+ AUTOMAKE_OPTIONS = foreign 1.8 no-dependencies
+ VPATH = @srcdir@
+
+-ACLOCAL_AMFLAGS = -I config/
++ACLOCAL_AMFLAGS = -I config
+
+ datadir = $(prefix)/share/matio
+ EXTRA_DIST = matio.pc.in bootstrap patches/inflate.patch \
diff --git a/matio-link.patch b/matio-link.patch
new file mode 100644
index 0000000..1ffa282
--- /dev/null
+++ b/matio-link.patch
@@ -0,0 +1,10 @@
+--- matio-1.3.4/src/Makefile.am.orig 2008-05-18 23:45:41.000000000 +0200
++++ matio-1.3.4/src/Makefile.am 2012-01-29 19:31:12.697914151 +0100
+@@ -15,6 +15,7 @@
+ noinst_HEADERS = matio_private.h mat4.h mat5.h
+ include_HEADERS = matio.h matioConfig.h
+ lib_LTLIBRARIES = libmatio.la
++libmatio_la_LIBADD = $(ZLIB_LIBS)
+ libmatio_la_SOURCES = snprintf.c endian.c io.c $(ZLIB_SRC) read_data.c \
+ mat5.c mat4.c mat.c
+
diff --git a/matio-separate-fortran.patch b/matio-separate-fortran.patch
new file mode 100644
index 0000000..a1c2c4f
--- /dev/null
+++ b/matio-separate-fortran.patch
@@ -0,0 +1,17 @@
+--- matio-1.3.4/src/Makefile.am.orig 2012-01-29 20:12:30.941330465 +0100
++++ matio-1.3.4/src/Makefile.am 2012-01-29 21:28:43.894816918 +0100
+@@ -21,11 +21,12 @@
+
+ if ENABLE_FORTRAN
+ AM_FCFLAGS = -I. -I$(top_builddir)/src/fortran
+- AM_LDFLAGS += $(FCLDFLAGS)
++ lib_LTLIBRARIES += libmatio-fortran.la
++ libmatio_fortran_la_LIBADD = libmatio.la $(FCLDFLAGS)
+ nodist_include_HEADERS = $(top_builddir)/src/matio.mod
+ noinst_HEADERS += fortran/create.f90 fortran/read_data.f90 \
+ fortran/write_data.f90 fortran/write.f90
+- libmatio_la_SOURCES += fortran/matio_internal.c fortran/matio.f90
++ libmatio_fortran_la_SOURCES = fortran/matio_internal.c fortran/matio.f90
+ endif
+
+ dosubst = sed -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
diff --git a/matio.spec b/matio.spec
new file mode 100644
index 0000000..b46acdb
--- /dev/null
+++ b/matio.spec
@@ -0,0 +1,193 @@
+#
+# Conditional build:
+%bcond_without apidocs # do not build and package API docs
+%bcond_without fortran # Fortran interface
+#
+Summary: MATIO - Matlab MAT file I/O library
+Summary(pl.UTF-8): MATIO - biblioteka wejścia/wyjścia do plików MAT (Matlaba)
+Name: matio
+Version: 1.3.4
+Release: 1
+License: LGPL v2.1+
+Group: Libraries
+Source0: http://downloads.sourceforge.net/matio/%{name}-%{version}.tar.gz
+# Source0-md5: a91208cf18f2456a5855bc1a9fdb90fd
+Patch0: %{name}-link.patch
+Patch1: %{name}-ac.patch
+Patch2: %{name}-separate-fortran.patch
+URL: http://matio.sourceforge.net/
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.8
+%{?with_apidocs:BuildRequires: doxygen}
+%{?with_fortran:BuildRequires: gcc-fortran}
+BuildRequires: libtool >= 2:1.5
+BuildRequires: sed >= 4.0
+BuildRequires: zlib-devel
+%if %{with apidocs}
+BuildRequires: doxygen
+BuildRequires: texlive-format-pdflatex
+BuildRequires: texlive-latex-ams
+BuildRequires: texlive-makeindex
+%endif
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libmatio is an open-source library for reading/writing Matlab MAT
+files. This library is designed for use by programs/libraries that do
+not have access or do not want to rely on Matlab's libmat shared
+library.
+
+%description -l pl.UTF-8
+libmatio to mająca otwarte źródłą biblioteka do odczytu i zapisu
+plików MAT (z programu Matlab). Jest przeznaczona dla programów i
+bibliotek nie mających dostępu albo nie chcących polegać na bibliotece
+współdzielonej libmat z Matlaba.
+
+%package devel
+Summary: Header files for MATIO library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki MATIO
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: zlib-devel
+
+%description devel
+Header files for MATIO library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki MATIO.
+
+%package static
+Summary: Static MATIO library
+Summary(pl.UTF-8): Statyczna biblioteka MATIO
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static MATIO library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka MATIO.
+
+%package fortran
+Summary: Fortran interface for MATIO library
+Summary(pl.UTF-8): Interfejs Fortrana do biblioteki MATIO
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description fortran
+Fortran interface for MATIO library.
+
+%description fortran -l pl.UTF-8
+Interfejs Fortrana do biblioteki MATIO.
+
+%package fortran-devel
+Summary: Header file for Fortran interface for MATIO library
+Summary(pl.UTF-8): Plik nagłówkowy interfejsu Fortrana do biblioteki MATIO
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-fortran = %{version}-%{release}
+
+%description fortran-devel
+Header file for Fortran interface for MATIO library.
+
+%description fortran-devel -l pl.UTF-8
+Plik nagłówkowy interfejsu Fortrana do biblioteki MATIO.
+
+%package fortran-static
+Summary: Fortran interface for MATIO library - static library
+Summary(pl.UTF-8): Interfejs Fortrana do biblioteki MATIO - biblioteka statyczna
+Group: Development/Libraries
+Requires: %{name}-fortran-devel = %{version}-%{release}
+
+%description fortran-static
+Fortran interface for MATIO library - static library.
+
+%description fortran-static -l pl.UTF-8
+Interfejs Fortrana do biblioteki MATIO - biblioteka statyczna.
+
+%package apidocs
+Summary: MATIO API documentation
+Summary(pl.UTF-8): Dokumentacja API biblioteki MATIO
+Group: Documentation
+
+%description apidocs
+API and internal documentation for MATIO library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki MATIO.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I config
+%{__autoconf}
+%{__automake}
+%configure \
+ %{?with_apidocs:--enable-docs} \
+ %{?with_fortran:--enable-fortran} \
+ --enable-shared
+
+# parallel build is broken (matio.mod, docs)
+%{__make} -j1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# keep .la - needed for -fortran
+
+# packaged in -apidocs
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/matio
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog NEWS README
+%attr(755,root,root) %{_libdir}/libmatio.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmatio.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmatio.so
+%{_libdir}/libmatio.la
+%{_includedir}/matio*.h
+%{_pkgconfigdir}/matio.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmatio.a
+
+%if %{with fortran}
+%files fortran
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmatio-fortran.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmatio-fortran.so.0
+
+%files fortran-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmatio-fortran.so
+%{_libdir}/libmatio-fortran.la
+%{_includedir}/matio.mod
+
+%files fortran-static
+%defattr(644,root,root,755)
+%{_libdir}/libmatio-fortran.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doxygen/latex/libmatio.pdf
+%endif