[57886] trunk/dports/print/cups-pdf/Portfile

blb at macports.org blb at macports.org
Thu Sep 17 23:56:39 PDT 2009


Revision: 57886
          http://trac.macports.org/changeset/57886
Author:   blb at macports.org
Date:     2009-09-17 23:56:37 -0700 (Thu, 17 Sep 2009)
Log Message:
-----------
print/cups-pdf - update for permissions changes on 10.6

Modified Paths:
--------------
    trunk/dports/print/cups-pdf/Portfile

Modified: trunk/dports/print/cups-pdf/Portfile
===================================================================
--- trunk/dports/print/cups-pdf/Portfile	2009-09-18 06:28:16 UTC (rev 57885)
+++ trunk/dports/print/cups-pdf/Portfile	2009-09-18 06:56:37 UTC (rev 57886)
@@ -3,7 +3,7 @@
 PortSystem          1.0
 name                cups-pdf
 version             2.5.0
-revision            1
+revision            2
 categories          print textproc
 maintainers         blb
 description         Provides a print-to-PDF feature through CUPS
@@ -51,8 +51,13 @@
       ${destroot}${prefix}/share/doc/${name}
 
    # Some initial changes to the conf file
-   reinplace "s|#Out .*|Out \${HOME}/Desktop/cups-pdf/|" \
-      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
+   if {${os.platform} == "darwin" && ${os.major} > 9} {
+      reinplace "s|#Out .*|Out ${prefix}/var/spool/cups-pdf/\${USER}/|" \
+         ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
+   } else {
+      reinplace "s|#Out .*|Out \${HOME}/Desktop/cups-pdf/|" \
+         ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
+   }
    reinplace "s| /var/spool| ${prefix}/var/spool|" \
       ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    reinplace "s| /var/log| ${prefix}/var/log|" \
@@ -92,9 +97,26 @@
    ui_msg "-  Finally, tell cupsd to update (it may not be running on 10.5):"
    ui_msg "      sudo killall -1 cupsd"
    ui_msg "\n*************************************************************"
+   if {${os.platform} == "darwin" && ${os.major} > 9} {
+      ui_msg "As of Mac OS X 10.6, cups can no longer write into user"
+      ui_msg "directories, so the output directory for ${name} has been"
+      ui_msg "updated to reflect this.  ${name} will now write PDF files"
+      ui_msg "into ${prefix}/var/spool/cups-pdf/\$USER .  You can create a"
+      ui_msg "symlink to this location from Desktop to have it behave as"
+      ui_msg "before:"
+      ui_msg "   ln -s ${prefix}/var/spool/cups-pdf/\$USER ~/Desktop/cups-pdf"
+   }
+   ui_msg "\n*************************************************************"
    if {![file exists ${prefix}/etc/cups/cups-pdf.conf]} {
       copy ${prefix}/etc/cups/cups-pdf.conf.dist \
          ${prefix}/etc/cups/cups-pdf.conf
+   } else {
+      if {${os.platform} == "darwin" && ${os.major} > 9} {
+         ui_msg "Note that your ${prefix}/etc/cups/cups-pdf.conf file is"
+         ui_msg "not being touched, and may need to have the Out parameter"
+         ui_msg "updated; see the ${prefix}/etc/cups/cups-pdf.conf.dist file"
+         ui_msg "for an example"
+      }
    }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090917/dd29d78c/attachment.html>


More information about the macports-changes mailing list