Ticket #53022: opencv-python-fix.diff

File opencv-python-fix.diff, 2.1 KB (added by RJVB (René Bertin), 8 years ago)

fix the +python34 build issue (and removes an inexistant CMake option). A revbump is not required.

  • graphics/opencv/Portfile

    diff --git a/graphics/opencv/Portfile b/graphics/opencv/Portfile
    index 19a905e..d45801e 100644
    a b configure.args-append \ 
    139139                    -DINSTALL_C_EXAMPLES=OFF \
    140140                    -DINSTALL_PYTHON_EXAMPLES=OFF \
    141141                    -DENABLE_PRECOMPILED_HEADERS=ON \
    142                     -DCMAKE_VERBOSE=ON \
    143                     -DENABLE_SSE3=ON
    144 
     142                    -DENABLE_SSSE3=ON
    145143platform darwin {
    146144    if {${os.major} >= 13} {
    147145        configure.args-append \
    foreach pdv ${pythonversions} { 
    279277        }
    280278    }
    281279    variant python${pv} conflicts ${conflist} description "Add bindings for Python ${pdv}" {
    282         depends_lib-append  port:python${pv} \
    283                             port:py${pv}-numpy
    284280        patchfiles-delete   patch-modules_python_CMakeLists.txt.diff
    285281        configure.args-delete \
    286282                            -DINSTALL_PYTHON_EXAMPLES=OFF \
    287283                            -DBUILD_opencv_python3=OFF
     284    }
     285    # settings that depend on loop variables must be set in an appropriate if, not in the
     286    # variant declaration scope.
     287    if {[variant_isset python${pv}]} {
     288        depends_lib-append  port:python${pv} \
     289                            port:py${pv}-numpy
    288290        if {![variant_isset python27]} {
    289291            configure.args-replace \
    290292                            -DPYTHON_EXECUTABLE=OFF \
    foreach pdv ${pythonversions} { 
    293295        configure.args-append \
    294296                            -DINSTALL_PYTHON_EXAMPLES=ON \
    295297                            -DPYTHON3_EXECUTABLE=${prefix}/bin/python${pdv} \
    296                             -DPYTHON3_LIBRARY=${prefix}/lib/libpython${pdv}.dylib \
     298                            -DPYTHON3_LIBRARY=${frameworks_dir}/Python.framework/Versions/${pdv}/lib/libpython${pdv}.dylib \
    297299                            -DPYTHON3_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/${pdv}/Headers \
    298300                            -DPYTHON3_PACKAGES_PATH=${frameworks_dir}/Python.framework/Versions/${pdv}/lib/python${pdv}/site-packages
    299301    }