From owner-svn-ports-head@FreeBSD.ORG Wed May 7 14:34:26 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91370335; Wed, 7 May 2014 14:34:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D947F27; Wed, 7 May 2014 14:34:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47EYQf4012430; Wed, 7 May 2014 14:34:26 GMT (envelope-from demon@svn.freebsd.org) Received: (from demon@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47EYOoY012421; Wed, 7 May 2014 14:34:24 GMT (envelope-from demon@svn.freebsd.org) Message-Id: <201405071434.s47EYOoY012421@svn.freebsd.org> From: Dmitry Sivachenko Date: Wed, 7 May 2014 14:34:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r353158 - in head/math: . foma foma/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 14:34:26 -0000 Author: demon Date: Wed May 7 14:34:24 2014 New Revision: 353158 URL: http://svnweb.freebsd.org/changeset/ports/353158 QAT: https://qat.redports.org/buildarchive/r353158/ Log: New port: foma. Foma is a compiler, programming language, and C library for constructing finite-state automata and transducers for various uses. It has specific support for many natural language processing applications such as producing morphological analyzers. Although NLP applications are probably the main use of foma, it is sufficiently generic to use for a large number of purposes. Added: head/math/foma/ head/math/foma/Makefile (contents, props changed) head/math/foma/distinfo (contents, props changed) head/math/foma/files/ head/math/foma/files/patch-flookup.c (contents, props changed) head/math/foma/files/patch-fomalib.h (contents, props changed) head/math/foma/files/patch-iface.c (contents, props changed) head/math/foma/files/patch-io.c (contents, props changed) head/math/foma/pkg-descr (contents, props changed) head/math/foma/pkg-plist (contents, props changed) Modified: head/math/Makefile Modified: head/math/Makefile ============================================================================== --- head/math/Makefile Wed May 7 14:18:54 2014 (r353157) +++ head/math/Makefile Wed May 7 14:34:24 2014 (r353158) @@ -124,6 +124,7 @@ SUBDIR += fftw3-long SUBDIR += fftw3-quad SUBDIR += fityk + SUBDIR += foma SUBDIR += fpc-fftw SUBDIR += fpc-gmp SUBDIR += fpc-numlib Added: head/math/foma/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/Makefile Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,25 @@ +# Created by: Dmitry Sivachenko +# $FreeBSD$ + +PORTNAME= foma +PORTVERSION= 0.9.17 +CATEGORIES= math +MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} + +MAINTAINER= demon@FreeBSD.org +COMMENT= A toolkit for constructing finite-state automata and transducers + +LICENSE= GPLv2 + +USES= gmake +USE_GCC= yes +USE_LDCONFIG= yes + +do-install: + cd ${WRKSRC} && ${INSTALL_DATA} fomalib.h fomalibconf.h ${STAGEDIR}${PREFIX}/include/ + cd ${WRKSRC} && ${INSTALL_PROGRAM} foma flookup cgflookup ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_LIB} ${WRKSRC}/libfoma.a ${STAGEDIR}${PREFIX}/lib/ + ${INSTALL_LIB} ${WRKSRC}/libfoma.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libfoma.so.0 + cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s libfoma.so.0 libfoma.so + +.include Added: head/math/foma/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/distinfo Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,2 @@ +SHA256 (foma-0.9.17.tar.gz) = 71761499b83af79cdc81b8b73ad2a2a1dd90c7466653ee89ba7dc9863fdf74f0 +SIZE (foma-0.9.17.tar.gz) = 333693 Added: head/math/foma/files/patch-flookup.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/files/patch-flookup.c Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,10 @@ +--- flookup.c.orig 2014-05-07 17:56:43.000000000 +0400 ++++ flookup.c 2014-05-07 17:57:05.000000000 +0400 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include "fomalib.h" + Added: head/math/foma/files/patch-fomalib.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/files/patch-fomalib.h Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,11 @@ +--- fomalib.h.orig 2012-11-17 13:46:43.000000000 +0400 ++++ fomalib.h 2014-05-07 18:16:20.000000000 +0400 +@@ -298,7 +298,7 @@ + FEXPORT int save_defined(); + FEXPORT int save_stack_att(); + FEXPORT int write_prolog(struct fsm *net, char *filename); +-FEXPORT int foma_net_print(struct fsm *net, gzFile *outfile); ++FEXPORT int foma_net_print(struct fsm *net, gzFile outfile); + + /* Lookups */ + Added: head/math/foma/files/patch-iface.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/files/patch-iface.c Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,28 @@ +--- iface.c.orig 2012-08-10 19:40:14.000000000 +0400 ++++ iface.c 2014-05-07 18:17:01.000000000 +0400 +@@ -16,7 +16,6 @@ + /* along with foma. If not, see . */ + + #include +-#include + #include + #include + #include +@@ -47,7 +46,7 @@ + extern int g_med_cutoff ; + extern char *g_att_epsilon; + +-extern int foma_net_print(struct fsm *net, gzFile *outfile); ++extern int foma_net_print(struct fsm *net, gzFile outfile); + + static char *sigptr(struct sigma *sigma, int number); + static int print_dot(struct fsm *net, char *filename); +@@ -999,7 +998,7 @@ + } + + void iface_save_stack(char *filename) { +- gzFile *outfile; ++ gzFile outfile; + struct stack_entry *stack_ptr; + + if (iface_stack_check(1)) { Added: head/math/foma/files/patch-io.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/files/patch-io.c Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,56 @@ +--- io.c.orig 2011-12-09 18:04:38.000000000 +0400 ++++ io.c 2014-05-07 18:15:26.000000000 +0400 +@@ -56,7 +56,7 @@ static size_t io_get_gz_file_size(char * + static size_t io_get_file_size(char *filename); + static size_t io_get_regular_file_size(char *filename); + size_t io_gz_file_to_mem (struct io_buf_handle *iobh, char *filename); +-int foma_net_print(struct fsm *net, gzFile *outfile); ++int foma_net_print(struct fsm *net, gzFile outfile); + struct fsm *io_net_read(struct io_buf_handle *iobh, char **net_name); + static inline int explode_line (char *buf, int *values); + +@@ -507,7 +507,7 @@ struct fsm *fsm_read_text_file(char *fil + } + + int fsm_write_binary_file(struct fsm *net, char *filename) { +- gzFile *outfile; ++ gzFile outfile; + if ((outfile = gzopen(filename,"wb")) == NULL) { + return(1); + } +@@ -560,7 +560,7 @@ struct fsm *fsm_read_binary_file(char *f + } + + int save_defined(char *filename) { +- gzFile *outfile; ++ gzFile outfile; + struct defined *def; + def = get_defines(); + if (def == NULL) { +@@ -829,7 +829,7 @@ static int io_gets(struct io_buf_handle + return(i); + } + +-int foma_net_print(struct fsm *net, gzFile *outfile) { ++int foma_net_print(struct fsm *net, gzFile outfile) { + struct sigma *sigma; + struct fsm_state *fsm; + int i, maxsigma, laststate, *cm, extras; +@@ -949,7 +949,7 @@ static size_t io_get_regular_file_size(c + + + static size_t io_get_file_size(char *filename) { +- gzFile *FILE; ++ gzFile FILE; + size_t size; + FILE = gzopen(filename, "r"); + if (FILE == NULL) { +@@ -968,7 +968,7 @@ static size_t io_get_file_size(char *fil + size_t io_gz_file_to_mem(struct io_buf_handle *iobh, char *filename) { + + size_t size; +- gzFile *FILE; ++ gzFile FILE; + + size = io_get_file_size(filename); + if (size == 0) { Added: head/math/foma/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/pkg-descr Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,17 @@ +Foma is a compiler, programming language, and C library for constructing +finite-state automata and transducers for various uses. It has specific +support for many natural language processing applications such as producing +morphological analyzers. Although NLP applications are probably the main use +of foma, it is sufficiently generic to use for a large number of purposes. + +The foma interface is similar to the Xerox xfst interface, and supports +most of the commands and the regular expression syntax in xfst. +Many grammars written for xfst compile out-of-the-box with foma. + +The library contains efficient implementations of all classical +automata/transducer algorithms: determinization, minimization, epsilon-removal, +composition, boolean operations. Also, more advanced construction methods +are available: context restriction, quotients, first-order regular logic, +transducers from replacement rules, etc. + +WWW: https://code.google.com/p/foma/ Added: head/math/foma/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/foma/pkg-plist Wed May 7 14:34:24 2014 (r353158) @@ -0,0 +1,8 @@ +bin/cgflookup +bin/flookup +bin/foma +include/fomalib.h +include/fomalibconf.h +lib/libfoma.a +lib/libfoma.so +lib/libfoma.so.0