Changeset 97736


Ignore:
Timestamp:
Sep 13, 2012, 6:06:32 PM (12 years ago)
Author:
devans@…
Message:

libtorrent-rasterbar*: fail with error message if active boost doesn't have the required Python support.

Location:
trunk/dports/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/net/libtorrent-rasterbar-devel/Portfile

    r97735 r97736  
    4242                }
    4343
     44#
     45# Make sure that boost is installed with the correct Python variant
     46#
     47
     48pre-configure {
     49    set boost_python_lib ${prefix}/lib/libboost_python-mt.dylib
     50    set boost_python_version "0"
     51    if {[file exists ${boost_python_lib}]} {
     52        set boost_python_version [exec /usr/bin/otool -L ${boost_python_lib} | /usr/bin/grep Python | /usr/bin/sed -e "s|^.*Versions/||" -e "s|/.*||"]
     53    }
     54    if {${boost_python_version} != ${boost_python_required}} {
     55            ui_error "This port requires 'boost ${boost_variant}'. Please install as follows:"
     56            ui_error "    sudo port install boost ${boost_variant}"
     57            return -code error
     58    }
     59}
     60
    4461configure.args  --disable-silent-rules \
    4562                --enable-python-binding \
     
    6380}
    6481
    65 if {![variant_isset python26]} {
    66         default_variants +python27
    67 }
    68 
    6982variant error_logging description {Enable logging of errors to disk} {
    7083    configure.args-append --enable-logging=errors
    7184}
    7285
     86if {[variant_isset python26]} {
     87        set boost_python_required 2.6
     88        set boost_variant         +python26
     89} else {
     90        set boost_python_required 2.7
     91        set boost_variant         +python27
     92        default_variants          +python27
     93}
     94
    7395livecheck.type  none
  • trunk/dports/net/libtorrent-rasterbar/Portfile

    r97400 r97736  
    3737                }
    3838
     39#
     40# Make sure that boost is installed with the correct Python variant
     41#
     42
     43pre-configure {
     44    set boost_python_lib ${prefix}/lib/libboost_python-mt.dylib
     45    set boost_python_version "0"
     46    if {[file exists ${boost_python_lib}]} {
     47        set boost_python_version [exec /usr/bin/otool -L ${boost_python_lib} | /usr/bin/grep Python | /usr/bin/sed -e "s|^.*Versions/||" -e "s|/.*||"]
     48    }
     49    if {${boost_python_version} != ${boost_python_required}} {
     50            ui_error "This port requires 'boost ${boost_variant}'. Please install as follows:"
     51            ui_error "    sudo port install boost ${boost_variant}"
     52            return -code error
     53    }
     54}
     55
    3956configure.args  --disable-silent-rules \
    4057                --enable-python-binding \
     
    5875}
    5976
    60 if {![variant_isset python26]} {
    61         default_variants +python27
     77variant error_logging description {Enable logging of errors to disk} {
     78    configure.args-append --enable-logging=errors
    6279}
    6380
    64 variant error_logging description {Enable logging of errors to disk} {
    65     configure.args-append --enable-logging=errors
     81if {[variant_isset python26]} {
     82        set boost_python_required 2.6
     83        set boost_variant         +python26
     84} else {
     85        set boost_python_required 2.7
     86        set boost_variant         +python27
     87        default_variants          +python27
    6688}
    6789
Note: See TracChangeset for help on using the changeset viewer.