Ticket #15293: Portfile

File Portfile, 2.0 KB (added by wagle@…, 17 years ago)

tested textproc/gsed portfile

Line 
1# $Id: Portfile 33572 2008-01-30 14:21:35Z nox@macports.org $
2
3PortSystem      1.0
4
5name            gsed
6set my_name     sed
7version         4.1.5
8revision        3
9categories      textproc
10platforms       darwin
11maintainers     nox
12description     GNU version of the stream editor, sed
13
14long_description \
15    Sed (streams editor) isn't really a true text editor or text        \
16    processor. Instead, it is used to filter text, i.e., it takes text  \
17    input and performs some operation (or set of operations) on it and  \
18    outputs the modified text. Sed is typically used for extracting part\
19    of a file using pattern matching or substituting multiple occurrences\
20    of a string within a file.
21
22homepage        http://www.gnu.org/software/${my_name}/
23master_sites    gnu:${my_name}
24distname        ${my_name}-${version}
25
26checksums       md5 7a1cbbbb3341287308e140bd4834c3ba \
27                sha1 8e575e8a44568392d5b6e089eab5da5cdbd45885 \
28                rmd160 49b12e99a55c6d2e78ad236f0205e63e46444173
29
30depends_lib     port:gettext \
31                port:libiconv
32
33patchfiles      patch-configure.diff
34
35configure.args  --infodir=${prefix}/share/info \
36                --mandir=${prefix}/share/man \
37                --program-prefix=g
38
39set docdir      ${prefix}/share/doc/${my_name}-${version}
40
41post-destroot {
42    foreach i [glob -tails -directory ${destroot}${prefix}/share/info *.info*] {
43        move ${destroot}${prefix}/share/info/${i} ${destroot}${prefix}/share/info/g${i}
44    }
45
46    xinstall -d ${destroot}${docdir}
47    xinstall -m 0644 -W ${worksrcpath} AUTHORS BUGS COPYING ChangeLog NEWS README THANKS \
48        ${destroot}${docdir}
49}
50
51test.run        yes
52test.target     check
53
54variant with_default_names description {Install files without 'g' prefix} {
55    post-destroot {
56        foreach {d} {bin share/info share/man/man1} {
57            foreach {a} [glob -nocomplain -directory ${destroot}${prefix}/${d} g*] {
58                ln ${a} [file dirname ${a}]/[string range [file tail ${a}] 1 end]
59            }
60        }
61    }
62}