From b0e24628ccc0e5647d4947f812557c6c7f6711e8 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Dec 07 2012 11:18:33 +0000 Subject: new release --- diff --git a/.gitignore b/.gitignore index d2c8e79..ad0dda2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /liborcus_0.1.0.tar.bz2 +/liborcus_0.3.0.tar.bz2 diff --git a/0001-link-with-Boost.System-if-needed.patch b/0001-link-with-Boost.System-if-needed.patch deleted file mode 100644 index 1c79f88..0000000 --- a/0001-link-with-Boost.System-if-needed.patch +++ /dev/null @@ -1,461 +0,0 @@ -From b19974e2bface4881491061b01ddff75a4b5e641 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Sat, 6 Oct 2012 19:43:33 +0200 -Subject: [PATCH] link with Boost.System if needed - ---- - .gitignore | 4 +- - autogen.sh | 2 +- - configure.ac | 23 +++++ - m4/ax_boost_base.m4 | 258 +++++++++++++++++++++++++++++++++++++++++++++++ - m4/ax_boost_system.m4 | 120 ++++++++++++++++++++++ - src/Makefile.am | 2 +- - src/liborcus/Makefile.am | 4 +- - 7 files changed, 408 insertions(+), 5 deletions(-) - create mode 100644 m4/ax_boost_base.m4 - create mode 100644 m4/ax_boost_system.m4 - -diff --git a/configure.ac b/configure.ac -index d44bcdc..dab0e18 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -59,5 +59,28 @@ AC_FUNC_STRTOD - AC_CHECK_FUNCS([gettimeofday]) - AC_DEFINE([_REENTRANT], [], [Enable reentrant.]) -+AX_BOOST_BASE -+ -+# =========================================================== -+# Determine if we are going to need to link with Boost.System -+# =========================================================== -+dnl This seems to be necessary since boost 1.50 (1.48 does not need it, -+dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned -+dnl in documentation has no effect. -+AC_MSG_CHECKING([if we need to link with Boost.System]) -+AC_LANG_PUSH([C++]) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+@%:@include -+]], [[ -+#if BOOST_VERSION >= 105000 -+# error yes, we need to link with Boost.System -+#endif -+]])],[ -+ AC_MSG_RESULT([no]) -+ ],[ -+ AC_MSG_RESULT([yes]) -+ AX_BOOST_SYSTEM -+ ]) -+AC_LANG_POP([C++]) - - # ============= - # Set orcus api -diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 -new file mode 100644 -index 0000000..54a2a1b ---- /dev/null -+++ b/m4/ax_boost_base.m4 -@@ -0,0 +1,258 @@ -+# =========================================================================== -+# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html -+# =========================================================================== -+# -+# SYNOPSIS -+# -+# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+# -+# DESCRIPTION -+# -+# Test for the Boost C++ libraries of a particular version (or newer) -+# -+# If no path to the installed boost library is given the macro searchs -+# under /usr, /usr/local, /opt and /opt/local and evaluates the -+# $BOOST_ROOT environment variable. Further documentation is available at -+# . -+# -+# This macro calls: -+# -+# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -+# -+# And sets: -+# -+# HAVE_BOOST -+# -+# LICENSE -+# -+# Copyright (c) 2008 Thomas Porschberg -+# Copyright (c) 2009 Peter Adolphs -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice -+# and this notice are preserved. This file is offered as-is, without any -+# warranty. -+ -+#serial 20 -+ -+AC_DEFUN([AX_BOOST_BASE], -+[ -+AC_ARG_WITH([boost], -+ [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], -+ [use Boost library from a standard location (ARG=yes), -+ from the specified location (ARG=), -+ or disable it (ARG=no) -+ @<:@ARG=yes@:>@ ])], -+ [ -+ if test "$withval" = "no"; then -+ want_boost="no" -+ elif test "$withval" = "yes"; then -+ want_boost="yes" -+ ac_boost_path="" -+ else -+ want_boost="yes" -+ ac_boost_path="$withval" -+ fi -+ ], -+ [want_boost="yes"]) -+ -+ -+AC_ARG_WITH([boost-libdir], -+ AS_HELP_STRING([--with-boost-libdir=LIB_DIR], -+ [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), -+ [ -+ if test -d "$withval" -+ then -+ ac_boost_lib_path="$withval" -+ else -+ AC_MSG_ERROR(--with-boost-libdir expected directory name) -+ fi -+ ], -+ [ac_boost_lib_path=""] -+) -+ -+if test "x$want_boost" = "xyes"; then -+ boost_lib_version_req=ifelse([$1], ,1.20.0,$1) -+ boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` -+ boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` -+ boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` -+ boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` -+ if test "x$boost_lib_version_req_sub_minor" = "x" ; then -+ boost_lib_version_req_sub_minor="0" -+ fi -+ WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` -+ AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) -+ succeeded=no -+ -+ dnl On 64-bit systems check for system libraries in both lib64 and lib. -+ dnl The former is specified by FHS, but e.g. Debian does not adhere to -+ dnl this (as it rises problems for generic multi-arch support). -+ dnl The last entry in the list is chosen by default when no libraries -+ dnl are found, e.g. when only header-only libraries are installed! -+ libsubdirs="lib" -+ ax_arch=`uname -m` -+ if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then -+ libsubdirs="lib64 lib lib64" -+ fi -+ -+ dnl first we check the system location for boost libraries -+ dnl this location ist chosen if boost libraries are installed with the --layout=system option -+ dnl or if you install boost with RPM -+ if test "$ac_boost_path" != ""; then -+ BOOST_CPPFLAGS="-I$ac_boost_path/include" -+ for ac_boost_path_tmp in $libsubdirs; do -+ if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then -+ BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" -+ break -+ fi -+ done -+ elif test "$cross_compiling" != yes; then -+ for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do -+ if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then -+ for libsubdir in $libsubdirs ; do -+ if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi -+ done -+ BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" -+ BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" -+ break; -+ fi -+ done -+ fi -+ -+ dnl overwrite ld flags if we have required special directory with -+ dnl --with-boost-libdir parameter -+ if test "$ac_boost_lib_path" != ""; then -+ BOOST_LDFLAGS="-L$ac_boost_lib_path" -+ fi -+ -+ CPPFLAGS_SAVED="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -+ export CPPFLAGS -+ -+ LDFLAGS_SAVED="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" -+ export LDFLAGS -+ -+ AC_REQUIRE([AC_PROG_CXX]) -+ AC_LANG_PUSH(C++) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ @%:@include -+ ]], [[ -+ #if BOOST_VERSION >= $WANT_BOOST_VERSION -+ // Everything is okay -+ #else -+ # error Boost version is too old -+ #endif -+ ]])],[ -+ AC_MSG_RESULT(yes) -+ succeeded=yes -+ found_system=yes -+ ],[ -+ ]) -+ AC_LANG_POP([C++]) -+ -+ -+ -+ dnl if we found no boost with system layout we search for boost libraries -+ dnl built and installed without the --layout=system option or for a staged(not installed) version -+ if test "x$succeeded" != "xyes"; then -+ _version=0 -+ if test "$ac_boost_path" != ""; then -+ if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then -+ for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do -+ _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` -+ V_CHECK=`expr $_version_tmp \> $_version` -+ if test "$V_CHECK" = "1" ; then -+ _version=$_version_tmp -+ fi -+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` -+ BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" -+ done -+ fi -+ else -+ if test "$cross_compiling" != yes; then -+ for ac_boost_path in /usr /usr/local /opt /opt/local ; do -+ if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then -+ for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do -+ _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` -+ V_CHECK=`expr $_version_tmp \> $_version` -+ if test "$V_CHECK" = "1" ; then -+ _version=$_version_tmp -+ best_path=$ac_boost_path -+ fi -+ done -+ fi -+ done -+ -+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` -+ BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" -+ if test "$ac_boost_lib_path" = ""; then -+ for libsubdir in $libsubdirs ; do -+ if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi -+ done -+ BOOST_LDFLAGS="-L$best_path/$libsubdir" -+ fi -+ fi -+ -+ if test "x$BOOST_ROOT" != "x"; then -+ for libsubdir in $libsubdirs ; do -+ if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi -+ done -+ if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then -+ version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` -+ stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` -+ stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` -+ V_CHECK=`expr $stage_version_shorten \>\= $_version` -+ if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then -+ AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) -+ BOOST_CPPFLAGS="-I$BOOST_ROOT" -+ BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" -+ fi -+ fi -+ fi -+ fi -+ -+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -+ export CPPFLAGS -+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" -+ export LDFLAGS -+ -+ AC_LANG_PUSH(C++) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ @%:@include -+ ]], [[ -+ #if BOOST_VERSION >= $WANT_BOOST_VERSION -+ // Everything is okay -+ #else -+ # error Boost version is too old -+ #endif -+ ]])],[ -+ AC_MSG_RESULT(yes) -+ succeeded=yes -+ found_system=yes -+ ],[ -+ ]) -+ AC_LANG_POP([C++]) -+ fi -+ -+ if test "$succeeded" != "yes" ; then -+ if test "$_version" = "0" ; then -+ AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) -+ else -+ AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) -+ fi -+ # execute ACTION-IF-NOT-FOUND (if present): -+ ifelse([$3], , :, [$3]) -+ else -+ AC_SUBST(BOOST_CPPFLAGS) -+ AC_SUBST(BOOST_LDFLAGS) -+ AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) -+ # execute ACTION-IF-FOUND (if present): -+ ifelse([$2], , :, [$2]) -+ fi -+ -+ CPPFLAGS="$CPPFLAGS_SAVED" -+ LDFLAGS="$LDFLAGS_SAVED" -+fi -+ -+]) -diff --git a/m4/ax_boost_system.m4 b/m4/ax_boost_system.m4 -new file mode 100644 -index 0000000..20df5ee ---- /dev/null -+++ b/m4/ax_boost_system.m4 -@@ -0,0 +1,120 @@ -+# =========================================================================== -+# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html -+# =========================================================================== -+# -+# SYNOPSIS -+# -+# AX_BOOST_SYSTEM -+# -+# DESCRIPTION -+# -+# Test for System library from the Boost C++ libraries. The macro requires -+# a preceding call to AX_BOOST_BASE. Further documentation is available at -+# . -+# -+# This macro calls: -+# -+# AC_SUBST(BOOST_SYSTEM_LIB) -+# -+# And sets: -+# -+# HAVE_BOOST_SYSTEM -+# -+# LICENSE -+# -+# Copyright (c) 2008 Thomas Porschberg -+# Copyright (c) 2008 Michael Tindal -+# Copyright (c) 2008 Daniel Casimiro -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice -+# and this notice are preserved. This file is offered as-is, without any -+# warranty. -+ -+#serial 15 -+ -+AC_DEFUN([AX_BOOST_SYSTEM], -+[ -+ AC_ARG_WITH([boost-system], -+ AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@], -+ [use the System library from boost - it is possible to specify a certain library for the linker -+ e.g. --with-boost-system=boost_system-gcc-mt ]), -+ [ -+ if test "$withval" = "no"; then -+ want_boost="no" -+ elif test "$withval" = "yes"; then -+ want_boost="yes" -+ ax_boost_user_system_lib="" -+ else -+ want_boost="yes" -+ ax_boost_user_system_lib="$withval" -+ fi -+ ], -+ [want_boost="yes"] -+ ) -+ -+ if test "x$want_boost" = "xyes"; then -+ AC_REQUIRE([AC_PROG_CC]) -+ AC_REQUIRE([AC_CANONICAL_BUILD]) -+ CPPFLAGS_SAVED="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -+ export CPPFLAGS -+ -+ LDFLAGS_SAVED="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" -+ export LDFLAGS -+ -+ AC_CACHE_CHECK(whether the Boost::System library is available, -+ ax_cv_boost_system, -+ [AC_LANG_PUSH([C++]) -+ CXXFLAGS_SAVE=$CXXFLAGS -+ -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], -+ [[boost::system::system_category]])], -+ ax_cv_boost_system=yes, ax_cv_boost_system=no) -+ CXXFLAGS=$CXXFLAGS_SAVE -+ AC_LANG_POP([C++]) -+ ]) -+ if test "x$ax_cv_boost_system" = "xyes"; then -+ AC_SUBST(BOOST_CPPFLAGS) -+ -+ AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) -+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` -+ -+ LDFLAGS_SAVE=$LDFLAGS -+ if test "x$ax_boost_user_system_lib" = "x"; then -+ for libextension in `ls $BOOSTLIBDIR/libboost_system*.a* $BOOSTLIBDIR/libboost_system*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.\(so\|a\).*$;\1;' | tac` ; do -+ ax_lib=${libextension} -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], -+ [link_system="no"]) -+ done -+ if test "x$link_system" != "xyes"; then -+ for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.\(dll\|a\).*$;\1;' | tac` ; do -+ ax_lib=${libextension} -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], -+ [link_system="no"]) -+ done -+ fi -+ -+ else -+ for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], -+ [link_system="no"]) -+ done -+ -+ fi -+ if test "x$ax_lib" = "x"; then -+ AC_MSG_ERROR(Could not find a version of the library!) -+ fi -+ if test "x$link_system" = "xno"; then -+ AC_MSG_ERROR(Could not link against $ax_lib !) -+ fi -+ fi -+ -+ CPPFLAGS="$CPPFLAGS_SAVED" -+ LDFLAGS="$LDFLAGS_SAVED" -+ fi -+]) -diff --git a/src/liborcus/Makefile.am b/src/liborcus/Makefile.am -index dfdac4d..767781b 100644 ---- a/src/liborcus/Makefile.am -+++ b/src/liborcus/Makefile.am -@@ -79,9 +79,11 @@ liborcus_@ORCUS_API_VERSION@_la_SOURCES += \ - liborcus_@ORCUS_API_VERSION@_la_CXXFLAGS = \ - $(LIBZIP_CFLAGS) \ -- $(LIBIXION_CFLAGS) -+ $(LIBIXION_CFLAGS) \ -+ $(BOOST_SYSTEM_CFLAGS) - liborcus_@ORCUS_API_VERSION@_la_LDFLAGS = -no-undefined - liborcus_@ORCUS_API_VERSION@_la_LIBADD = \ - $(LIBZIP_LIBS) \ -- $(LIBIXION_LIBS) -+ $(LIBIXION_LIBS) \ -+ $(BOOST_SYSTEM_LIBS) $(BOOST_SYSTEM_LIB) - - TESTS = liborcus-test-xml-map-tree --- -1.7.11.4 - diff --git a/liborcus.spec b/liborcus.spec index 1c1ea4f..1ecaaf8 100644 --- a/liborcus.spec +++ b/liborcus.spec @@ -1,5 +1,5 @@ Name: liborcus -Version: 0.1.0 +Version: 0.3.0 Release: 1%{?dist} Summary: Standalone file import filter library for spreadsheet documents @@ -7,17 +7,12 @@ Group: System Environment/Libraries License: MIT URL: http://gitorious.org/orcus Source: http://kohei.us/files/orcus/src/%{name}_%{version}.tar.bz2 -Patch0: 0001-link-with-Boost.System-if-needed.patch # libs BuildRequires: boost-devel BuildRequires: mdds-devel BuildRequires: zlib-devel -# build tools -BuildRequires: autoconf -BuildRequires: automake - %description %{name} is a standalone file import filter library for spreadsheet documents. Currently under development are ODS, XLSX and CSV import @@ -43,13 +38,9 @@ Tools for working with Orcus. %prep %setup -q -n %{name}_%{version} -%patch0 -p1 %build -aclocal -I m4 -autoconf -automake # TODO spreadsheet-model requires ixion %configure --disable-debug --disable-static --disable-werror --with-pic \ --disable-spreadsheet-model --without-libzip @@ -73,19 +64,22 @@ rm -f %{buildroot}/%{_libdir}/*.la %files %doc AUTHORS -%{_libdir}/%{name}-0.2.so.* +%{_libdir}/%{name}-0.4.so.* %files devel -%{_includedir}/%{name}-0.2 -%{_libdir}/%{name}-0.2.so -%{_libdir}/pkgconfig/%{name}-0.2.pc +%{_includedir}/%{name}-0.4 +%{_libdir}/%{name}-0.4.so +%{_libdir}/pkgconfig/%{name}-0.4.pc %files tools -%{_bindir}/orcus-format-xml +%{_bindir}/orcus-xml-dump %changelog +* Fri Dec 07 2012 David Tardon - 0.3.0-1 +- new release + * Sun Sep 09 2012 David Tardon - 0.1.0-1 - initial import diff --git a/sources b/sources index 83a3cae..58439a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -46d9f4cf8b145c21ce1056e116d2ce71 liborcus_0.1.0.tar.bz2 +8755aac23317494a9028569374dc87b2 liborcus_0.3.0.tar.bz2