summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-08-11 10:05:29 +0000
committerCoprDistGit <infra@openeuler.org>2025-08-11 10:05:29 +0000
commit21b64b2265f9d1aee5b0bb398363496119fb528a (patch)
tree68c0fab7daba594b84beb465286cfb5f7f49c8ad
parent6fac807048db9d5a7f5c09a6cf5fb8eb49dcb808 (diff)
automatic import of PEGTLopeneuler25.03
-rw-r--r--.gitignore1
-rw-r--r--PEGTL-compiler-warning.patch32
-rw-r--r--PEGTL.spec77
-rw-r--r--sources1
4 files changed, 111 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e3f86ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/PEGTL-2.8.3.tar.gz
diff --git a/PEGTL-compiler-warning.patch b/PEGTL-compiler-warning.patch
new file mode 100644
index 0000000..d8bf7d7
--- /dev/null
+++ b/PEGTL-compiler-warning.patch
@@ -0,0 +1,32 @@
+diff --git a/include/tao/pegtl/contrib/rep_one_min_max.hpp b/include/tao/pegtl/contrib/rep_one_min_max.hpp
+index 9173ad4a..2c9c25e6 100644
+--- a/include/tao/pegtl/contrib/rep_one_min_max.hpp
++++ b/include/tao/pegtl/contrib/rep_one_min_max.hpp
+@@ -45,6 +45,27 @@ namespace tao
+ }
+ };
+
++ 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;
++ }
++ };
++
+ template< unsigned Min, unsigned Max, char C >
+ struct skip_control< rep_one_min_max< Min, Max, C > > : std::true_type
+ {
diff --git a/PEGTL.spec b/PEGTL.spec
new file mode 100644
index 0000000..708bae0
--- /dev/null
+++ b/PEGTL.spec
@@ -0,0 +1,77 @@
+%global debug_package %{nil}
+
+Name: PEGTL
+Version: 2.8.3
+Release: 1
+Summary: Parsing Expression Grammar Template Library
+License: MIT
+URL: https://github.com/taocpp/%{name}
+Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
+
+Patch: PEGTL-compiler-warning.patch
+
+BuildRequires: gcc-c++
+BuildRequires: cmake
+BuildRequires: ninja-build
+
+%description
+The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency
+C++11 header-only library for creating parsers according to a Parsing
+Expression Grammar (PEG).
+
+%package devel
+Summary: Development files for %{name}
+Provides: %{name}-static = %{version}-%{release}
+Provides: %{name} = %{version}-%{release}
+Requires: libstdc++-devel
+
+%description devel
+The %{name}-devel package contains C++ header files for developing
+applications that use %{name}.
+
+%prep
+%autosetup -p1
+
+%build
+%cmake \
+ -DPEGTL_INSTALL_INCLUDE_DIR:PATH='%{_includedir}' \
+ -DPEGTL_INSTALL_DOC_DIR:PATH='%{_pkgdocdir}' \
+ -DPEGTL_INSTALL_CMAKE_DIR:PATH='%{_datadir}/cmake/pegtl' \
+ -GNinja
+%cmake_build
+
+%install
+%cmake_install
+rm -rv %{buildroot}%{_pkgdocdir}
+
+%check
+%ctest
+
+%files devel
+%doc README.md doc/
+%license LICENSE
+%{_includedir}/tao/pegtl.hpp
+%{_includedir}/tao/pegtl/
+%{_datadir}/cmake/pegtl/
+
+%changelog
+* Tue Aug 5 2025 mimanchiok <mimanchiok@qq.com> - 2.8.3-1
+- downgrade 2.8.3
+
+* Wed Jan 01 2025 Funda Wang <fundawang@yeah.net> - 3.2.8-1
+- update to 3.2.8
+
+* Mon Nov 04 2024 Funda Wang <fundawang@yeah.net> - 3.2.7-3
+- adopt to cmake macro change
+
+* Mon Oct 28 2024 Funda Wang <fundawang@yeah.net> - 3.2.7-2
+- adopt to cmake macro change
+
+* Thu Sep 14 2023 liyanan <thistleslyn@163.com> - 3.2.7-1
+- update to 3.2.7
+
+* Mon Aug 2 2021 Shenmei Tu <tushenmei@huawei.com> - 2.8.0-3
+- bugfix-gcc-10.patch
+
+* Sat Jul 18 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 2.8.0-2
+- Package init
diff --git a/sources b/sources
new file mode 100644
index 0000000..69fa08e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+28b3c455d9ec392dd4230402383a8c6f PEGTL-2.8.3.tar.gz