Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch for adam wolf
diff -u kicad-mac-packaging/cmake_settings kicad-mac-packaging-snakes/cmake_settings
--- kicad-mac-packaging/cmake_settings 2015-02-28 12:07:52.000000000 -0700
+++ kicad-mac-packaging-snakes/cmake_settings 2015-02-28 07:44:02.000000000 -0700
@@ -1,3 +1,3 @@
#!/bin/bash
-CMAKE_SETTINGS="-DCMAKE_C_COMPILER=`which clang` -DCMAKE_CXX_COMPILER=`which clang++` -DCMAKE_OSX_SYSROOT=../MacOSX10.7.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DwxWidgets_CONFIG_EXECUTABLE=../wx/wx-bin/bin/wx-config -DKICAD_SCRIPTING=OFF -DKICAD_SCRIPTING_MODULES=OFF -DKICAD_SCRIPTING_WXPYTHON=OFF -DCMAKE_INSTALL_PREFIX=../bin -DCMAKE_BUILD_TYPE=Release"
+CMAKE_SETTINGS="-DCMAKE_C_COMPILER=`which clang` -DCMAKE_CXX_COMPILER=`which clang++` -DCMAKE_OSX_SYSROOT=../MacOSX10.7.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DwxWidgets_CONFIG_EXECUTABLE=../wx/wx-bin/bin/wx-config -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DPYTHON_EXECUTABLE=`which python` -DPYTHON_SITE_PACKAGE_PATH=`pwd`/wx/wx-bin/lib/python2.7/site-packages -DCMAKE_INSTALL_PREFIX=../bin -DCMAKE_BUILD_TYPE=Release"
diff -u kicad-mac-packaging/compile_wx.sh kicad-mac-packaging-snakes/compile_wx.sh
--- kicad-mac-packaging/compile_wx.sh 2015-02-28 12:07:52.000000000 -0700
+++ kicad-mac-packaging-snakes/compile_wx.sh 2015-02-28 11:47:00.000000000 -0700
@@ -2,9 +2,9 @@
NUM_OF_CORES=7
-WX_SRC_URL="http://downloads.sourceforge.net/project/wxwindows/3.0.2/wxWidgets-3.0.2.tar.bz2?r=http%3A%2F%2Fwww.wxwidgets.org%2Fdownloads%2F&ts=1412609411&use_mirror=superb-dca2"
-WX_SRC_NAME=wxWidgets-3.0.2.tar.bz2
-WX_SRC_ORIG_DIR=wx-src-orig
+WX_SRC_URL="http://downloads.sourceforge.net/project/wxpython/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2?r=http%3A%2F%2Fwww.wxpython.org%2Fdownload.php&ts=1425049283&use_mirror=iweb"
+WX_SRC_NAME=wxPython-src-3.0.2.0.tar.bz2
+WX_SRC_ORIG_DIR=wxpython-src-orig
check_wx_download() {
if [ ! -f $WX_SRC_NAME ]; then
@@ -59,6 +59,7 @@
fi
mkdir wx-build
cd wx-build
+ export MAC_OS_X_VERSION_MIN_REQUIRED=10.7
../wx-src/configure \
--prefix=`pwd`/../wx-bin \
--with-opengl \
@@ -90,4 +91,33 @@
cd -
}
+check_wxpython_build() {
+ cd wx
+ if [ -d wx-bin/lib/python2.7/site-packages ]; then
+ echo "Skipping building wxPython because lib/python2.7/sitepackages exists."
+ else
+ cd wx-src/wxPython
+
+ export MAC_OS_X_VERSION_MIN_REQUIRED=10.7
+ # build params
+ WXPYTHON_BUILD_OPTS="WX_CONFIG=`pwd`/../../wx-bin/bin/wx-config \
+ BUILD_BASE=`pwd`/../../wx-build \
+ UNICODE=1 \
+ WXPORT=osx_cocoa"
+
+ WXPYTHON_PREFIX="--prefix=`pwd`/../../wx-bin"
+ python setup.py build_ext $WXPYTHON_BUILD_OPTS
+ if [ $? == 0 ]; then
+ # install
+ python setup.py install $WXPYTHON_PREFIX $WXPYTHON_BUILD_OPTS
+ else
+ cd -
+ exit 1
+ fi
+ fi
+ cd -
+}
+
+
check_wx_build
+check_wxpython_build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment