Accepting request 1174844 from LibreOffice:Factory
- Update to git snapshot 0.10.0+git22 (e0d8122) OBS-URL: https://build.opensuse.org/request/show/1174844 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/foma?expand=0&rev=8
This commit is contained in:
commit
bf1a769dc1
11
_service
11
_service
@ -1,14 +1,15 @@
|
|||||||
<services>
|
<services>
|
||||||
<service mode="disabled" name="tar_scm">
|
<service mode="manual" name="tar_scm">
|
||||||
<param name="url">https://github.com/mhulden/foma</param>
|
<param name="url">https://github.com/mhulden/foma</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="filename">foma</param>
|
<param name="filename">foma</param>
|
||||||
<param name="revision">dfe1ccb1055af99be0232a26520d247b5fe093bc</param>
|
<param name="revision">master</param>
|
||||||
<param name="versionformat">0.10.0</param>
|
<param name="parent-tag">dfe1ccb1055af99be0232a26520d247b5fe093bc</param>
|
||||||
|
<param name="versionformat">0.10.0+git@TAG_OFFSET@</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="recompress">
|
<service mode="manual" name="recompress">
|
||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
<param name="compression">xz</param>
|
<param name="compression">xz</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="set_version"/>
|
<service mode="manual" name="set_version"/>
|
||||||
</services>
|
</services>
|
||||||
|
3
foma-0.10.0+git22.tar.xz
Normal file
3
foma-0.10.0+git22.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8e60920ee539810ad990a07546924625750bed6857292337ddc02d2ffd5cc129
|
||||||
|
size 141636
|
BIN
foma-0.10.0.tar.xz
(Stored with Git LFS)
BIN
foma-0.10.0.tar.xz
(Stored with Git LFS)
Binary file not shown.
@ -1,14 +0,0 @@
|
|||||||
diff --git a/foma/io.c b/foma/io.c
|
|
||||||
index b7bf69b..da1c57a 100644
|
|
||||||
--- a/foma.orig/io.c
|
|
||||||
+++ a/foma/io.c
|
|
||||||
@@ -999,7 +999,7 @@ static BOM BOM_codes[] = {
|
|
||||||
{ { 0x00, 0x00, 0xFE, 0xFF }, 4, "UTF-32BE" },
|
|
||||||
{ { 0xFF, 0xFE }, 2, "UTF16-LE" },
|
|
||||||
{ { 0xFE, 0xFF }, 2, "UTF16-BE" },
|
|
||||||
- { NULL, 0, NULL },
|
|
||||||
+ { { 0, } , 0, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
BOM *check_BOM(char *buffer) {
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
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)
|
|
||||||
- $(CC) $(CFLAGS) $(FOMAOBJS) $(LIBOBJS) $(LDFLAGS) -o $@
|
|
||||||
+ $(CC) $(CFLAGS) -pie -Wl,-z,now $(FOMAOBJS) $(LIBOBJS) $(LDFLAGS) -o $@
|
|
||||||
|
|
||||||
flookup: flookup.o libfoma
|
|
||||||
- $(CC) $(CFLAGS) flookup.o $(FLOOKUPLDFLAGS) -o $@
|
|
||||||
+ $(CC) $(CFLAGS) -pie -Wl,-z,now flookup.o $(FLOOKUPLDFLAGS) -o $@
|
|
||||||
|
|
||||||
cgflookup: cgflookup.o libfoma
|
|
||||||
- $(CC) $(CFLAGS) cgflookup.o $(FLOOKUPLDFLAGS) -o $@
|
|
||||||
+ $(CC) $(CFLAGS) -pie -Wl,-z,now cgflookup.o $(FLOOKUPLDFLAGS) -o $@
|
|
||||||
|
|
||||||
STATICLIB = libfoma.a
|
|
||||||
|
|
||||||
@@ -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 libfoma.pc
|
|
||||||
-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 17 06:34:16 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Update to git snapshot 0.10.0+git22 (e0d8122)
|
||||||
|
* Build fixes for various compilers and C++ standard modes
|
||||||
|
- Drop foma-gcc14.patch (merged), delete foma-harden-build.patch
|
||||||
|
(obsolete)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 13 12:10:56 UTC 2024 - pgajdos@suse.com
|
Mon May 13 12:10:56 UTC 2024 - pgajdos@suse.com
|
||||||
|
|
||||||
|
55
foma.spec
55
foma.spec
@ -19,39 +19,36 @@
|
|||||||
%{!?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.10.0
|
Version: 0.10.0+git22
|
||||||
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/
|
||||||
Source0: foma-%{version}.tar.xz
|
Source: foma-%version.tar.xz
|
||||||
Patch0: foma-harden-build.patch
|
|
||||||
# https://github.com/mhulden/foma/commit/9a99d2d41809422080606bb49531b38ce1e2111a
|
|
||||||
Patch1: foma-gcc14.patch
|
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkg-config
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Foma is a compiler, programming language, and C library for constructing
|
Foma is a compiler, programming language, and C library for constructing
|
||||||
finite-state automata and transducers for various uses. It has specific
|
finite-state automata and transducers for various uses. It has specific support
|
||||||
support for many natural language processing applications such as producing
|
for many natural language processing applications such as producing
|
||||||
morphological analyzers. Although NLP applications are probably the main
|
morphological analyzers. Although NLP applications are probably the main use of
|
||||||
use of foma, it is sufficiently generic to use for a large number of purposes.
|
foma, it is sufficiently generic to use for a large number of purposes.
|
||||||
|
|
||||||
%package -n %{libname}
|
%package -n %{libname}
|
||||||
Summary: Finite-state C library
|
Summary: Finite-state C library
|
||||||
|
|
||||||
%description -n %{libname}
|
%description -n %{libname}
|
||||||
The library contains efficient implementations of all classical
|
The library contains efficient implementations of all classical
|
||||||
automata/transducer algorithms: determinization, minimization,
|
automata/transducer algorithms: determinization, minimization, epsilon-removal,
|
||||||
epsilon-removal, composition, boolean operations. Also, more
|
composition, boolean operations. Also, more advanced construction methods are
|
||||||
advanced construction methods are available: context restriction,
|
available: context restriction, quotients, first-order regular logic,
|
||||||
quotients, first-order regular logic, transducers from replacement
|
transducers from replacement rules, etc.
|
||||||
rules, etc.
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Finite-state C library development files and headers
|
Summary: Finite-state C library development files and headers
|
||||||
@ -61,27 +58,21 @@ 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
|
||||||
%autosetup -p2 -n %{name}-%{version}/%{name}
|
%autosetup -p1
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# hand written Makefile that gets to be quite PITA
|
pushd foma/
|
||||||
%make_build -j1
|
%cmake
|
||||||
|
%cmake_build
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install \
|
pushd foma/
|
||||||
prefix=%{buildroot}%{_prefix} \
|
%cmake_install
|
||||||
libdir=%{buildroot}%{_libdir}
|
popd
|
||||||
rm -rf %{buildroot}%{_libdir}/*.a
|
find "%buildroot" -type f -name "*.a" -print -delete
|
||||||
# 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
|
%ldconfig_scriptlets -n %libname
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/cgflookup
|
%{_bindir}/cgflookup
|
||||||
@ -95,7 +86,7 @@ cat "%{buildroot}/%{_libdir}/pkgconfig"/*.pc
|
|||||||
%{_libdir}/pkgconfig/libfoma.pc
|
%{_libdir}/pkgconfig/libfoma.pc
|
||||||
|
|
||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%license COPYING
|
%license foma/COPYING
|
||||||
%{_libdir}/libfoma.so.*
|
%{_libdir}/libfoma.so.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user