Changeset 138277


Ignore:
Timestamp:
Jul 3, 2015, 9:18:48 PM (5 years ago)
Author:
ionic@…
Message:

weechat: fix python variant(s). Patch provided by maintainer. Fixes: #37048.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/irc/weechat/Portfile

    r137362 r138277  
    6060                    -DENABLE_PERL=OFF \
    6161                    -DENABLE_PYTHON=OFF \
     62                    -DENABLE_PYTHON3=OFF \
    6263                    -DENABLE_RUBY=OFF \
    6364                    -DENABLE_ASPELL=OFF \
    6465                    -DENABLE_MAN=ON
     66
     67variant python requires python27 description {Compatibility variant, requires +python27} {}
     68
     69variant python27 description "Bindings for python 2.7 plugins" conflicts python34 {
     70    configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
     71    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7
     72    configure.args-append   -DPYTHON_INCLUDE_PATH=${frameworks_dir}/Python.framework/Versions/2.7/Headers
     73    configure.args-append   -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python
     74    depends_lib-append      port:python27
     75}
     76
     77variant python34 description "Bindings for python 3.4 plugins" conflicts python27 {
     78    configure.args-replace  -DENABLE_PYTHON=OFF -DENABLE_PYTHON=ON
     79    configure.args-replace  -DENABLE_PYTHON3=OFF -DENABLE_PYTHON3=ON
     80    configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python3.4
     81    configure.args-append   -DPYTHON_INCLUDE_PATH=${frameworks_dir}/Python.framework/Versions/3.4/Headers
     82    configure.args-append   -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.4/Python
     83    depends_lib-append      port:python34
     84
     85    # From http://weechat.org/files/doc/stable/weechat_user.en.html#dependencies
     86    notes "Recommended Python version is 2.7 (all scripts run fine with version 2.7, but not with versions ≤ 2.6 or ≥ 3.0)."
     87}
     88
     89post-configure {
     90    if {[variant_isset python27] || [variant_isset python34]} {
     91        set patchfile ${configure.dir}/src/plugins/python/CMakeFiles/python.dir/link.txt
     92
     93        reinplace -E "s| \(Python.framework\)| ${frameworks_dir}/\\1|g" ${patchfile}
     94
     95        if {[variant_isset python34]} {
     96            reinplace -E "s|-Wl,-stack_size,1000000||" ${patchfile}
     97        }
     98    }
     99}
    65100
    66101variant aspell description {Support for aspell} {
     
    86121    configure.args-append   -DENABLE_PERL=ON
    87122    depends_lib-append      path:bin/perl:perl5
    88 }
    89 
    90 variant python description {Bindings for python plugins} {
    91     configure.args-delete   -DENABLE_PYTHON=OFF
    92     configure.args-append   -DENABLE_PYTHON=ON
    93     depends_lib-append      path:bin/python:python27
    94 
    95     post-configure {
    96         reinplace -E "s|\(Python.framework\)|${frameworks_dir}/\\1|" ${worksrcpath}/src/plugins/python/CMakeFiles/python.dir/link.txt
    97     }
    98123}
    99124
Note: See TracChangeset for help on using the changeset viewer.