diff --git a/change-config.patch b/change-config.patch new file mode 100644 index 0000000000000000000000000000000000000000..5629908743788176710aa1b2b7520a3ef4571187 --- /dev/null +++ b/change-config.patch @@ -0,0 +1,45 @@ +diff --git a/configure.ac b/configure.ac +index aa127b68..fc034f28 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,6 +45,7 @@ AC_PROG_CXX + AC_CHECK_TOOL(AR, ar) + AC_PROG_RANLIB + AC_PROG_LIBTOOL ++ + SED_SUBST=["\ + -e 's|@CXX@|${CXX}|g' \ + -e 's|@CC@|${CC}|g' \ +@@ -420,6 +421,13 @@ test -e src/include/colm || ln -s .. src/include/colm + echo "#define VERSION \"$VERSION\"" > src/version.h + echo "#define PUBDATE \"$PUBDATE\"" >> src/version.h + ++if test "x$enable_static" = "xyes"; then ++ AC_DEFINE([LINK_STATIC], [1], [Link static lib when invoking C compile and link]) ++fi ++ ++if test "x$enable_shared" = "xyes"; then ++ AC_DEFINE([LINK_SHARED], [1], [Link shared lib when invoking C compile and link]) ++fi + + dnl + dnl Wrap up. +diff --git a/src/main.cc b/src/main.cc +index 301fae91..8ca395f0 100644 +--- a/src/main.cc ++++ b/src/main.cc +@@ -485,7 +485,14 @@ void compileOutput( const char *argv0, const bool inSource, char *srcLocation ) + " -I%s/../aapl" + " -I%s/include" + " -L%s" ++#if defined(LINK_STATIC) + " %s/libcolm.a", ++#elif defined(LINK_SHARED) ++ " %s/libcolm.so", ++#else ++# error "must enabled at least one of shared or static libs" ++#endif ++ + binaryFn, intermedFn, srcLocation, + srcLocation, location, location ); + } diff --git a/colm-0.13.0.7.tar.gz b/colm-0.13.0.7.tar.gz deleted file mode 100644 index 046f24f859dc29e0f5ad3307d8efa139f189a04c..0000000000000000000000000000000000000000 Binary files a/colm-0.13.0.7.tar.gz and /dev/null differ diff --git a/colm-0.14.1.tar.gz b/colm-0.14.1.tar.gz deleted file mode 100644 index 7337279ce6ceca03ccc4f03c01b18dfc56f7ec2d..0000000000000000000000000000000000000000 Binary files a/colm-0.14.1.tar.gz and /dev/null differ diff --git a/colm-0.14.7.tar.gz b/colm-0.14.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..44382a924bd4d486e79973771a605c17b5a544d9 Binary files /dev/null and b/colm-0.14.7.tar.gz differ diff --git a/colm-libfsm-ac_check_lib.patch b/colm-libfsm-ac_check_lib.patch new file mode 100644 index 0000000000000000000000000000000000000000..4ad74c4ec863ae856ad9f6b87f4302592d11c311 --- /dev/null +++ b/colm-libfsm-ac_check_lib.patch @@ -0,0 +1,23 @@ +From 28b6e0a01157049b4cb279b0ef25ea9dcf3b46ed Mon Sep 17 00:00:00 2001 +From: Adrian Thurston +Date: Sun, 12 Mar 2023 13:17:42 -0700 +Subject: [PATCH] include an extern C function in libfsm so we can use + AC_CHECK_LIB + +--- + src/libfsm/codegen.cc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libfsm/codegen.cc b/src/libfsm/codegen.cc +index 21edb5ac..1150384e 100644 +--- a/src/libfsm/codegen.cc ++++ b/src/libfsm/codegen.cc +@@ -30,6 +30,8 @@ + #include + #include + ++// Convenience: for checking for the presence of the libfsm. ++extern "C" void libfsm_present() {} + + using std::ostream; + using std::ostringstream; diff --git a/colm.spec b/colm.spec index 7adf357692a76805a733363796e6eaa66e6b83d8..7784e9de5ad1e0854368403a6f6f98766d91a6ca 100644 --- a/colm.spec +++ b/colm.spec @@ -1,5 +1,5 @@ Name: colm -Version: 0.13.0.7 +Version: 0.14.7 Release: 1 Summary: Programming language designed for the analysis of computer languages @@ -7,6 +7,8 @@ Summary: Programming language designed for the analysis of computer langu License: MIT and LGPLv2+ URL: https://www.colm.net/open-source/colm/ Source0: https://www.colm.net/files/%{name}/%{name}-%{version}.tar.gz +Patch0: change-config.patch +Patch1: colm-libfsm-ac_check_lib.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -32,7 +34,7 @@ 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 @@ -50,21 +52,31 @@ install -p -m 0644 -D %{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{ %files %license COPYING -%doc ChangeLog README -%{_bindir}/%{name} +%doc README +%{_bindir}/%{name}* %{_libdir}/lib%{name}-%{version}.so %dir %{_datadir}/vim %dir %{_datadir}/vim/vimfiles %dir %{_datadir}/vim/vimfiles/syntax %{_datadir}/vim/vimfiles/syntax/%{name}.vim +%{_datadir}/doc/%{name}/* +%{_datadir}/*.lm +%{_datadir}/runtests %files devel %{_libdir}/lib%{name}.so +%{_libdir}/libfsm* %{_includedir}/%{name}/ %{_docdir}/%{name}/* +%{_includedir}/libfsm* +%{_includedir}/aapl* %changelog -* Tue Jun 23 2020 Yikun Jiang +* Thu Sep 14 2023 xu_ping <707078654@qq.com> - 0.14.7-1 +- Upgrade version to 0.14.7 + +* Tue Jun 23 2020 Yikun Jiang - 0.13.0.7-1 - bump version to 0.13.0.7 -* Sun Mar 29 2020 Wei Xiong + +* Sun Mar 29 2020 Wei Xiong - 0.14.0-1 - Package init