!6 Upgrade version to 7.0.4
From: @cherry530 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
7346896015
@ -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
|
||||
|
||||
Binary file not shown.
BIN
ragel-7.0.4.tar.gz
Normal file
BIN
ragel-7.0.4.tar.gz
Normal file
Binary file not shown.
43
ragel-fallback-no-la.patch
Normal file
43
ragel-fallback-no-la.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 463f4914057b0193c6ca025e9233c17035bc0448 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Thurston <thurston@colm.net>
|
||||
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)
|
||||
38
ragel-use-libdir.patch
Normal file
38
ragel-use-libdir.patch
Normal file
@ -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"])])
|
||||
],
|
||||
18
ragel.spec
18
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 <sunguoshuai@huawei.com> - 7.0.0.12-2
|
||||
- Fix ragel-d ragel-go ragel-java eg. command segfault
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user