Ticket #24927: highlight-2.4.8-2.16.patch

File highlight-2.4.8-2.16.patch, 2.7 KB (added by lists@…, 14 years ago)
  • (a) Portfile vs. (b) (clipboard)

    a b  
    33PortSystem 1.0
    44
    55name                    highlight
    6 version                 2.4.8
     6version                 2.16
    77categories              textproc devel
    88platforms               darwin
    99maintainers             groovie.org:pjenvey
     
    1212
    1313homepage                http://www.andre-simon.de
    1414master_sites            ${homepage}/zip/
    15 checksums               sha1 091689fde96c9f4e3de75ea1b7c1838e8d25708c
     15checksums               sha1 b5fed14bb1a973fe134dd2133766bb86fdc7494e
    1616use_bzip2               yes
    1717
     18use_configure   no
     19
    1820configure {
    19         reinplace "s|/usr/share/highlight/|${prefix}/share/${name}/|g" \
    20                 ${worksrcpath}/highlight/datadir.cpp
    21         reinplace "s|/etc/highlight/|${prefix}/etc/highlight/|g" \
    22                 ${worksrcpath}/highlight/datadir.cpp
     21        reinplace "s|^PREFIX = /usr$|PREFIX = ${prefix}|g" \
     22                ${worksrcpath}/makefile
     23        reinplace "s|^conf_dir = /etc/highlight/$|conf_dir = ${prefix}/etc/highlight/|g" \
     24                ${worksrcpath}/makefile
    2325}
    2426
    2527# Avoid stripping the binary (-s flag) during linking as this corrupts the executable.
     
    2729platform darwin 8 { build.args LDFLAGS="" }
    2830
    2931set conf_file "filetypes.conf"
    30 set old_conf_files { "scriptre.conf" "extensions.conf" }
    3132destroot {
    32         xinstall -m 755 ${worksrcpath}/highlight/highlight ${destroot}${prefix}/bin
     33        xinstall -m 755 ${worksrcpath}/src/highlight ${destroot}${prefix}/bin
    3334
    3435        xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
    35         xinstall -m 644 ${worksrcpath}/${conf_file} \
    36                 ${destroot}${prefix}/etc/${name}/${conf_file}.sample
     36  xinstall -m 644 ${worksrcpath}/${conf_file} \
     37                ${destroot}${prefix}/etc/${name}/${conf_file}.sample
    3738
    3839        xinstall -m 755 -d ${destroot}${prefix}/share/${name}
    39         foreach dir { "langDefs" "themes" "indentSchemes" "helpmsg" } {
     40        foreach dir { "langDefs" "themes" } {
    4041                file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name}
    4142                        system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*"
    4243        }
     
    4647                ${destroot}${prefix}/share/man/man1
    4748
    4849        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    49         foreach file { "AUTHORS" "README" "README_DE" "README_INDENT" "ChangeLog" \
    50                 "COPYING" "INSTALL" } {
     50        foreach file { "AUTHORS" "README" "README_DE" "ChangeLog" \
     51                "COPYING" "INSTALL" "README_LANGLIST" "README_REGEX" } {
    5152                xinstall -m 644 ${worksrcpath}/${file} \
    5253                        ${destroot}${prefix}/share/doc/${name}
    5354        }
     
    5556        file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
    5657}
    5758
     59set old_conf_files { "scriptre.conf" "extensions.conf" }
    5860post-activate {
    5961        # copy over the sample conf file if necessary
    6062        if { ![file exists ${prefix}/etc/${name}/${conf_file}] } {
    6163                file copy ${prefix}/etc/${name}/${conf_file}.sample \
    6264                        ${prefix}/etc/${name}/${conf_file}
    6365        }
    64        
     66
    6567        # warn the user of deprecated conf files
    6668        set deprecated_conf_files {}
    6769        foreach file $old_conf_files {
     
    8486                }
    8587        }
    8688}