]> git.pld-linux.org Git - packages/hfst.git/commitdiff
- new package
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Nov 2010 23:26:43 +0000 (23:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- link patch to fix libhfstlexc linking
- rules patch to fix flex/bison rules (conflicting .h[h]/.c[c] outputs)

Changed files:
    hfst-link.patch -> 1.1
    hfst-rules.patch -> 1.1
    hfst.spec -> 1.1

hfst-link.patch [new file with mode: 0644]
hfst-rules.patch [new file with mode: 0644]
hfst.spec [new file with mode: 0644]

diff --git a/hfst-link.patch b/hfst-link.patch
new file mode 100644 (file)
index 0000000..28c4f97
--- /dev/null
@@ -0,0 +1,22 @@
+--- hfst-2.4.1/hfst-tools/hfst-lexc/src/Makefile.am.orig       2009-11-10 23:30:20.000000000 +0100
++++ hfst-2.4.1/hfst-tools/hfst-lexc/src/Makefile.am    2010-11-27 12:50:55.227094909 +0100
+@@ -1,9 +1,8 @@
+ ## Process this file with automake to produce Makefile.in
+ ## For nested distribution as part of hfst
+-hfst_lexc_LDADD = ../../../hfst2/libhfst.la libhfstlexc.la
++hfst_lexc_LDADD = libhfstlexc.la
+ AM_CPPFLAGS = -I../../../ -I ../../../hfst2
+-AM_CXXFLAGS = -O3
+ lib_LTLIBRARIES=libhfstlexc.la
+ bin_PROGRAMS=hfst-lexc
+@@ -20,6 +19,8 @@
+ libhfstlexc_la_SOURCES=\
+                                          lexc.cc string-munging.cc lexcio.cc \
+                                          xducer.cc xymbol.cc xymbol-table.cc xymbol-bridges.cc
++libhfstlexc_la_LIBADD=../../../hfst2/libhfst.la
++
+ BUILT_SOURCES=lexc-parser.h
+ hfst_lexc_CXXFLAGS=-Wno-deprecated
diff --git a/hfst-rules.patch b/hfst-rules.patch
new file mode 100644 (file)
index 0000000..d176a3f
--- /dev/null
@@ -0,0 +1,42 @@
+--- hfst-2.4.1/hfst2/Makefile.am.orig  2010-03-02 01:55:12.000000000 +0100
++++ hfst-2.4.1/hfst2/Makefile.am       2010-11-27 12:53:33.683094909 +0100
+@@ -95,31 +95,19 @@
+ # LEX
+-regexp/xre_lex.cc: regexp/xre_lex.ll
+-      $(LEX) -v --prefix=xre --outfile=$@ --header-file=regexp/xre_lex.h $<
++regexp/xre_lex.cc regexp/xre_lex.h: regexp/xre_lex.ll
++      $(LEX) -v --prefix=xre --outfile=regexp/xre_lex.cc --header-file=regexp/xre_lex.h $<
+-regexp/xrew_lex.cc: regexp/xrew_lex.ll
+-      $(LEX) -v --prefix=xrew --outfile=$@ --header-file=regexp/xrew_lex.h $<
++regexp/xrew_lex.cc regexp/xrew_lex.h: regexp/xrew_lex.ll
++      $(LEX) -v --prefix=xrew --outfile=regexp/xrew_lex.cc --header-file=regexp/xrew_lex.h $<
+-regexp/xre_lex.h: regexp/xre_lex.ll
+-      $(LEX) -v --prefix=xre --outfile=regexp/xre_lex.cc --header-file=$@ $<
+-
+-regexp/xrew_lex.h: regexp/xrew_lex.ll
+-      $(LEX) -v --prefix=xrew --outfile=regexp/xrew_lex.cc --header-file=$@ $<
+-
+ # YACC
+-regexp/xre_parse.hh: regexp/xre_parse.yy
+-      $(YACC) -d -v --name-prefix=xre --output=$@ $<
+-
+-regexp/xrew_parse.hh: regexp/xrew_parse.yy
+-      $(YACC) -d -v --name-prefix=xrew --output=$@ $<
+-
+-regexp/xre_parse.cc: regexp/xre_parse.yy
+-      $(YACC) -d -v --name-prefix=xre --output=$@ $<
++regexp/xre_parse.cc regexp/xre_parse.hh: regexp/xre_parse.yy
++      $(YACC) -d -v --name-prefix=xre --output=xre_parse.cc $<
+-regexp/xrew_parse.cc: regexp/xrew_parse.yy
+-      $(YACC) -d -v --name-prefix=xrew --output=$@ $<
++regexp/xrew_parse.cc regexp/xrew_parse.hh: regexp/xrew_parse.yy
++      $(YACC) -d -v --name-prefix=xrew --output=xrew_parse.cc $<
+ # libtool takes over
diff --git a/hfst.spec b/hfst.spec
new file mode 100644 (file)
index 0000000..9d97b6b
--- /dev/null
+++ b/hfst.spec
@@ -0,0 +1,140 @@
+Summary:       Helsinki Finite-State Transducer (library and application suite)
+Summary(pl.UTF-8):     Helsinki Finite-State Transducer (biblioteka i zestaw aplikacji)
+Name:          hfst
+Version:       2.4.1
+Release:       1
+License:       GPL v3+
+Group:         Applications/Text
+Source0:       http://downloads.sourceforge.net/hfst/%{name}-%{version}.tar.gz
+# Source0-md5: 4e501d68f1ef67ab45029ce14e3ce559
+Patch0:                %{name}-link.patch
+Patch1:                %{name}-rules.patch
+URL:           http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
+BuildRequires: autoconf >= 2.61
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex >= 2.5.35
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:2.0
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Helsinki Finite-State Transducer software is intended for the
+implementation of morphological analysers and other tools which are
+based on weighted and unweigted finite-state transducer technology.
+
+%description -l pl.UTF-8
+Pakiet HFST (Helsinki Finite-State Transducer) to oprogramowanie
+służące do implementacji analizatorów morfologicznych i innych
+narzędzi opartych na technice przetwarzania ze skończoną liczbą
+stanów z wagami lub bez.
+
+%package devel
+Summary:       Header files for HFST library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki HFST
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      libstdc++-devel
+
+%description devel
+Header files for HFST library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki HFST.
+
+%package static
+Summary:       Static HFST library
+Summary(pl.UTF-8):     Statyczna biblioteka HFST
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static HFST library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka HFST.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+cd hfst2
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd ../hfst-tools
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd hfst-lexc
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd ../hfst-twolc
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd ../..
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+       --enable-static
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS BUGS ChangeLog NEWS README THANKS
+%attr(755,root,root) %{_bindir}/hfst-*
+%attr(755,root,root) %{_bindir}/htwolcpre*
+%attr(755,root,root) %{_bindir}/hwfst-calculate
+%attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhfst.so.0
+%attr(755,root,root) %{_libdir}/libhfstlexc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhfstlexc.so.0
+%{_mandir}/man1/hfst-*.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhfst.so
+%attr(755,root,root) %{_libdir}/libhfstlexc.so
+%{_libdir}/libhfst.la
+%{_libdir}/libhfstlexc.la
+%{_includedir}/hfst2
+%{_includedir}/flex-utils.h
+%{_includedir}/lexc.h
+%{_includedir}/lexcio.h
+%{_includedir}/string-munging.h
+%{_includedir}/xducer.h
+%{_includedir}/xymbol.h
+%{_includedir}/xymbol-bridges.h
+%{_includedir}/xymbol-table.h
+%{_pkgconfigdir}/hfst.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libhfst.a
+%{_libdir}/libhfstlexc.a
This page took 0.079694 seconds and 4 git commands to generate.