[103190] trunk/dports/devel/ninka

and.damore at macports.org and.damore at macports.org
Sun Feb 17 23:33:19 PST 2013


Revision: 103190
          https://trac.macports.org/changeset/103190
Author:   and.damore at macports.org
Date:     2013-02-17 23:33:19 -0800 (Sun, 17 Feb 2013)
Log Message:
-----------
port ninka: avoid repetition of shared data and doc path, #38104

Modified Paths:
--------------
    trunk/dports/devel/ninka/Portfile
    trunk/dports/devel/ninka/files/patch-ninka_pl.diff

Modified: trunk/dports/devel/ninka/Portfile
===================================================================
--- trunk/dports/devel/ninka/Portfile	2013-02-18 06:33:51 UTC (rev 103189)
+++ trunk/dports/devel/ninka/Portfile	2013-02-18 07:33:19 UTC (rev 103190)
@@ -22,9 +22,13 @@
 supported_archs     noarch
 checksums           rmd160  856573164bb105abf43a0c0140550447a3be3db0 \
                     sha256  df6d4c7efe173fca70efe019deb21bf7b32a969a662cf6880c17aaba9a7144ce
+
+set datadir         ${prefix}/share/${name}
+set docdir          ${prefix}/share/doc/${name}
+
 patchfiles          patch-ninka_pl.diff
 post-patch {
-    reinplace "s|%%PREFIX%%|${prefix}/share/${name}|" ${worksrcpath}/ninka.pl
+    reinplace "s|%%DATADIR%%|${datadir}|" ${worksrcpath}/ninka.pl
 }
 
 use_configure       no
@@ -33,19 +37,19 @@
     xinstall -m 755 ${worksrcpath}/ninka.pl ${destroot}${prefix}/bin/ninka
     set directoriesToCopy [list comments extComments filter matcher senttok splitter]
     foreach directory ${directoriesToCopy} {
-        xinstall -d   -m 755 ${destroot}${prefix}/share/${name}/${directory}
-        eval xinstall -m 644 [glob ${worksrcpath}/${directory}/*] ${destroot}${prefix}/share/${name}/${directory}
+        xinstall -d   -m 755 ${destroot}${datadir}/${directory}
+        eval xinstall -m 644 [glob ${worksrcpath}/${directory}/*] ${destroot}${datadir}/${directory}
     }
     
-    foreach aFile [glob ${destroot}${prefix}/share/${name}/*/*.pl] {
+    foreach aFile [glob ${destroot}${datadir}/*/*.pl] {
         file attributes $aFile -permissions 0755
     }
 
-    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
-    xinstall    -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name} 
+    xinstall -d -m 755 ${destroot}${docdir}
+    xinstall    -m 644 ${worksrcpath}/README ${destroot}${docdir}
     
-    move ${destroot}${prefix}/share/${name}/comments/README ${destroot}${prefix}/share/doc/${name}/README-comments
-    move ${destroot}${prefix}/share/${name}/splitter/README ${destroot}${prefix}/share/doc/${name}/README-splitter
-    file attributes ${destroot}${prefix}/share/doc/${name}/README-comments -permissions 644
-    file attributes ${destroot}${prefix}/share/doc/${name}/README-splitter -permissions 644
+    move ${destroot}${datadir}/comments/README ${destroot}${docdir}/README-comments
+    move ${destroot}${datadir}/splitter/README ${destroot}${docdir}/README-splitter
+    file attributes ${destroot}${docdir}/README-comments -permissions 644
+    file attributes ${destroot}${docdir}/README-splitter -permissions 644
 }

Modified: trunk/dports/devel/ninka/files/patch-ninka_pl.diff
===================================================================
--- trunk/dports/devel/ninka/files/patch-ninka_pl.diff	2013-02-18 06:33:51 UTC (rev 103189)
+++ trunk/dports/devel/ninka/files/patch-ninka_pl.diff	2013-02-18 07:33:19 UTC (rev 103190)
@@ -10,7 +10,7 @@
 -if ($path eq "") {
 -    $path = "./";
 -}
-+my $path = "%%PREFIX%%";
++my $path = "%%DATADIR%%";
  
  
  my $force = exists $opts{f};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130217/0a9207d2/attachment-0001.html>


More information about the macports-changes mailing list