SHA256
1
0
forked from pool/hfst

- Remove hfst-split-libs.diff, hfst-wrong-flags.diff, system-foma.diff (obsolete)

OBS-URL: https://build.opensuse.org/package/show/devel:tools/hfst?expand=0&rev=13
This commit is contained in:
Jan Engelhardt 2021-07-05 12:30:14 +00:00 committed by Git OBS Bridge
parent dd35899a73
commit 05dd455db9
5 changed files with 8 additions and 227 deletions

View File

@ -1,74 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-09-12 10:29:55.446630599 +0200
X-Upstream: likely not
Install sublibraries such that we can make them separate packages
and tag these with their licenses.
---
back-ends/foma/Makefile.am | 4 +++-
back-ends/openfst/src/lib/Makefile.am | 3 ++-
back-ends/sfst/Makefile.am | 5 +++--
3 files changed, 8 insertions(+), 4 deletions(-)
Index: hfst-3.15.4/back-ends/foma/Makefile.am
===================================================================
--- hfst-3.15.4.orig/back-ends/foma/Makefile.am
+++ hfst-3.15.4/back-ends/foma/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS += -D__NO_MINGW_LFS
endif
if WANT_FOMA
-noinst_LTLIBRARIES = libfoma.la
+lib_LTLIBRARIES = libfoma.la
endif
lex.yy.c: regex.l regex.h
@@ -27,6 +27,7 @@ lex.cmatrix.c: cmatrix.l
regex.c regex.h: regex.y constructions.o
$(YACC) --defines=regex.h --output=regex.c $<
+libfoma_la_LDFLAGS = -release hfst -version-number 0 -no-undefined
libfoma_la_SOURCES = int_stack.c define.c determinize.c apply.c \
rewrite.c lexcread.c topsort.c flags.c minimize.c reverse.c \
extract.c sigma.c structures.c constructions.c \
@@ -55,6 +56,7 @@ endif
if GENERATE_FOMA_WRAPPER
bin_PROGRAMS=hfst_foma
+libfoma_la_LIBADD = -lz
AM_CPPFLAGS += -DZLIB
endif
Index: hfst-3.15.4/back-ends/openfst/src/lib/Makefile.am
===================================================================
--- hfst-3.15.4.orig/back-ends/openfst/src/lib/Makefile.am
+++ hfst-3.15.4/back-ends/openfst/src/lib/Makefile.am
@@ -11,6 +11,7 @@
AUTOMAKE_OPTIONS=subdir-objects
AM_CPPFLAGS = -I $(srcdir)/../include $(ICU_CPPFLAGS)
-noinst_LTLIBRARIES = libfst.la
+lib_LTLIBRARIES = libfst.la
+libfst_la_LDFLAGS = -release hfst -version-number 0 -no-undefined
libfst_la_SOURCES = compat.cc flags.cc fst.cc properties.cc \
symbol-table.cc symbol-table-ops.cc util.cc
Index: hfst-3.15.4/back-ends/sfst/Makefile.am
===================================================================
--- hfst-3.15.4.orig/back-ends/sfst/Makefile.am
+++ hfst-3.15.4/back-ends/sfst/Makefile.am
@@ -1,12 +1,13 @@
AM_CPPFLAGS=-Wno-deprecated
if WANT_SFST
-noinst_LTLIBRARIES = libsfst.la
+lib_LTLIBRARIES = libsfst.la
endif
if WANT_LEAN_SFST
-noinst_LTLIBRARIES = libsfst.la
+lib_LTLIBRARIES = libsfst.la
endif
+libsfst_la_LDFLAGS = -release hfst -version-number 0 -no-undefined
libsfst_la_SOURCES = alphabet.cc basic.cc utf8.cc compact.cc fst.cc \
operators.cc determinise.cc generate.cc hopcroft.cc

View File

@ -1,41 +0,0 @@
Date: 2014-09-12 11:37:08.444984219 +0200
From: Jan Engelhardt <jengelh@inai.de>
build: fix potential linking hazards
-L/-l belong into LDADD/LIBADD, *not* LDFLAGS.
---
back-ends/foma/Makefile.am | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
Index: hfst-3.12.2/back-ends/foma/Makefile.am
===================================================================
--- hfst-3.12.2.orig/back-ends/foma/Makefile.am
+++ hfst-3.12.2/back-ends/foma/Makefile.am
@@ -17,20 +17,19 @@ libfoma_la_SOURCES = int_stack.c define.
hfst_foma_LDADD = $(top_builddir)/back-ends/foma/libfoma.la
+hfst_foma_LDADD += -lz
if WANT_READLINE
-hfst_foma_LDFLAGS=-lreadline -lz
-else
-hfst_foma_LDFLAGS=-lz
+hfst_foma_LDADD += -lreadline
endif
if HAVE_TERMCAP
-hfst_foma_LDFLAGS += -ltermcap
+hfst_foma_LDADD += -ltermcap
else
if HAVE_NCURSES
-hfst_foma_LDFLAGS += -lncurses
+hfst_foma_LDADD += -lncurses
else
if HAVE_CURSES
-hfst_foma_LDFLAGS += -lcurses
+hfst_foma_LDADD += -lcurses
endif
endif
endif

