Enhanced build script so it's able to better detect Ruby/Python versions.

This commit is contained in:
Matthias Koefferlein
2017-09-18 21:11:35 +02:00
parent 5df6e6dcaa
commit dbe11b7eba
3 changed files with 33 additions and 77 deletions
-28
View File
@@ -43,35 +43,7 @@ bindir="bin.linux.release"
builddir="build.linux.release"
libdir="/usr/lib/klayout"
qmake="qmake"
if which qmake-qt5; then
qmake="qmake-qt5"
elif which qmake-qt4; then
qmake="qmake-qt4"
elif which qmake; then
qmake="qmake"
fi
ruby="ruby"
if which ruby2; then
ruby="ruby2"
elif which ruby; then
ruby="ruby"
fi
python="python"
if which python3; then
python="python3"
elif which python2; then
python="python2"
elif which python; then
python="python"
fi
./build.sh -j4 \
-qmake $qmake \
-python $python \
-ruby $ruby \
-bin $bindir \
-build $builddir \
-rpath $libdir
+1 -35
View File
@@ -76,37 +76,6 @@ For details see README.md
TARGET="linux-release"
QMAKE=qmake
if which qmake-qt5; then
QMAKE=qmake-qt5
elif which qmake-qt4; then
QMAKE=qmake-qt4
elif which qmake; then
QMAKE=qmake
fi
PYTHON=python
if which python3; then
PYTHON=python3
elif which python2; then
PYTHON=python2
elif which python; then
PYTHON=python
fi
RUBY=ruby
if which ruby2.3; then
RUBY=ruby2.3
elif which ruby2.2; then
RUBY=ruby2.2
elif which ruby2.1; then
RUBY=ruby2.1
elif which ruby2; then
RUBY=ruby2
elif which ruby; then
RUBY=ruby
fi
# TODO: remove -without-qtbinding
%if "%{git_source}" != ""
# build from git sources if possible
@@ -117,10 +86,7 @@ cd %{_sourcedir}
./build.sh -rpath %{_libdir}/klayout \
-bin %{_builddir}/bin.$TARGET \
-build %{_builddir}/build.$TARGET \
-j4 \
-qmake $QMAKE \
-ruby $RUBY \
-python $PYTHON
-j2
cp -p LICENSE Changelog CONTRIB %{_builddir}
strip %{_builddir}/bin.$TARGET/*