1 | # $Id: Portfile 20429 2007-12-18 01:48:50Z lefevre $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name zsh-devel |
---|
6 | set my_name [strsed ${name} {s/-.*//}] |
---|
7 | version 4.3.4-dev-5 |
---|
8 | categories shells |
---|
9 | platforms darwin |
---|
10 | maintainers nox |
---|
11 | description Zsh is a UNIX command interpreter (shell) |
---|
12 | |
---|
13 | long_description \ |
---|
14 | Zsh is a UNIX command interpreter (shell) which of the standard shells most resembles the Korn shell \ |
---|
15 | (ksh), although it is not completely compatible. It includes enhancements of many types, notably in \ |
---|
16 | the command-line editor, options for customising its behaviour, filename globbing, features to make \ |
---|
17 | C-shell (csh) users feel more at home and extra features drawn from tcsh (another `custom' shell). |
---|
18 | |
---|
19 | homepage http://www.zsh.org/ |
---|
20 | use_bzip2 no |
---|
21 | dist_subdir ${my_name} |
---|
22 | distname ${my_name}-${version} |
---|
23 | master_sites ftp://ftp.zsh.org/pub/development/ \ |
---|
24 | ${homepage}pub/ \ |
---|
25 | ftp://ftp.zsh.org/${my_name} \ |
---|
26 | ftp://ftp.sterling.com/${my_name}/ \ |
---|
27 | ftp://ftp.rge.com/pub/shells/${my_name}/ \ |
---|
28 | ftp://ftp.fu-berlin.de/pub/unix/shells/${my_name}/ \ |
---|
29 | ftp://ftp.ips.oz.au/pub/packages/${my_name}/ \ |
---|
30 | ftp://ftp.uit.no/pub/unix/shells/${my_name}/ \ |
---|
31 | ftp://ftp.iij.ad.jp/pub/misc/${my_name}/ \ |
---|
32 | ftp://ftp.icm.edu.pl/vol/wojsyl/${my_name}/ \ |
---|
33 | ftp://ftp.sunsite.auc.dk/disk1/${my_name}/ \ |
---|
34 | sourceforge:${my_name} \ |
---|
35 | http://deb.grml.org/pool/main/z/${my_name}-lovers/:love |
---|
36 | |
---|
37 | # Some love for zsh: http://grml.org/zsh/zsh-lovers.html |
---|
38 | set love_distname zsh-lovers_0.7.0 |
---|
39 | set love_distfile ${love_distname}.tar.gz |
---|
40 | set worklovedir [strsed [strsed ${love_distname} {s/-[0-9][0-9]*$//}] {g/_/-/}] |
---|
41 | set worklovepath ${workpath}/${worklovedir} |
---|
42 | |
---|
43 | checksums [suffix ${distname}] \ |
---|
44 | md5 d0b5cfcc41554eb68f2db6e7c4006d80 \ |
---|
45 | sha1 b786d274d15cfb1f16f61fea4a6112e80374d1ec \ |
---|
46 | rmd160 91e43cd623a7a198285a0f39c0b195404d9f746c \ |
---|
47 | [suffix ${distname}-doc] \ |
---|
48 | md5 1a4ab09a9d75c5ae8585ad645406f27d \ |
---|
49 | sha1 83d1a38112f305892393cb036058248ebbf6168e \ |
---|
50 | rmd160 768ce8ca2860139428d27a0fedf5c0724967e444 \ |
---|
51 | ${love_distfile} \ |
---|
52 | md5 e7a4ecabe514afdf2d1a56d1e925fb86 \ |
---|
53 | sha1 669fd529080492819c10379ad41b7b5e7a575fd1 \ |
---|
54 | rmd160 16367651748e7e7102de74b1f70e5d3b59fdd867 |
---|
55 | |
---|
56 | depends_lib port:libiconv \ |
---|
57 | port:ncurses |
---|
58 | |
---|
59 | # configure.universal_ldflags-append -isysroot ${sysroot} |
---|
60 | configure.universal_ldflags-append -isysroot /Developer/SDKs/MacOSX10.4u.sdk |
---|
61 | |
---|
62 | configure.args --mandir=${prefix}/share/man \ |
---|
63 | --infodir=${prefix}/share/info \ |
---|
64 | --with-curses-terminfo \ |
---|
65 | --enable-multibyte \ |
---|
66 | --enable-etcdir=${prefix}/etc |
---|
67 | |
---|
68 | test.run yes |
---|
69 | test.target check |
---|
70 | |
---|
71 | set docdir ${prefix}/share/doc/${my_name}-${version} |
---|
72 | |
---|
73 | post-destroot { |
---|
74 | # This manpage only includes every zsh manpage; as manpages are gzipped in MacPorts, |
---|
75 | # .so groff directives will fail. |
---|
76 | system "cd ${destroot}${prefix}/share/man/man1 && \ |
---|
77 | soelim -I.. zshall.1 > zshall.1.soelim" |
---|
78 | move -force \ |
---|
79 | ${destroot}${prefix}/share/man/man1/zshall.1.soelim \ |
---|
80 | ${destroot}${prefix}/share/man/man1/zshall.1 |
---|
81 | |
---|
82 | xinstall -d ${destroot}${docdir} |
---|
83 | xinstall -m 0644 -W ${worksrcpath} ChangeLog FEATURES LICENCE NEWS README ${destroot}${docdir} |
---|
84 | |
---|
85 | if {[variant_isset doc] || [variant_isset examples]} { |
---|
86 | xinstall -d ${destroot}${docdir}/pdf |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | post-install { |
---|
91 | ui_info "If you want MacPorts' ${my_name} as login shell, you should run:" |
---|
92 | ui_info "% sudo sh -c \"echo '${prefix}/bin/${my_name}' >> /etc/shells\"" |
---|
93 | ui_info "% chsh -s ${prefix}/bin/${my_name}" |
---|
94 | } |
---|
95 | |
---|
96 | platform darwin { |
---|
97 | # Dynamic loadable libraries' extension is `bundle` on Darwin |
---|
98 | configure.env-append DL_EXT=bundle |
---|
99 | } |
---|
100 | |
---|
101 | platform darwin 8 { |
---|
102 | configure.compiler gcc-4.0 |
---|
103 | |
---|
104 | post-configure { |
---|
105 | # poll(2) is broken on Darwin 8. |
---|
106 | reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" \ |
---|
107 | ${worksrcpath}/config.h |
---|
108 | } |
---|
109 | } |
---|
110 | |
---|
111 | variant mp_completion description {Install port(1) completion file} { |
---|
112 | post-destroot { |
---|
113 | set sitedir ${prefix}/share/${my_name}/site-functions |
---|
114 | xinstall -m 0644 ${filespath}/_port \ |
---|
115 | ${destroot}${sitedir} |
---|
116 | } |
---|
117 | } |
---|
118 | |
---|
119 | variant pcre description {Add regular expressions support in builtin functions through PCRE} { |
---|
120 | configure.args-append --enable-pcre |
---|
121 | depends_lib-append port:pcre |
---|
122 | } |
---|
123 | |
---|
124 | variant doc description {Install extra documentation} { |
---|
125 | distfiles-append [suffix ${distname}-doc] |
---|
126 | |
---|
127 | post-build { |
---|
128 | system "make -C ${worksrcpath}/Doc html info" |
---|
129 | } |
---|
130 | |
---|
131 | destroot.target-append install.html \ |
---|
132 | install.info |
---|
133 | } |
---|
134 | |
---|
135 | variant examples description {Install configuration examples} { |
---|
136 | distfiles-append ${love_distfile}:love |
---|
137 | extract.only-delete ${love_distfile} |
---|
138 | |
---|
139 | post-extract { |
---|
140 | system "tar xzf ${distpath}/${love_distfile} -C ${workpath}" |
---|
141 | } |
---|
142 | |
---|
143 | post-destroot { |
---|
144 | proc xinstall_dir {dir destdir} { |
---|
145 | xinstall -d ${destdir} |
---|
146 | |
---|
147 | foreach {file} [glob ${dir}/*] { |
---|
148 | if {[file isdirectory ${file}]} { |
---|
149 | xinstall_dir ${file} [file join ${destdir} [file tail ${file}]] |
---|
150 | } else { |
---|
151 | xinstall -m 0644 ${file} ${destdir} |
---|
152 | } |
---|
153 | } |
---|
154 | } |
---|
155 | |
---|
156 | xinstall -m 0644 ${worklovepath}/refcard.pdf ${destroot}${docdir}/pdf |
---|
157 | xinstall_dir ${worklovepath}/zsh_people ${destroot}${docdir}/examples |
---|
158 | } |
---|
159 | } |
---|
160 | |
---|
161 | variant debug description {Debugging support (disables optimization)} { |
---|
162 | configure.args-append --enable-zsh-debug |
---|
163 | } |
---|
164 | |
---|
165 | livecheck.distname ${my_name}-dev |
---|