From d0b3f60e7d4b80ad2e94bcd37b9753ccf679b5b4 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 27 Jun 2013 19:09:03 +0200 Subject: [PATCH] - new - cg-fix patch (from SVN) fixes CG compilation --- apertium-dict-hbs-slv-cg-fix.patch | 48 ++++++++++++++++++++ apertium-dict-hbs-slv.spec | 70 ++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 apertium-dict-hbs-slv-cg-fix.patch create mode 100644 apertium-dict-hbs-slv.spec diff --git a/apertium-dict-hbs-slv-cg-fix.patch b/apertium-dict-hbs-slv-cg-fix.patch new file mode 100644 index 0000000..37e1b03 --- /dev/null +++ b/apertium-dict-hbs-slv-cg-fix.patch @@ -0,0 +1,48 @@ +--- apertium-hbs-slv-0.5.0/apertium-hbs-slv.hbs-slv.rlx.orig 2013-04-30 14:59:01.000000000 +0200 ++++ apertium-hbs-slv-0.5.0/apertium-hbs-slv.hbs-slv.rlx 2013-06-27 18:29:14.061089090 +0200 +@@ -205,15 +205,15 @@ + + # This is a heuristic: + SELECT:vbserORvblex VBLex IF (0 VBSer OR VBLex) (1* Nomen + Acc BARRIER V - Clt) +-REMOVE:vbserORvblex VBLex IF (0 VBSer OR VBLex) (NEGATE -1* Nomen + Acc LINK 1 VBSer + Clt BARRIER V-FIN OR BOS) (NEGATE 1* Nomen + Acc LINK 1 VBSer + Clt BARRIER V-FIN OR EOS) ++REMOVE:vbserORvblex VBLex IF (0 VBSer OR VBLex) (NEGATE -1* (Nomen + Acc LINK 1 VBSer + Clt) BARRIER V-FIN OR BOS) (NEGATE 1* (Nomen + Acc LINK 1 VBSer + Clt) BARRIER V-FIN OR EOS) + + SELECT VBSer IF (-1* Lp ); + SELECT VBSer IF (1* Lp BARRIER V - Lp - PresParticiple ); + + SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (-1* VBSer BARRIER BOS) ; + SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (1* VBSer BARRIER EOS) ; +-SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (-1 MeTeSePron BARRIER BOS) ; +-SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (1 MeTeSePron BARRIER EOS) ; ++SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (-1 MeTeSePron) ; ++SELECT:PerfectNotOptative Lp (0C Lp OR Optative) (1 MeTeSePron) ; + ## These are all ways how perfect can be made + + SELECT:l-participleNumber $$NUMBER (0C Lp OR Optative) ( (-1* VBSer + $$NUMBER BARRIER BOS) OR (1* VBSer + $$NUMBER BARRIER EOS) ); +@@ -230,7 +230,7 @@ + + SELECT:Nom+Perfect NP-HEAD + $$NUMBER + $$GENDER + Nom IF + (0 NP-HEAD + $$NUMBER + $$GENDER) +- (1* V-COP + $$NUMBER LINK 1 Lp + $$NUMBER + $$GENDER BARRIER S-BOUNDARY) ; ++ (1* (V-COP + $$NUMBER LINK 1 Lp + $$NUMBER + $$GENDER) BARRIER S-BOUNDARY) ; + ## Radovanović je ušla u povijest kao prva žena-pilot u Srbiji. + + SELECT:BOS-Nom-Viv $$NUMBER + Nom IF (-1 BOS OR Cm) (1* V-FIN + Intransitive + $$NUMBER BARRIER Cm) ; +@@ -464,7 +464,7 @@ + SELECT $$NUMBER (O PassiveParticiple) (-1* VBSer LINK -1* Particle + Interrogative LINK -1 V + $$NUMBER) ; + ## "hoću li biti primljena" + +-REMOVE:notParticiple Participle (-1 VBMod) (NOT 1 V BARRIER EOS) ; ++REMOVE:notParticiple Participle (-1 VBMod) (NOT 1 V) ; + + REMOVE:IsNotAdverb Adv (NOT -1* VBLex BARRIER BOS OR CS OR CC) (NOT 1* VBLex BARRIER EOS OR CS OR CC); + ## Bilo je teško,... +@@ -543,7 +543,7 @@ + MAP:Adverb→Verb (@V→) TARGET Adv (1C V) + MAP:Verb←Adverb (@V←) TARGET Adv (-1C V) + MAP:Verb←...←Adverb (@V←) TARGET Adv (-1*C V BARRIER BOS OR Cm) (1C Cm OR EOS) +-MAP:Adverb→...→Verb (@V←) TARGET Adv (NOT -1*C V BARRIER BOS OR Cm) (1C V BARRIER EOS) ++MAP:Adverb→...→Verb (@V←) TARGET Adv (NOT -1*C V BARRIER BOS OR Cm) (1C V) + ## Participles and such Note: Looks like a copy paste, but was thought through :) Could perhaps be made more universal though + ### l-participle + MAP:Lp→VBSer (@V→) TARGET Lp (1C VBSer + Clt) diff --git a/apertium-dict-hbs-slv.spec b/apertium-dict-hbs-slv.spec new file mode 100644 index 0000000..e3566d8 --- /dev/null +++ b/apertium-dict-hbs-slv.spec @@ -0,0 +1,70 @@ +Summary: Serbo-Croatian and Slovenian language pair for Apertium +Summary(pl.UTF-8): Para języków serbsko-chorwacki i słoweński dla Apertium +%define lpair hbs-slv +Name: apertium-dict-%{lpair} +Version: 0.5.0 +Release: 1 +License: GPL v2+ +Group: Applications/Text +Source0: http://downloads.sourceforge.net/apertium/apertium-%{lpair}-%{version}.tar.gz +# Source0-md5: b382273d0a84b2b572fd39dcfae0940d +Patch0: %{name}-cg-fix.patch +URL: http://www.apertium.org/ +BuildRequires: apertium-devel >= 3.2.0 +BuildRequires: apertium-lex-tools +BuildRequires: autoconf >= 2.52 +BuildRequires: automake +BuildRequires: libxslt-progs +BuildRequires: lttoolbox >= 3.2.0 +BuildRequires: pkgconfig +BuildRequires: vislcg3 +Requires: apertium >= 3.2.0 +Requires: apertium-lex-tools +Requires: lttoolbox >= 3.2.0 +Requires: vislcg3 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +This is an Apertium language pair, which can be used for translating +between Serbo-Croatian and Slovenian, morphological analysis or +part-of-speech tagging of both languages. + +%description -l pl.UTF-8 +Ten pakiet zawiera parę języków dla Apertium służącą do tłumaczenia +między serbsko-chorwackim a słoweńskim, a także analizy morfologicznej +lub oznaczania części mowy w obu językach. + +%prep +%setup -q -n apertium-%{lpair}-%{version} +%patch0 -p1 + +%build +%{__aclocal} +%{__autoconf} +%{__autoheader} +%{__automake} +%configure + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_datadir}/apertium/modes + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +# not needed here (see modes subdir) and contain wrong (builddir) paths +%{__rm} $RPM_BUILD_ROOT%{_datadir}/apertium/apertium-%{lpair}/*.mode + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc AUTHORS ChangeLog README +%{_datadir}/apertium/apertium-%{lpair} +%{_datadir}/apertium/modes/hbs-slv.mode +%{_datadir}/apertium/modes/slv-hbs_BS.mode +%{_datadir}/apertium/modes/slv-hbs_HR.mode +%{_datadir}/apertium/modes/slv-hbs_SR.mode -- 2.44.0