mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
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
This commit is contained in:
parent
b25d2e5e98
commit
ecaba1413e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=404244
@ -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
|
||||
|
26
textproc/p5-Lingua-Identify-CLD/Makefile
Normal file
26
textproc/p5-Lingua-Identify-CLD/Makefile
Normal file
@ -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>
|
2
textproc/p5-Lingua-Identify-CLD/distinfo
Normal file
2
textproc/p5-Lingua-Identify-CLD/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (Lingua-Identify-CLD-0.09.tar.gz) = 28b897f9e32f4090f05baa2819b67cead1195e40eb9901c3133d0be030079fb4
|
||||
SIZE (Lingua-Identify-CLD-0.09.tar.gz) = 2735166
|
16
textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs
Normal file
16
textproc/p5-Lingua-Identify-CLD/files/patch-CLD.xs
Normal file
@ -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
|
||||
|
34
textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm
Normal file
34
textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm
Normal file
@ -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)
|
4
textproc/p5-Lingua-Identify-CLD/pkg-descr
Normal file
4
textproc/p5-Lingua-Identify-CLD/pkg-descr
Normal file
@ -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/
|
5
textproc/p5-Lingua-Identify-CLD/pkg-plist
Normal file
5
textproc/p5-Lingua-Identify-CLD/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user