* distrib/rpm/olena-1.0-linkage.patch, * distrib/rpm/olena-1.0-subdirs.patch, * distrib/rpm/olena-2.0-tesseract-3.01.patch: New.
* distrib/rpm/olena.spec: Update to support Olena 2.0. --- ChangeLog | 10 +++ distrib/rpm/olena-1.0-linkage.patch | 14 +++++ distrib/rpm/olena-1.0-subdirs.patch | 35 ++++++++++++ distrib/rpm/olena-2.0-tesseract-3.01.patch | 66 ++++++++++++++++++++++ distrib/rpm/olena.spec | 83 +++++++++++++++++++++------ 5 files changed, 189 insertions(+), 19 deletions(-) create mode 100644 distrib/rpm/olena-1.0-linkage.patch create mode 100644 distrib/rpm/olena-1.0-subdirs.patch create mode 100644 distrib/rpm/olena-2.0-tesseract-3.01.patch
diff --git a/ChangeLog b/ChangeLog index 95c83b4..aae6f78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2013-04-10 Guillaume Lazzara z@lrde.epita.fr
+ Update spec file for Olena 2.0. + + * distrib/rpm/olena-1.0-linkage.patch, + * distrib/rpm/olena-1.0-subdirs.patch, + * distrib/rpm/olena-2.0-tesseract-3.01.patch: New. + + * distrib/rpm/olena.spec: Update to support Olena 2.0. + +2013-04-10 Guillaume Lazzara z@lrde.epita.fr + * distrib/rpm/olena.spec: New.
2012-06-07 Guillaume Lazzara z@lrde.epita.fr diff --git a/distrib/rpm/olena-1.0-linkage.patch b/distrib/rpm/olena-1.0-linkage.patch new file mode 100644 index 0000000..dcd3949 --- /dev/null +++ b/distrib/rpm/olena-1.0-linkage.patch @@ -0,0 +1,14 @@ +--- external/trimesh/gluit/Makefile.am.link 2010-05-08 17:08:54.000000000 +0200 ++++ external/trimesh/gluit/Makefile.am 2010-05-08 17:10:33.000000000 +0200 +@@ -20,10 +20,10 @@ + # Find config.h. + AM_CPPFLAGS = -I$(top_builddir) + AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/include/GL +-AM_LDFLAGS = -lGL -lGLU -lX11 + + lib_LTLIBRARIES = libgluit.la + ++libgluit_la_LIBADD = -lGL -lGLU -lX11 -lxcb + libgluit_la_SOURCES = \ + glui_algebra3.h \ + glui_arcball.h \ \ No newline at end of file diff --git a/distrib/rpm/olena-1.0-subdirs.patch b/distrib/rpm/olena-1.0-subdirs.patch new file mode 100644 index 0000000..8488bdf --- /dev/null +++ b/distrib/rpm/olena-1.0-subdirs.patch @@ -0,0 +1,35 @@ +--- milena/Makefile.am.new 2009-09-14 15:10:30.000000000 -0300 ++++ milena/Makefile.am 2009-09-14 15:10:55.000000000 -0300 +@@ -19,7 +19,6 @@ + ## Process this file through Automake to create Makefile.in. + + SUBDIRS = \ +- doc \ + mesh \ + tests + +@@ -31,14 +30,7 @@ + SUBDIRS += tools + endif ENABLE_TOOLS + +-.PHONY: doc tutorial pretty-check tests +- +-doc: +- cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ +- +-# FIXME: This target has no trigger in the top-level. +-tutorial: +- cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ ++.PHONY: tutorial pretty-check tests + + pretty-check: + cd tests && $(MAKE) $(AM_MAKEFLAGS) $@ +@@ -48,7 +40,7 @@ + + # Regen files recursively. + include $(top_srcdir)/build-aux/regen-recursive.mk +-REGEN_SUBDIRS += doc tests ++REGEN_SUBDIRS += tests + + # Force the regeneration of `headers.mk'. + # diff --git a/distrib/rpm/olena-2.0-tesseract-3.01.patch b/distrib/rpm/olena-2.0-tesseract-3.01.patch new file mode 100644 index 0000000..eb1350f --- /dev/null +++ b/distrib/rpm/olena-2.0-tesseract-3.01.patch @@ -0,0 +1,66 @@ +Index: scribo/scribo/text/recognition.hh +=================================================================== +--- scribo/scribo/text/recognition.hh (revision dd1061b049328e5e45cb02150ec01aa9c9d3dd66) ++++ scribo/scribo/text/recognition.hh (revision 3b03179e7f4d5bd9354bdfbcc897dfd47968fe05) +@@ -113,5 +113,5 @@ + # else // HAVE_TESSERACT_3 + tesseract::TessBaseAPI tess; +- if (tess.Init(NULL, language, NULL, 0, false) == -1) ++ if (tess.Init(NULL, language, tesseract::OEM_DEFAULT) == -1) + { + std::cout << "Error: cannot initialize tesseract!" << std::endl; +@@ -221,5 +221,5 @@ + # else // HAVE_TESSERACT_3 + tesseract::TessBaseAPI tess; +- if (tess.Init(NULL, language, NULL, 0, false) == -1) ++ if (tess.Init(NULL, language, tesseract::OEM_DEFAULT) == -1) + { + std::cout << "Error: cannot initialize tesseract!" << std::endl; + +Index: m4/oln-with-lib.m4 +=================================================================== +--- m4/oln-with-lib.m4 (revision 40966ccf914d0289ee0e84c049b06f3606af738e) ++++ m4/oln-with-lib.m4 (revision b340c526ae583ce7be9ea28b63bf98f25aae1add) +@@ -1,6 +1,6 @@ + # -*- Autoconf -*- + +-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +-# (LRDE) ++# Copyright (C) 2009, 2010, 2011 EPITA Research and Development ++# Laboratory (LRDE) + # + # This file is part of Olena. +@@ -84,17 +84,25 @@ + + if test "x$with_tesseract" != xno; then +- # Checking for Tesseract 3.x +- _OLN_WITH_LIB_SHARED_IMPL([TESSERACT], [tesseract/baseapi.h], [tesseract_api], ++ # Checking for Tesseract 3.x (single lib) ++ _OLN_WITH_LIB_SHARED_IMPL([TESSERACT], [tesseract/baseapi.h], [tesseract], + [tesseract], [TESSERACT_3], []) + + if test x$oln_have_tesseract != xyes; then +- # Tesseract 2.x not found, checking for Tesseract 2.x +- _OLN_WITH_LIB_SHARED_IMPL([TESSERACT], [tesseract/baseapi.h], [tesseract_full], ++ # Checking for Tesseract 3.x (multiple lib) ++ _OLN_WITH_LIB_SHARED_IMPL([TESSERACT], [tesseract/baseapi.h], [tesseract_api], ++ [tesseract], [TESSERACT_3], []) ++ if test x$oln_have_tesseract != xyes; then ++ # Tesseract 3.x not found, checking for Tesseract 2.x ++ _OLN_WITH_LIB_SHARED_IMPL([TESSERACT], [tesseract/baseapi.h], [tesseract_full], + [tesseract], [TESSERACT_2], []) +- TESSERACT_CPPFLAGS="$TESSERACT_2_CPPFLAGS -DHAVE_TESSERACT_2" +- TESSERACT_LDFLAGS=$TESSERACT_2_LDFLAGS ++ TESSERACT_CPPFLAGS="$TESSERACT_2_CPPFLAGS -DHAVE_TESSERACT_2" ++ TESSERACT_LDFLAGS=$TESSERACT_2_LDFLAGS ++ else ++ TESSERACT_CPPFLAGS="$TESSERACT_3_CPPFLAGS -DHAVE_TESSERACT_3" ++ TESSERACT_LDFLAGS=$TESSERACT_3_LDFLAGS ++ fi + else +- TESSERACT_CPPFLAGS="$TESSERACT_3_CPPFLAGS -DHAVE_TESSERACT_3" +- TESSERACT_LDFLAGS=$TESSERACT_3_LDFLAGS ++ TESSERACT_CPPFLAGS="$TESSERACT_3_CPPFLAGS -DHAVE_TESSERACT_3" ++ TESSERACT_LDFLAGS=$TESSERACT_3_LDFLAGS + fi + fi \ No newline at end of file diff --git a/distrib/rpm/olena.spec b/distrib/rpm/olena.spec index 37d285f..4bef325 100644 --- a/distrib/rpm/olena.spec +++ b/distrib/rpm/olena.spec @@ -1,9 +1,10 @@ %bcond_with apps -%bcond_with doc +%bcond_without doc +%bcond_without scribo
Name: olena -Version: 1.0 -Release: %mkrel 4 +Version: 2.0 +Release: 3 Epoch: 2 License: GPLv2 Summary: Olena is a platform dedicated to image processing @@ -12,6 +13,8 @@ URL: http://www.lrde.epita.fr/cgi-bin/twiki/view/Olena/WebHome # Get from https://svn.lrde.epita.fr/svn/oln/tags/olena-1.0 to have scribo Source0: %name-%version.tar.bz2 Patch0: olena-1.0-subdirs.patch +Patch1: olena-1.0-linkage.patch +Patch2: olena-2.0-tesseract-3.01.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: cfitsio-devel BuildRequires: tiff-devel @@ -19,8 +22,13 @@ BuildRequires: imagemagick-devel BuildRequires: mesaglut-devel BuildRequires: mesagl-devel BuildRequires: vtk-devel -BuildRequires: gdcm-devel +%if %with scribo BuildRequires: tesseract-devel >= 2.04-3 +%endif +BuildRequires: imagemagick +BuildRequires: texlive-latex texlive-dvips +BuildRequires: latex2html +BuildRequires: doxygen
%description Olena is a platform dedicated to image processing. At the @@ -46,7 +54,6 @@ its genericity: it allows to write an algorithm once and run it over many kinds of images (grey scale, color, 1D, 2D, 3D, ...).
%files doc -%defattr(-,root,root,-) %_docdir/olena
%endif @@ -65,9 +72,11 @@ its genericity: it allows to write an algorithm once and run it over many kinds of images (grey scale, color, 1D, 2D, 3D, ...).
%files tools -%defattr(-,root,root,-) %_bindir/* -%_datadir/olena/images +%_datadir/olena +%if %with scribo +%_libdir/scribo/* +%endif
#------------------------------------------------------------------------------
@@ -97,7 +106,6 @@ Group: Development/C++ trimesh C++ main Olena library.
%files -n %{libtrimesh} -%defattr(-,root,root,-) %{_libdir}/libtrimesh.so.%{tri_major}*
#------------------------------------------------------------------------------ @@ -118,44 +126,81 @@ its genericity: it allows to write an algorithm once and run it over many kinds of images (grey scale, color, 1D, 2D, 3D, ...).
%files devel -%defattr(-,root,root,-) %{_libdir}/*.so %{_libdir}/*.la %{_includedir}/* -%exclude %_libdir/*.a +%_libdir/*.a
#------------------------------------------------------------------------------
%prep %setup -q +%patch1 -p0 +%patch2 %if ! %with doc %patch0 -p0 -b .orig +autoreconf -fi %endif +pushd external/trimesh +autoreconf -fi +popd
%build -CXXFLAGS="$CXXFLAGS -I%{_includedir}/ImageMagick" -export CPPFLAGS CXXFLAGS - %configure2_5x \ +%if %with scribo --enable-scribo \ +%endif --enable-trimesh \ %if %with apps --enable-apps \ %endif --enable-tools
+pushd external/trimesh +%configure2_5x +popd + %make
%install -rm -rf %{buildroot} %makeinstall_std
-%clean -rm -rf %buildroot -
%changelog +* Thu Dec 01 2011 Dmitry Mikhirev dmikhirev@mandriva.org 2:2.0-3 ++ Revision: 735945 +- Fixed compatibility to tesseract 3.01 + +* Wed Nov 09 2011 Andrey Smirnov asmirnov@mandriva.org 2:2.0-2 ++ Revision: 729310 +- Disable scribo until compatibility with current tesseract fixed + +* Wed Oct 05 2011 Nicolas Lécureuil nlecureuil@mandriva.com 2:2.0-1 ++ Revision: 703157 +- Fix file list +- Install .a files +- Clean spec file +- New version 2.0 + + + Oden Eriksson oeriksson@mandriva.com + - rebuild + + + Pascal Terjan pterjan@mandriva.org + - Drop require on gdcm-devel for now : + - It is in contribs + - It is unused now (configure does not find it) + +* Sat May 08 2010 Funda Wang fwang@mandriva.org 2:1.0-6mdv2010.1 ++ Revision: 543630 +- fix link +- more BRs +- add BR +- add convert BR + + + Oden Eriksson oeriksson@mandriva.com + - rebuilt for 2010.1 + * Wed Sep 23 2009 Helio Chissini de Castro helio@mandriva.com 2:1.0-4mdv2010.0 + Revision: 448013 - Respect description, as requested in Mandriva bug #53959 @@ -177,5 +222,5 @@ rm -rf %buildroot + Revision: 421273 - imported package olena
- + Nicolas Lécureuil neoclust@mandriva.org - - import olena \ No newline at end of file + + Nicolas Lécureuil nlecureuil@mandriva.com + - import olena