source: trunk/dports/irc/weechat/Portfile

Last change on this file was 152968, checked in by cal@…, 12 months ago

weechat: Add missing docbook-xsl dependency

Weechat fails to build in trace mode (and without network connection), because
xsltproc fails to find DTDs and stylesheets. Add the missing dependency to fix
this.

Closes: #52296

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 152968 2016-09-21 12:53:30Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7
8name                weechat
9
10homepage            http://weechat.org/
11license             GPL-3
12description         Fast, light & extensible IRC client
13long_description    \
14    WeeChat (Wee Enhanced Environment for Chat) is a fast and light IRC client \
15    for many operating systems. Everything can be done with a keyboard. It is \
16    customizable and extensible with plugins/scripts, and includes: \
17    \n - nicklist \
18    \n - smart hotlist \
19    \n - infobar with highlight notification \
20    \n - horizontal and vertical split \
21    \n - double charset support (decode/encode) \
22    \n - FIFO pipe for remote control \
23    \n - and much more!
24
25categories          irc
26maintainers         gmail.com:starkhalo \
27                    openmaintainer
28platforms           darwin
29
30if {${name} eq ${subport}} {
31    conflicts       weechat-devel
32    github.setup    weechat weechat 1.5 v
33
34    checksums       rmd160  3eba0f051cc158798a9810a83ff950faeaa48e49 \
35                    sha256  fe8cc22db690ed62b10514acf1142fa3669e50aff35e3bce41e478104fa56446
36}
37
38subport weechat-devel {
39    github.setup    weechat weechat 290b40af8905152e82f83a6f521ee420f7631c7a
40    version         1.6-dev-20160715
41
42    conflicts       weechat
43    checksums       rmd160  6473a48520503ca8941aa5f53f604a83515e2b84 \
44                    sha256  285803b61ab62a7e1e83b494a246b9eb300105a705f1687fd68443720ac9dbef
45}
46
47depends_build-append \
48                    port:asciidoc \
49                    port:libxslt \
50                    port:docbook-xsl
51
52depends_lib-append  port:gettext \
53                    port:libgcrypt \
54                    port:libiconv \
55                    port:ncurses
56
57cmake.out_of_source yes
58
59configure.args-append \
60                    -DENABLE_GNUTLS=OFF \
61                    -DENABLE_LUA=OFF \
62                    -DENABLE_GUILE=OFF \
63                    -DENABLE_PERL=OFF \
64                    -DENABLE_PYTHON=OFF \
65                    -DENABLE_PYTHON3=OFF \
66                    -DENABLE_RUBY=OFF \
67                    -DENABLE_ASPELL=OFF \
68                    -DENABLE_TCL=OFF \
69                    -DENABLE_MAN=ON
70
71variant python requires python27 description {Compatibility variant, requires +python27} {}
72
73variant python27 description "Bindings for python 2.7 plugins" conflicts python34 {
74    configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
75    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7
76    configure.args-append   -DPYTHON_INCLUDE_PATH=${frameworks_dir}/Python.framework/Versions/2.7/Headers
77    configure.args-append   -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python
78    depends_lib-append      port:python27
79}
80
81variant python34 description "Bindings for python 3.4 plugins" conflicts python27 {
82    configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
83    configure.args-replace  -DENABLE_PYTHON3=OFF -DENABLE_PYTHON3=ON
84    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.4
85    configure.args-append   -DPYTHON_INCLUDE_PATH=${frameworks_dir}/Python.framework/Versions/3.4/Headers
86    configure.args-append   -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.4/Python
87    depends_lib-append      port:python34
88
89    # From http://weechat.org/files/doc/stable/weechat_user.en.html#dependencies
90    notes "Recommended Python version is 2.7 (all scripts run fine with version 2.7, but not with versions ≤ 2.6 or ≥ 3.0)."
91}
92
93post-configure {
94    if {[variant_isset python27] || [variant_isset python34]} {
95        set patchfile ${configure.dir}/src/plugins/python/CMakeFiles/python.dir/link.txt
96
97        reinplace -E "s| \(Python.framework\)| ${frameworks_dir}/\\1|g" ${patchfile}
98
99        if {[variant_isset python34]} {
100            reinplace -E "s|-Wl,-stack_size,1000000||" ${patchfile}
101        }
102    }
103}
104
105variant tcl description {Support for tcl} {
106    configure.args-delete   -DENABLE_TCL=OFF
107    configure.args-append   -DENABLE_TCL=ON
108    depends_lib-append      port:tcl
109}
110
111variant aspell description {Support for aspell} {
112    configure.args-delete   -DENABLE_ASPELL=OFF
113    configure.args-append   -DENABLE_ASPELL=ON
114    depends_lib-append      port:aspell
115}
116
117variant lua description {Bindings for lua plugins} {
118    configure.args-delete   -DENABLE_LUA=OFF
119    configure.args-append   -DENABLE_LUA=ON
120    depends_lib-append      port:lua
121}
122
123variant scheme description {Bindings for Scheme (guile) plugins} {
124    configure.args-delete   -DENABLE_GUILE=OFF
125    configure.args-append   -DENABLE_GUILE=ON
126    depends_lib-append      port:guile
127}
128
129variant perl description {Bindings for perl plugins} {
130    configure.args-delete   -DENABLE_PERL=OFF
131    configure.args-append   -DENABLE_PERL=ON
132    depends_lib-append      path:bin/perl:perl5
133}
134
135variant ruby description {Bindings for ruby plugins} {
136    configure.args-delete   -DENABLE_RUBY=OFF
137    configure.args-append   -DENABLE_RUBY=ON
138    depends_lib-append      port:ruby
139}
140
141variant tls description {Support for secure connecting} {
142    depends_run-append      path:etc/openssl/cert.pem:certsync
143
144    configure.args-delete   -DENABLE_GNUTLS=OFF
145    configure.args-append   -DENABLE_GNUTLS=ON \
146                            -DCA_FILE=${prefix}/etc/openssl/cert.pem
147    depends_lib-append      port:gnutls
148}
149
150variant doc description {Build Documentation and plugin API} {
151    depends_build-append    port:source-highlight
152
153    configure.args-append   -DENABLE_DOC=ON
154}
155
156post-destroot {
157#   https://github.com/weechat/weechat/issues/722
158    set ext "adoc"
159    if {${subport} eq ${name}} {set ext "asciidoc"}
160    xinstall -m 755 -d ${destroot}${prefix}/share/doc/weechat
161    xinstall -m 644 -W ${worksrcpath} AUTHORS.${ext} COPYING ChangeLog.${ext} README.${ext} ${destroot}${prefix}/share/doc/weechat
162    xinstall -m 644 -W ${worksrcpath} {*}[glob doc/en/weechat*.${ext}] ${destroot}${prefix}/share/doc/weechat
163}
164
165post-install {
166    # if present then remove file previously installed outside destroot
167    foreach file {include/weechat/weechat-plugin.h} {
168        set filepath ${prefix}/${file}
169        if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
170            if {[catch {delete ${filepath}}]} {
171                ui_warn "Cannot delete ${filepath}; please remove it manually"
172            }
173        }
174    }
175}
Note: See TracBrowser for help on using the repository browser.