diff --git a/foma-0.9.18+git20200221.5e5521e.tar.xz b/foma-0.9.18+git20200221.5e5521e.tar.xz deleted file mode 100644 index 26ba8f5..0000000 --- a/foma-0.9.18+git20200221.5e5521e.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98d8b28aedff8c2a842e343d1f6291786ad62bebdf33df95e7af7a1fef47763f -size 139180 diff --git a/foma-0.9.18+git20210604.180b6fe.tar.xz b/foma-0.9.18+git20210604.180b6fe.tar.xz new file mode 100644 index 0000000..5bdd18a --- /dev/null +++ b/foma-0.9.18+git20210604.180b6fe.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b83fa3c7c3c13a673bbd773c756aa31150828bc905b754269a004ecff739162d +size 140780 diff --git a/foma-harden-build.patch b/foma-harden-build.patch index 74bbe29..ca6046e 100644 --- a/foma-harden-build.patch +++ b/foma-harden-build.patch @@ -1,7 +1,12 @@ -diff -Naur foma-0fa48dbacfe39509577ae6741054be7c05a19aac.orig/foma/Makefile foma-0fa48dbacfe39509577ae6741054be7c05a19aac/foma/Makefile ---- foma-0fa48dbacfe39509577ae6741054be7c05a19aac.orig/foma/Makefile 2015-06-13 19:50:43.000000000 +0300 -+++ foma-0fa48dbacfe39509577ae6741054be7c05a19aac/foma/Makefile 2018-08-05 13:48:07.836080649 +0300 -@@ -23,13 +23,13 @@ +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: foma/Makefile +=================================================================== +--- a/foma.orig/Makefile ++++ a/foma/Makefile +@@ -23,13 +23,13 @@ LIBOBJS = int_stack.o define.o determini all: libfoma foma flookup cgflookup foma: $(FOMAOBJS) $(LIBOBJS) @@ -18,12 +23,12 @@ diff -Naur foma-0fa48dbacfe39509577ae6741054be7c05a19aac.orig/foma/Makefile foma STATICLIB = libfoma.a -@@ -68,7 +68,7 @@ +@@ -72,7 +72,7 @@ libfoma: $(SHAREDLIBV) $(SHAREDLIBV): $(LIBOBJS) $(AR) $(ARFLAGS) $(STATICLIB) $(LIBOBJS) $(RANLIB) $(STATICLIB) - $(CC) $(CFLAGS) -shared -Wl,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS) + $(CC) $(CFLAGS) -shared -Wl,-z,now,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS) - install: foma libfoma + install: foma libfoma libfoma.pc -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi diff --git a/foma.changes b/foma.changes index d160a63..6772e34 100644 --- a/foma.changes +++ b/foma.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sat Jun 26 17:55:35 UTC 2021 - jengelh@inai.de + +- Update to version 0.9.18+git20210604.180b6fe: + * Drop xx prefix for standard C functions. + * Add runtime options interface for HFST. + * Fix segfault when Foma sigmas are merged. + * Add test for leaks and segfaults to avoid regression. + * Fix a premature free() call in fsm_isempty. + * add ^> to lexc's regex lexer. + * Fix memory leak in regex parser: destroy FSM via bison destructor. + * Fix memory leaks in "print shortest-string" command processor. + * Drop leftover command "test star-free" + * Avoid memory leaks in test functions: free temporary FSMs after use. + * Avoid memory leak in fsm_isempty function: release minimized FSM. + * Avoid memory leak in fsm_rewrite: free center FSM after usage. + * Skip definition without network when save_defined is executed. + ------------------------------------------------------------------- Wed May 19 15:14:43 UTC 2021 - Fridrich Strba diff --git a/foma.spec b/foma.spec index c3af144..2ed01a9 100644 --- a/foma.spec +++ b/foma.spec @@ -19,12 +19,11 @@ %{!?make_build:%global make_build make %{?_smp_mflags}} %define libname libfoma0 Name: foma -Version: 0.9.18+git20200221.5e5521e +Version: 0.9.18+git20210604.180b6fe Release: 0 Summary: Finite-state compiler and C library License: Apache-2.0 URL: https://fomafst.github.io/ -# Source must be from git tarball has different license than git, no idea why Source0: foma-%{version}.tar.xz Patch0: foma-harden-build.patch BuildRequires: bison @@ -60,8 +59,8 @@ Requires: %{libname} = %{version} Finite-state C library development files and headers for %{name}. %prep -%setup -q -n %{name}-%{version}/%{name} -%patch0 -p2 +%autosetup -p2 -n %{name}-%{version}/%{name} + sed -i '/^CFLAGS/c\CFLAGS = %{optflags} -fcommon -Wl,--as-needed -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC' Makefile sed -i '/^LDFLAGS/c\LDFLAGS = -lreadline -lz -lreadline -fpic' Makefile sed -i '/^FLOOKUPLDFLAGS/c\FLOOKUPLDFLAGS = libfoma.a -lz -fpic' Makefile @@ -75,6 +74,9 @@ sed -i '/^FLOOKUPLDFLAGS/c\FLOOKUPLDFLAGS = libfoma.a -lz -fpic' Makefile prefix=%{buildroot}%{_prefix} \ libdir=%{buildroot}%{_libdir} rm -rf %{buildroot}%{_libdir}/*.a +# github.com/mhulden/foma/issues/127 +perl -i -pe 's{\Q%{buildroot}\E}{}' "%{buildroot}/%{_libdir}/pkgconfig"/*.pc +cat "%{buildroot}/%{_libdir}/pkgconfig"/*.pc %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig @@ -88,6 +90,7 @@ rm -rf %{buildroot}%{_libdir}/*.a %{_includedir}/fomalib.h %{_includedir}/fomalibconf.h %{_libdir}/libfoma.so +%{_libdir}/pkgconfig/libfoma.pc %files -n %{libname} %license COPYING