Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2014 15:22:59 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r352012 - head/lang/clang-cheri/files
Message-ID:  <201404241522.s3OFMxiq093959@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Thu Apr 24 15:22:59 2014
New Revision: 352012
URL: http://svnweb.freebsd.org/changeset/ports/352012
QAT: https://qat.redports.org/buildarchive/r352012/

Log:
  Actually use the python interpreter found by cmake.

Added:
  head/lang/clang-cheri/files/patch-tools_lldb_scripts_CMakeLists.txt   (contents, props changed)
  head/lang/clang-cheri/files/patch-tools_lldb_scripts_Python_finish-swig-Python-LLDB.sh   (contents, props changed)

Added: head/lang/clang-cheri/files/patch-tools_lldb_scripts_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/clang-cheri/files/patch-tools_lldb_scripts_CMakeLists.txt	Thu Apr 24 15:22:59 2014	(r352012)
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- tools/lldb/scripts/CMakeLists.txt.orig
++++ tools/lldb/scripts/CMakeLists.txt
+@@ -8,8 +8,8 @@
+   DEPENDS ${SWIG_INPUTS}
+   # swig was directly invoked on Windows (where the Python API is not being generated) but on other platforms, we need to run the *swig-wrapper-classes.sh shell-scripts.
+   #COMMAND swig -c++ -shadow -python -I${LLDB_SOURCE_DIR}/include -I./. -outdir ${LLDB_SOURCE_DIR}/scripts/Python  -o ${LLDB_SOURCE_DIR}/source/LLDBWrapPython.cpp ${LLDB_SOURCE_DIR}/scripts/lldb.swig
+-  COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
+-  COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
++  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
++  COMMAND env PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/finish-swig-wrapper-classes.sh ${LLDB_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} -m
+   COMMENT "Building lldb python wrapper")
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1)
+ 

Added: head/lang/clang-cheri/files/patch-tools_lldb_scripts_Python_finish-swig-Python-LLDB.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/clang-cheri/files/patch-tools_lldb_scripts_Python_finish-swig-Python-LLDB.sh	Thu Apr 24 15:22:59 2014	(r352012)
@@ -0,0 +1,36 @@
+
+$FreeBSD$
+
+--- tools/lldb/scripts/Python/finish-swig-Python-LLDB.sh.orig
++++ tools/lldb/scripts/Python/finish-swig-Python-LLDB.sh
+@@ -34,6 +34,9 @@
+ debug_flag=$5
+ makefile_flag=$6
+ 
++# /usr/bin/env python
++PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python}
++
+ # If we don't want Python, then just do nothing here.
+ # Note, at present iOS doesn't have Python, so if you're building for iOS be sure to
+ # set LLDB_DISABLE_PYTHON to 1.
+@@ -55,7 +58,7 @@
+ fi
+ 
+ OS_NAME=`uname -s`
+-PYTHON_VERSION=`/usr/bin/env python --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`
++PYTHON_VERSION=`${PYTHON} --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`
+ 
+ 
+ if [ $Debug -eq 1 ]
+@@ -100,9 +103,9 @@
+ 
+     if [ -n "${PYTHON_INSTALL_DIR}" ]
+     then
+-        framework_python_dir=`/usr/bin/env python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False, \"${PYTHON_INSTALL_DIR}\");"`/lldb
++        framework_python_dir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False, \"${PYTHON_INSTALL_DIR}\");"`/lldb
+     else
+-        framework_python_dir=`/usr/bin/env python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False);"`/lldb
++        framework_python_dir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False);"`/lldb
+     fi
+ fi
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404241522.s3OFMxiq093959>