Ticket #45006: Portfile-cups-pdf.diff

File Portfile-cups-pdf.diff, 4.3 KB (added by icaines77@…, 10 years ago)

Diff of portfile.

  • Portfile

    old new  
    1313   network by providing a PDF printer on the central fileserver.
    1414
    1515platforms           darwin
     16depends_run         port:ghostscript
    1617
    1718if {${os.platform} eq "darwin" && ${os.major} > 9} {
    1819   set notes-darwinover9 "
    19    As of Mac OS X 10.6, cups can no longer write into user directories, so
    20    the output directory for ${name} has been updated to reflect this.
    21    ${name} will now write PDF files into ${prefix}/var/spool/cups-pdf/\$USER .
    22    You can create a symlink to this location from Desktop to have it behave as
    23    before:
    24       ln -s ${prefix}/var/spool/cups-pdf/\$USER ~/Desktop/cups-pdf
    25 
    26    If you are upgrading, your ${prefix}/etc/cups/cups-pdf.conf file will
    27    not be touched, and will probably need the Out parameter updated; see the
    28    ${prefix}/etc/cups/cups-pdf.conf.dist file for an example."
     20
     21   For OS X 10.6 (Snow Leopard) later:
     22
     23     As of Mac OS X 10.6, cups can no longer write into user directories, so
     24     the output directory for ${name} has been updated to reflect this.
     25     ${name} will now write PDF files into ${prefix}/var/spool/cups-pdf/\$USER .
     26     You can create a symlink to this location from Desktop to have it behave as
     27     before:
     28        ln -s ${prefix}/var/spool/cups-pdf/\$USER ~/Desktop/cups-pdf
     29
     30     If you are upgrading, your ${prefix}/etc/cups/cups-pdf.conf file will
     31     not be touched, and will probably need the Out parameter updated; see the
     32     ${prefix}/etc/cups/cups-pdf.conf.dist file for an example."
    2933} else {
    3034   set notes-darwinover9 ""
    3135}
    3236
     37if {${os.platform} eq "darwin" && ${os.major} > 13} {
     38   set notes-yosemite "
     39   
     40   For OS X 10.10 (Yosemite) or later:
     41
     42     OS X 10.10 moved to CUPS 2, with stricter sandboxing requirements that
     43     interfere with the operation of cups-pdf.  Pending fixes in the cups-pdf
     44     package, you can revert to the old sandboxing behavior and allow cups-pdf
     45     to work by adding the following line to /etc/cups/cups-files.conf:
     46
     47       Sandboxing relaxed
     48
     49     (Note that by doing this you are partially disabling one of the security
     50     features in CUPS.)   
     51   "
     52} else {
     53   set notes-yosemite ""
     54}
     55
    3356notes "
    3457   *************************************************************
    35    If this is the first installation, there are a couple of items to do:
    36    -  First, symlinks in /usr are needed for CUPS to see cups-pdf, so run
    37       (it will run sudo so may ask for your password):
    38          ${prefix}/libexec/cups-pdf_links.sh
    39    -  Edit ${prefix}/etc/cups/cups-pdf.conf as needed
    40    -  Finally, tell cupsd to update (it may not be running on 10.5+):
    41          sudo killall -1 cupsd
     58   If this is the first installation, there are a couple of items to do / be aware of:
     59
     60   General notes:
     61     -  First, symlinks in /usr are needed for CUPS to see cups-pdf, so run
     62        (it will run sudo so may ask for your password):
     63           ${prefix}/libexec/cups-pdf_links.sh
     64     -  Edit ${prefix}/etc/cups/cups-pdf.conf as needed
     65     -  Edit
     66     -  Finally, tell cupsd to update (it may not be running on 10.5+):
     67           sudo killall -1 cupsd 
     68   ${notes-darwinover9}
     69   ${notes-yosemite}
    4270   *************************************************************
    43    ${notes-darwinover9}"
     71   "
    4472
    4573homepage            http://www.cups-pdf.de/
    4674master_sites        ${homepage}src/
     
    99127      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    100128   reinplace "s|#Log |Log |" \
    101129      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    102    reinplace "s|#GhostScript .*|GhostScript /usr/bin/pstopdf|" \
    103       ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    104    reinplace "s|#GSCall .*|GSCall %s %s -o %s %s|" \
    105       ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    106    reinplace "s|#PDFVer .*|PDFVer |" \
     130   reinplace "s|#GhostScript .*|GhostScript ${prefix}/bin/gs|" \
    107131      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
     132#   reinplace "s|#GSCall .*|GSCall %s %s -o %s %s|" \
     133#      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
     134#   reinplace "s|#PDFVer .*|PDFVer |" \
     135#      ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
    108136}
    109137destroot.keepdirs   ${destroot}${prefix}/var/spool/cups-pdf \
    110138                    ${destroot}${prefix}/var/log/cups