SHA256
1
0
forked from pool/foma

Accepting request 904148 from home:jengelh:dev

- Update to version 0.9.18+git20210604.180b6fe:[..]

- Needed by HFST to get rid of hfst's bundled copy of foma

OBS-URL: https://build.opensuse.org/request/show/904148
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/foma?expand=0&rev=15
This commit is contained in:
Fridrich Strba 2021-08-15 06:23:45 +00:00 committed by Git OBS Bridge
parent 7b73827ecc
commit 59e415666b
5 changed files with 39 additions and 13 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98d8b28aedff8c2a842e343d1f6291786ad62bebdf33df95e7af7a1fef47763f
size 139180

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b83fa3c7c3c13a673bbd773c756aa31150828bc905b754269a004ecff739162d
size 140780

View File

@ -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 Makefile | 8 ++++----
+++ foma-0fa48dbacfe39509577ae6741054be7c05a19aac/foma/Makefile 2018-08-05 13:48:07.836080649 +0300 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -23,13 +23,13 @@
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 all: libfoma foma flookup cgflookup
foma: $(FOMAOBJS) $(LIBOBJS) foma: $(FOMAOBJS) $(LIBOBJS)
@ -18,12 +23,12 @@ diff -Naur foma-0fa48dbacfe39509577ae6741054be7c05a19aac.orig/foma/Makefile foma
STATICLIB = libfoma.a STATICLIB = libfoma.a
@@ -68,7 +68,7 @@ @@ -72,7 +72,7 @@ libfoma: $(SHAREDLIBV)
$(SHAREDLIBV): $(LIBOBJS) $(SHAREDLIBV): $(LIBOBJS)
$(AR) $(ARFLAGS) $(STATICLIB) $(LIBOBJS) $(AR) $(ARFLAGS) $(STATICLIB) $(LIBOBJS)
$(RANLIB) $(STATICLIB) $(RANLIB) $(STATICLIB)
- $(CC) $(CFLAGS) -shared -Wl,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS) - $(CC) $(CFLAGS) -shared -Wl,$(DFLAG),$(SHAREDLIBM) -o $(SHAREDLIBV) $(LIBOBJS) $(LDFLAGS)
+ $(CC) $(CFLAGS) -shared -Wl,-z,now,$(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 -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi

View File

@ -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 <fstrba@suse.com> Wed May 19 15:14:43 UTC 2021 - Fridrich Strba <fstrba@suse.com>

View File

@ -19,12 +19,11 @@
%{!?make_build:%global make_build make %{?_smp_mflags}} %{!?make_build:%global make_build make %{?_smp_mflags}}
%define libname libfoma0 %define libname libfoma0
Name: foma Name: foma
Version: 0.9.18+git20200221.5e5521e Version: 0.9.18+git20210604.180b6fe
Release: 0 Release: 0
Summary: Finite-state compiler and C library Summary: Finite-state compiler and C library
License: Apache-2.0 License: Apache-2.0
URL: https://fomafst.github.io/ URL: https://fomafst.github.io/
# Source must be from git tarball has different license than git, no idea why
Source0: foma-%{version}.tar.xz Source0: foma-%{version}.tar.xz
Patch0: foma-harden-build.patch Patch0: foma-harden-build.patch
BuildRequires: bison BuildRequires: bison
@ -60,8 +59,8 @@ Requires: %{libname} = %{version}
Finite-state C library development files and headers for %{name}. Finite-state C library development files and headers for %{name}.
%prep %prep
%setup -q -n %{name}-%{version}/%{name} %autosetup -p2 -n %{name}-%{version}/%{name}
%patch0 -p2
sed -i '/^CFLAGS/c\CFLAGS = %{optflags} -fcommon -Wl,--as-needed -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC' Makefile 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 '/^LDFLAGS/c\LDFLAGS = -lreadline -lz -lreadline -fpic' Makefile
sed -i '/^FLOOKUPLDFLAGS/c\FLOOKUPLDFLAGS = libfoma.a -lz -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} \ prefix=%{buildroot}%{_prefix} \
libdir=%{buildroot}%{_libdir} libdir=%{buildroot}%{_libdir}
rm -rf %{buildroot}%{_libdir}/*.a 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 %post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
@ -88,6 +90,7 @@ rm -rf %{buildroot}%{_libdir}/*.a
%{_includedir}/fomalib.h %{_includedir}/fomalib.h
%{_includedir}/fomalibconf.h %{_includedir}/fomalibconf.h
%{_libdir}/libfoma.so %{_libdir}/libfoma.so
%{_libdir}/pkgconfig/libfoma.pc
%files -n %{libname} %files -n %{libname}
%license COPYING %license COPYING