diff --git a/2.8.0.tar.gz b/2.8.0.tar.gz deleted file mode 100644 index e3346e1..0000000 Binary files a/2.8.0.tar.gz and /dev/null differ diff --git a/3.2.7.tar.gz b/3.2.7.tar.gz new file mode 100644 index 0000000..ecdf378 Binary files /dev/null and b/3.2.7.tar.gz differ diff --git a/PEGTL.spec b/PEGTL.spec index bfccfdb..ff1b8e3 100644 --- a/PEGTL.spec +++ b/PEGTL.spec @@ -1,17 +1,15 @@ %global debug_package %{nil} Name: PEGTL -Version: 2.8.0 -Release: 3 +Version: 3.2.7 +Release: 1 Summary: Parsing Expression Grammar Template Library License: MIT URL: https://github.com/taocpp/PEGTL/ Source0: https://github.com/taocpp/%{name}/archive/%{version}.tar.gz BuildRequires: gcc-c++ -BuildRequires: make - -Patch0001: bugfix-gcc-10.patch +BuildRequires: make cmake %description The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency @@ -30,24 +28,34 @@ applications that use %{name}. %prep %setup -q -n %{name}-%{version} -%patch0001 -p1 + +%build +%cmake \ + -DPEGTL_INSTALL_DOC_DIR:PATH=%{_defaultdocdir}/pegtl \ + -DPEGTL_INSTALL_CMAKE_DIR:PATH=%{_datadir}/cmake/Modules \ + -DPEGTL_BUILD_EXAMPLES:BOOL=OFF \ + -DPEGTL_BUILD_TESTS:BOOL=ON + +%make_build %check -make +/usr/bin/ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %install -install -d -m 0755 %{buildroot}%{_includedir} -pushd include/ -cp -R tao/ %{buildroot}%{_includedir} -popd +%make_install +rm %{buildroot}%{_defaultdocdir}/pegtl/LICENSE %files devel %doc README.md doc/ %license LICENSE -%{_includedir}/tao/pegtl.hpp -%{_includedir}/tao/pegtl +%{_includedir}/* +%{_datadir}/cmake/Modules + %changelog +* Thu Sep 14 2023 liyanan - 3.2.7-1 +- update to 3.2.7 + * Mon Aug 2 2021 Shenmei Tu - 2.8.0-3 - bugfix-gcc-10.patch diff --git a/bugfix-gcc-10.patch b/bugfix-gcc-10.patch deleted file mode 100644 index bcc030d..0000000 --- a/bugfix-gcc-10.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nur PEGTL-2.8.0/include/tao/pegtl/contrib/rep_one_min_max.hpp PEGTL-2.8.0-new/include/tao/pegtl/contrib/rep_one_min_max.hpp ---- PEGTL-2.8.0/include/tao/pegtl/contrib/rep_one_min_max.hpp 2019-04-10 02:27:36.000000000 +0800 -+++ PEGTL-2.8.0-new/include/tao/pegtl/contrib/rep_one_min_max.hpp 2021-08-02 10:13:41.000000000 +0800 -@@ -1,4 +1,4 @@ --// Copyright (c) 2017-2019 Dr. Colin Hirsch and Daniel Frey -+// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey - // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ - - #ifndef TAO_PEGTL_CONTRIB_REP_ONE_MIN_MAX_HPP -@@ -41,6 +41,27 @@ - bump_help< result_on_found::success, Input, char, C >( in, i ); - return true; - } -+ return false; -+ } -+ }; -+ -+ template< unsigned Max, char C > -+ struct rep_one_min_max< 0, Max, C > -+ { -+ using analyze_t = analysis::counted< analysis::rule_type::any, 0 >; -+ -+ template< typename Input > -+ static bool match( Input& in ) -+ { -+ const auto size = in.size( Max + 1 ); -+ std::size_t i = 0; -+ while( ( i < size ) && ( in.peek_char( i ) == C ) ) { -+ ++i; -+ } -+ if( i <= Max ) { -+ bump_help< result_on_found::success, Input, char, C >( in, i ); -+ return true; -+ } - return false; - } - };