diff --git a/README.md b/README.md index 419299b..d3443a4 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,13 @@ jammy, noble, resolute and trixie on amd64, armhf and arm64. * [`control`](./debian/control) — one source stanza and 18 binary packages (`omc`, `libomc`, `omedit`, `omshell`, `omnotebook`, `omsimulator`, `omlibrary`, …). Some build dependencies carry alternatives (`libhdf5-serial-dev | libhdf5-dev`) because a - single control file has to satisfy every distribution in the matrix. Note that `apt` - installs the *first* alternative it can, so an alternative is not a way to say - "either of these will do" — it only helps where the first one is unavailable. + single control file has to satisfy every distribution in the matrix. An alternative + only helps where the first one is unavailable: `apt` skips the whole group when any + member is already installed or being installed, and its newer solver need not pick + the first one at all. A dependency that some distributions cannot satisfy is gated + on a build profile instead: `qt6-httpserver-dev ` (jammy has + no QtHttpServer, so apt-build passes `-Ppkg.openmodelica.nomcp` there, and + `debian/rules` fails when the profile is off and CMake did not find QtHttpServer). * [`rules`](./debian/rules) — a hand-written rules file, *not* the `dh` sequencer. It configures and builds the tree itself — with CMake, into `obj-/` — and then calls each `dh_*` helper explicitly from the `install` and `binary-arch` targets. @@ -107,9 +111,11 @@ done dpkg-source -x "openmodelica_$V-1.dsc" rm -rf "openmodelica-$V/debian" && cp -a /buildscripts/debian "openmodelica-$V/debian" sed -i -e "s/@REV@/$V/" -e "s/@TIME@/$(date -R)/" "openmodelica-$V/debian/changelog" -cd "openmodelica-$V" && dpkg-buildpackage -rfakeroot -b -j"$(nproc)" +cd "openmodelica-$V" && dpkg-buildpackage -rfakeroot -b -j"$(nproc)" -Ppkg.openmodelica.nomcp ``` +Drop `-Ppkg.openmodelica.nomcp` for any distribution newer than jammy. + The first run takes hours. Afterwards `build-stamp` is cached, so re-running only `fakeroot debian/rules binary-arch` after another `debian/` tweak takes minutes. diff --git a/debian/control b/debian/control index e98dce0..ec7c0f8 100644 --- a/debian/control +++ b/debian/control @@ -33,8 +33,8 @@ Build-Depends: debhelper-compat (= 13), qt6-shadertools-dev | libqt6shadertools6-dev, # Qt links libGL.so by absolute path; only jammy's qt6-base-dev omits it libgl-dev, -# QtHttpServer needs Qt 6.4; OMEdit builds without the MCP server on jammy - qt6-httpserver-dev | qt6-base-dev, +# QtHttpServer needs Qt 6.4: jammy builds with -Ppkg.openmodelica.nomcp + qt6-httpserver-dev , flex, bison, liblpsolve55-dev (>= 5.5.0.10), diff --git a/debian/rules b/debian/rules index 3da4848..fdea03e 100755 --- a/debian/rules +++ b/debian/rules @@ -61,6 +61,10 @@ build-stamp: -DOM_RUST_RESULT_READERS=ON \ -DOM_RUST_RESULT_WRITERS=ON \ -DOM_ENABLE_RUST_SIM_RUNTIME=ON +ifeq (,$(filter pkg.openmodelica.nomcp,$(DEB_BUILD_PROFILES))) + grep -q '^Qt6HttpServer_DIR:PATH=/' $(BUILD)/CMakeCache.txt || \ + { echo 'QtHttpServer not found; build with -Ppkg.openmodelica.nomcp to drop the MCP server' >&2; exit 1; } +endif cmake --build $(BUILD) $(BUILDFLAGS) touch build-stamp