[95489] trunk/dports/textproc/extractopinion

hum at macports.org hum at macports.org
Fri Jul 13 18:40:54 PDT 2012


Revision: 95489
          https://trac.macports.org/changeset/95489
Author:   hum at macports.org
Date:     2012-07-13 18:40:53 -0700 (Fri, 13 Jul 2012)
Log Message:
-----------
extractopinion: fix perl module dependency from p5-* to p5.12-*; add patch-perl.diff to replace "perl" with "${prefix}/bin/perl5.12" in the distributed files; see #35097.

Modified Paths:
--------------
    trunk/dports/textproc/extractopinion/Portfile

Added Paths:
-----------
    trunk/dports/textproc/extractopinion/files/patch-perl.diff

Modified: trunk/dports/textproc/extractopinion/Portfile
===================================================================
--- trunk/dports/textproc/extractopinion/Portfile	2012-07-14 01:03:50 UTC (rev 95488)
+++ trunk/dports/textproc/extractopinion/Portfile	2012-07-14 01:40:53 UTC (rev 95489)
@@ -5,6 +5,7 @@
 
 name                extractopinion
 version             1.2
+revision            1
 categories          textproc japanese
 maintainers         hum openmaintainer
 
@@ -22,12 +23,13 @@
 patchfiles          patch-extract.sh.diff \
                     patch-makemdl.sh.diff \
                     patch-crftrain.sh.diff \
-                    patch-lib_tsv.pm.diff
+                    patch-lib_tsv.pm.diff \
+                    patch-perl.diff
 
 depends_lib         port:crfpp \
                     port:libiconv \
                     port:gawk \
-                    port:p5-text-csv_xs \
+                    port:p5.12-text-csv_xs \
                     port:juman6 \
                     port:knp3
 
@@ -53,6 +55,10 @@
                         xpr/otag2tsv xpr/tsv2tag} {
         reinplace "s|/usr/bin/gawk|${prefix}/bin/gawk|" ${worksrcpath}/${script}.awk
     }
+    foreach script {extract.sh lib/in2tsv.pl lib/tsv2out.pl makemdl.sh \
+                        makemodel/csv/csv2tsv.pl makemodel/csv/csv2tsv.sh} {
+        reinplace "s|@prefix@|${prefix}|" ${worksrcpath}/${script}
+    }
     copy ${worksrcpath}/extract.sh ${destroot}${prefix}/bin/extractopinion.sh
     copy ${worksrcpath}/makemdl.sh ${destroot}${prefix}/bin/extractopinion-makemdl.sh
     copy ${worksrcpath}            ${destroot}${prefix}/share

Added: trunk/dports/textproc/extractopinion/files/patch-perl.diff
===================================================================
--- trunk/dports/textproc/extractopinion/files/patch-perl.diff	                        (rev 0)
+++ trunk/dports/textproc/extractopinion/files/patch-perl.diff	2012-07-14 01:40:53 UTC (rev 95489)
@@ -0,0 +1,96 @@
+*** extract.sh.orig	Mon Jul  9 21:55:38 2012
+--- extract.sh	Sat Jul 14 10:18:41 2012
+***************
+*** 48,54 ****
+  #nkf -e -W --fb-skip < $1 > $1.euc
+  # $B;XDjJ8;z%3!<%I$O4D6-$K$h$C$FI=5-$,0c$&$?$a(Biconv -l$B$G3NG'(B
+  iconv -c -f UTF-8 -t EUC-JP < $file_name > $euc_file
+! perl -I $EXOPLIB $EXOPLIB/in2tsv.pl $euc_file $topic_str > $tsvfile
+! $dir/_extract.sh $model $tsvfile | perl -I $EXOPLIB $EXOPLIB/tsv2out.pl
+  
+  rm -f $tsvfile
+--- 48,54 ----
+  #nkf -e -W --fb-skip < $1 > $1.euc
+  # $B;XDjJ8;z%3!<%I$O4D6-$K$h$C$FI=5-$,0c$&$?$a(Biconv -l$B$G3NG'(B
+  iconv -c -f UTF-8 -t EUC-JP < $file_name > $euc_file
+! @prefix@/bin/perl5.12 -I $EXOPLIB $EXOPLIB/in2tsv.pl $euc_file $topic_str > $tsvfile
+! $dir/_extract.sh $model $tsvfile | @prefix@/bin/perl5.12 -I $EXOPLIB $EXOPLIB/tsv2out.pl
+  
+  rm -f $tsvfile
+*** lib/in2tsv.pl.orig	Thu Mar  1 09:38:37 2012
+--- lib/in2tsv.pl	Sat Jul 14 10:17:49 2012
+***************
+*** 1,4 ****
+! #!/bin/env perl
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+--- 1,4 ----
+! #!@prefix@/bin/perl5.12
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+*** lib/tsv2out.pl.orig	Thu Mar  1 09:38:37 2012
+--- lib/tsv2out.pl	Sat Jul 14 10:18:02 2012
+***************
+*** 1,4 ****
+! #!/bin/env perl
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+--- 1,4 ----
+! #!@prefix@/bin/perl5.12
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+*** makemdl.sh.orig	Mon Jul  9 21:55:38 2012
+--- makemdl.sh	Sat Jul 14 10:19:14 2012
+***************
+*** 42,48 ****
+  for file in $csvfiles
+  do
+    f=`basename $file .csv`
+!   perl -I $dir/lib $dir/makemodel/csv/csv2tsv.pl $file > $workdir/tsv/$f.tsv
+  done
+  
+  cat $workdir/tsv/*.tsv > $workdir/data.tsv
+--- 42,48 ----
+  for file in $csvfiles
+  do
+    f=`basename $file .csv`
+!   @prefix@/bin/perl5.12 -I $dir/lib $dir/makemodel/csv/csv2tsv.pl $file > $workdir/tsv/$f.tsv
+  done
+  
+  cat $workdir/tsv/*.tsv > $workdir/data.tsv
+*** makemodel/csv/csv2tsv.pl.orig	Thu Mar  1 09:38:37 2012
+--- makemodel/csv/csv2tsv.pl	Sat Jul 14 10:16:06 2012
+***************
+*** 1,4 ****
+! #!/bin/env perl
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+--- 1,4 ----
+! #!@prefix@/bin/perl5.12
+  
+  #
+  # Copyright(C) 2007-2012 National Institute of Information and Communications Technology
+*** makemodel/csv/csv2tsv.sh.orig	Thu Mar  1 09:38:37 2012
+--- makemodel/csv/csv2tsv.sh	Sat Jul 14 10:15:35 2012
+***************
+*** 8,14 ****
+  for f in *.csv
+  do
+    f=`basename $f .csv`
+!   perl -I ../../lib ./csv2tsv.pl $f.csv > ../tsv/$f.tsv
+  done
+  
+  
+--- 8,14 ----
+  for f in *.csv
+  do
+    f=`basename $f .csv`
+!   @prefix@/bin/perl5.12 -I ../../lib ./csv2tsv.pl $f.csv > ../tsv/$f.tsv
+  done
+  
+  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120713/2023d079/attachment.html>


More information about the macports-changes mailing list