From 6acbe946fed06995c15dbff7c86d5af7e2df67fa Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Wed, 13 Dec 2017 06:51:23 +0900 Subject: [PATCH 1/7] Improve Bash scripts for building for Mac OSX. This refs #4. --- macbuild/{macbuildQt4.sh => macbuildQt4-highsierra.sh} | 0 macbuild/{macbuildQt5.sh => macbuildQt5-highsierra.sh} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename macbuild/{macbuildQt4.sh => macbuildQt4-highsierra.sh} (100%) rename macbuild/{macbuildQt5.sh => macbuildQt5-highsierra.sh} (100%) diff --git a/macbuild/macbuildQt4.sh b/macbuild/macbuildQt4-highsierra.sh similarity index 100% rename from macbuild/macbuildQt4.sh rename to macbuild/macbuildQt4-highsierra.sh diff --git a/macbuild/macbuildQt5.sh b/macbuild/macbuildQt5-highsierra.sh similarity index 100% rename from macbuild/macbuildQt5.sh rename to macbuild/macbuildQt5-highsierra.sh From 94cc87bc32f107a7df7293c2329d31763f210718 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Wed, 13 Dec 2017 06:59:17 +0900 Subject: [PATCH 2/7] Improve Bash scripts for building for Mac OSX. This refs #4. --- macbuild/macbuildQt4-highsierra.sh | 126 +++++++++++++++++++++++++---- macbuild/macbuildQt5-highsierra.sh | 125 ++++++++++++++++++++++++---- 2 files changed, 221 insertions(+), 30 deletions(-) diff --git a/macbuild/macbuildQt4-highsierra.sh b/macbuild/macbuildQt4-highsierra.sh index 4153ebc0d..280ddab40 100755 --- a/macbuild/macbuildQt4-highsierra.sh +++ b/macbuild/macbuildQt4-highsierra.sh @@ -1,21 +1,117 @@ #!/bin/bash +#------------------------------------------------------------------------------ # Using Qt 4.8.7 from Mac Ports. # # Ruby: OSX native # Python: OSX native -./build.sh \ - -release \ - -qmake /opt/local/libexec/qt4/bin/qmake \ - -build ./qt4.build.macos-high-sierra \ - -bin ./qt4.bin.macos-high-sierra \ - -option -j2 \ - -with-qtbinding \ - -qt4 \ - -ruby /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby \ - -python /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python \ - -rbinc /System/Library/Frameworks/Ruby.framework/Headers \ - -rblib /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib \ - -pyinc /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \ - -pylib /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib 2>&1 \ - | tee macbuildQt4.log +#------------------------------------------------------------------------------ +MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby +MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers +MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib + +MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python +MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 +MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib + +MacQMake=/opt/local/libexec/qt4/bin/qmake +MacBinDir=./qt4.build.macos-highsierra +MacBuildDir=./qt4.bin.macos-highsierra +MacBuildLog=macbuildQt4-highsierra.log +#------------------------------------------------------------------------------ +function WithRubyPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt4 \ + -ruby $MacRuby \ + -rbinc $MacRubyInc \ + -rblib $MacRubyLib \ + -python $MacPython \ + -pyinc $MacPythonInc \ + -pylib $MacPythonLib 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithRuby() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt4 \ + -ruby $MacRuby \ + -rbinc $MacRubyInc \ + -rblib $MacRubyLib \ + -nopython 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt4 \ + -noruby \ + -python $MacPython \ + -pyinc $MacPythonInc \ + -pylib $MacPythonLib 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithoutRubytPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt4 \ + -noruby \ + -nopython 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function Usage() { + echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + echo "This script is for building KLayout for macOS High Sierra" + echo " with Qt 4.8.7 from MacPorts" + echo "" + echo "USAGE:" + echo " $0 < 0 | 1 | 2 | 3 >" + echo " 0: support neither Ruby nor Python" + echo " 1: support both Ruby and Python" + echo " 2: support Ruby only" + echo " 3: support Python only" + echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + echo "" +} +#------------------------------------------------------------------------------ +if [ $# -ne 1 ]; then + Usage + exit +else + if [ "$1" = "0" ]; then + WithoutRubytPython + elif [ "$1" = "1" ]; then + WithRubyPython + elif [ "$1" = "2" ]; then + WithRuby + elif [ "$1" = "3" ]; then + WithPython + else + Usage + exit + fi +fi +#---------- +# EOF +#---------- + diff --git a/macbuild/macbuildQt5-highsierra.sh b/macbuild/macbuildQt5-highsierra.sh index 32034dc0f..8d3a0bb8e 100755 --- a/macbuild/macbuildQt5-highsierra.sh +++ b/macbuild/macbuildQt5-highsierra.sh @@ -1,21 +1,116 @@ #!/bin/bash +#------------------------------------------------------------------------------ # Using Qt 5.9.3 from Mac Ports. # # Ruby: OSX native # Python: OSX native -./build.sh \ - -release \ - -qmake /opt/local/libexec/qt5/bin/qmake \ - -build ./qt5.build.macos-high-sierra \ - -bin ./qt5.bin.macos-high-sierra \ - -option -j2 \ - -with-qtbinding \ - -qt5 \ - -ruby /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby \ - -python /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python \ - -rbinc /System/Library/Frameworks/Ruby.framework/Headers \ - -rblib /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib \ - -pyinc /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \ - -pylib /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib 2>&1 \ - | tee macbuildQt5.log +#------------------------------------------------------------------------------ +MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby +MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers +MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib + +MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python +MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 +MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib + +MacQMake=/opt/local/libexec/qt5/bin/qmake +MacBinDir=./qt5.build.macos-highsierra +MacBuildDir=./qt5.bin.macos-highsierra +MacBuildLog=macbuildQt5-highsierra.log +#------------------------------------------------------------------------------ +function WithRubyPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt5 \ + -ruby $MacRuby \ + -rbinc $MacRubyInc \ + -rblib $MacRubyLib \ + -python $MacPython \ + -pyinc $MacPythonInc \ + -pylib $MacPythonLib 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithRuby() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt5 \ + -ruby $MacRuby \ + -rbinc $MacRubyInc \ + -rblib $MacRubyLib \ + -nopython 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt5 \ + -noruby \ + -python $MacPython \ + -pyinc $MacPythonInc \ + -pylib $MacPythonLib 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function WithoutRubytPython() { + ./build.sh \ + -release \ + -qmake $MacQMake \ + -build $MacBinDir \ + -bin $MacBuildDir \ + -option -j4 \ + -with-qtbinding \ + -qt5 \ + -noruby \ + -nopython 2>&1 | tee $MacBuildLog +} +#------------------------------------------------------------------------------ +function Usage() { + echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + echo "This script is for building KLayout for macOS High Sierra" + echo " with Qt 5.9.3 from MacPorts" + echo "" + echo "USAGE:" + echo " $0 < 0 | 1 | 2 | 3 >" + echo " 0: support neither Ruby nor Python" + echo " 1: support both Ruby and Python" + echo " 2: support Ruby only" + echo " 3: support Python only" + echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + echo "" +} +#------------------------------------------------------------------------------ +if [ $# -ne 1 ]; then + Usage + exit +else + if [ "$1" = "0" ]; then + WithoutRubytPython + elif [ "$1" = "1" ]; then + WithRubyPython + elif [ "$1" = "2" ]; then + WithRuby + elif [ "$1" = "3" ]; then + WithPython + else + Usage + exit + fi +fi +#---------- +# EOF +#---------- From 3c920b5938d8ae5e003bc4b0264f7e5ce36678c1 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Sat, 16 Dec 2017 13:52:53 +0900 Subject: [PATCH 3/7] Remove individual script files for building for Mac OSX. This refs #4. --- macbuild/macbuildQt4-highsierra.sh | 117 ----------------------------- macbuild/macbuildQt4-yosemite.sh | 115 ---------------------------- macbuild/macbuildQt5-highsierra.sh | 116 ---------------------------- macbuild/macbuildQt5-yosemite.sh | 115 ---------------------------- 4 files changed, 463 deletions(-) delete mode 100755 macbuild/macbuildQt4-highsierra.sh delete mode 100755 macbuild/macbuildQt4-yosemite.sh delete mode 100755 macbuild/macbuildQt5-highsierra.sh delete mode 100755 macbuild/macbuildQt5-yosemite.sh diff --git a/macbuild/macbuildQt4-highsierra.sh b/macbuild/macbuildQt4-highsierra.sh deleted file mode 100755 index 280ddab40..000000000 --- a/macbuild/macbuildQt4-highsierra.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -#------------------------------------------------------------------------------ -# Using Qt 4.8.7 from Mac Ports. -# -# Ruby: OSX native -# Python: OSX native -#------------------------------------------------------------------------------ -MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers -MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib - -MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python -MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib - -MacQMake=/opt/local/libexec/qt4/bin/qmake -MacBinDir=./qt4.build.macos-highsierra -MacBuildDir=./qt4.bin.macos-highsierra -MacBuildLog=macbuildQt4-highsierra.log -#------------------------------------------------------------------------------ -function WithRubyPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithRuby() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -noruby \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithoutRubytPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -noruby \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function Usage() { - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "This script is for building KLayout for macOS High Sierra" - echo " with Qt 4.8.7 from MacPorts" - echo "" - echo "USAGE:" - echo " $0 < 0 | 1 | 2 | 3 >" - echo " 0: support neither Ruby nor Python" - echo " 1: support both Ruby and Python" - echo " 2: support Ruby only" - echo " 3: support Python only" - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "" -} -#------------------------------------------------------------------------------ -if [ $# -ne 1 ]; then - Usage - exit -else - if [ "$1" = "0" ]; then - WithoutRubytPython - elif [ "$1" = "1" ]; then - WithRubyPython - elif [ "$1" = "2" ]; then - WithRuby - elif [ "$1" = "3" ]; then - WithPython - else - Usage - exit - fi -fi -#---------- -# EOF -#---------- - diff --git a/macbuild/macbuildQt4-yosemite.sh b/macbuild/macbuildQt4-yosemite.sh deleted file mode 100755 index 9c619726d..000000000 --- a/macbuild/macbuildQt4-yosemite.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------ -# Using Qt 4.8.7 from Mac Ports. -# -# Ruby: OSX native -# Python: OSX native -#------------------------------------------------------------------------------ -MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers -MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib - -MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python -MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib - -MacQMake=/opt/local/libexec/qt4/bin/qmake -MacBinDir=./qt4.build.macos-yosemite -MacBuildDir=./qt4.bin.macos-yosemite -MacBuildLog=macbuildQt4-yosemite.log -#------------------------------------------------------------------------------ -function WithRubyPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithRuby() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -noruby \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithoutRubytPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt4 \ - -noruby \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function Usage() { - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "This script is for building KLayout for Mac OSX Yosemite" - echo " with Qt 4.8.7 from MacPorts" - echo "" - echo "USAGE:" - echo " $0 < 0 | 1 | 2 | 3 >" - echo " 0: support neither Ruby nor Python" - echo " 1: support both Ruby and Python" - echo " 2: support Ruby only" - echo " 3: support Python only" - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "" -} -#------------------------------------------------------------------------------ -if [ $# -ne 1 ]; then - Usage - exit -else - if [ "$1" = "0" ]; then - WithoutRubytPython - elif [ "$1" = "1" ]; then - WithRubyPython - elif [ "$1" = "2" ]; then - WithRuby - elif [ "$1" = "3" ]; then - WithPython - else - Usage - exit - fi -fi -#---------- -# EOF -#---------- diff --git a/macbuild/macbuildQt5-highsierra.sh b/macbuild/macbuildQt5-highsierra.sh deleted file mode 100755 index 8d3a0bb8e..000000000 --- a/macbuild/macbuildQt5-highsierra.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -#------------------------------------------------------------------------------ -# Using Qt 5.9.3 from Mac Ports. -# -# Ruby: OSX native -# Python: OSX native -#------------------------------------------------------------------------------ -MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers -MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/libruby.dylib - -MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python -MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib - -MacQMake=/opt/local/libexec/qt5/bin/qmake -MacBinDir=./qt5.build.macos-highsierra -MacBuildDir=./qt5.bin.macos-highsierra -MacBuildLog=macbuildQt5-highsierra.log -#------------------------------------------------------------------------------ -function WithRubyPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithRuby() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -noruby \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithoutRubytPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -noruby \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function Usage() { - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "This script is for building KLayout for macOS High Sierra" - echo " with Qt 5.9.3 from MacPorts" - echo "" - echo "USAGE:" - echo " $0 < 0 | 1 | 2 | 3 >" - echo " 0: support neither Ruby nor Python" - echo " 1: support both Ruby and Python" - echo " 2: support Ruby only" - echo " 3: support Python only" - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "" -} -#------------------------------------------------------------------------------ -if [ $# -ne 1 ]; then - Usage - exit -else - if [ "$1" = "0" ]; then - WithoutRubytPython - elif [ "$1" = "1" ]; then - WithRubyPython - elif [ "$1" = "2" ]; then - WithRuby - elif [ "$1" = "3" ]; then - WithPython - else - Usage - exit - fi -fi -#---------- -# EOF -#---------- diff --git a/macbuild/macbuildQt5-yosemite.sh b/macbuild/macbuildQt5-yosemite.sh deleted file mode 100755 index 6ecea529e..000000000 --- a/macbuild/macbuildQt5-yosemite.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------ -# Using Qt 5.8.0 from Mac Ports. -# -# Ruby: OSX native -# Python: OSX native -#------------------------------------------------------------------------------ -MacRuby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -MacRubyInc=/System/Library/Frameworks/Ruby.framework/Headers -MacRubyLib=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.dylib - -MacPython=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python -MacPythonInc=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -MacPythonLib=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib - -MacQMake=/opt/local/libexec/qt5/bin/qmake -MacBinDir=./qt5.build.macos-yosemite -MacBuildDir=./qt5.bin.macos-yosemite -MacBuildLog=macbuildQt5-yosemite.log -#------------------------------------------------------------------------------ -function WithRubyPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithRuby() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -ruby $MacRuby \ - -rbinc $MacRubyInc \ - -rblib $MacRubyLib \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -noruby \ - -python $MacPython \ - -pyinc $MacPythonInc \ - -pylib $MacPythonLib 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function WithoutRubytPython() { - ./build.sh \ - -release \ - -qmake $MacQMake \ - -build $MacBinDir \ - -bin $MacBuildDir \ - -option -j4 \ - -with-qtbinding \ - -qt5 \ - -noruby \ - -nopython 2>&1 | tee $MacBuildLog -} -#------------------------------------------------------------------------------ -function Usage() { - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "This script is for building KLayout for Mac OSX Yosemite" - echo " with Qt 5.8.0 from MacPorts" - echo "" - echo "USAGE:" - echo " $0 < 0 | 1 | 2 | 3 >" - echo " 0: support neither Ruby nor Python" - echo " 1: support both Ruby and Python" - echo " 2: support Ruby only" - echo " 3: support Python only" - echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - echo "" -} -#------------------------------------------------------------------------------ -if [ $# -ne 1 ]; then - Usage - exit -else - if [ "$1" = "0" ]; then - WithoutRubytPython - elif [ "$1" = "1" ]; then - WithRubyPython - elif [ "$1" = "2" ]; then - WithRuby - elif [ "$1" = "3" ]; then - WithPython - else - Usage - exit - fi -fi -#---------- -# EOF -#---------- From 9b9d68a6385015e94e88384317e28c005b04eb67 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Sat, 16 Dec 2017 13:58:42 +0900 Subject: [PATCH 4/7] Prepare Python scripts for building for Mac OSX. This refs #4. --- macbuild/ReadMe.txt | 25 +++ macbuild/build4mac.py | 390 ++++++++++++++++++++++++++++++++++++++ macbuild/build4mac_env.py | 143 ++++++++++++++ 3 files changed, 558 insertions(+) create mode 100644 macbuild/ReadMe.txt create mode 100755 macbuild/build4mac.py create mode 100755 macbuild/build4mac_env.py diff --git a/macbuild/ReadMe.txt b/macbuild/ReadMe.txt new file mode 100644 index 000000000..4c3d8d693 --- /dev/null +++ b/macbuild/ReadMe.txt @@ -0,0 +1,25 @@ +<< Draft >> + +This directory "macbuild" contains different files required to build KLayout +version 0.25 or later for different Max OSX including: + * Yosemite (10.10) + * El Capitan (10.11) + * Sierra (10.12) + * High Sierra (10.13) + +By default, Qt framework is the from Mac Ports (https://www.macports.org/) which +is usually located under: + /opt/local/libexec/qt5/ + +Also by default, supported script languages, i.e,, Ruby and Python, are those +standard ones bundled with the OS. +However, you are able to choose other options like Python from Anaconda. + +etc. etc. + + +Make a symbolic link from the parent directory like: + build4mac.py -> macbuild/build4mac.py +then execute the Python script to build with appropriate options if required. + +[End of File] diff --git a/macbuild/build4mac.py b/macbuild/build4mac.py new file mode 100755 index 000000000..0e61bd5e1 --- /dev/null +++ b/macbuild/build4mac.py @@ -0,0 +1,390 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +#=============================================================================== +# File: "macbuild/build4mac.py" +# +# The main script for building KLayout (http://www.klayout.de/index.php) +# version 0.25 or later on different Apple Mac OSX platforms. +#=============================================================================== +from __future__ import print_function # to use print() of Python 3 in Python >= 2.7 +import sys +import os +import platform +import optparse +import subprocess + +#------------------------------------------------------------------------------- +## To import global dictionaries of different modules +#------------------------------------------------------------------------------- +mydir = os.path.dirname(os.path.abspath(__file__)) +sys.path.append( mydir + "/macbuild" ) +from build4mac_env import * + +#------------------------------------------------------------------------------- +## To set global variables including present directory and platform info. +#------------------------------------------------------------------------------- +def SetGlobals(): + global PresentDir # present directory + global Usage # string on usage + global BuildBash # the main build Bash script + global Platform # platform + global ModuleQt # Qt module to be used + global ModuleRuby # Ruby module to be used + global ModulePython # Python module to be used + global NoQtBindings # True if not creating Qt bindings for Ruby scripts + global MakeOptions # options passed to `make` + global DebugMode # True if debug mode build + global CheckComOnly # True if check the command line only + # auxiliary variables on platform + global System # 6-tuple from platform.uname() + global Node # - do - + global Release # - do - + global Version # - do - + global Machine # - do - + global Processor # - do - + global Bit # machine bit-size + + Usage = "\n" + Usage += "---------------------------------------------------------------------------------------------\n" + Usage += "<< Usage of 'build4mac.py' >>\n" + Usage += " for building KLayout 0.25 or later on different Apple Mac OSX platforms.\n" + Usage += "\n" + Usage += "$ [python] build4mac.py \n" + Usage += " option & argument : comment on option if any | default value\n" + Usage += " -----------------------------------------------------------------------+---------------\n" + Usage += " : * key type names below are case insensitive * | \n" + Usage += " : 'nil' = not to support the script language | \n" + Usage += " : 'Sys' = using the OS standard script language | \n" + Usage += " [-q|--qt ] : type=['Qt4MacPorts', 'Qt5MacPorts'] | qt5macports \n" + Usage += " [-r|--ruby ] : type=['nil', 'Sys', 'RubySource'] | sys \n" + Usage += " [-p|--python ] : type=['nil', 'Sys', 'Anaconda27', 'Anaconda36'] | sys \n" + Usage += " [-n|--noqtbinding] : don't create Qt bindings for ruby scripts | disabled \n" + Usage += " [-m|--make