Ticket #42066: Portfile.diff

File Portfile.diff, 3.9 KB (added by zpeeters@…, 11 years ago)
  • Portfile

    old new  
    2020                    sha256  f44c52a0f8065d41d44772a7484f93bc5e7da21a8f4a9ad3f38a36b827eeff0b
    2121
    2222depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
    23                     port:libxml2 \
    24                     port:swig-python
     23                    port:libxml2
    2524
    2625patchfiles          patch-iterator.diff
    2726
    28 configure.args-append   -DENABLE_CYTHON=OFF
     27configure.args-append   -DENABLE_CYTHON=OFF -DENABLE_SWIG=OFF
    2928
    3029use_parallel_build  no
    3130
    32 variant python26 conflicts python27 description {Use Python 2.6} {
    33     depends_lib-append  port:python26
     31variant python26 conflicts python27 python32 python33 description {Install Python 2.6 bindings} {
     32    depends_lib-append  port:python26 port:swig-python
     33    configure.args-replace -DENABLE_SWIG=OFF -DENABLE_SWIG=ON
    3434    configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python2.6 \
    35                           -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.6/include/python2.6 \
     35                          -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.6/Headers \
    3636                          -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.6/Python
    3737}
    38 variant python27 conflicts python26 description {Use Python 2.7} {
    39     depends_lib-append  port:python27
     38variant python27 conflicts python26 python32 python33 description {Install Python 2.7 bindings} {
     39    depends_lib-append  port:python27 port:swig-python
     40    configure.args-replace -DENABLE_SWIG=OFF -DENABLE_SWIG=ON
    4041    configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
    41                           -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/include/python2.7 \
     42                          -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \
    4243                          -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python
    4344}
    44 if {![variant_isset python26]} {
    45     default_variants    +python27
     45variant python32 conflicts python26 python27 python33 description {Install Python 3.2 bindings} {
     46    depends_lib-append  port:python32 port:swig-python
     47    configure.args-replace -DENABLE_SWIG=OFF -DENABLE_SWIG=ON
     48    configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python3.2 \
     49                          -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/3.2/Headers \
     50                          -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.2/Python
     51    pre-configure {
     52        reinplace "s|CMAKE_SWIG_FLAGS|CMAKE_SWIG_FLAGS -py3|" \
     53            ${worksrcpath}/swig/CMakeLists.txt
     54           
     55        reinplace "s|print distutils\.sysconfig\.get_python_lib\(plat_specific=1\)|print (distutils.sysconfig.get_python_lib(plat_specific=1))|" \
     56            ${worksrcpath}/swig/CMakeLists.txt
     57    }
    4658}
    47 if {![variant_isset python26] && ![variant_isset python27]} {
    48     depends_lib-delete port:swig-python
    49     configure.args-append -DENABLE_SWIG=OFF
     59variant python33 conflicts python26 python27 python32 description {Install Python 3.3 bindings} {
     60    depends_lib-append  port:python32 port:swig-python
     61    configure.args-replace -DENABLE_SWIG=OFF -DENABLE_SWIG=ON
     62    configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python3.3 \
     63                          -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/3.3/Headers \
     64                          -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.3/Python
     65    pre-configure {
     66        reinplace "s|CMAKE_SWIG_FLAGS|CMAKE_SWIG_FLAGS -py3|" \
     67            ${worksrcpath}/swig/CMakeLists.txt
     68           
     69        reinplace "s|print distutils\.sysconfig\.get_python_lib\(plat_specific=1\)|print (distutils.sysconfig.get_python_lib(plat_specific=1))|" \
     70            ${worksrcpath}/swig/CMakeLists.txt
     71    }
    5072}
    5173
    5274livecheck.type      regex