Ticket #30174: centerim.ryandesign.cleanervariants.diff

File centerim.ryandesign.cleanervariants.diff, 2.9 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago)

alternate proposal for cleaned-up variants

  • Portfile

     
    44PortSystem          1.0
    55
    66name                centerim
    7 version             4.22.9
    8 revision            3
     7version             4.22.10
    98categories          net
    109platforms           darwin
    1110maintainers         freebsd.org:miwi
     
    1312
    1413description         Console multi-IM client.
    1514long_description    Console client for AIM/ICQ/Yahoo/MSN/IRC/LiveJournal.
    16 checksums           md5     c43911508205e0277529230c8316a298 \
    17                     sha1    ebe9f4ee2064a2fa10f1084ce26083ccd295673e \
    18                     rmd160  253007e466a211ec740f7843538e4f686ab95cad
     15
     16checksums           sha1    46fbac7a55f33b0d4f42568cca21ed83770650e5 \
     17                    rmd160  2514c871388edb98b4a8957f965ccee3450b968f
     18
    1919homepage            http://www.centerim.org/
    2020master_sites        ${homepage}download/releases/
    2121depends_lib         port:libiconv port:gettext port:ncurses port:openssl \
     
    3131                    --without-libcurl
    3232build.type          gnu
    3333
    34 variant msn description {Enable MSN support (requires curl+ssl)} {
    35     depends_build-append port:pkgconfig
    36     depends_lib-append port:curl
    37     configure.args-delete --disable-msn --without-libcurl
    38     configure.args-append --with-libcurl=${prefix}
    39     pre-fetch {
    40         set fd [open "|pkg-config --variable=supported_features libcurl"]
    41         eval set features [gets $fd]
    42         close $fd
    43         if {[lsearch -exact $features SSL] == -1} {
    44             return -code error "curl must be installed with +ssl to enable MSN support."
    45         }
    46     }
     34variant msn description {Enable Microsoft Messenger support} {
     35    configure.args-delete --disable-msn
    4736}
    48 variant allproto description {Enable support for all protocols (requires curl+ssl)} {
     37
     38variant yahoo description {Enable Yahoo! Messenger support} {
     39    configure.args-delete --disable-yahoo
     40}
     41
     42# Legacy compatibility variant; can be removed once most users have upgraded.
     43variant allproto requires msn yahoo description {Enable support for all protocols} {}
     44
     45if {[variant_isset msn] || [variant_isset yahoo]} {
    4946    depends_build-append port:pkgconfig
    5047    depends_lib-append port:curl
    51     configure.args-delete --disable-msn --disable-yahoo --without-libcurl
     48    configure.args-delete --without-libcurl
    5249    configure.args-append --with-libcurl=${prefix}
    53     pre-fetch {
     50    pre-configure {
    5451        set fd [open "|pkg-config --variable=supported_features libcurl"]
    5552        eval set features [gets $fd]
    5653        close $fd
    5754        if {[lsearch -exact $features SSL] == -1} {
    58             return -code error "curl must be installed with +ssl to enable MSN and Yahoo support."
     55            ui_error "curl must be installed with the +ssl variant"
     56            return -code error "incompatible curl installation"
    5957        }
    6058    }
    6159}