From 6fac0a602e51982cd1b3cc548126d014162880d7 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Mon, 2 Feb 2026 16:04:33 +0100 Subject: [PATCH 1/2] d/configure: Prepare for execution on other OS Committer: Steffen Moeller --- debian/configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/debian/configure b/debian/configure index c960e40050c..38af84ec2e3 100755 --- a/debian/configure +++ b/debian/configure @@ -12,6 +12,26 @@ set -e +if [[ -z "$OSTYPE" ]]; then + echo "W: The 'OSTYPE' environment variable is not set." + echo " Failure to confirm Linux as the operating system cannot be determined." +elif [[ "$OSTYPE" == "linux-gnu"* ]]; then + echo "I: Found operating system '$OSTYPE'." +else + echo "W: LinuxCNC is not (yet) prepared for the operating system '$OSTYPE'." + echo " Instead of this Debian+derivative-tailored configuration please invoke the compilation directly." + if [[ "$OSTYPE" == "darwin"* ]]; then + echo + echo " LinuxCNC is yet unlikely to be successfully built on MacOS because of missing dependencies." + if command -v brew &> /dev/null; then + echo " With brew, we are aware of packages" + echo " autoconf automake libusb libmodbus libtircp pkgconf" + echo " but missing is, e.g., a package for libgpiod." + fi + fi + exit 1; +fi + usage () { P=${0##*/} cat 1>&2 < Date: Tue, 3 Feb 2026 13:27:33 +0000 Subject: [PATCH 2/2] d/configure: Embrace also FreeBSD --- debian/configure | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/debian/configure b/debian/configure index 38af84ec2e3..109c1af9842 100755 --- a/debian/configure +++ b/debian/configure @@ -1,6 +1,7 @@ #!/bin/bash # dpkg configuration script for linuxcnc -# Copyright (C) 2006 Jeff Epler +# Copyright (C) 2006 Jeff Epler +# 2025-2026 Steffen Moeller # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -13,23 +14,29 @@ set -e if [[ -z "$OSTYPE" ]]; then - echo "W: The 'OSTYPE' environment variable is not set." + echo "E: The 'OSTYPE' environment variable is not set." echo " Failure to confirm Linux as the operating system cannot be determined." -elif [[ "$OSTYPE" == "linux-gnu"* ]]; then - echo "I: Found operating system '$OSTYPE'." + exit 1 else - echo "W: LinuxCNC is not (yet) prepared for the operating system '$OSTYPE'." - echo " Instead of this Debian+derivative-tailored configuration please invoke the compilation directly." - if [[ "$OSTYPE" == "darwin"* ]]; then - echo - echo " LinuxCNC is yet unlikely to be successfully built on MacOS because of missing dependencies." - if command -v brew &> /dev/null; then - echo " With brew, we are aware of packages" - echo " autoconf automake libusb libmodbus libtircp pkgconf" - echo " but missing is, e.g., a package for libgpiod." + echo "D: Found operating system '$OSTYPE'." + if [[ ! "$OSTYPE" == "linux-gnu"* ]]; then + echo "W: LinuxCNC is not (yet) prepared for the operating system '$OSTYPE'." + if [[ "$OSTYPE" == "freebsd"* ]]; then + echo " For FreeBSD there have been reports for LinuxCNC to compile and be executable." + else + if [[ "$OSTYPE" == "darwin"* ]]; then + echo + echo " LinuxCNC is yet unlikely to be successfully built on MacOS because of missing dependencies." + if command -v brew &> /dev/null; then + echo " With brew, we are aware of packages" + echo " autoconf automake libusb libmodbus libtircp pkgconf" + echo " but missing is, e.g., a package for libgpiod." + fi + fi fi + echo " Instead of this Debian+derivative-tailored configuration please invoke the compilation directly." + exit 1 fi - exit 1; fi usage () {