From fa65765c04694eca2e794d0e55f5629ce7b7ec6a Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 25 Dec 2024 21:43:31 +0300 Subject: [PATCH] import ragel-7.0.4-5.el10 --- .gitignore | 1 + .ragel.metadata | 1 + SOURCES/ragel-fallback-no-la.diff | 43 +++++ SOURCES/ragel-use-libdir.diff | 38 +++++ SPECS/ragel.spec | 266 ++++++++++++++++++++++++++++++ 5 files changed, 349 insertions(+) create mode 100644 .gitignore create mode 100644 .ragel.metadata create mode 100644 SOURCES/ragel-fallback-no-la.diff create mode 100644 SOURCES/ragel-use-libdir.diff create mode 100644 SPECS/ragel.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..32d4cbf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ragel-7.0.4.tar.gz diff --git a/.ragel.metadata b/.ragel.metadata new file mode 100644 index 0000000..98f9258 --- /dev/null +++ b/.ragel.metadata @@ -0,0 +1 @@ +6bb3fbd35d94e4c05f251b4981ad1779835ecd80 SOURCES/ragel-7.0.4.tar.gz diff --git a/SOURCES/ragel-fallback-no-la.diff b/SOURCES/ragel-fallback-no-la.diff new file mode 100644 index 0000000..c419839 --- /dev/null +++ b/SOURCES/ragel-fallback-no-la.diff @@ -0,0 +1,43 @@ +From 463f4914057b0193c6ca025e9233c17035bc0448 Mon Sep 17 00:00:00 2001 +From: Adrian Thurston +Date: Sun, 12 Mar 2023 13:24:22 -0700 +Subject: [PATCH] fallback to AC_CHECK_LIB for libcolm and libfsm + +If the .la files for libcolm and libfsm are not present then fallback to using +AC_CHECK_LIB for these libraries. Many packaging systems strip out .la files so +we need to still be able to link if they are not there. +--- + configure.ac | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/configure.ac b/configure.ac +index e1a0fc67..07a2b075 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -59,6 +59,26 @@ AC_CHECK_FILES( + [], + [AC_ERROR([colm is required to build ragel])] + ) ++ ++dnl If the .la files are present use those, otherwise locate the libs with AC_CHECK_LIB. ++AC_CHECK_FILES( ++ [$LIBCOLM_LA $LIBFSM_LA], ++ [], ++ [ ++ AC_CHECK_LIB( ++ [colm], ++ [colm_run_program], ++ [LIBCOLM_LA=-lcolm], ++ [AC_ERROR([libcolm is required to build ragel])] ++ ) ++ AC_CHECK_LIB( ++ [fsm], ++ [libfsm_present], ++ [LIBFSM_LA=-lfsm], ++ [AC_ERROR([libfsm is required to build ragel])] ++ ) ++ ] ++) + AC_SUBST(COLM) + AC_SUBST(COLM_WRAP) + AC_SUBST(COLM_SHARE) diff --git a/SOURCES/ragel-use-libdir.diff b/SOURCES/ragel-use-libdir.diff new file mode 100644 index 0000000..3be5973 --- /dev/null +++ b/SOURCES/ragel-use-libdir.diff @@ -0,0 +1,38 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -46,9 +46,9 @@ AC_ARG_WITH(colm, + COLM_WRAP="$withval/bin/colm-wrap" + CPPFLAGS="-I$withval/include ${CPPFLAGS}" + CPPFLAGS="-I$withval/include/aapl ${CPPFLAGS}" +- LDFLAGS="-L$withval/lib ${LDFLAGS}" +- LIBCOLM_LA="$withval/lib/libcolm.la" +- LIBFSM_LA="$withval/lib/libfsm.la" ++ LDFLAGS="-L$libdir ${LDFLAGS}" ++ LIBCOLM_LA="$libdir/libcolm.la" ++ LIBFSM_LA="$libdir/libfsm.la" + COLM_SHARE="$withval/share" + ], + [] +@@ -209,11 +209,11 @@ AC_ARG_WITH(subject, + + SUBJ_COLM_BIN="${withval}/bin/colm" + SUBJ_COLM_CPPFLAGS="-I${withval}/include" +- SUBJ_COLM_LDFLAGS="-L${withval}/lib -Wl,-rpath,${withval}/lib" ++ SUBJ_COLM_LDFLAGS="-L${libdir} -Wl,-rpath,${libdir}" + + SUBJ_RAGEL_BIN="$withval/bin/ragel" + SUBJ_RAGEL_CPPFLAGS="-I$withval/include" +- SUBJ_RAGEL_LDFLAGS="-L$withval/lib -Wl,-rpath,${withval}/lib" ++ SUBJ_RAGEL_LDFLAGS="-L${libdir} -Wl,-rpath,${libdir}" + SUBJ_RAGEL_LM="${withval}/share" + + SUBJ_RAGEL_C_BIN="$withval/bin/ragel-c" +@@ -434,7 +434,7 @@ AC_ARG_WITH(colm, + [ + EXTERNAL_COLM="$withval" + EXTERNAL_INC="-I$withval/include" +- EXTERNAL_LIBS="-L$withval/lib" ++ EXTERNAL_LIBS="-L$withval/${libdir}" + AC_CHECK_FILES(["$EXTERNAL_COLM/bin/colm"], [], + [AC_ERROR(["could not find $EXTERNAL_COLM/bin/colm"])]) + ], diff --git a/SPECS/ragel.spec b/SPECS/ragel.spec new file mode 100644 index 0000000..34da8ee --- /dev/null +++ b/SPECS/ragel.spec @@ -0,0 +1,266 @@ +%bcond_with bootstrap + +Name: ragel +Version: 7.0.4 +Release: 5%{?dist} +Summary: Finite state machine compiler + +# aapl/ is the LGPLv2+ +License: MIT and LGPLv2+ +URL: http://www.colm.net/open-source/%{name}/ +Source0: https://www.colm.net/files/%{name}/%{name}-%{version}.tar.gz +# allow building without *.la for libcolm and libfsm +Patch: https://github.com/adrian-thurston/ragel/commit/463f4914057b0193c6ca025e9233c17035bc0448.patch#/ragel-fallback-no-la.diff +Patch: ragel-use-libdir.diff + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +# for manual +BuildRequires: asciidoc +BuildRequires: dblatex +BuildRequires: texlive-latex +BuildRequires: texlive-upquote +BuildRequires: transfig +%if %{with bootstrap} +BuildRequires: kelbt +BuildRequires: ragel +%endif +BuildRequires: colm-devel = 0.14.7 + +# Unfortunately, upstream doesn't exist and not possible to find version +Provides: bundled(aapl) +# ragel no longer ships include files since libfsm is moved to colm +Obsoletes: ragel-devel < 7.0.4-1 + +%description +Ragel compiles executable finite state machines from regular languages. +Ragel targets C, C++ and ASM. Ragel state machines can not only recognize +byte sequences as regular expression machines do, but can also execute code +at arbitrary points in the recognition of a regular language. Code embedding +is done using inline operators that do not disrupt the regular language syntax. + +%prep +%autosetup +# Do not pollute with docs +sed -i -e "/dist_doc_DATA/d" Makefile.am + +%build +autoreconf -vfi +%configure --disable-static --with-colm=%{_prefix} +%make_build + +%install +%make_install +find %{buildroot}%{_libdir} -type f -name '*.la' -print -delete +install -p -m 0644 -D %{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{name}.vim + +%ldconfig_scriptlets + +%files +%license COPYING +%doc ragel-guide.html ragel-guide.pdf +%{_bindir}/%{name} +%{_bindir}/%{name}-* +%{_mandir}/man1/%{name}.1* +%exclude %{_libdir}/libragel.so +%{_libdir}/libragel.so.* +%{_datarootdir}/%{name}.lm +%{_datarootdir}/out-go.lm +%dir %{_datadir}/vim +%dir %{_datadir}/vim/vimfiles +%dir %{_datadir}/vim/vimfiles/syntax +%{_datadir}/vim/vimfiles/syntax/%{name}.vim + +%changelog +* Wed Dec 25 2024 Arkady L. Shane - 7.0.4-5 +- Rebuilt for MSVSphere 10 + +* Fri Jul 19 2024 Fedora Release Engineering - 7.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 7.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 7.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 7.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Apr 25 2023 Michel Alexandre Salim - 7.0.4-1 +- Update to 7.0.4 for colm 0.14.7 + +* Fri Jan 20 2023 Fedora Release Engineering - 7.0.0.12-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 7.0.0.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 7.0.0.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 7.0.0.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 7.0.0.12-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 7.0.0.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 7.0.0.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jul 28 2019 Christian Glombek - 7.0.0.12-2 +- Explicitly require colm 0.13.07 for the build + +* Sun Jul 28 2019 Christian Glombek - 7.0.0.12-1 +- Updated to version 7.0.0.12 + +* Fri Jul 26 2019 Fedora Release Engineering - 7.0.0.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 7.0.0.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 7.0.0.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jul 06 2018 Christian Glombek - 7.0.0.11-1 +- Update to 7.0.0.11 + +* Fri Feb 09 2018 Fedora Release Engineering - 7.0.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 11 2017 Jason Taylor - 7.0.0.10-1 +- Upstream bugfix release +- Updated spec to reflect MIT license + +* Thu Aug 03 2017 Fedora Release Engineering - 7.0.0.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 7.0.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 7.0.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Oct 07 2016 Igor Gnatenko - 7.0.0.9-1 +- Fix FTBFS +- Update to 7.0.0.9 +- Trivial fixes in spec + +* Thu Feb 04 2016 Fedora Release Engineering - 6.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 6.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 6.8-4 +- Rebuilt for GCC 5 C++11 ABI change + +* Sun Aug 17 2014 Fedora Release Engineering - 6.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 6.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Sep 08 2013 Jeremy Hinegardner - 6.8-1 +- Update to upstream 6.8 + +* Sun Aug 04 2013 Fedora Release Engineering - 6.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 6.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Aug 1 2012 Mamoru Tasaka - 6.6-6 +- Fix build with gcc47 +- Pass fedora cflags correctly + +* Sat Jul 21 2012 Fedora Release Engineering - 6.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 6.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 6.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Aug 24 2010 Adam Tkac - 6.6-2 +- rebuild to ensure F14 has higher NVR than F13 + +* Thu Feb 18 2010 Jeremy Hinegardner - 6.6-0 +- update to 6.6 +- remove patch, fix applied upstream + +* Sun Aug 02 2009 Jeremy Hinegardner - 6.5-2 +- fix build process + +* Sun Aug 02 2009 Jeremy Hinegardner - 6.5-1 +- Update to 6.5 + +* Sun Jul 26 2009 Fedora Release Engineering - 6.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Apr 14 2009 Jeremy Hinegardner 6.4-3 +- remove main.cpp patch for testing + +* Sat Apr 11 2009 Jeremy Hinegardner 6.4-2 +- add patch for main.cpp + +* Sat Apr 11 2009 Jeremy Hinegardner 6.4-1 +- Update to 6.4 + +* Wed Feb 25 2009 Fedora Release Engineering - 6.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Aug 30 2008 Jeremy Hinegardner - 6.3-1 +- update to 6.3 + +* Mon May 12 2008 Jeremy Hinegardner - 6.2-1 +- update to 6.2 + +* Mon Apr 14 2008 Jeremy Hinegardner - 6.1-1 +- update to 6.1 + +* Tue Feb 19 2008 Fedora Release Engineering - 6.0-2 +- Autorebuild for GCC 4.3 + +* Sat Jan 19 2008 Jeremy Hinegardner - 6.0-1 +- update to 6.0 + +* Sun Jan 06 2008 Jeremy Hinegardner - 5.25-1 +- update to 5.25 + +* Tue Sep 18 2007 Jeremy Hinegardner - 5.24-1 +- update to 5.24 +- update License tag + +* Wed Aug 29 2007 Fedora Release Engineering - 5.23-2 +- Rebuild for selinux ppc32 issue. + +* Tue Jul 24 2007 Jeremy Hinegardner - 5.23-1 +- update to 5.23 +- removed ragel-rlcodegen-replace.patch - it was applied upstream + +* Mon Jun 18 2007 Jeremy Hinegardner - 5.22-1 +- update to 5.22 +- remove ragel-Makefile-in.patch - it was applied upstream +- update ragel-rlcodegen-replace.patch to apply cleanly + +* Sat Mar 24 2007 Jeremy Hinegardner - 5.19-4 +- further replacement of rlcodegen +- rework patches + +* Fri Mar 23 2007 Jeremy Hinegardner - 5.19-3 +- replace RPM_BUILD_ROOT in spec file with buildroot macro +- cleanup rpmlint errors for the src.rpm +- add ragel(1) man page patch + +* Tue Mar 20 2007 Jeremy Hinegardner - 5.19-1 +- Creation of spec file