View File

@ -5,6 +5,8 @@ Thu May 27 10:02:31 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
* pmatch: modified tracking of entry points to allow for RTNs * pmatch: modified tracking of entry points to allow for RTNs
in captures in captures
* pmatch: fixed off-by-one bug in checking captures * pmatch: fixed off-by-one bug in checking captures
- Remove hfst-split-libs.diff, hfst-wrong-flags.diff,
system-foma.diff (obsolete)
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Feb 13 21:59:39 UTC 2021 - Jan Engelhardt <jengelh@inai.de> Sat Feb 13 21:59:39 UTC 2021 - Jan Engelhardt <jengelh@inai.de>

View File

@ -25,9 +25,6 @@ Group: Development/Tools/Other
URL: https://hfst.github.io/ URL: https://hfst.github.io/
Source: https://github.com/hfst/hfst/archive/refs/tags/v%version.tar.gz Source: https://github.com/hfst/hfst/archive/refs/tags/v%version.tar.gz
Patch1: system-foma.diff
Patch2: hfst-wrong-flags.diff
Patch3: hfst-split-libs.diff
Patch4: hfst-nodate.diff Patch4: hfst-nodate.diff
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -35,7 +32,7 @@ BuildRequires: bison
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: flex BuildRequires: flex
BuildRequires: foma-devel BuildRequires: foma-devel >= 0.9.18+git20210604
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libtool BuildRequires: libtool
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -64,15 +61,6 @@ applications ranging from natural language processing and research in
automata theory. It should be upwardly compatible with Xerox xfst and automata theory. It should be upwardly compatible with Xerox xfst and
lexc, with the exception of binary file reading and writing. lexc, with the exception of binary file reading and writing.
%package -n libfst-hfst0
Summary: OpenFST Finite State Transducer library
License: Apache-2.0
Group: System/Libraries
%description -n libfst-hfst0
OpenFst is a library for constructing, combining, optimizing, and
searching weighted finite-state transducers (FSTs).
%package -n libhfst54 %package -n libhfst54
Summary: Helsinki Finite-State Transducer Technology Libraries Summary: Helsinki Finite-State Transducer Technology Libraries
License: GPL-3.0-only License: GPL-3.0-only
@ -83,18 +71,6 @@ The Helsinki Finite-State Transducer software is intended for the
implementation of morphological analyzers and other tools which are implementation of morphological analyzers and other tools which are
based on weighted and unweighted finite-state transducer technology. based on weighted and unweighted finite-state transducer technology.
%package -n libsfst-hfst0
Summary: SFST Finite State Tools
# HFST is missing the license file; a look in SFST upstream code
# (https://code.google.com/p/cistern/wiki/SFST) reveals it is GPL-2.0.
License: GPL-2.0-only
Group: System/Libraries
%description -n libsfst-hfst0
SFST is a toolkit for the implementation of morphological analyzers
and other tools which are based on finite state transducer
technology.
%package devel %package devel
Summary: Development files for the Helsinki Finite-State Transducer Summary: Development files for the Helsinki Finite-State Transducer
License: GPL-3.0-only License: GPL-3.0-only
@ -111,12 +87,12 @@ want to make use of the HFST library.
%prep %prep
%autosetup -p1 %autosetup -p1
rm -Rfv back-ends/foma/
%build %build
autoreconf -fiv autoreconf -fiv
%configure --disable-static --with-unicode-handler=glib --with-readline \ %configure --disable-static --with-unicode-handler=glib --with-readline \
--enable-all-tools --includedir="%_includedir/%name" --enable-all-tools --includedir="%_includedir/%name" \
--with-foma-upstream
%make_build %make_build
%install %install
@ -127,32 +103,22 @@ rm -fv "%buildroot/%_libdir/"{libfoma,libfst,libsfst}.so
%fdupes %buildroot/%_prefix %fdupes %buildroot/%_prefix
%check %check
%make_build check %make_build check -j1
%post -n libfoma-hfst0 -p /sbin/ldconfig %post -n libfoma-hfst0 -p /sbin/ldconfig
%postun -n libfoma-hfst0 -p /sbin/ldconfig %postun -n libfoma-hfst0 -p /sbin/ldconfig
%post -n libfst-hfst0 -p /sbin/ldconfig
%postun -n libfst-hfst0 -p /sbin/ldconfig
%post -n libhfst54 -p /sbin/ldconfig %post -n libhfst54 -p /sbin/ldconfig
%postun -n libhfst54 -p /sbin/ldconfig %postun -n libhfst54 -p /sbin/ldconfig
%post -n libsfst-hfst0 -p /sbin/ldconfig
%postun -n libsfst-hfst0 -p /sbin/ldconfig
%files %files
%_bindir/hfst* %_bindir/hfst*
%_mandir/man1/*.1* %_mandir/man1/*.1*
%doc AUTHORS COPYING NEWS README %doc NEWS README
%license COPYING
%files -n libfst-hfst0
%_libdir/libfst-hfst.so.0*
%doc back-ends/openfst/COPYING
%files -n libhfst54 %files -n libhfst54
%_libdir/libhfst.so.54* %_libdir/libhfst.so.54*
%files -n libsfst-hfst0
%_libdir/libsfst-hfst.so.0*
%files devel %files devel
%_includedir/* %_includedir/*
%_libdir/libhfst.so %_libdir/libhfst.so

View File

@ -1,72 +0,0 @@
---
back-ends/Makefile.am | 2 +-
configure.ac | 1 -
libhfst/src/Makefile.am | 2 +-
libhfst/src/implementations/ConvertFomaTransducer.cc | 3 ++-
libhfst/src/implementations/FomaTransducer.cc | 3 ++-
5 files changed, 6 insertions(+), 5 deletions(-)
Index: hfst-3.15.5/back-ends/Makefile.am
===================================================================
--- hfst-3.15.5.orig/back-ends/Makefile.am
+++ hfst-3.15.5/back-ends/Makefile.am
@@ -15,5 +15,5 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-SUBDIRS=openfst openfstwin dlfcn sfst foma
+SUBDIRS=openfst openfstwin dlfcn sfst
AUTOMAKE_OPTIONS=subdir-objects
Index: hfst-3.15.5/configure.ac
===================================================================
--- hfst-3.15.5.orig/configure.ac
+++ hfst-3.15.5/configure.ac
@@ -812,7 +812,6 @@ AC_CONFIG_FILES([Makefile doc/Makefile t
back-ends/openfst/Makefile
back-ends/openfst/src/Makefile
back-ends/openfst/src/lib/Makefile
- back-ends/foma/Makefile
back-ends/sfst/Makefile
man/Makefile
scripts/Makefile])
Index: hfst-3.15.5/libhfst/src/Makefile.am
===================================================================
--- hfst-3.15.5.orig/libhfst/src/Makefile.am
+++ hfst-3.15.5/libhfst/src/Makefile.am
@@ -41,7 +41,7 @@ endif
endif
if WANT_FOMA
- libhfst_la_LIBADD += $(top_builddir)/back-ends/foma/libfoma.la
+ libhfst_la_LIBADD += -lfoma
endif
if WANT_MINGW
Index: hfst-3.15.5/libhfst/src/implementations/ConvertFomaTransducer.cc
===================================================================
--- hfst-3.15.5.orig/libhfst/src/implementations/ConvertFomaTransducer.cc
+++ hfst-3.15.5/libhfst/src/implementations/ConvertFomaTransducer.cc
@@ -17,7 +17,8 @@
#ifndef _FOMALIB_H_
#define _FOMALIB_H_
- #include "back-ends/foma/fomalib.h"
+ #include <stdbool.h>
+ #include <fomalib.h>
#endif
#include "ConvertTransducerFormat.h"
Index: hfst-3.15.5/libhfst/src/implementations/FomaTransducer.cc
===================================================================
--- hfst-3.15.5.orig/libhfst/src/implementations/FomaTransducer.cc
+++ hfst-3.15.5/libhfst/src/implementations/FomaTransducer.cc
@@ -17,7 +17,8 @@
#ifndef _FOMALIB_H_
#define _FOMALIB_H_
-#include "back-ends/foma/fomalib.h"
+#include <stdbool.h>
+#include <fomalib.h>
#endif
#include "FomaTransducer.h"