[39649] trunk/dports/graphics/dcraw/Portfile

ryandesign at macports.org ryandesign at macports.org
Wed Aug 27 14:46:40 PDT 2008


Revision: 39649
          http://trac.macosforge.org/projects/macports/changeset/39649
Author:   ryandesign at macports.org
Date:     2008-08-27 14:46:39 -0700 (Wed, 27 Aug 2008)
Log Message:
-----------
dcraw: build the message catalogs in the build phase, not the destroot phase

Modified Paths:
--------------
    trunk/dports/graphics/dcraw/Portfile

Modified: trunk/dports/graphics/dcraw/Portfile
===================================================================
--- trunk/dports/graphics/dcraw/Portfile	2008-08-27 21:30:42 UTC (rev 39648)
+++ trunk/dports/graphics/dcraw/Portfile	2008-08-27 21:46:39 UTC (rev 39649)
@@ -34,6 +34,7 @@
 
 post-extract {
     xinstall -W ${filespath} Makefile.in ${worksrcpath}/Makefile
+    xinstall -d ${worksrcpath}/build
     # Move "install" script; it conflicts with the destroot phase ("make install")
     move ${worksrcpath}/install ${worksrcpath}/install.sh
 }
@@ -49,16 +50,26 @@
     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
 }
 
+set my_locales          {eo ru fr it de pt es zh_TW zh_CN nl pl hu ca cs sv}
+
+post-build {
+    foreach locale ${my_locales} {
+        if {[file exist ${worksrcpath}/dcraw_${locale}.po]} {
+            system "msgfmt -o ${worksrcpath}/build/dcraw_${locale}.mo ${worksrcpath}/dcraw_${locale}.po"
+        }
+    }
+}
+
 post-destroot {
     xinstall -m 644 -W ${worksrcpath} dcraw.1 ${destroot}${prefix}/share/man/man1
-    foreach lang {eo ru fr it de pt es zh_TW zh_CN nl pl hu ca cs sv} {
-        if {[file exist ${worksrcpath}/dcraw_${lang}.1]} {
-            xinstall -m 755 -d ${destroot}${prefix}/share/man/${lang}/man1
-            xinstall -m 644 -W ${worksrcpath} dcraw_${lang}.1 ${destroot}${prefix}/share/man/${lang}/man1/dcraw.1
+    foreach locale ${my_locales} {
+        if {[file exist ${worksrcpath}/dcraw_${locale}.1]} {
+            xinstall -m 755 -d ${destroot}${prefix}/share/man/${locale}/man1
+            xinstall -m 644 -W ${worksrcpath} dcraw_${locale}.1 ${destroot}${prefix}/share/man/${locale}/man1/dcraw.1
         }
-        if {[file exist ${worksrcpath}/dcraw_${lang}.po]} {
-            xinstall -m 755 -d ${destroot}${prefix}/share/locale/${lang}/LC_MESSAGES
-            system "msgfmt -o ${destroot}${prefix}/share/locale/${lang}/LC_MESSAGES/dcraw.mo ${worksrcpath}/dcraw_${lang}.po"
+        if {[file exist ${worksrcpath}/build/dcraw_${locale}.mo]} {
+            xinstall -m 755 -d ${destroot}${prefix}/share/locale/${locale}/LC_MESSAGES
+            xinstall -m 644 -W ${worksrcpath}/build dcraw_${locale}.mo ${destroot}${prefix}/share/locale/${locale}/LC_MESSAGES/dcraw.mo
         }
     }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080827/ba90a8a2/attachment.html 


More information about the macports-changes mailing list