source: trunk/dports/textproc/highlight/Portfile @ 50984

Last change on this file since 50984 was 50984, checked in by and.damore@…, 10 years ago

Maintainer email change, second batch, mail without @macports.org domain are put in domain:user form.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
2
3PortSystem 1.0
4
5name                    highlight
6version                 2.4.8
7categories              textproc devel
8platforms               darwin
9maintainers             groovie.org:pjenvey
10description             converts source code to formatted text with syntax highlighting
11long_description        ${description}
12
13homepage                http://www.andre-simon.de
14master_sites            ${homepage}/zip/
15checksums               sha1 091689fde96c9f4e3de75ea1b7c1838e8d25708c
16use_bzip2               yes
17
18configure {
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
23}
24
25# Avoid stripping the binary (-s flag) during linking as this corrupts the executable.
26# Strip after building
27platform darwin 8 { build.args LDFLAGS="" }
28
29set conf_file "filetypes.conf"
30set old_conf_files { "scriptre.conf" "extensions.conf" }
31destroot {
32        xinstall -m 755 ${worksrcpath}/highlight/highlight ${destroot}${prefix}/bin
33
34        xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
35        xinstall -m 644 ${worksrcpath}/${conf_file} \
36                ${destroot}${prefix}/etc/${name}/${conf_file}.sample
37
38        xinstall -m 755 -d ${destroot}${prefix}/share/${name}
39        foreach dir { "langDefs" "themes" "indentSchemes" "helpmsg" } {
40                file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name}
41                        system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*"
42        }
43
44        xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
45        xinstall -m 644 ${worksrcpath}/man/highlight.1.gz \
46                ${destroot}${prefix}/share/man/man1
47
48        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
49        foreach file { "AUTHORS" "README" "README_DE" "README_INDENT" "ChangeLog" \
50                "COPYING" "INSTALL" } {
51                xinstall -m 644 ${worksrcpath}/${file} \
52                        ${destroot}${prefix}/share/doc/${name}
53        }
54
55        file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
56}
57
58post-activate {
59        # copy over the sample conf file if necessary
60        if { ![file exists ${prefix}/etc/${name}/${conf_file}] } {
61                file copy ${prefix}/etc/${name}/${conf_file}.sample \
62                        ${prefix}/etc/${name}/${conf_file}
63        }
64       
65        # warn the user of deprecated conf files
66        set deprecated_conf_files {}
67        foreach file $old_conf_files {
68                if { [file exists ${prefix}/etc/${name}/${file}] } {
69                        file rename ${prefix}/etc/${name}/${file} \
70                                ${prefix}/etc/${name}/${file}.dport_bak
71                        lappend deprecated_conf_files ${file}
72                }
73        }
74        if { [llength $deprecated_conf_files] } {
75                ui_msg "\nWarning: Old highlight conf files: ${deprecated_conf_files}"
76                ui_msg "have been replaced by: ${conf_file}"
77                ui_msg "as of highlight-2.4.5."
78                ui_msg "\nThe following old conf files have been renamed (and should be"
79                ui_msg "removed):\n"
80                foreach file $deprecated_conf_files {
81                        ui_msg "${prefix}/etc/${name}/${file} ->"
82                        ui_msg "${prefix}/etc/${name}/${file}.dport_bak"
83                        ui_msg ""
84                }
85        }
86}
87
Note: See TracBrowser for help on using the repository browser.