debian/0000755000000000000000000000000012142725362007172 5ustar debian/libsfst1-1.4-dev.install0000644000000000000000000000013512142001472013351 0ustar usr/lib/*/lib*.so usr/lib/*/libsfst1.la usr/lib/*/libsfst1.a usr/lib/*/pkgconfig usr/include debian/control0000644000000000000000000000330112142003122010551 0ustar Source: sfst Priority: optional Maintainer: Rico Sennrich Uploaders: Roland Stigge Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config (>= 0.20 ), flex, bison, libreadline-dev (>= 5.2), libncurses5-dev (>= 5.5) Standards-Version: 3.9.4 Section: misc Homepage: http://www.ims.uni-stuttgart.de/projekte/gramotron/SOFTWARE/SFST.html Package: sfst Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: Description: Stuttgart finite-state transducer tools SFST is a toolbox for the implementation of morphological analysers and other tools which are based on finite state transducer technology. The SFST tools comprise . * a compiler which translates transducer programs into minimised transducers * interactive and batch-mode analysis programs * tools for comparing and printing transducers * a C++ library which is efficient and easy to use . Package: libsfst1-1.4 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Provides: libsfst1 Conflicts: libsfst1 Description: Shared library for SFST Contains shared library for SFST. SFST is a toolbox for the implementation of morphological analysers and other tools which are based on finite state transducer technology. . Package: libsfst1-1.4-dev Section: libdevel Architecture: any Depends: libsfst1-1.4 (= ${binary:Version}), ${misc:Depends} Provides: libsfst1-dev Conflicts: libsfst1-dev Description: Development library SFST Contains development files for SFST. SFST is a toolbox for the implementation of morphological analysers and other tools which are based on finite state transducer technology. . debian/libsfst1-1.4.dirs0000644000000000000000000000001012133316017012064 0ustar usr/lib debian/changelog0000644000000000000000000000404712142655464011056 0ustar sfst (1.4.6g-3) unstable; urgency=low * altivec support on powerpcspe (Closes: #701510) * fix shlibs-symbol-not-found build warning -- Rico Sennrich Thu, 9 May 2013 10:15:04 +0100 sfst (1.4.6g-2) unstable; urgency=low * bump debhelper version to 9. takes care of some lintian warnings. * multi-arch support for shared library * set symlink from ChangeLog to NEWS (lintian warning) * add lintian override (dev-pkg-without-shlib-symlink) shared library has version 1, not 1-1.4 -- Rico Sennrich Mon, 6 May 2013 21:30:04 +0100 sfst (1.4.6g-1) experimental; urgency=low * new maintainer (closes: #702488) * new upstream release * update package style * clean-up separation of upstream/debian files * use source format 3.0 (quilt) * use autoreconf for building * add get-orig-source goal to rules (removes PDFs from source tarball) * add more headers to dev package (Closes: LP:#583815) * fix some lintian warnings * fix bad whatis entries of man pages * add watch file * bump standards to 2.9.4 -- Rico Sennrich Tue, 16 Apr 2013 11:30:57 +0100 sfst (1.2.0-1.2) unstable; urgency=low * Non-maintainer upload. * Fix FTBFS with gcc-4.7: rename redeclared variables in src/fst.C (Closes: #667372) -- Mònica Ramírez Arceda Mon, 21 May 2012 13:58:07 +0200 sfst (1.2.0-1.1) unstable; urgency=medium * Non-maintainer upload. * Build depend on libreadline5-dev to libreadline-dev (Closes: #553852) * Set urgency to medium due to RC bug fix * Also fix some minor lintian warnings: * Add ${misc:Depends} to depends of libsfst1-1.2-0-dev * Bump debian/compat to 7 * Use dh_prep instead of dh_clean -k * Bump standards to 2.9.2 (no further changes needed) -- Alexander Reichle-Schmehl Fri, 29 Apr 2011 13:46:41 +0200 sfst (1.2.0-1) unstable; urgency=low * Initial release Closes: #481915 -- Francis Tyers Mon, 19 May 2008 11:40:31 +0100 debian/watch0000644000000000000000000000011212133316017010206 0ustar version=3 ftp://ftp.ims.uni-stuttgart.de/pub/corpora/SFST/SFST-(.+).tar.gzdebian/libsfst1-1.4.lintian-overrides0000644000000000000000000000015312142002116014561 0ustar libsfst1-1.4: package-name-doesnt-match-sonames libsfst1-1.4-0 libsfst1-1.4: dev-pkg-without-shlib-symlink debian/libsfst1-1.4-dev.dirs0000644000000000000000000000001312142004623012640 0ustar usr/includedebian/rules0000755000000000000000000000203212142001472010234 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS %: dh $@ --with autoreconf TMP=get-orig-source-tmp VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p') get-orig-source: rm -rf $(TMP) mkdir $(TMP) uscan --download --no-symlink --destdir $(TMP) cd $(TMP) && tar xf SFST*.tar.gz && \ rm SFST*.tar.gz && \ rm -r */data && \ rm -r */doc && \ tar czf ../sfst_$(VERSION).orig.tar.gz * rm -rf $(TMP) debian/patches/0000755000000000000000000000000012142655710010620 5ustar debian/patches/0003-altivec-support-on-powerpcspe.patch0000644000000000000000000000240012142655322020154 0ustar From: Rico Sennrich Date: Thu, 9 May 2013 09:29:50 +0200 Subject: altivec support on powerpcspe --- configure.ac | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9cfe590..19ad239 100644 --- a/configure.ac +++ b/configure.ac @@ -50,11 +50,27 @@ then ARCH=$($(which uname) -m) else ARCH=$($(which arch)) fi +AC_COMPILE_IFELSE([ +#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) +#error "Need GCC >= 3.4 for sane altivec support" +#endif +#include +int main () { + vector unsigned int v = vec_splat_u32 (1); + v = vec_sub (v, v); + return 0; +}], [HAVE_ALTIVEC=yes], [HAVE_ALTIVEC=no]) + if test x$ARCH = xppc then AC_MSG_RESULT([PowerPC]) - CFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CFLAGS" - CXXFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CXXFLAGS" + CFLAGS="-Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer $CFLAGS" + CXXFLAGS="-Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer $CXXFLAGS" + if test x$HAVE_ALTIVEC = xyes + then + CFLAGS="-maltivec $CFLAGS" + CXXFLAGS="-maltivec $CXXFLAGS" + fi else if test x$ARCH = xi686 then -- debian/patches/series0000644000000000000000000000021312142655322012030 0ustar 0001-fix-man-pages.patch 0002-build-system.patch 0003-altivec-support-on-powerpcspe.patch 0004-fix-missing-symbols-in-shared-library.patch debian/patches/0001-fix-man-pages.patch0000644000000000000000000001206712142655322014660 0ustar From: Rico Sennrich Date: Fri, 8 Mar 2013 20:33:26 +0100 Subject: fix man pages --- src/man1/fst-compiler-utf8.1 | 2 +- src/man1/fst-compiler.1 | 2 +- src/man1/fst-infl.1 | 2 +- src/man1/fst-infl2-daemon.1 | 80 ++++++++++++++++++++++++++++++++++++++++++ src/man1/fst-infl2.1 | 2 +- src/man1/fst-infl3.1 | 2 +- 6 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 src/man1/fst-infl2-daemon.1 diff --git a/src/man1/fst-compiler-utf8.1 b/src/man1/fst-compiler-utf8.1 index 8356d50..9d889c0 100644 --- a/src/man1/fst-compiler-utf8.1 +++ b/src/man1/fst-compiler-utf8.1 @@ -1,6 +1,6 @@ .TH fst-compiler 1 "December 2004" "" "fst-compiler" .SH NAME -fst-compiler fst-compiler-utf8 \- Two compilers for SFST programs +fst-compiler, fst-compiler-utf8 \- Two compilers for SFST programs .SH SYNOPSIS .B fst-compiler .I grammar-file diff --git a/src/man1/fst-compiler.1 b/src/man1/fst-compiler.1 index 8356d50..9d889c0 100644 --- a/src/man1/fst-compiler.1 +++ b/src/man1/fst-compiler.1 @@ -1,6 +1,6 @@ .TH fst-compiler 1 "December 2004" "" "fst-compiler" .SH NAME -fst-compiler fst-compiler-utf8 \- Two compilers for SFST programs +fst-compiler, fst-compiler-utf8 \- Two compilers for SFST programs .SH SYNOPSIS .B fst-compiler .I grammar-file diff --git a/src/man1/fst-infl.1 b/src/man1/fst-infl.1 index b85e120..4d0cf52 100644 --- a/src/man1/fst-infl.1 +++ b/src/man1/fst-infl.1 @@ -1,6 +1,6 @@ .TH fst-infl 1 "November 2004" "" "fst-infl" .SH NAME -fst-infl fst-infl2 fst-infl3 \- morphological analysers +fst-infl, fst-infl2, fst-infl3 \- morphological analysers .SH SYNOPSIS .B fst-infl [ options ] .I file diff --git a/src/man1/fst-infl2-daemon.1 b/src/man1/fst-infl2-daemon.1 new file mode 100644 index 0000000..eece07b --- /dev/null +++ b/src/man1/fst-infl2-daemon.1 @@ -0,0 +1,80 @@ +.TH fst-infl 1 "December 2012" "" "fst-infl2-daemon" +.SH NAME +fst-infl2-daemon \- morphological analysers +.SH SYNOPSIS +.B fst-infl2-daemon [ options ] +.I +.I file +.SH OPTIONS +.TP +.B \-t file +Read an alternative transducer from +.I file +and use it if the main transducer fails to find an analysis. By +iterating this option, a cascade of transducers may be tried to find +an analysis. +.TP +.B \-b +Print surface and analysis symbols. (fst-infl2 only) +.TP +.B \-n +Print multi-character symbols without the enclosing angle brackets. +(fst-infl only) +.TP +.B \-d +The analyses are symbolically disambiguated by returning only analyses +with a minimal number of morphemes. This option requires that morpheme +boundaries are marked with the tag . If no tag is found in the +analysis string, then the program (basically) counts the number of +multi-character symbols consisting entirely of upper-case characters +and uses this count for disambiguation. The latter heuristic was +developed for the German SMOR morphology. (This option is only +available with fst-infl2 and fst-infl3.) +.TP +.B \-e n +If no regular analysis is found, do robust matching and print analyses +with up to +.I n +edit errors. The set of edit operations currently includes +replacement, insertion and deletion. Each operation has currently a +fixed error weight of 1. (fst-infl2 only) +.TP +.B \-% f +Disambiguates the analyses statistically and prints the most likely +analyses with at least f % of the total probability mass of the +analyses. The transducer weights are read from a file obtained by +appending +.I .prob +to the name of the transducer file. The weight files are created with +.I fst-train. +(fst-infl2 only) +.TP +.B \-p +Print the probability of each analysis. (fst-infl2 only) +.TP +.B \-c +use this option if the transducer was compiled on a computer with a +different endianness. If you have a transducer which was compiled +on a Sparc computer and you want to use it on a Pentium, you need to +use this option. (fst-infl2 only) +.TP +.B \-q +Suppress status messages. +.TP +.B \-h +Print usage information. +.SH DESCRIPTION +.I fst-infl2-daemon +is similar to +.I fst-infl2 +but but reads and writes from/to a socket. +.SH BUGS +No bugs are known so far. +.SH "SEE ALSO" +fst-infl2, fst-compiler, fst-mor +.SH AUTHOR +Helmut Schmid, +Institute for Computational Linguistics, +University of Stuttgart, +Email: schmid@ims.uni-stuttgart.de, +This software is available under the GNU Public License. diff --git a/src/man1/fst-infl2.1 b/src/man1/fst-infl2.1 index b85e120..4d0cf52 100644 --- a/src/man1/fst-infl2.1 +++ b/src/man1/fst-infl2.1 @@ -1,6 +1,6 @@ .TH fst-infl 1 "November 2004" "" "fst-infl" .SH NAME -fst-infl fst-infl2 fst-infl3 \- morphological analysers +fst-infl, fst-infl2, fst-infl3 \- morphological analysers .SH SYNOPSIS .B fst-infl [ options ] .I file diff --git a/src/man1/fst-infl3.1 b/src/man1/fst-infl3.1 index b85e120..4d0cf52 100644 --- a/src/man1/fst-infl3.1 +++ b/src/man1/fst-infl3.1 @@ -1,6 +1,6 @@ .TH fst-infl 1 "November 2004" "" "fst-infl" .SH NAME -fst-infl fst-infl2 fst-infl3 \- morphological analysers +fst-infl, fst-infl2, fst-infl3 \- morphological analysers .SH SYNOPSIS .B fst-infl [ options ] .I file -- debian/patches/0002-build-system.patch0000644000000000000000000003277312142655322014654 0ustar From: Rico Sennrich Date: Fri, 8 Mar 2013 20:33:48 +0100 Subject: build system --- AUTHORS | 1 + ChangeLog | 8 +++ Makefile.am | 12 ++++ NEWS | 1 + README | 13 ++-- configure.ac | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sfst.pc.in | 10 +++ src/Makefile.am | 127 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 350 insertions(+), 5 deletions(-) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 120000 NEWS create mode 100644 configure.ac create mode 100644 sfst.pc.in create mode 100644 src/Makefile.am diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..205c013 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Helmut Schmid diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..f484adf --- /dev/null +++ b/ChangeLog @@ -0,0 +1,8 @@ +fri mar 8 20:30:13 CEST 2013 + + * new upstream release + * new build system + +lun may 19 11:33:50 CEST 2008 + + * Initial packgement for autotools diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..ade8ab8 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +SUBDIRS = src +DIST_SUBDIRS = src + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = sfst.pc + +## This part needs to be autoconf-ised. + +EXTRA_DIST=autogen.sh data/easy/*.* data/XMOR/*.* data/SMOR/*.fst data/easy/README \ + data/easy/adj data/SMOR/README data/SMOR/lexicon data/SMOR/Makefile data/XMOR/README \ + data/XMOR/FILES data/XMOR/lexicon data/XMOR/Makefile data/XMOR/HOWTO +#doc/*.* diff --git a/NEWS b/NEWS new file mode 120000 index 0000000..b0936e8 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +ChangeLog \ No newline at end of file diff --git a/README b/README index 2f41398..e03b9b9 100644 --- a/README +++ b/README @@ -30,18 +30,21 @@ You might additionally need one or more of the following tools: After unpacking the software package, change to the source directory and call +> ./configure + +Then type: + > make to compile the tools. Then call > make install -to install the tools in /usr/local/bin. Finally call - -> make maninstall - -to install the manpages in /usr/local/man/man1 and you are done. +to install the tools in /usr/local/. If you would like to install +the tools in another location, call ./configure with the --prefix +parameter, e.g. +> ./configure --prefix=/opt/local The subdirectory data contains a simple example of an English morphological analyser, the source code of the German SMOR morphology diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9cfe590 --- /dev/null +++ b/configure.ac @@ -0,0 +1,183 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.52) + +AC_INIT([], [1.4.6g], [schmid@ims.uni-stuttgart.de]) + +GENERIC_LIBRARY_NAME=sfst + +GENERIC_MAJOR_VERSION=1 +GENERIC_MINOR_VERSION=4 +GENERIC_MICRO_VERSION=6g + +# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION) +GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION +AC_SUBST(GENERIC_API_VERSION) + +# Shared library versioning +GENERIC_LIBRARY_VERSION=0:0:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed +# or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed + +AC_SUBST(GENERIC_LIBRARY_VERSION) +PACKAGE=$GENERIC_LIBRARY_NAME +AC_SUBST(GENERIC_LIBRARY_NAME) + +GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION +GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION +AC_SUBST(GENERIC_RELEASE) +AC_SUBST(GENERIC_VERSION) + +VERSION=$GENERIC_VERSION + +AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) + +# Checks for programs. + +AC_MSG_CHECKING([Compilation architecture: PPC, i686, x86_64, Other]) +if test x$(which arch) = x +then ARCH=$($(which uname) -m) +else ARCH=$($(which arch)) +fi + +if test x$ARCH = xppc +then + AC_MSG_RESULT([PowerPC]) + CFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CFLAGS" + CXXFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CXXFLAGS" +else + if test x$ARCH = xi686 + then + AC_MSG_RESULT([i686]) + CFLAGS="-Wall -ansi -march=i686 -O3 -fomit-frame-pointer -funroll-loops $CFLAGS" + CXXFLAGS="-Wall -ansi -march=i686 -O3 \ + -fomit-frame-pointer -funroll-loops $CXXFLAGS" + + else + if test x$ARCH = xx86_64 + then + AC_MSG_RESULT([x86_64]) + CFLAGS="-Wall -ansi -O3 -mtune=nocona -fomit-frame-pointer -funroll-loops $CFLAGS" + CXXFLAGS="-Wall -ansi -O3 -mtune=nocona \ + -fomit-frame-pointer -funroll-loops $CXXFLAGS" + else + AC_MSG_RESULT([Other]) + CFLAGS="-Wall -ansi -O3 $CFLAGS" + CXXFLAGS="-Wall -ansi -O3 $CXXFLAGS" + fi + fi +fi + + +AC_PROG_CXX +AM_PROG_LIBTOOL +AM_SANITY_CHECK +AC_LANG_CPLUSPLUS + +AC_PROG_YACC + +AC_PATH_PROG(FLEX, flex, no) +if test x$ac_cv_path_FLEX = x +then + AC_MSG_ERROR([You don't have flex installed.]) +fi +if test x$ac_cv_path_FLEX = xno +then + AC_MSG_ERROR([You don't have flex installed.]) +fi + +AC_PATH_PROG(BISON, bison, no) +if test x$ac_cv_path_BISON = x +then + AC_MSG_ERROR([You don't have bison installed.]) +fi +if test x$ac_cv_path_BISON = xno +then + AC_MSG_ERROR([You don't have bison installed.]) +fi + + + +AC_ARG_ENABLE(debug, + [ --enable-debug Enable "-g -Wall" compiler options], + [CXXFLAGS="-g -Wall";CFLAGS="-g -Wall"]) + +AC_ARG_ENABLE(profile, + [ --enable-profile Enable "-pg -g -Wall" compiler options], + [CXXFLAGS="-pg -g -Wall"; CFLAGS="-pg -g -Wall"; LDFLAGS="-pg"]) + +# We enable this because of errors with gcc 4.3 + +CFLAGS="-Wno-deprecated $CFLAGS" +CXXFLAGS="-Wno-deprecated $CXXFLAGS" + +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test x$ac_cv_path_PKG_CONFIG = x +then + AC_MSG_ERROR([You don't have pkg-config installed]) +fi +if test x$ac_cv_path_PKG_CONFIG = xno +then + AC_MSG_ERROR([You don't have pkg-config installed]) +fi + +# Check for wide strings +AC_DEFUN([AC_CXX_WSTRING],[ + AC_CACHE_CHECK(whether the compiler supports wide strings, + ac_cv_cxx_wstring, + [AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ +std::wstring test = L"test"; + ]])], + [ac_cv_cxx_wstring=yes], [ac_cv_cxx_wstring=no]) + AC_LANG_RESTORE + ]) +]) + +if test "$ac_cv_cxx_have_ext_hash_map" = yes +then + CXXFLAGS="-DSGIext $CXXFLAGS" + CFLAGS="-DSGIext $CFLAGS" + LDFLAGS="-DSGIext $LDFLAGS" +fi + +AC_CXX_WSTRING + +if test "$ac_cv_cxx_wstring" = no +then + AC_MSG_ERROR([Missing wide string support]) +fi + + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([stdlib.h string.h unistd.h stddef.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_FUNC_MALLOC +AC_FUNC_REALLOC + +AC_CHECK_DECLS([fread_unlocked, fwrite_unlocked, fgetc_unlocked, \ + fputc_unlocked, fputs_unlocked, \ + fgetwc_unlocked, fputwc_unlocked, fputws_unlocked]) + +AC_CHECK_FUNCS([setlocale strdup getopt_long]) + +AC_OUTPUT([Makefile sfst.pc src/Makefile]) diff --git a/sfst.pc.in b/sfst.pc.in new file mode 100644 index 0000000..575658e --- /dev/null +++ b/sfst.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: sfst +Description: Finite-state tools for natural language processing +Version: @VERSION@ +Libs: -L${libdir} -l@GENERIC_LIBRARY_NAME@@GENERIC_API_VERSION@ @SFST_LIBS@ +Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@ -I${libdir}/@GENERIC_LIBRARY_NAME@-@GENERIC_API_VERSION@/include @SFST_CFLAGS@ diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..8a55792 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,127 @@ +## Library sources + +h_sources = alphabet.h basic.h make-compact.h utf8.h interface.h \ + fst.h sgi.h compact.h mem.h + +cc_sources = alphabet.C basic.C compact.C utf8.C hopcroft.C + +library_includedir = $(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME) +library_include_HEADERS = $(h_sources) + +# List of binaries to build + +bin_PROGRAMS = fst-infl fst-compiler fst-compiler-utf8 fst-compare fst-compact \ + fst-generate fst-print fst-infl2 fst-infl2-daemon fst-infl3 fst-lattice fst-match \ + fst-parse fst-parse2 fst-train fst-text2bin fst-mor fst-lowmem + +instdir = sfst + +# Shared library definition + +lib_LTLIBRARIES= libsfst1.la +libsfst1_la_SOURCES= $(h_sources) $(cc_sources) +libsfst1_la_LDFLAGS= -version-info $(GENERIC_LIBRARY_VERSION) -release $(GENERIC_RELEASE) + +# Bison and flex stuff + +default-scanner.C: fst.h interface.h scanner.ll fst-compiler.C default-scanner.ll + $(FLEX) -o$@ default-scanner.ll + +utf8-scanner.C: fst.h interface.h scanner.ll fst-compiler.C utf8-scanner.ll + $(FLEX) -o$@ utf8-scanner.ll + +default-scanner.ll: scanner.ll + sed -e '/^utf8>/d' -e 's/^default> *//' scanner.ll > default-scanner.ll + +utf8-scanner.ll: scanner.ll + sed -e '/^default>/d' -e 's/^utf8> *//' scanner.ll > utf8-scanner.ll + +fst-compiler.C: + $(BISON) -d -o $@ fst-compiler.yy + +## Binaries + +fst_infl_SOURCES = fst-infl.C fst.C operators.C determinise.C +fst_infl_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_infl_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_infl2_SOURCES = fst-infl2.C fst.C operators.C determinise.C robust.C +fst_infl2_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_infl2_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_infl2_daemon_SOURCES = fst-infl2-daemon.C fst.C operators.C determinise.C robust.C +fst_infl2_daemon_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_infl2_daemon_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_infl3_SOURCES = fst-infl3.C fst.C operators.C determinise.C lowmem.C +fst_infl3_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_infl3_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + + +fst_compiler_SOURCES = fst-compiler.C fst.C operators.C determinise.C make-compact.C \ + interface.C default-scanner.C +fst_compiler_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_compiler_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_compiler_utf8_SOURCES = fst-compiler.C fst.C operators.C determinise.C \ + make-compact.C interface.C utf8-scanner.C +fst_compiler_utf8_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_compiler_utf8_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_compact_SOURCES = fst-compact.C make-compact.C fst.C operators.C determinise.C +fst_compact_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_compact_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_compare_SOURCES = fst-compare.C fst.C operators.C determinise.C +fst_compare_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_compare_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_generate_SOURCES = fst-generate.C fst.C operators.C determinise.C generate.C +fst_generate_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_generate_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_print_SOURCES = fst-print.C fst.C operators.C determinise.C generate.C +fst_print_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_print_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_lattice_SOURCES = fst-lattice.C fst.C operators.C determinise.C generate.C +fst_lattice_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_lattice_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_parse_SOURCES = fst-parse.C fst.C operators.C determinise.C generate.C +fst_parse_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_parse_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_parse2_SOURCES = fst-parse2.C fst.C operators.C determinise.C generate.C +fst_parse2_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_parse2_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_match_SOURCES = fst-match.C fst.C operators.C determinise.C generate.C +fst_match_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_match_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_train_SOURCES = fst-train.C fst.C operators.C determinise.C generate.C +fst_train_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_train_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_text2bin_SOURCES = fst-text2bin.C fst.C operators.C determinise.C generate.C +fst_text2bin_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_text2bin_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_mor_SOURCES = fst-mor.C fst.C operators.C determinise.C generate.C +fst_mor_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_mor_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + +fst_lowmem_SOURCES = fst-lowmem.C fst.C operators.C determinise.C generate.C lowmem.C +fst_lowmem_LDADD = libsfst$(GENERIC_API_VERSION).la +fst_lowmem_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) + + + +INCLUDES = -I$(top_srcdir) $(SFST_CFLAGS) + +CLEANFILES = $(bin_PROGRAMS) fst-compiler.C utf8-scanner.C default-scanner.C + +EXTRA_DIST = compact.h fst-compiler.h lowmem.h mem.h \ + default-scanner.ll scanner.ll utf8-scanner.ll fst-compiler.yy + -- debian/patches/0004-fix-missing-symbols-in-shared-library.patch0000644000000000000000000001237012142655710021462 0ustar From: Rico Sennrich Date: Thu, 9 May 2013 10:12:02 +0200 Subject: fix missing symbols in shared library --- src/Makefile.am | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8a55792..e36c110 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ h_sources = alphabet.h basic.h make-compact.h utf8.h interface.h \ fst.h sgi.h compact.h mem.h -cc_sources = alphabet.C basic.C compact.C utf8.C hopcroft.C +cc_sources = alphabet.C basic.C compact.C utf8.C hopcroft.C fst.C operators.C determinise.C library_includedir = $(includedir)/$(GENERIC_LIBRARY_NAME)-$(GENERIC_API_VERSION)/$(GENERIC_LIBRARY_NAME) library_include_HEADERS = $(h_sources) @@ -41,78 +41,77 @@ fst-compiler.C: ## Binaries -fst_infl_SOURCES = fst-infl.C fst.C operators.C determinise.C +fst_infl_SOURCES = fst-infl.C fst_infl_LDADD = libsfst$(GENERIC_API_VERSION).la fst_infl_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_infl2_SOURCES = fst-infl2.C fst.C operators.C determinise.C robust.C +fst_infl2_SOURCES = fst-infl2.C robust.C fst_infl2_LDADD = libsfst$(GENERIC_API_VERSION).la fst_infl2_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_infl2_daemon_SOURCES = fst-infl2-daemon.C fst.C operators.C determinise.C robust.C +fst_infl2_daemon_SOURCES = fst-infl2-daemon.C robust.C fst_infl2_daemon_LDADD = libsfst$(GENERIC_API_VERSION).la fst_infl2_daemon_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_infl3_SOURCES = fst-infl3.C fst.C operators.C determinise.C lowmem.C +fst_infl3_SOURCES = fst-infl3.C lowmem.C fst_infl3_LDADD = libsfst$(GENERIC_API_VERSION).la fst_infl3_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_compiler_SOURCES = fst-compiler.C fst.C operators.C determinise.C make-compact.C \ +fst_compiler_SOURCES = fst-compiler.C make-compact.C \ interface.C default-scanner.C fst_compiler_LDADD = libsfst$(GENERIC_API_VERSION).la fst_compiler_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_compiler_utf8_SOURCES = fst-compiler.C fst.C operators.C determinise.C \ - make-compact.C interface.C utf8-scanner.C +fst_compiler_utf8_SOURCES = fst-compiler.C make-compact.C interface.C utf8-scanner.C fst_compiler_utf8_LDADD = libsfst$(GENERIC_API_VERSION).la fst_compiler_utf8_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_compact_SOURCES = fst-compact.C make-compact.C fst.C operators.C determinise.C +fst_compact_SOURCES = fst-compact.C make-compact.C fst_compact_LDADD = libsfst$(GENERIC_API_VERSION).la fst_compact_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_compare_SOURCES = fst-compare.C fst.C operators.C determinise.C +fst_compare_SOURCES = fst-compare.C fst_compare_LDADD = libsfst$(GENERIC_API_VERSION).la fst_compare_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_generate_SOURCES = fst-generate.C fst.C operators.C determinise.C generate.C +fst_generate_SOURCES = fst-generate.C generate.C fst_generate_LDADD = libsfst$(GENERIC_API_VERSION).la fst_generate_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_print_SOURCES = fst-print.C fst.C operators.C determinise.C generate.C +fst_print_SOURCES = fst-print.C generate.C fst_print_LDADD = libsfst$(GENERIC_API_VERSION).la fst_print_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_lattice_SOURCES = fst-lattice.C fst.C operators.C determinise.C generate.C +fst_lattice_SOURCES = fst-lattice.C generate.C fst_lattice_LDADD = libsfst$(GENERIC_API_VERSION).la fst_lattice_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_parse_SOURCES = fst-parse.C fst.C operators.C determinise.C generate.C +fst_parse_SOURCES = fst-parse.C generate.C fst_parse_LDADD = libsfst$(GENERIC_API_VERSION).la fst_parse_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_parse2_SOURCES = fst-parse2.C fst.C operators.C determinise.C generate.C +fst_parse2_SOURCES = fst-parse2.C generate.C fst_parse2_LDADD = libsfst$(GENERIC_API_VERSION).la fst_parse2_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_match_SOURCES = fst-match.C fst.C operators.C determinise.C generate.C +fst_match_SOURCES = fst-match.C generate.C fst_match_LDADD = libsfst$(GENERIC_API_VERSION).la fst_match_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_train_SOURCES = fst-train.C fst.C operators.C determinise.C generate.C +fst_train_SOURCES = fst-train.C generate.C fst_train_LDADD = libsfst$(GENERIC_API_VERSION).la fst_train_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_text2bin_SOURCES = fst-text2bin.C fst.C operators.C determinise.C generate.C +fst_text2bin_SOURCES = fst-text2bin.C generate.C fst_text2bin_LDADD = libsfst$(GENERIC_API_VERSION).la fst_text2bin_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_mor_SOURCES = fst-mor.C fst.C operators.C determinise.C generate.C +fst_mor_SOURCES = fst-mor.C generate.C fst_mor_LDADD = libsfst$(GENERIC_API_VERSION).la fst_mor_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -fst_lowmem_SOURCES = fst-lowmem.C fst.C operators.C determinise.C generate.C lowmem.C +fst_lowmem_SOURCES = fst-lowmem.C generate.C lowmem.C fst_lowmem_LDADD = libsfst$(GENERIC_API_VERSION).la fst_lowmem_LDFLAGS = -lsfst$(GENERIC_API_VERSION) $(SFST_LIBS) -- debian/libsfst1-1.4.install0000644000000000000000000000003112142001472012570 0ustar usr/lib/*/libsfst1*.so.* debian/source/0000755000000000000000000000000012133316017010463 5ustar debian/source/format0000644000000000000000000000001412133316017011671 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000221012133316017011111 0ustar This package was debianised by Francis Tyers on Mon, 19 May 2008 00:12:15 +0100. It was downloaded from: http://www.ims.uni-stuttgart.de/projekte/gramotron/SOFTWARE/SFST.html Copyright: Copyright (C) 2008 Helmut Schmid This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-2. debian/compat0000644000000000000000000000000212142001472010355 0ustar 9 debian/sfst.dirs0000644000000000000000000000001012133316017011014 0ustar usr/bin debian/docs0000644000000000000000000000001312142001472010024 0ustar NEWS READMEdebian/sfst.manpages0000644000000000000000000000065712133316017011667 0ustar src/man1/fst-compact.1 src/man1/fst-compare.1 src/man1/fst-compiler.1 src/man1/fst-compiler-utf8.1 src/man1/fst-infl.1 src/man1/fst-infl2.1 src/man1/fst-infl2-daemon.1 src/man1/fst-infl3.1 src/man1/fst-lattice.1 src/man1/fst-lowmem.1 src/man1/fst-match.1 src/man1/fst-mor.1 src/man1/fst-parse.1 src/man1/fst-print.1 src/man1/fst-text2bin.1 src/man1/fst-train.1 src/man1/fst-generate.1 src/man1/fst-parse2.1 src/man1/fst-generate.1 debian/sfst.install0000644000000000000000000000001012133316017011521 0ustar usr/bin