From fa492094198e3c6f0e0de43fe197ef15121b31b2 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 21 Feb 2020 19:14:01 +0100 Subject: [PATCH 1/6] Issue #496 fixed (CentOS 8 builds) --- build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7a8e95ee7..6c6150e8f 100755 --- a/build.sh +++ b/build.sh @@ -591,8 +591,6 @@ qmake_options=( -recursive CONFIG+="$CONFIG" RUBYLIBFILE="$RUBYLIBFILE" - RUBYINCLUDE="$RUBYINCLUDE" - RUBYINCLUDE2="$RUBYINCLUDE2" RUBYVERSIONCODE="$RUBYVERSIONCODE" HAVE_RUBY="$HAVE_RUBY" PYTHON="$PYTHON" @@ -613,6 +611,16 @@ qmake_options=( KLAYOUT_VERSION_REV="$KLAYOUT_VERSION_REV" ) +# NOTE: qmake does not like include paths which clash with paths built into the compiler +# hence we don't add RUBYINCLUDE or RUBYINCLUDE2 in this case (found on CentOS 8 where Ruby +# headers are installed in /usr/include) +if [ "$RUBYINCLUDE" != "/usr/include" ] && [ "$RUBYINCLUDE" != "/usr/local/include" ]; then + qmake_options+=( RUBYINCLUDE="$RUBYINCLUDE" ) +fi +if [ "$RUBYINCLUDE2" != "/usr/include" ] && [ "$RUBYINCLUDE2" != "/usr/local/include" ]; then + qmake_options+=( RUBYINCLUDE2="$RUBYINCLUDE2" ) +fi + # This should speed up build time considerably # https://ortogonal.github.io/ccache-and-qmake-qtcreator/ if [ "$QMAKE_CCACHE" = 1 ]; then From 4e4778afba6253f0ac5715e70a9cd78fc56fc93a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 21 Feb 2020 21:16:38 +0100 Subject: [PATCH 2/6] CentOS8 builds, first fix iteration. --- scripts/rpm-data/klayout.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index 4cd9b3216..f520bcc3a 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -31,6 +31,20 @@ Source0: http://www.klayout.de/downloads/%{name}-%{version}.tar.gz # so's of klayout itself) AutoReqProv: no +# CentOS8 requirements +%if "%{target_system}" == "centos8" +Requires: ruby >= 2.5.5 +Requires: python >= 3.6.0 +Requires: qt5-qtbase >= 5.11.1 +Requires: qt5-qtmultimedia >= 5.11.1 +Requires: qt5-qtxmlpatterns >= 5.11.1 +Requires: qt5-qtsvg >= 5.11.1 +Requires: qt5-qttools >= 5.11.1 + +%define buildopt -j2 +%define pylib %{python_sitearch} +%endif + # CentOS7 requirements %if "%{target_system}" == "centos7" Requires: ruby >= 2.0.0 From a57d2cd934cad1b28d8f8b0dad8cd62821da9be2 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 21 Feb 2020 21:41:28 +0100 Subject: [PATCH 3/6] Fixed #496 (CentOS 8 builds) --- scripts/rpm-data/klayout.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index f520bcc3a..e826497c8 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -34,7 +34,7 @@ AutoReqProv: no # CentOS8 requirements %if "%{target_system}" == "centos8" Requires: ruby >= 2.5.5 -Requires: python >= 3.6.0 +Requires: python3 >= 3.6.0 Requires: qt5-qtbase >= 5.11.1 Requires: qt5-qtmultimedia >= 5.11.1 Requires: qt5-qtxmlpatterns >= 5.11.1 From 3b8fdf52a248844cdea659156559943cd9dd9eef Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 21 Feb 2020 21:43:26 +0100 Subject: [PATCH 4/6] Fixed #496 (CentOS 8 builds) --- scripts/rpm-data/klayout.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index e826497c8..7f29304db 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -43,6 +43,7 @@ Requires: qt5-qttools >= 5.11.1 %define buildopt -j2 %define pylib %{python_sitearch} +%define __python /usr/bin/python3 %endif # CentOS7 requirements From d4b06ca1439e7a940190ebd871b7ffbbfe03a0ac Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 21 Feb 2020 23:51:04 +0100 Subject: [PATCH 5/6] WIP: fixed dependencies --- scripts/rpm-data/klayout.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index 7f29304db..e326ed4ff 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -40,6 +40,9 @@ Requires: qt5-qtmultimedia >= 5.11.1 Requires: qt5-qtxmlpatterns >= 5.11.1 Requires: qt5-qtsvg >= 5.11.1 Requires: qt5-qttools >= 5.11.1 +# NOTE: this package is required for libQt5Designer and pulls in a lot of devel stuff. +# Maybe it's worth considering to drop designer support and replace by QUiLoader. +Requires: qt5-qttools-devel >= 5.11.1 %define buildopt -j2 %define pylib %{python_sitearch} From d202989c12068b654a545de9dfaa6388f6107d38 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 22 Feb 2020 00:56:18 +0100 Subject: [PATCH 6/6] Fixed Qt5 binding issue. --- testdata/ruby/qtbinding.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testdata/ruby/qtbinding.rb b/testdata/ruby/qtbinding.rb index 6a9eb9531..b526f3a53 100644 --- a/testdata/ruby/qtbinding.rb +++ b/testdata/ruby/qtbinding.rb @@ -623,7 +623,7 @@ class QtBinding_TestClass < TestBase w.setLayout(l) w._destroy - assert_equal(l.destroyed?, true) + assert_equal(l._destroyed?, true) end @@ -637,7 +637,7 @@ class QtBinding_TestClass < TestBase wc.setParent(w) w._destroy - assert_equal(wc.destroyed?, true) + assert_equal(wc._destroyed?, true) end @@ -651,7 +651,7 @@ class QtBinding_TestClass < TestBase wc.setParent(w) w._destroy - assert_equal(wc.destroyed?, true) + assert_equal(wc._destroyed?, true) end @@ -667,9 +667,9 @@ class QtBinding_TestClass < TestBase wc.setParent(nil) w._destroy - assert_equal(wc.destroyed?, false) + assert_equal(wc._destroyed?, false) wc._destroy - assert_equal(wc.destroyed?, true) + assert_equal(wc._destroyed?, true) end