source: trunk/dports/sysutils/bash-completion-devel/Portfile @ 134624

Last change on this file since 134624 was 118693, checked in by raimue@…, 6 years ago

sysutils/bash-completion{,-devel}:
Port patches from Debian to fix compatibility problems with bash 4.3, closes #43265

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 118693 2014-04-08 10:26:23Z raimue@macports.org $
2
3PortSystem      1.0
4
5name            bash-completion-devel
6conflicts       bash-completion
7version         2.1
8revision        7
9categories      sysutils
10platforms       darwin
11supported_archs noarch
12license         GPL-2+
13maintainers     raimue
14description     Programmable bash completions
15long_description \
16    Programmable completion library for bash. This port requires bash >=4.1 and \
17    is meant to be used together with the bash port.
18
19homepage        http://bash-completion.alioth.debian.org/
20master_sites    http://bash-completion.alioth.debian.org/files/
21distname        bash-completion-${version}
22checksums       md5     4e2a9f11a4042a38ee79ddcd048e8b9e \
23                rmd160  5e019214ee2c7788ef7d80179e30594047b23a37 \
24                sha256  2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f
25use_bzip2 yes
26
27depends_run     port:bash
28
29patchfiles      patch-vpnc.diff \
30                patch-make.diff \
31                patch-_known_hosts_real.diff \
32                patch-compat-dont-return.diff \
33                patch-words-bad-array-subscript.diff \
34                patch-fix-quote-readline-by-ref.diff \
35                patch-perldoc-pod.diff
36
37post-patch {
38    reinplace "s:/etc/bash_completion:${prefix}/etc/bash_completion:g" \
39        ${worksrcpath}/bash_completion
40    reinplace "s:readlink -f:readlink:g" \
41        ${worksrcpath}/bash_completion
42
43    # Fix vpnc config location, #29281
44    reinplace "s:@@PREFIX@@:${prefix}:g" \
45        ${worksrcpath}/completions/vpnc
46}
47
48post-destroot {
49    xinstall -m 644 -W ${filespath} port launchctl \
50        ${destroot}${prefix}/share/bash-completion/completions/
51
52    # Add a link for compatibility with versions <2.0 of this port
53    ln -s ${prefix}/etc/profile.d/bash_completion.sh ${destroot}${prefix}/etc/bash_completion
54}
55
56notes "
57To use bash_completion, add the following lines at the end of your .bash_profile:
58  if \[ -f ${prefix}/etc/profile.d/bash_completion.sh ]; then
59      . ${prefix}/etc/profile.d/bash_completion.sh
60  fi
61"
62
63if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx"} {
64    # Insert an empty line into the notes
65    notes-append ""
66    notes-append "
67        The port bash-completion >=2.0 requires bash >=4.1; please make sure
68        you are using ${prefix}/bin/bash by changing the preferences of your
69        terminal accordingly. If your version of bash is too old, the script
70        above will not modify your shell environment and no extended completion
71        will be available.
72    "
73}
74
75livecheck.type      regex
76livecheck.url       ${homepage}
77livecheck.regex     "bash-completion-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.