source: trunk/dports/editors/MacVim/files/patch-python.diff @ 110123

Last change on this file since 110123 was 110123, checked in by raimue@…, 6 years ago

editors/vim, editors/vim-app, editors/MacVim:
Fix linking with +python27, which failed silently before, closes #39207.
Also ensure we are always using the correct tclsh binary.

Thanks to larryv@ for the patches.

File size: 3.1 KB
  • src/configure.in

    old new  
    965965AC_MSG_RESULT($enable_pythoninterp)
    966966if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
    967967  dnl -- find the python executable
    968   AC_PATH_PROG(vi_cv_path_python, python)
     968  AC_MSG_CHECKING(--with-python argument)
     969  AC_ARG_WITH(python, [  --with-python=PATH       which python to use (default: python)],
     970        python_name="$withval"; AC_MSG_RESULT($python_name),
     971        python_name="python"; AC_MSG_RESULT(no))
     972  AC_SUBST(vi_cv_path_python, $python_name)
    969973  if test "X$vi_cv_path_python" != "X"; then
    970974
    971975    dnl -- get its version number
     
    10491053            dnl -- delete the lines from make about Entering/Leaving directory
    10501054            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
    10511055            rm -f -- "${tmp_mkf}"
    1052             if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
    1053                 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
    1054               vi_cv_path_python_plibs="-framework Python"
    1055             else
    1056               if test "${vi_cv_var_python_version}" = "1.4"; then
    1057                   vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
    1058               else
    1059                   vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
    1060               fi
    1061               vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
    1062               dnl remove -ltermcap, it can conflict with an earlier -lncurses
    1063               vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    1064             fi
     1056            vi_cv_path_python_plibs="`${vi_cv_path_python}-config --ldflags`"
     1057            dnl remove -ltermcap, it can conflict with an earlier -lncurses
     1058            vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    10651059        ])
    10661060
    10671061        if test "X$python_DLLLIBRARY" != "X"; then
    10681062          python_INSTSONAME="$python_DLLLIBRARY"
    10691063        fi
    10701064        PYTHON_LIBS="${vi_cv_path_python_plibs}"
    1071         if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
    1072           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
    1073         else
    1074           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME=\\\"${vi_cv_path_python_pfx}\\\""
    1075         fi
     1065        PYTHON_CFLAGS="`${vi_cv_path_python}-config --includes` -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    10761066        PYTHON_SRC="if_python.c"
    10771067        PYTHON_OBJ="objects/if_python.o"
    10781068        if test "${vi_cv_var_python_version}" = "1.4"; then
  • src/if_python.c

    old new  
    4646
    4747#define PY_SSIZE_T_CLEAN
    4848
    49 #ifdef FEAT_GUI_MACVIM
    50 # include <Python/Python.h>
    51 #else
    52 # include <Python.h>
    53 #endif
    54 
     49#include <Python.h>
    5550#if defined(MACOS) && !defined(MACOS_X_UNIX)
    5651# include "macglue.h"
    5752# include <CodeFragments.h>
Note: See TracBrowser for help on using the repository browser.