summaryrefslogtreecommitdiff
path: root/textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm')
-rw-r--r--textproc/p5-Lingua-Identify-CLD/files/patch-inc_MyBuilder.pm34
1 files changed, 34 insertions, 0 deletions
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)