[packages/libcutl] - new

qboosh qboosh at pld-linux.org
Sun Feb 11 21:13:01 CET 2024


commit 347009d57d22743f9d2c31079d7b7017dbdc04f3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 11 21:01:55 2024 +0100

    - new

 libcutl-boost.patch | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 libcutl.spec        | 110 ++++++++++++++++++++++++++++++++++
 2 files changed, 279 insertions(+)
---
diff --git a/libcutl.spec b/libcutl.spec
new file mode 100644
index 0000000..dd7e117
--- /dev/null
+++ b/libcutl.spec
@@ -0,0 +1,110 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static libraries
+#
+Summary:	C++ utility library
+Summary(pl.UTF-8):	Biblioteka narzędziowa C++
+Name:		libcutl
+Version:	1.10.0
+Release:	1
+License:	MIT (with Boost fragments)
+Group:		Libraries
+Source0:	https://www.codesynthesis.com/download/libcutl/1.10/%{name}-%{version}.tar.bz2
+# Source0-md5:	462930494a5e7094ea14b00f3767f6af
+Patch0:		%{name}-boost.patch
+URL:		https://www.codesynthesis.com/projects/libcutl/
+BuildRequires:	autoconf >= 2.60
+BuildRequires:	automake
+BuildRequires:	boost-devel >= 1.54.0
+BuildRequires:	expat-devel >= 1.95
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:2
+BuildRequires:	pkgconfig
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libcutl is a C++ utility library. It contains a collection of generic
+and fairly independent components.
+
+%description -l pl.UTF-8
+libcutl to biblioteka narzędziowa C++. Zawiera zbiór ogólnych i w
+miarę niezależnych komponentów.
+
+%package devel
+Summary:	Header files for cutl library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki cutl
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	boost-devel >= 1.54.0
+Requires:	libstdc++-devel
+
+%description devel
+Header files for cutl library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki cutl.
+
+%package static
+Summary:	Static cutl library
+Summary(pl.UTF-8):	Statyczna biblioteka cutl
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static cutl library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka cutl.
+
+%prep
+%setup -q
+%patch0 -p1
+
+# boost (as of 1.82) includes C++ <version> header; take out version file from include path
+%{__mv} version version.txt
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	%{!?with_static_libs:--disable-static} \
+	--with-external-boost \
+	--with-external-expat
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcutl.la
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libcutl
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE NEWS README
+%attr(755,root,root) %{_libdir}/libcutl-1.10.so
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcutl.so
+%{_includedir}/cutl
+%{_pkgconfigdir}/libcutl.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libcutl.a
+%endif
diff --git a/libcutl-boost.patch b/libcutl-boost.patch
new file mode 100644
index 0000000..cedcc76
--- /dev/null
+++ b/libcutl-boost.patch
@@ -0,0 +1,169 @@
+--- libcutl-1.10.0/m4/libboost.m4.orig	2013-02-09 09:10:00.000000000 +0100
++++ libcutl-1.10.0/m4/libboost.m4	2024-02-11 20:37:58.218627499 +0100
+@@ -129,13 +129,13 @@ dnl
+ AC_DEFUN([LIBBOOST_REGEX], [
+ LIBBOOST_LIB([regex],[
+ AC_LANG_SOURCE([
+-#include <boost/tr1/regex.hpp>
++#include <boost/regex.hpp>
+ 
+ int
+ main ()
+ {
+-  std::tr1::regex r ("te.t", std::tr1::regex_constants::ECMAScript);
+-  return std::tr1::regex_match ("test", r) ? 0 : 1;
++  boost::regex r ("te.t", boost::regex_constants::ECMAScript);
++  return boost::regex_match ("test", r) ? 0 : 1;
+ }
+ ])],
+ [$1],
+--- libcutl-1.10.0/cutl/re/re.cxx.orig	2013-04-10 18:53:19.000000000 +0200
++++ libcutl-1.10.0/cutl/re/re.cxx	2024-02-11 20:49:24.151578148 +0100
+@@ -9,7 +9,7 @@
+ #ifndef LIBCUTL_EXTERNAL_BOOST
+ #  include <cutl/details/boost/tr1/regex.hpp>
+ #else
+-#  include <boost/tr1/regex.hpp>
++#  include <boost/regex.hpp>
+ #endif
+ 
+ using namespace std;
+@@ -40,17 +40,17 @@ namespace cutl
+     struct basic_regex<C>::impl
+     {
+       typedef basic_string<C> string_type;
+-      typedef tr1::basic_regex<C> regex_type;
++      typedef boost::basic_regex<C> regex_type;
+       typedef typename regex_type::flag_type flag_type;
+ 
+       impl () {}
+       impl (regex_type const& r): r (r) {}
+       impl (string_type const& s, bool icase)
+       {
+-        flag_type f (tr1::regex_constants::ECMAScript);
++        flag_type f (boost::regex_constants::ECMAScript);
+ 
+         if (icase)
+-          f |= tr1::regex_constants::icase;
++          f |= boost::regex_constants::icase;
+ 
+         r.assign (s, f);
+       }
+@@ -118,15 +118,15 @@ namespace cutl
+           impl_ = s == 0 ? new impl : new impl (*s, icase);
+         else
+         {
+-          impl::flag_type f (tr1::regex_constants::ECMAScript);
++          impl::flag_type f (boost::regex_constants::ECMAScript);
+ 
+           if (icase)
+-            f |= tr1::regex_constants::icase;
++            f |= boost::regex_constants::icase;
+ 
+           impl_->r.assign (*s, f);
+         }
+       }
+-      catch (tr1::regex_error const& e)
++      catch (boost::regex_error const& e)
+       {
+         throw basic_format<char> (s == 0 ? "" : *s, e.what ());
+       }
+@@ -146,15 +146,15 @@ namespace cutl
+           impl_ = s == 0 ? new impl : new impl (*s, icase);
+         else
+         {
+-          impl::flag_type f (tr1::regex_constants::ECMAScript);
++          impl::flag_type f (boost::regex_constants::ECMAScript);
+ 
+           if (icase)
+-            f |= tr1::regex_constants::icase;
++            f |= boost::regex_constants::icase;
+ 
+           impl_->r.assign (*s, f);
+         }
+       }
+-      catch (tr1::regex_error const& e)
++      catch (boost::regex_error const& e)
+       {
+         throw basic_format<wchar_t> (s == 0 ? L"" : *s, e.what ());
+       }
+@@ -166,28 +166,28 @@ namespace cutl
+     bool basic_regex<char>::
+     match (string_type const& s) const
+     {
+-      return tr1::regex_match (s, impl_->r);
++      return boost::regex_match (s, impl_->r);
+     }
+ 
+     template <>
+     bool basic_regex<wchar_t>::
+     match (string_type const& s) const
+     {
+-      return tr1::regex_match (s, impl_->r);
++      return boost::regex_match (s, impl_->r);
+     }
+ 
+     template <>
+     bool basic_regex<char>::
+     search (string_type const& s) const
+     {
+-      return tr1::regex_search (s, impl_->r);
++      return boost::regex_search (s, impl_->r);
+     }
+ 
+     template <>
+     bool basic_regex<wchar_t>::
+     search (string_type const& s) const
+     {
+-      return tr1::regex_search (s, impl_->r);
++      return boost::regex_search (s, impl_->r);
+     }
+ 
+     template <>
+@@ -196,13 +196,13 @@ namespace cutl
+              string_type const& sub,
+              bool first_only) const
+     {
+-      tr1::regex_constants::match_flag_type f (
+-        tr1::regex_constants::format_default);
++      boost::regex_constants::match_flag_type f (
++        boost::regex_constants::format_default);
+ 
+       if (first_only)
+-        f |= tr1::regex_constants::format_first_only;
++        f |= boost::regex_constants::format_first_only;
+ 
+-      return tr1::regex_replace (s, impl_->r, sub, f);
++      return boost::regex_replace (s, impl_->r, sub, f);
+     }
+ 
+     template <>
+@@ -211,13 +211,13 @@ namespace cutl
+              string_type const& sub,
+              bool first_only) const
+     {
+-      tr1::regex_constants::match_flag_type f (
+-        tr1::regex_constants::format_default);
++      boost::regex_constants::match_flag_type f (
++        boost::regex_constants::format_default);
+ 
+       if (first_only)
+-        f |= tr1::regex_constants::format_first_only;
++        f |= boost::regex_constants::format_first_only;
+ 
+-      return tr1::regex_replace (s, impl_->r, sub, f);
++      return boost::regex_replace (s, impl_->r, sub, f);
+     }
+   }
+ }
+--- libcutl-1.10.0/Makefile.am.orig	2015-11-24 14:45:49.000000000 +0100
++++ libcutl-1.10.0/Makefile.am	2024-02-11 20:55:18.206326734 +0100
+@@ -3,7 +3,7 @@
+ # license   : MIT; see accompanying LICENSE file
+ 
+ SUBDIRS = cutl
+-dist_doc_DATA = LICENSE NEWS README INSTALL version
++dist_doc_DATA = LICENSE NEWS README INSTALL version.txt
+ EXTRA_DIST = libcutl-vc9.sln libcutl-vc10.sln bootstrap
+ ACLOCAL_AMFLAGS = -I m4
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libcutl.git/commitdiff/347009d57d22743f9d2c31079d7b7017dbdc04f3



More information about the pld-cvs-commit mailing list