diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2015-12-22 15:37:33 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2015-12-22 15:37:33 +0000 |
commit | ecaba1413e58eefa9d3085dce1b478f5d04f206d (patch) | |
tree | 3cbb3112990b885d15839e2af6401b511889dd82 /textproc | |
parent | b25d2e5e98a8c51983204f485d6ee4154c41865e (diff) | |
download | ports-ecaba1413e58eefa9d3085dce1b478f5d04f206d.tar.gz ports-ecaba1413e58eefa9d3085dce1b478f5d04f206d.zip |
These are Perl bindings to CLD, the Compact Language Detection library
from Google/Chrome.
WWW: http://search.cpan.org/dist/Lingua-Identify-CLD/
PR: 196428
Submitted by: Gasol Wu <gasol.wu@gmail.com>
Approved by: mat (mentor)
Differential Revision: D4638
Notes
Notes:
svn path=/head/; revision=404244
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/Makefile | 26 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/distinfo | 2 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs | 16 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm | 34 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/pkg-descr | 4 | ||||
-rw-r--r-- | textproc/p5-Lingua-Identify-CLD/pkg-plist | 5 |
7 files changed, 88 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index 822b86bcb807..c0d9f85a29b1 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -621,6 +621,7 @@ SUBDIR += p5-Lingua-EN-Words2Nums SUBDIR += p5-Lingua-Ident SUBDIR += p5-Lingua-Identify + SUBDIR += p5-Lingua-Identify-CLD SUBDIR += p5-Lingua-Ispell SUBDIR += p5-Lingua-PT-Stemmer SUBDIR += p5-Lingua-Preferred diff --git a/textproc/p5-Lingua-Identify-CLD/Makefile b/textproc/p5-Lingua-Identify-CLD/Makefile new file mode 100644 index 000000000000..cc2cc17d0d59 --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/Makefile @@ -0,0 +1,26 @@ +# Created by: Gasol Wu <gasol.wu@gmail.com> +# $FreeBSD$ + +PORTNAME= Lingua-Identify-CLD +PORTVERSION= 0.09 +CATEGORIES= textproc perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= gasol.wu@gmail.com +COMMENT= Interface to Chrome language detection library + +LICENSE= BSD3CLAUSE + +BUILD_DEPENDS= libcld.so:${PORTSDIR}/devel/cld \ + p5-Config-AutoConf>=0.16:${PORTSDIR}/devel/p5-Config-AutoConf \ + p5-ExtUtils-CBuilder>0.27:${PORTSDIR}/devel/p5-ExtUtils-CBuilder \ + p5-ExtUtils-ParseXS>=0:${PORTSDIR}/devel/p5-ExtUtils-ParseXS \ + p5-ExtUtils-LibBuilder>=0.02:${PORTSDIR}/devel/p5-ExtUtils-LibBuilder +RUN_DEPENDS= libcld.so:${PORTSDIR}/devel/cld \ + p5-XSLoader>=0:${PORTSDIR}/devel/p5-XSLoader + +USES= perl5 +USE_PERL5= modbuild + +.include <bsd.port.mk> diff --git a/textproc/p5-Lingua-Identify-CLD/distinfo b/textproc/p5-Lingua-Identify-CLD/distinfo new file mode 100644 index 000000000000..56112de670b4 --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/distinfo @@ -0,0 +1,2 @@ +SHA256 (Lingua-Identify-CLD-0.09.tar.gz) = 28b897f9e32f4090f05baa2819b67cead1195e40eb9901c3133d0be030079fb4 +SIZE (Lingua-Identify-CLD-0.09.tar.gz) = 2735166 diff --git a/textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs b/textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs new file mode 100644 index 000000000000..c89f67eb72e4 --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs @@ -0,0 +1,16 @@ +--- CLD.xs.orig 2014-09-07 20:44:12 UTC ++++ CLD.xs +@@ -24,10 +24,9 @@ extern "C" { + # define dNOOP + #endif + +-#include "encodings/compact_lang_det/compact_lang_det.h" +-#include "encodings/compact_lang_det/ext_lang_enc.h" +-#include "encodings/compact_lang_det/unittest_data.h" +-#include "encodings/proto/encodings.pb.h" ++#include "compact_lang_det.h" ++#include "ext_lang_enc.h" ++#include "encodings/public/encodings.h" + + MODULE = Lingua::Identify::CLD PACKAGE = Lingua::Identify::CLD + diff --git a/textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm b/textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm new file mode 100644 index 000000000000..edf02e759522 --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm @@ -0,0 +1,34 @@ +--- inc/MyBuilder.pm.orig 2014-09-07 20:44:12 UTC ++++ inc/MyBuilder.pm +@@ -46,7 +46,6 @@ sub ACTION_code { + $self->notes(CFLAGS => '-fPIC -I. -O2 -DCLD_WINDOWS'); # XXX fixme for windows + $self->notes(LDFLAGS => '-L.'); + +- $self->dispatch("create_objects"); + $self->dispatch("compile_xscode"); + + $self->SUPER::ACTION_code; +@@ -80,7 +79,7 @@ sub ACTION_compile_xscode { + + if (!$self->up_to_date($cfile, $ofile)) { + $cbuilder->compile( source => $cfile, +- include_dirs => [ catdir("cld-src") ], ++ include_dirs => [ catdir("/usr/local/include/cld") ], + 'C++' => 1, + extra_compiler_flags => $extra_compiler_flags, + object_file => $ofile); +@@ -97,12 +96,11 @@ sub ACTION_compile_xscode { + utime( (time) x 2, $bs_file ); # touch + } + +- my $extra_linker_flags = "-lstdc++"; ++ my $extra_linker_flags = "-lcld -lstdc++"; + $extra_linker_flags .= " -lgcc_s" if $^O eq 'netbsd'; + + my $objects = [ +- $ofile, +- @{ $self->rscan_dir('cld-src', qr/\.o$/) }, ++ $ofile + ]; + + # .o => .(a|bundle) diff --git a/textproc/p5-Lingua-Identify-CLD/pkg-descr b/textproc/p5-Lingua-Identify-CLD/pkg-descr new file mode 100644 index 000000000000..f6ed0d6b3f10 --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/pkg-descr @@ -0,0 +1,4 @@ +These are Perl bindings to CLD, the Compact Language Detection library +from Google/Chrome. + +WWW: http://search.cpan.org/dist/Lingua-Identify-CLD/ diff --git a/textproc/p5-Lingua-Identify-CLD/pkg-plist b/textproc/p5-Lingua-Identify-CLD/pkg-plist new file mode 100644 index 000000000000..6a2f53cfa99b --- /dev/null +++ b/textproc/p5-Lingua-Identify-CLD/pkg-plist @@ -0,0 +1,5 @@ +bin/identify-cld +%%SITE_ARCH%%/Lingua/Identify/CLD.pm +%%SITE_ARCH%%/auto/Lingua/Identify/CLD/CLD.so +%%PERL5_MAN3%%/Lingua::Identify::CLD.3.gz +man/man1/identify-cld.1.gz |