diff --git a/OMOptim/debian/control b/OMOptim/debian/control index 7764919..0d5bbf2 100644 --- a/OMOptim/debian/control +++ b/OMOptim/debian/control @@ -3,7 +3,9 @@ Section: math Priority: optional Maintainer: OpenModelica Build System Build-Depends: debhelper-compat (= 13), - libqt4-dev (>= 4.4.3), + qt6-base-dev, + qt6-svg-dev | libqt6svg6-dev, + qt6-5compat-dev | libqt6core5compat6-dev, omniidl:native (>= 4.0.0) | omniidl4:native | omniidl (>= 4.0.0) | omniidl4, libomniorb4-dev, autoconf, diff --git a/OMPlot/debian/control b/OMPlot/debian/control index 4773904..eb1c58f 100644 --- a/OMPlot/debian/control +++ b/OMPlot/debian/control @@ -3,7 +3,8 @@ Section: math Priority: optional Maintainer: OpenModelica Build System Build-Depends: debhelper-compat (= 13), - libqt4-dev (>= 4.4.3), + qt6-base-dev, + qt6-svg-dev | libqt6svg6-dev, autoconf, omc-common Standards-Version: 3.9.6 diff --git a/README.md b/README.md index da60b07..419299b 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,9 @@ string replace, any occurrence of those words anywhere in the file is replaced. Targets at the time of writing: el8, el9, el10, fc43 and fc44. +el8 is packaged without the GUI clients (`omnogui` in the template): it has no +qt6 in EPEL or anywhere else, and the clients no longer build against qt5. + ## CI Two workflows, split by how long they take. diff --git a/macports/Portfile.openmodelica.template b/macports/Portfile.openmodelica.template index f5b3bd0..3cce886 100644 --- a/macports/Portfile.openmodelica.template +++ b/macports/Portfile.openmodelica.template @@ -2,7 +2,7 @@ PortSystem 1.0 -PortGroup qt5 1.0 +PortGroup qt6 1.0 default_variants +qt +omnotebook @@ -117,12 +117,14 @@ variant clang description {build with macports clang} { variant qt description {Build Qt-based clients} { depends_lib-append \ - port:qt5 \ - port:qwt-qt5 \ - port:qt5-qtwebkit -qt5.depends_component qttools - -configure.env-append QTDIR=${prefix}/libexec/qt5 + port:qt6-qtbase \ + port:qt6-qtsvg \ + port:qt6-qt5compat \ + port:qt6-qtwebengine \ + port:qt6-qtquick3d +qt6.depends_component qttools + +configure.env-append QTDIR=${prefix}/libexec/qt6 } variant osg description {Build with OpenSceneGraph (visualization in OMEdit).} { diff --git a/rpm/SPECS/openmodelica.spec.tpl b/rpm/SPECS/openmodelica.spec.tpl index 1b21ea6..0d860fa 100644 --- a/rpm/SPECS/openmodelica.spec.tpl +++ b/rpm/SPECS/openmodelica.spec.tpl @@ -59,20 +59,13 @@ BuildRequires: xz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran -# EL8 is the only target left without qt6, in EPEL or anywhere else +# EL8 is the only target left without qt6, in EPEL or anywhere else, and the +# GUI clients no longer build against qt5: ship el8 without them. %if 0%{?rhel} == 8 -%define omqt5 1 +%define omnogui 1 %endif -%if 0%{?omqt5} -BuildRequires: qt5-qtwebengine-devel -BuildRequires: qt5-linguist -BuildRequires: qt5-qttools -BuildRequires: qt5-qtbase-devel -BuildRequires: qt5-qtsvg-devel -BuildRequires: qt5-qtxmlpatterns-devel -BuildRequires: qt5-qt3d-devel -%else +%if ! 0%{?omnogui} BuildRequires: qt6-qtwebengine-devel BuildRequires: qt6-linguist BuildRequires: qt6-qttools @@ -101,12 +94,10 @@ BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfor %define devtoolscmakeflags -DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gfortran -DCMAKE_ASM_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/as %endif -%if 0%{?omqt5} -%define omqtmajor 5 -%define omqtversion qt5 +%if 0%{?omnogui} +%define omguicmakeflags -DOM_ENABLE_GUI_CLIENTS=OFF %else -%define omqtmajor 6 -%define omqtversion qt6 +%define omguicmakeflags -DOM_ENABLE_GUI_CLIENTS=ON -DCMAKE_PREFIX_PATH=/usr/%{_lib}/qt6 %endif @@ -150,12 +141,10 @@ cmake -S . -B build_rpm -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG" \ - -DCMAKE_PREFIX_PATH=/usr/%{_lib}/%{omqtversion} \ -DOM_USE_CCACHE=OFF \ -DOM_ENABLE_TESTSUITE=OFF \ -DOM_ENABLE_DOCS=OFF \ - -DOM_ENABLE_GUI_CLIENTS=ON \ - -DOM_QT_MAJOR_VERSION=%{omqtmajor} \ + %{omguicmakeflags} \ -DOM_ENABLE_OMSIMULATOR=ON \ -DOM_OMOPTIM_ENABLE=OFF \ -DOM_RUST_RESULT_READERS=ON \ @@ -180,17 +169,19 @@ fi mkdir -p %{buildroot}/opt/%{name}/lib/ %{buildroot}/opt/%{name}/share/doc/omc/ %{buildroot}%{_bindir} ln -s /usr/lib/omlibrary %{buildroot}/opt/%{name}/lib/ ln -s /opt/%{name}/bin/omc %{buildroot}%{_bindir}/omc-BRANCH +touch %{buildroot}%{_bindir}/omc +%if ! 0%{?omnogui} ln -s /opt/%{name}/bin/OMEdit %{buildroot}%{_bindir}/OMEdit-BRANCH ln -s /opt/%{name}/bin/OMShell %{buildroot}%{_bindir}/OMShell-BRANCH ln -s /opt/%{name}/bin/OMShell-terminal %{buildroot}%{_bindir}/OMShell-terminal-BRANCH ln -s /opt/%{name}/bin/OMNotebook %{buildroot}%{_bindir}/OMNotebook-BRANCH ln -s /opt/%{name}/bin/OMPlot %{buildroot}%{_bindir}/OMPlot-BRANCH -touch %{buildroot}%{_bindir}/omc touch %{buildroot}%{_bindir}/OMEdit touch %{buildroot}%{_bindir}/OMShell touch %{buildroot}%{_bindir}/OMShell-terminal touch %{buildroot}%{_bindir}/OMNotebook touch %{buildroot}%{_bindir}/OMPlot +%endif cp -a openmodelica-doc*/* %{buildroot}/opt/%{name}/share/doc/omc/ %postun @@ -201,12 +192,15 @@ if [ "$1" -ge "1" ]; then fi %post -%{_sbindir}/update-alternatives --install %{_bindir}/omc openmodelica %{_bindir}/omc-BRANCH PRIORITY \ - --slave %{_bindir}/OMEdit openmodelica-OMEdit %{_bindir}/OMEdit-BRANCH \ +slaves="" +%if ! 0%{?omnogui} +slaves="--slave %{_bindir}/OMEdit openmodelica-OMEdit %{_bindir}/OMEdit-BRANCH \ --slave %{_bindir}/OMShell openmodelica-OMShell %{_bindir}/OMShell-BRANCH \ --slave %{_bindir}/OMShell-terminal openmodelica-OMShell-terminal %{_bindir}/OMShell-terminal-BRANCH \ --slave %{_bindir}/OMNotebook openmodelica-OMNotebook %{_bindir}/OMNotebook-BRANCH \ - --slave %{_bindir}/OMPlot openmodelica-OMPlot %{_bindir}/OMPlot-BRANCH + --slave %{_bindir}/OMPlot openmodelica-OMPlot %{_bindir}/OMPlot-BRANCH" +%endif +%{_sbindir}/update-alternatives --install %{_bindir}/omc openmodelica %{_bindir}/omc-BRANCH PRIORITY $slaves %preun if [ $1 = 0 ]; then @@ -221,11 +215,13 @@ rm -rf %{buildroot} /opt/%{name}/* %{_bindir}/*-BRANCH %ghost %{_bindir}/omc +%if ! 0%{?omnogui} %ghost %{_bindir}/OMEdit %ghost %{_bindir}/OMShell %ghost %{_bindir}/OMShell-terminal %ghost %{_bindir}/OMNotebook %ghost %{_bindir}/OMPlot +%endif %changelog * DATE OpenModelica ${version}-1