Compare commits
10 Commits
39b3c0fa12
...
7346896015
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7346896015 | ||
|
|
2c14a78f17 | ||
|
|
dda7dd4115 | ||
|
|
50d18a9505 | ||
|
|
bbc8452b2d | ||
|
|
6f770958a4 | ||
|
|
da94b4e9ee | ||
|
|
ef901ebd55 | ||
|
|
cb27f2bac3 | ||
|
|
97359dc6e0 |
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"])])
|
||||
],
|
||||
20
ragel.spec
20
ragel.spec
@ -1,7 +1,7 @@
|
||||
%bcond_with bootstrap
|
||||
|
||||
Name: ragel
|
||||
Version: 7.0.0.12
|
||||
Version: 7.0.4
|
||||
Release: 1
|
||||
Summary: Finite state machine compiler
|
||||
|
||||
@ -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
|
||||
@ -40,13 +43,13 @@ Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
# Do not pollute with docs
|
||||
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
|
||||
@ -58,23 +61,26 @@ 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
|
||||
|
||||
* Mon Jun 22 2020 Yikun Jiang <yikunkero@gmail.com> - 7.0.0.12-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user