[packages/liborcus] - build spreadsheet model library - added link patch (fixes spreadsheet-model library and examples l

qboosh qboosh at pld-linux.org
Mon Apr 1 10:10:09 CEST 2013


commit 90a34fd6b183f6beb69eb0aeedf4ec5b55bf7e4f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 1 10:10:01 2013 +0200

    - build spreadsheet model library
    - added link patch (fixes spreadsheet-model library and examples linking)
    - added am patch (fixes build with automake 1.13)
    - release 2

 liborcus-am.patch   | 11 +++++++
 liborcus-link.patch | 32 ++++++++++++++++++++
 liborcus.spec       | 84 +++++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 122 insertions(+), 5 deletions(-)
---
diff --git a/liborcus.spec b/liborcus.spec
index ccdd78a..2fb9cd0 100644
--- a/liborcus.spec
+++ b/liborcus.spec
@@ -1,7 +1,6 @@
-# TODO: ixion (requires newer version than existing in PLD)
 #
 # Conditional build:
-%bcond_with	ixion		# ixion-based spreadsheet model support
+%bcond_without	ixion		# ixion-based spreadsheet model support
 %bcond_without	libzip		# ZIP-based formats support via libzip
 %bcond_without	static_libs	# static library
 #
@@ -9,15 +8,20 @@ Summary:	Standalone file import filter library for spreadsheet documents
 Summary(pl.UTF-8):	Biblioteka samodzielnego filtra importującego pliki dla arkuszy kalkulacyjnych
 Name:		liborcus
 Version:	0.3.0
-Release:	1
+Release:	2
 License:	MIT
 Group:		Libraries
 Source0:	http://kohei.us/files/orcus/src/%{name}_%{version}.tar.bz2
 # Source0-md5:	8755aac23317494a9028569374dc87b2
+Patch0:		%{name}-link.patch
+Patch1:		%{name}-am.patch
 URL:		http://gitorious.org/orcus
+BuildRequires:	autoconf >= 2.65
+BuildRequires:	automake >= 1:1.11
 BuildRequires:	boost-devel
-%{?with_ixion:BuildRequires:	ixion-devel >= 0.6}
+%{?with_ixion:BuildRequires:	ixion-devel >= 0.5}
 BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:1.5
 %{?with_libzip:BuildRequires:	libzip-devel}
 BuildRequires:	mdds-devel
 BuildRequires:	pkgconfig >= 1:0.20
@@ -62,10 +66,56 @@ Static liborcus library.
 %description static -l pl.UTF-8
 Statyczna biblioteka liborcus.
 
+%package spreadsheet
+Summary:	liborcus spreadsheet model library
+Summary(pl.UTF-8):	Biblioteka liborcus spreadsheet model
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	ixion >= 0.5
+
+%description spreadsheet
+liborcus spreadsheet model library.
+
+%description spreadsheet -l pl.UTF-8
+Biblioteka liborcus spreadsheet model (modelu arkuszy kalkulacyjnych).
+
+%package spreadsheet-devel
+Summary:	Development files for liborcus spreadsheet model library
+Summary(pl.UTF-8):	Pliki programistyczne biblioteki liborcus spreadsheet model
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	%{name}-spreadsheet = %{version}-%{release}
+Requires:	ixion-devel >= 0.5
+
+%description spreadsheet-devel
+Development files for liborcus spreadsheet model library.
+
+%description spreadsheet-devel -l pl.UTF-8
+Pliki programistyczne biblioteki liborcus spreadsheet model.
+
+%package spreadsheet-static
+Summary:	Static liborcus spreadsheet model library
+Summary(pl.UTF-8):	Biblioteka statyczna liborcus spreadsheet model
+Group:		Development/Libraries
+Requires:	%{name}-spreadsheet-devel = %{version}-%{release}
+
+%description spreadsheet-static
+Static liborcus spreadsheet model library.
+
+%description spreadsheet-static -l pl.UTF-8
+Biblioteka statyczna liborcus spreadsheet model.
+
 %prep
 %setup -q -n %{name}_%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
 	--disable-debug \
 	--disable-silent-rules \
@@ -92,6 +142,9 @@ rm -rf $RPM_BUILD_ROOT
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
+%post	spreadsheet -p /sbin/ldconfig
+%postun	spreadsheet -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS
@@ -108,5 +161,26 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%endif
 %{_libdir}/liborcus-0.4.a
+%endif
+
+%if %{with ixion}
+%files spreadsheet
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/orcus-csv
+%attr(755,root,root) %{_bindir}/orcus-gnumeric
+%attr(755,root,root) %{_bindir}/orcus-ods
+%attr(755,root,root) %{_bindir}/orcus-xlsx
+%attr(755,root,root) %{_bindir}/orcus-xml
+%attr(755,root,root) %{_libdir}/liborcus-spreadsheet-model-0.4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liborcus-spreadsheet-model-0.4.so.0
+
+%files spreadsheet-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liborcus-spreadsheet-model-0.4.so
+%{_pkgconfigdir}/liborcus-spreadsheet-model-0.4.pc
+
+%files spreadsheet-static
+%defattr(644,root,root,755)
+%{_libdir}/liborcus-spreadsheet-model-0.4.a
+%endif
diff --git a/liborcus-am.patch b/liborcus-am.patch
new file mode 100644
index 0000000..71217fa
--- /dev/null
+++ b/liborcus-am.patch
@@ -0,0 +1,11 @@
+--- liborcus_0.3.0/configure.ac.orig	2012-11-28 13:21:10.000000000 +0100
++++ liborcus_0.3.0/configure.ac	2013-04-01 07:14:35.052006900 +0200
+@@ -22,7 +22,7 @@
+ # =============
+ AC_INIT([orcus],[orcus_version])
+ AC_CONFIG_MACRO_DIR([m4])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
+ AM_SILENT_RULES([yes])
+ AC_LANG([C++])
diff --git a/liborcus-link.patch b/liborcus-link.patch
new file mode 100644
index 0000000..bd246bc
--- /dev/null
+++ b/liborcus-link.patch
@@ -0,0 +1,32 @@
+--- liborcus_0.3.0/src/Makefile.am.orig	2012-11-28 13:21:10.000000000 +0100
++++ liborcus_0.3.0/src/Makefile.am	2013-04-01 09:25:19.181843438 +0200
+@@ -22,7 +22,8 @@
+ 	dom_tree_sax_handler.cpp
+ 
+ orcus_xml_dump_LDADD = \
+-	liborcus/liborcus- at ORCUS_API_VERSION@.la
++	liborcus/liborcus- at ORCUS_API_VERSION@.la \
++	-lpthread
+ 
+ orcus_xml_dump_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(COMMON_CPPFLAGS)
+ 
+@@ -78,7 +79,8 @@
+ 
+ orcus_xml_LDADD = \
+ 	liborcus/liborcus- at ORCUS_API_VERSION@.la \
+-	spreadsheet/liborcus-spreadsheet-model- at ORCUS_API_VERSION@.la
++	spreadsheet/liborcus-spreadsheet-model- at ORCUS_API_VERSION@.la \
++	-lpthread
+ 
+ orcus_xml_CPPFLAGS = -I$(top_builddir)/lib/liborcus/liborcus.la $(COMMON_CPPFLAGS)
+ 
+--- liborcus_0.3.0/src/spreadsheet/Makefile.am.orig	2012-11-28 13:21:10.000000000 +0100
++++ liborcus_0.3.0/src/spreadsheet/Makefile.am	2013-04-01 07:28:42.121989280 +0200
+@@ -17,6 +17,6 @@
+ 
+ liborcus_spreadsheet_model_ at ORCUS_API_VERSION@_la_CXXFLAGS = $(LIBIXION_CFLAGS)
+ liborcus_spreadsheet_model_ at ORCUS_API_VERSION@_la_LDFLAGS = -no-undefined
+-liborcus_spreadsheet_model_ at ORCUS_API_VERSION@_la_LIBADD = $(LIBIXION_LIBS)
++liborcus_spreadsheet_model_ at ORCUS_API_VERSION@_la_LIBADD = $(LIBIXION_LIBS) $(top_builddir)/src/liborcus/liborcus- at ORCUS_API_VERSION@.la
+ 
+ endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/liborcus.git/commitdiff/90a34fd6b183f6beb69eb0aeedf4ec5b55bf7e4f



More information about the pld-cvs-commit mailing list