Commit 834d5441 authored by Johannes Maibaum's avatar Johannes Maibaum Committed by Wayne Stambaugh
Browse files

OSX build fixes.

* Make patches/wxwidgets-3.0.2_macosx_yosemite.patch usable.  There were
  complaints here before that the patch does not work because it is a
  "metapatch" that tries to patch another patch (which is not in the tree
  and therefore fails). With this change, it becomes a normal patch again,
  that can be applied to the wxWidgets source tree as described in
  Documentation/compiling/mac-osx.txt.
* Make scripts/library-repos-install.sh compatible with OSX: This involves
  checking for the correct option to enable extended regular expressions in
  sed during detect_pretty_repos, as the script uses "-r", which is only
  available in GNU sed. The sed shipped with Mac OSX is an older BSD descendant
  sed which needs "-E". This change has been tested to work on Mac OSX 10.10.1
  and on an up-to-date Arch Linux.  I also changed the error message during
  --install-prerequisites to inform users without apt-get or yum which programs
  need to be installed to use the script.
* Add the execute flag to scripts/osx_build_wx.sh: At the moment, after
  fetching the source with bzr, one has to chmod the file by hand. This
  change change ensures consistency between the script and the build docs
  for OSX, which assumes the script to be executable.
parent de4e688b
Loading
Loading
Loading
Loading
+9 −30
Original line number Original line Diff line number Diff line
=== modified file 'patches/wxwidgets-3.0.2_macosx_yosemite.patch'
--- src/osx/webview_webkit.mm.orig	2014-09-16 07:27:52.000000000 -0600
--- patches/wxwidgets-3.0.2_macosx_yosemite.patch	2014-11-04 19:24:22 +0000
+++ src/osx/webview_webkit.mm	2014-09-16 07:28:12.000000000 -0600
+++ patches/wxwidgets-3.0.2_macosx_yosemite.patch	2014-11-12 01:54:50 +0000
@@ -28,7 +28,7 @@
@@ -1,15 +1,11 @@
 #include "wx/hashmap.h"
-=== added file 'patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch'
 #include "wx/filesys.h"
---- patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch	1970-01-01 00:00:00 +0000
-+++ patches/wxwidgets-3.0.2_macosx_yosemite_webview_webkit.mm.patch	2014-10-29 18:17:55 +0000
-@@ -0,0 +1,11 @@
-+--- src/osx/webview_webkit.mm.orig	2014-09-16 07:27:52.000000000 -0600
-++++ src/osx/webview_webkit.mm	2014-09-16 07:28:12.000000000 -0600
-+@@ -28,7 +28,7 @@
-+ #include "wx/hashmap.h"
-+ #include "wx/filesys.h"
-+
-+-#include <WebKit/WebKit.h>
-++#include <WebKit/WebKitLegacy.h>
-+ #include <WebKit/HIWebView.h>
-+ #include <WebKit/CarbonUtils.h>
-+
+--- src/osx/webview_webkit.mm.orig	2014-09-16 07:27:52.000000000 -0600
++++ src/osx/webview_webkit.mm	2014-09-16 07:28:12.000000000 -0600
+@@ -28,7 +28,7 @@
+ #include "wx/hashmap.h"
+ #include "wx/filesys.h"
+
+-#include <WebKit/WebKit.h>
++#include <WebKit/WebKitLegacy.h>
+ #include <WebKit/HIWebView.h>
+ #include <WebKit/CarbonUtils.h>
+


-#include <WebKit/WebKit.h>
+#include <WebKit/WebKitLegacy.h>
 #include <WebKit/HIWebView.h>
 #include <WebKit/CarbonUtils.h>
+16 −2
Original line number Original line Diff line number Diff line
@@ -70,7 +70,9 @@ install_prerequisites()
            sed
            sed
    else
    else
        echo
        echo
        echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to continue."
        echo "Incompatible System. Neither 'yum' nor 'apt-get' found. Not possible to"
        echo "continue. Please make sure to install git, curl, and sed before using this"
        echo "script."
        echo
        echo
        exit 1
        exit 1
    fi
    fi
@@ -107,11 +109,23 @@ cmake_uninstall()


detect_pretty_repos()
detect_pretty_repos()
{
{
    # Check for the correct option to enable extended regular expressions in
    # sed. This is '-r' for GNU sed and '-E' for (older) BSD-like sed, as on
    # Mac OSX.
    if [ $(echo | sed -r '' &>/dev/null; echo $?) -eq 0 ]; then
        SED_EREGEXP="-r"
    elif [ $(echo | sed -E '' &>/dev/null; echo $?) -eq 0 ]; then
        SED_EREGEXP="-E"
    else
        echo "Your sed command does not support extended regular expressions. Cannot continue."
        exit 1
    fi

    # Use github API to list repos for org KiCad, then subset the JSON reply for only
    # Use github API to list repos for org KiCad, then subset the JSON reply for only
    # *.pretty repos
    # *.pretty repos
    PRETTY_REPOS=`curl https://api.github.com/orgs/KiCad/repos?per_page=2000 2> /dev/null \
    PRETTY_REPOS=`curl https://api.github.com/orgs/KiCad/repos?per_page=2000 2> /dev/null \
        | grep full_name | grep pretty \
        | grep full_name | grep pretty \
        | sed -r  's:.+ "KiCad/(.+)",:\1:'`
        | sed $SED_EREGEXP 's:.+ "KiCad/(.+)",:\1:'`


    #echo "PRETTY_REPOS:$PRETTY_REPOS"
    #echo "PRETTY_REPOS:$PRETTY_REPOS"