Ignore:
Timestamp:
Jun 20, 2013, 7:34:39 PM (7 years ago)
Author:
aronnax@…
Message:

htcondor: add variants for different versions of Python

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/htcondor/Portfile

    r106881 r107162  
    99github.setup            htcondor htcondor 8_0_0 V
    1010version                 [strsed ${github.version} g/_/\./]
     11revision                1
    1112maintainers             aronnax
    1213
     
    2627homepage                http://research.cs.wisc.edu/htcondor
    2728
    28 default_variants        +personal
     29default_variants        +personal +python27
    2930
    3031variant personal \
     
    3940}
    4041
     42set pythons_suffixes {25 26 27 31 32 33}
     43
     44set pythons_ports {}
     45foreach s ${pythons_suffixes} {
     46    lappend pythons_ports python${s}
     47}
     48
     49configure.args-append   -DWITH_PYTHON_BINDINGS:BOOL="0"
     50
     51foreach s ${pythons_suffixes} {
     52    set p python${s}
     53    set v [string index ${s} 0].[string index ${s} 1]
     54    set i [lsearch -exact ${pythons_ports} ${p}]
     55    set c [lreplace ${pythons_ports} ${i} ${i}]
     56    set d ${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}
     57    eval [subst {
     58        variant ${p} description "Enable Python interface for Python ${v}" conflicts ${c} {
     59
     60            depends_lib-append      port:${p}
     61            require_active_variants boost ${p}
     62            configure.args-append   -DC_PYTHONARCHLIB:PATH="${d}/site-packages"
     63            configure.args-strsed   s/-DWITH_PYTHON_BINDINGS:BOOL="0"/-DWITH_PYTHON_BINDINGS:BOOL="1"/
     64
     65            post-patch {
     66                reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/src/condor_utils/condor_config.cpp
     67                reinplace "s|@c_pythonarchlib@|${d}/site-packages|g" ${worksrcpath}/build/cmake/CondorPackageConfig.cmake
     68            }
     69
     70        }
     71    }]
     72}
     73
    4174checksums               rmd160  d7a11387a78b1a25d2ecd04f2d136d74f2f5fb6c \
    4275                        sha256  d07e2ccc24beefc84f5c878b702468e52ca20a26ef326b3eca2a2c531fa95876
     
    4881                        port:kerberos5 \
    4982                        port:openssl \
    50                         port:pcre \
    51                         port:python27
     83                        port:pcre
    5284
    5385license_noconflict      latex2html
     
    68100
    69101# FIXME: Globus support is disabled because Globus is not available in MacPorts.
    70 configure.args-append   -DWITH_GLOBUS:BOOL="0" -DBUILD_TESTING:BOOL="0" -DC_PYTHONARCHLIB:PATH="${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"
     102configure.args-append   -DWITH_GLOBUS:BOOL="0" -DBUILD_TESTING:BOOL="0"
    71103
    72104# Man pages are not part of the default build target.
Note: See TracChangeset for help on using the changeset viewer.