Ticket #43385: Portfile.diff

File Portfile.diff, 3.9 KB (added by lockhart (Thomas Lockhart), 11 years ago)

Integrate this port with new portgroup and common infrastructure.

  • Portfile

    old new  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id: Portfile 100113 2012-11-29 02:36:26Z ryandesign@macports.org $
    2 PortSystem 1.0
    33
    4 name            docbook-dsssl
    5 version         1.79
    6 revision        1
    7 categories      textproc
    8 license         MIT
    9 description     the docbook dsssl stylesheets
    10 platforms       darwin
    11 depends_run     port:xmlcatmgr
     4PortSystem      1.0
     5PortGroup       xmlcatalog 1.0
     6
     7name            docbook-dsssl
     8version         1.79
     9revision        3
     10categories      textproc
     11license         MIT
     12description     The docbook DSSSL stylesheets
     13platforms       darwin
    1214maintainers     decibel.org:decibel
    1315supported_archs noarch
    14 master_sites    sourceforge:docbook
    15 homepage        http://docbook.sf.net/
    16 checksums       md5 8459913bbd8a5724a6fe4b9ed5bab5af
    17 use_configure   no
    18 build           {}
    19 
    20 set things_to_install   "common contrib dtds frames html images lib olink print catalog VERSION"
    21 set install_dir         ${prefix}/share/dsssl/${name}
    22 
    23 # xmlcatmgr as installed by MacPorts defaults to using
    24 # ${prefix}/etc/sgml/catalog (for XML) and ${prefix}/etc/sgml/catalog (for
    25 # SGML) if no catalog is specified, but we'll specify the path just in case
    26 # users have another installation of xmlcatmgr and happen to have it before
    27 # ${prefix}/bin in their PATH.
    28 set catalog.sgml ${prefix}/etc/sgml/catalog
    29 set xmlcatmgr.args "-s -c ${catalog.sgml}"
     16master_sites    sourceforge:docbook
     17homepage        http://docbook.sf.net/
     18checksums       md5 8459913bbd8a5724a6fe4b9ed5bab5af
     19use_configure   no
     20
     21set things_to_install "common contrib dtds frames html images lib olink print catalog VERSION"
     22
     23set install_dir ${prefix}/share/dsssl/${name}
     24sgml.catalog "${install_dir}/catalog"
     25
     26build {}
    3027
    31 destroot        {
     28destroot {
    3229    # Docs
    33         xinstall -m 755 -d ${destroot}${install_dir} \
    34                 ${destroot}${prefix}/share/doc/${name} \
    35                 ${destroot}${prefix}/share/${name}
     30    xinstall -m 755 -d ${destroot}${install_dir} \
     31        ${destroot}${prefix}/share/doc/${name} \
     32        ${destroot}${prefix}/share/${name}
    3633   
    3734    # bin
    38         xinstall -m 755 -W ${worksrcpath} bin/collateindex.pl \
    39                 ${destroot}${prefix}/bin
     35    xinstall -m 755 -W ${worksrcpath} bin/collateindex.pl \
     36        ${destroot}${prefix}/bin
    4037    # man
    41         xinstall -m 644 -W ${worksrcpath} bin/collateindex.pl.1 \
    42                 ${destroot}${prefix}/share/man/man1
     38    xinstall -m 644 -W ${worksrcpath} bin/collateindex.pl.1 \
     39        ${destroot}${prefix}/share/man/man1
    4340
    4441    # everything else
    45         xinstall -m 644 -W ${worksrcpath} BUGS ChangeLog README \
    46                 RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt WhatsNew \
    47                 ${destroot}${prefix}/share/doc/${name}
    48         foreach dirname $things_to_install {
    49                 file copy ${worksrcpath}/${dirname} ${destroot}${install_dir}
    50         }
    51 }
    52 
    53 post-activate {
    54         # Make the directory if it doesn't exist
    55         if {![file exists ${prefix}/etc/sgml]} {
    56                 xinstall -m 755 -d ${prefix}/etc/sgml
    57         }
    58 
    59         # Create the catalog file if it doesn't exist
    60         if {![file exists ${catalog.sgml}]} {
    61                 system "xmlcatmgr ${xmlcatmgr.args} create"
    62         }
    63 
    64         # Add the CATALOG entry to the catalog if it doesn't exist
    65         if {[catch {exec xmlcatmgr ${xmlcatmgr.args} lookup ${install_dir}/catalog}]} {
    66                 system "xmlcatmgr ${xmlcatmgr.args} add CATALOG ${install_dir}/catalog"
    67         }
    68 }
    69 
    70 # This will remove the catalog entry for this port.
    71 post-deactivate {
    72         # Remove the CATALOG entry from the catalog
    73         system "xmlcatmgr ${xmlcatmgr.args} remove CATALOG ${install_dir}/catalog"
     42    xinstall -m 644 -W ${worksrcpath} BUGS ChangeLog README \
     43        RELEASE-NOTES.html RELEASE-NOTES.xml RELEASE-NOTES.txt WhatsNew \
     44        ${destroot}${prefix}/share/doc/${name}
     45    foreach dirname $things_to_install {
     46        file copy ${worksrcpath}/${dirname} ${destroot}${install_dir}
     47    }
    7448}