Index: head/textproc/apertium/Makefile =================================================================== --- head/textproc/apertium/Makefile (revision 365547) +++ head/textproc/apertium/Makefile (revision 365548) @@ -1,56 +1,45 @@ # Created by: Mykola Dzham # $FreeBSD$ PORTNAME= apertium -PORTVERSION= ${APVER}.${APREV} -PORTREVISION= 3 +PORTVERSION= 3.2.0 +PORTREVISION= 4 CATEGORIES= textproc -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${APVER} +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} MAINTAINER= ports@FreeBSD.org COMMENT= Toolbox to build shallow-transfer machine translation systems +LICENSE= GPLv2 # (or later) + BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash +LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre \ + liblttoolbox3.so:${PORTSDIR}/textproc/lttoolbox RUN_DEPENDS= bash:${PORTSDIR}/shells/bash -LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2 \ - libxslt.so:${PORTSDIR}/textproc/libxslt \ - liblttoolbox3.so:${PORTSDIR}/textproc/lttoolbox \ - libpcre.so:${PORTSDIR}/devel/pcre -APVER= 3.2 -APREV= 0 - +USES= libtool pathfix pkgconfig +USE_GNOME= libxml2 libxslt +GNU_CONFIGURE= yes +USE_LDCONFIG= yes +INSTALL_TARGET= install-strip MAKE_JOBS_UNSAFE= yes -GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -USES= pathfix pkgconfig -USE_LDCONFIG= yes -PLIST_SUB+= APVER="${APVER}" +PLIST_SUB= APVER="${PORTVERSION:R}" -MAN1= apertium-deshtml.1 apertium-desodt.1 apertium-despptx.1 \ - apertium-desrtf.1 apertium-destxt.1 apertium-deswxml.1 \ - apertium-desxlsx.1 apertium-filter-ambiguity.1 \ - apertium-gen-deformat.1 apertium-gen-lextorbil.1 \ - apertium-gen-lextormono.1 apertium-gen-modes.1 \ - apertium-gen-reformat.1 apertium-gen-stopwords-lextor.1 \ - apertium-gen-wlist-lextor-translation.1 apertium-gen-wlist-lextor.1 \ - apertium-interchunk.1 apertium-lextor.1 apertium-multiple-translations.1 \ - apertium-postchunk.1 apertium-preprocess-corpus-lextor.1 \ - apertium-preprocess-transfer.1 apertium-pretransfer.1 \ - apertium-rehtml.1 apertium-reodt.1 apertium-repptx.1 \ - apertium-rertf.1 apertium-retxt.1 apertium-rewxml.1 apertium-rexlsx.1 \ - apertium-tagger-apply-new-rules.1 apertium-tagger.1 apertium-transfer.1 \ - apertium-validate-acx.1 apertium-validate-dictionary.1 \ - apertium-validate-interchunk.1 apertium-validate-modes.1 \ - apertium-validate-postchunk.1 apertium-validate-tagger.1\ - apertium-validate-transfer.1 apertium-unformat.1 \ - apertium.1 apertium-desmediawiki.1 apertium-remediawiki.1 - -NO_STAGE= yes post-patch: - @${REINPLACE_CMD} -e 's/pcre_info/pcre_fullinfo/g' ${WRKSRC}/configure + @${REINPLACE_CMD} -e \ + 's| -ansi | | ; \ + s| -march=.* | | ; \ + s| -mtune=.* | | ; \ + s| -O3 | | ; \ + s|pcre_info|pcre_fullinfo|g' ${WRKSRC}/configure + @${REINPLACE_CMD} -e \ + 's|\([[:blank:]]\)\($$(modesdir)\)|\1$$(DESTDIR)\2|' \ + ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e \ + 's|_C_|_H_|' ${WRKSRC}/apertium/tmx_aligner_tool.h .include Index: head/textproc/apertium/files/patch-apertium__hmm.cc =================================================================== --- head/textproc/apertium/files/patch-apertium__hmm.cc (nonexistent) +++ head/textproc/apertium/files/patch-apertium__hmm.cc (revision 365548) @@ -0,0 +1,80 @@ +--- apertium/hmm.cc.orig ++++ apertium/hmm.cc +@@ -141,7 +141,7 @@ + int N = td->getN(); + int M = td->getM(); + int i, j, k, k1, k2, nw=0; +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double classes_ocurrences[M]; //M = Number of ambiguity classes + double classes_pair_ocurrences[M][M]; + double tags_estimate[N]; //N = Number of tags (states) +@@ -159,7 +159,7 @@ + + TaggerWord *word=NULL; + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + for(k=0; kgetN(); + int M = td->getM(); +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double tags_pair[N][N]; + double emission[N][M]; + #else +@@ -288,7 +288,7 @@ + + set tags; + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + // Init counters - each event appears at least once. + // Espected likelihood estimate (ELE) with a fixed initial count of 1 + for(i=0; igetN(); +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double alpha[2][N]; + vector best[2][N]; + #else + vector > alpha(2, vector(N)); +- vector > > best(2, vector>(N)); ++ vector > > best(2, vector >(N)); + #endif + + vector wpend; +@@ -799,7 +799,7 @@ + + k = output[tags]; //Ambiguity class the word belongs to + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + clear_array_double(alpha[nwpend%2], N); + clear_array_vector(best[nwpend%2], N); + #endif Property changes on: head/textproc/apertium/files/patch-apertium__hmm.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/textproc/apertium/files/patch-apertium__lextor.cc =================================================================== --- head/textproc/apertium/files/patch-apertium__lextor.cc (nonexistent) +++ head/textproc/apertium/files/patch-apertium__lextor.cc (revision 365548) @@ -0,0 +1,47 @@ +--- apertium/lextor.cc.orig ++++ apertium/lextor.cc +@@ -277,7 +277,7 @@ + //Note: Words in the context can also be ambiguous (with more than one lexical choice) + //In that case the count will come from all the possible + //translations +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + vector translation_buffer[buffer_max_size]; + wstring reduced_buffer[buffer_max_size]; + #else +@@ -340,7 +340,7 @@ + //The counts of the TL co-occurrence model are transferred to the SL. If the SL word is ambiguous + //it will have more than one translation into TL, so we need to normalize using the frequency of words + //in the TL +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double translation_weighs[translation_buffer[i].size()]; + #else + vector translation_weighs(translation_buffer[i].size()); +@@ -686,7 +686,7 @@ + + int + LexTor::estimate_winner_lch_voting(deque& window, int word_index, double weigth_exponent) { +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double lexchoices_count[window[word_index].n_lexical_choices()]; + #else + vector lexchoices_count(window[word_index].n_lexical_choices()); +@@ -879,7 +879,7 @@ + exit(EXIT_FAILURE); + } + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double lexchoices_count[window[word_index].n_lexical_choices()]; + vector translation_window[window.size()]; + wstring reduced_window[window.size()]; +@@ -935,7 +935,7 @@ + //If the SL word is ambiguous it will have more than one + //translation into TL, so we need to normalize using the + //frequency of words in the TL +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(__clang__) + double translation_weighs[translation_window[k].size()]; + #else + vector translation_weighs(translation_window[k].size()); Property changes on: head/textproc/apertium/files/patch-apertium__lextor.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/textproc/apertium/pkg-plist =================================================================== --- head/textproc/apertium/pkg-plist (revision 365547) +++ head/textproc/apertium/pkg-plist (revision 365548) @@ -1,117 +1,160 @@ bin/apertium bin/apertium-deshtml bin/apertium-desmediawiki bin/apertium-desodt bin/apertium-despptx bin/apertium-desrtf bin/apertium-destxt bin/apertium-deswxml bin/apertium-desxlsx bin/apertium-desxpresstag bin/apertium-filter-ambiguity bin/apertium-gen-deformat bin/apertium-gen-lextorbil bin/apertium-gen-lextormono bin/apertium-gen-modes bin/apertium-gen-reformat bin/apertium-gen-stopwords-lextor bin/apertium-gen-wlist-lextor bin/apertium-gen-wlist-lextor-translation bin/apertium-interchunk bin/apertium-lextor bin/apertium-multiple-translations bin/apertium-postchunk bin/apertium-preprocess-corpus-lextor bin/apertium-preprocess-transfer bin/apertium-pretransfer bin/apertium-rehtml bin/apertium-remediawiki bin/apertium-reodt bin/apertium-repptx bin/apertium-rertf bin/apertium-retxt bin/apertium-rewxml bin/apertium-rexlsx bin/apertium-rexpresstag bin/apertium-tagger bin/apertium-tagger-apply-new-rules bin/apertium-tmxbuild bin/apertium-transfer bin/apertium-unformat bin/apertium-validate-acx bin/apertium-validate-dictionary bin/apertium-validate-interchunk bin/apertium-validate-modes bin/apertium-validate-postchunk bin/apertium-validate-tagger bin/apertium-validate-transfer include/apertium-%%APVER%%/apertium/apertium_re.h include/apertium-%%APVER%%/apertium/collection.h include/apertium-%%APVER%%/apertium/constant_manager.h include/apertium-%%APVER%%/apertium/endian_double_util.h include/apertium-%%APVER%%/apertium/hmm.h include/apertium-%%APVER%%/apertium/interchunk.h include/apertium-%%APVER%%/apertium/interchunk_word.h include/apertium-%%APVER%%/apertium/lextor.h include/apertium-%%APVER%%/apertium/lextor_data.h include/apertium-%%APVER%%/apertium/lextor_eval.h include/apertium-%%APVER%%/apertium/lextor_word.h include/apertium-%%APVER%%/apertium/morpho_stream.h include/apertium-%%APVER%%/apertium/postchunk.h include/apertium-%%APVER%%/apertium/string_utils.h include/apertium-%%APVER%%/apertium/tagger.h include/apertium-%%APVER%%/apertium/tagger_data.h include/apertium-%%APVER%%/apertium/tagger_utils.h include/apertium-%%APVER%%/apertium/tagger_word.h include/apertium-%%APVER%%/apertium/tmx_align_parameters.h include/apertium-%%APVER%%/apertium/tmx_aligner_tool.h include/apertium-%%APVER%%/apertium/tmx_alignment.h include/apertium-%%APVER%%/apertium/tmx_arguments_parser.h include/apertium-%%APVER%%/apertium/tmx_book_to_matrix.h include/apertium-%%APVER%%/apertium/tmx_builder.h include/apertium-%%APVER%%/apertium/tmx_dic_tree.h include/apertium-%%APVER%%/apertium/tmx_dictionary.h include/apertium-%%APVER%%/apertium/tmx_quasi_diagonal.h include/apertium-%%APVER%%/apertium/tmx_serialize_impl.h include/apertium-%%APVER%%/apertium/tmx_strings_and_streams.h include/apertium-%%APVER%%/apertium/tmx_trail_postprocessors.h include/apertium-%%APVER%%/apertium/tmx_translate.h include/apertium-%%APVER%%/apertium/tmx_words.h include/apertium-%%APVER%%/apertium/transfer.h include/apertium-%%APVER%%/apertium/transfer_data.h include/apertium-%%APVER%%/apertium/transfer_instr.h include/apertium-%%APVER%%/apertium/transfer_mult.h include/apertium-%%APVER%%/apertium/transfer_token.h include/apertium-%%APVER%%/apertium/transfer_word.h include/apertium-%%APVER%%/apertium/transfer_word_list.h include/apertium-%%APVER%%/apertium/trx_reader.h include/apertium-%%APVER%%/apertium/tsx_reader.h include/apertium-%%APVER%%/apertium/ttag.h include/apertium-%%APVER%%/apertium/unlocked_cstdio.h include/apertium-%%APVER%%/apertium/utf_converter.h -lib/libapertium3-%%APVER%%.so lib/libapertium3-%%APVER%%.so.0 +lib/libapertium3-%%APVER%%.so.0.0.0 lib/libapertium3.a -lib/libapertium3.la lib/libapertium3.so libdata/pkgconfig/apertium-%%APVER%%.pc +man/man1/apertium.1.gz +man/man1/apertium-deshtml.1.gz +man/man1/apertium-desmediawiki.1.gz +man/man1/apertium-desodt.1.gz +man/man1/apertium-despptx.1.gz +man/man1/apertium-desrtf.1.gz +man/man1/apertium-destxt.1.gz +man/man1/apertium-deswxml.1.gz +man/man1/apertium-desxlsx.1.gz +man/man1/apertium-filter-ambiguity.1.gz +man/man1/apertium-gen-deformat.1.gz +man/man1/apertium-gen-lextorbil.1.gz +man/man1/apertium-gen-lextormono.1.gz +man/man1/apertium-gen-modes.1.gz +man/man1/apertium-gen-reformat.1.gz +man/man1/apertium-gen-stopwords-lextor.1.gz +man/man1/apertium-gen-wlist-lextor-translation.1.gz +man/man1/apertium-gen-wlist-lextor.1.gz +man/man1/apertium-interchunk.1.gz +man/man1/apertium-lextor.1.gz +man/man1/apertium-multiple-translations.1.gz +man/man1/apertium-postchunk.1.gz +man/man1/apertium-preprocess-corpus-lextor.1.gz +man/man1/apertium-preprocess-transfer.1.gz +man/man1/apertium-pretransfer.1.gz +man/man1/apertium-rehtml.1.gz +man/man1/apertium-remediawiki.1.gz +man/man1/apertium-reodt.1.gz +man/man1/apertium-repptx.1.gz +man/man1/apertium-rertf.1.gz +man/man1/apertium-retxt.1.gz +man/man1/apertium-rewxml.1.gz +man/man1/apertium-rexlsx.1.gz +man/man1/apertium-tagger-apply-new-rules.1.gz +man/man1/apertium-tagger.1.gz +man/man1/apertium-transfer.1.gz +man/man1/apertium-unformat.1.gz +man/man1/apertium-validate-acx.1.gz +man/man1/apertium-validate-dictionary.1.gz +man/man1/apertium-validate-interchunk.1.gz +man/man1/apertium-validate-modes.1.gz +man/man1/apertium-validate-postchunk.1.gz +man/man1/apertium-validate-tagger.1.gz +man/man1/apertium-validate-transfer.1.gz %%DATADIR%%/acx.rng %%DATADIR%%/apertium-createmodes.awk %%DATADIR%%/deformat.xsl %%DATADIR%%/dix.dtd %%DATADIR%%/format.dtd %%DATADIR%%/interchunk.dtd %%DATADIR%%/lexchoice.xsl %%DATADIR%%/lexchoicebil.xsl %%DATADIR%%/modes.dtd %%DATADIR%%/modes/README %%DATADIR%%/modes2bash.xsl %%DATADIR%%/new2old.xsl %%DATADIR%%/postchunk.dtd %%DATADIR%%/reformat.xsl %%DATADIR%%/tagger.dtd %%DATADIR%%/transfer.dtd -@dirrm include/apertium-%%APVER%%/apertium -@dirrm include/apertium-%%APVER%% @dirrm %%DATADIR%%/modes @dirrm %%DATADIR%% +@dirrm include/apertium-%%APVER%%/apertium +@dirrm include/apertium-%%APVER%%