diff --git a/0001-Fix-ragel-d-ragel-go-ragel-java-such-command-segfault.patch b/0001-Fix-ragel-d-ragel-go-ragel-java-such-command-segfault.patch deleted file mode 100644 index 4f47853..0000000 --- a/0001-Fix-ragel-d-ragel-go-ragel-java-such-command-segfault.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5482a621c75baad6dee31f5f6a1d38bf5849d4eb Mon Sep 17 00:00:00 2001 -From: si-gui <245140120@qq.com> -Date: Mon, 21 Sep 2020 20:01:10 +0800 -Subject: [PATCH] Fix ragel-d,ragel-go,ragel-java such command segfault error - -Signed-off-by: si-gui <245140120@qq.com> ---- - src/inputdata.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/inputdata.cc b/src/inputdata.cc -index 8a6de8b..e6d4f73 100644 ---- a/src/inputdata.cc -+++ b/src/inputdata.cc -@@ -1105,9 +1105,19 @@ void InputData::wait( const char *what, pid_t pid ) - int InputData::rlhcMain( int argc, const char **argv ) - { - pid_t pid = 0; -+ int code = 0; -+ try { -+ parseArgs( argc, argv ); -+ checkArgs(); -+ -+ if ( !process() ) -+ abortCompile( 1 ); -+ } -+ catch ( const AbortCompile &ac ) { -+ code = ac.code; -+ return code; -+ } - -- parseArgs( argc, argv ); -- checkArgs(); - makeDefaultFileName(); - makeTranslateOutputFileName(); - --- -2.23.0 - diff --git a/ragel-7.0.0.12.tar.gz b/ragel-7.0.0.12.tar.gz deleted file mode 100644 index 2209d3e..0000000 Binary files a/ragel-7.0.0.12.tar.gz and /dev/null differ diff --git a/ragel-7.0.4.tar.gz b/ragel-7.0.4.tar.gz new file mode 100644 index 0000000..9aa9275 Binary files /dev/null and b/ragel-7.0.4.tar.gz differ diff --git a/ragel-fallback-no-la.patch b/ragel-fallback-no-la.patch new file mode 100644 index 0000000..7b34997 --- /dev/null +++ b/ragel-fallback-no-la.patch @@ -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/ragel-use-libdir.patch b/ragel-use-libdir.patch new file mode 100644 index 0000000..3be5973 --- /dev/null +++ b/ragel-use-libdir.patch @@ -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/ragel.spec b/ragel.spec index f009068..0eb5d25 100644 --- a/ragel.spec +++ b/ragel.spec @@ -1,8 +1,8 @@ %bcond_with bootstrap Name: ragel -Version: 7.0.0.12 -Release: 2 +Version: 7.0.4 +Release: 1 Summary: Finite state machine compiler # aapl/ is the LGPLv2+ @@ -10,6 +10,9 @@ License: MIT and LGPLv2+ URL: http://www.colm.net/open-source/%{name}/ Source0: https://www.colm.net/files/%{name}/%{name}-%{version}.tar.gz +Patch0: ragel-fallback-no-la.patch +Patch1: ragel-use-libdir.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: autoconf @@ -24,7 +27,6 @@ BuildRequires: colm-devel # Unfortunately, upstream doesn't exist and not possible to find version Provides: bundled(aapl) -Patch0000: 0001-Fix-ragel-d-ragel-go-ragel-java-such-command-segfault.patch %description Ragel compiles executable finite state machines from regular languages. @@ -47,7 +49,7 @@ sed -i -e "/dist_doc_DATA/d" Makefile.am %build autoreconf -vfi -%configure --disable-static +%configure --disable-static --with-colm=%{_prefix} --disable-manual %make_build %install @@ -59,24 +61,24 @@ install -p -m 0644 -D %{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{ %files %license COPYING -%doc CREDITS ChangeLog %{_bindir}/%{name} %{_bindir}/%{name}-* %{_mandir}/man1/%{name}.1* -%{_libdir}/libfsm.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 %files devel -%{_libdir}/libfsm.so %{_libdir}/libragel.so -%{_includedir}/%{name}/ %changelog +* Thu Sep 14 2023 xu_ping <707078654@qq.com> - 7.0.4-1 +- Upgrade version to 7.0.4 + * Mon Sep 21 2020 Guoshuai Sun - 7.0.0.12-2 - Fix ragel-d ragel-go ragel-java eg. command segfault