sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master z-rejected grimoire by Ismael Luceno (5f6cdefc7a0d46f66bbbc712dd0b7523ae2c53f1)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master z-rejected grimoire by Ismael Luceno (5f6cdefc7a0d46f66bbbc712dd0b7523ae2c53f1)
- Date: Thu, 13 Aug 2026 09:21:32 +0000
GIT changes to master z-rejected grimoire by Ismael Luceno
<ismael AT sourcemage.org>:
ChangeLog | 4 +++
z-devel/openwatcom/BUILD | 34
+++++++++++++++++++++++++++++
z-devel/openwatcom/CONFIGURE | 2 +
z-devel/openwatcom/DETAILS | 23 +++++++++++++++++++
z-devel/openwatcom/HISTORY | 3 ++
z-devel/openwatcom/INSTALL | 19 ++++++++++++++++
z-devel/openwatcom/PRE_BUILD | 3 ++
z-devel/openwatcom/owwrapper | 9 +++++++
z-devel/openwatcom/patches/musl-ecvt.patch | 19 ++++++++++++++++
9 files changed, 116 insertions(+)
New commits:
commit 5f6cdefc7a0d46f66bbbc712dd0b7523ae2c53f1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
openwatcom: new spell, Cross-compiler suite for DOS, Windows and OS/2
diff --git a/ChangeLog b/ChangeLog
index 73661cc..6f023cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2026-08-13 Ismael Luceno <ismael AT sourcemage.org>
+ * z-devel/openwatcom: new spell, Cross-compiler suite for DOS,
+ Windows and OS/2
+
2024-03-05 Conner Clere <xenanthropy AT sourcemage.org>
* z-graphics/opencl-amd: new spell, openCL AMD bundle
* z-graphics/opencl-amd-dev: new spell, openCL AMD dev packages
diff --git a/z-devel/openwatcom/BUILD b/z-devel/openwatcom/BUILD
new file mode 100755
index 0000000..f663f22
--- /dev/null
+++ b/z-devel/openwatcom/BUILD
@@ -0,0 +1,34 @@
+# Open Watcom bootstraps its own compiler and then builds every target with
+# it, so the host toolchain flags sorcery exports are neither consumed nor
+# meaningful here; clearing them keeps the build reproducible.
+unset CFLAGS CXXFLAGS LDFLAGS &&
+
+# OWROOT must be a real path: no symlinks, and no '=' anywhere in it.
+export OWROOT="$(realpath "$SOURCE_DIRECTORY")" &&
+cd "$OWROOT" &&
+
+export OWTOOLS=GCC &&
+export OWRELROOT="$OWROOT/rel" &&
+
+# The documentation is generated by a DOS-only WGML binary that would need
+# DOSBox to run, so it is disabled.
+export OWDOCBUILD=0 &&
+export OWNOWGML=1 &&
+
+# Installers for the other host platforms are of no use to us.
+export OWDISTRBUILD=0 &&
+
+if [[ $OPENWATCOM_GUI == n ]]; then
+ export OWGUINOBUILD=1 &&
+ export OWNOBUILD="ide browser dlgprs"
+fi &&
+
+# Derives OWOBJDIR/OWBINDIR and puts the bootstrapped tools on the PATH.
+. ./cmnvars.sh &&
+
+# The builder handles its own scheduling; MAKE_NJOBS does not apply.
+# First pass bootstraps wmake and builder, then builds the tree.
+./build.sh &&
+
+# Second pass populates $OWRELROOT with the shippable tree.
+./build.sh rel
diff --git a/z-devel/openwatcom/CONFIGURE b/z-devel/openwatcom/CONFIGURE
new file mode 100755
index 0000000..878393b
--- /dev/null
+++ b/z-devel/openwatcom/CONFIGURE
@@ -0,0 +1,2 @@
+config_query OPENWATCOM_GUI \
+ "Build the GUI tools and the IDE (much slower, of limited use on Linux)?" n
diff --git a/z-devel/openwatcom/DETAILS b/z-devel/openwatcom/DETAILS
new file mode 100755
index 0000000..1c05ab1
--- /dev/null
+++ b/z-devel/openwatcom/DETAILS
@@ -0,0 +1,23 @@
+# Watch: https://github.com/open-watcom/open-watcom-v2/tags
/tags/(....-..-..)-Build[.]tar
+ SPELL=openwatcom
+ VERSION=2026-08-01
+ SOURCE="$SPELL-$VERSION.tar.gz"
+ WEB_SITE="https://open-watcom.github.io/"
+
SOURCE_URL=("https://github.com/open-watcom/open-watcom-v2/archive/$VERSION-Build.tar.gz")
+
SOURCE_HASH=sha512:50e2526b8fe89fc33c053532b9126c9e1390dd174cf01afe982fe8ede99783c061306cec5a4607a9d3542dcd937d2b9e8d78257c19560d02c4e0181de6d0d825
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/open-watcom-v2-$VERSION-Build"
+ LICENSE[0]="Watcom-1.0"
+ ENTERED=20260813
+ KEYWORDS="compiler devel"
+ SHORT="Cross-compiler suite for DOS, Windows and OS/2"
+cat << EOF
+Open Watcom V2 is a maintained fork of the Watcom C/C++ and Fortran
compilers,
+released under the Sybase Open Watcom Public License.
+
+It hosts on Linux and cross-compiles for 16- and 32-bit DOS, Windows 3.x,
+Win32/Win64, OS/2, NetWare NLM, RDOS, QNX and Linux itself, and it remains
the
+reference toolchain for a large body of DOS-era software.
+
+The suite includes the wcc/wcc386 C compilers, wpp/wpp386 for C++, wfc/wfc386
+for Fortran 77, the wlink linker, wmake, wasm, wdis, wlib and the wd
debugger.
+EOF
diff --git a/z-devel/openwatcom/HISTORY b/z-devel/openwatcom/HISTORY
new file mode 100644
index 0000000..1fe4155
--- /dev/null
+++ b/z-devel/openwatcom/HISTORY
@@ -0,0 +1,3 @@
+2026-08-13 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS, BUILD, CONFIGURE, INSTALL, PRE_BUILD, owwrapper,
+ patches/musl-ecvt.patch: spell created
diff --git a/z-devel/openwatcom/INSTALL b/z-devel/openwatcom/INSTALL
new file mode 100755
index 0000000..7d3edd1
--- /dev/null
+++ b/z-devel/openwatcom/INSTALL
@@ -0,0 +1,19 @@
+install -vd "$INSTALL_ROOT/opt/watcom" &&
+cp -r "$SOURCE_DIRECTORY"/rel/. "$INSTALL_ROOT/opt/watcom/" &&
+
+install -vm 555 "$SCRIPT_DIRECTORY/owwrapper" \
+ "$INSTALL_ROOT/opt/watcom/owwrapper" &&
+
+install -vd "$INSTALL_ROOT/usr/bin" &&
+
+# Expose the Linux-hosted tools through the wrapper. vi and ctags are held
back
+# because they would shadow other spells; wrc is renamed instead of dropped,
+# since Wine's wrc of the same name does a related but not interchangeable
job.
+find "$SOURCE_DIRECTORY"/rel/binl64 ! -name \*.so ! -name \*.exe \
+ ! -name vi ! -name ctags -type f -executable -printf %f\\n |
+while read f; do
+ case $f in
+ (wrc) f=watcom-$f ;;
+ esac
+ ln -vrsf "$INSTALL_ROOT"/opt/watcom/owwrapper "$INSTALL_ROOT/usr/bin/$f"
|| return 1
+done
diff --git a/z-devel/openwatcom/PRE_BUILD b/z-devel/openwatcom/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/z-devel/openwatcom/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/z-devel/openwatcom/owwrapper b/z-devel/openwatcom/owwrapper
new file mode 100755
index 0000000..bcab27f
--- /dev/null
+++ b/z-devel/openwatcom/owwrapper
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Dispatcher for the Open Watcom tools
+set -e
+export WATCOM=/opt/watcom
+tool=${0##*/}
+INCLUDE="${INCLUDE:+$INCLUDE:}$WATCOM/h:$WATCOM/lh" \
+EDPATH="$WATCOM/eddat" \
+PATH="$WATCOM/binl64:$PATH" \
+exec "$WATCOM/binl64/${tool#watcom-}" "$@"
diff --git a/z-devel/openwatcom/patches/musl-ecvt.patch
b/z-devel/openwatcom/patches/musl-ecvt.patch
new file mode 100644
index 0000000..b4e8a52
--- /dev/null
+++ b/z-devel/openwatcom/patches/musl-ecvt.patch
@@ -0,0 +1,19 @@
+musl only declares ecvt() under _GNU_SOURCE, so the debugger's MAD
+manager fails to build against it now that gcc treats an implicit
+declaration as an error. Harmless on glibc.
+
+--- a/bld/dig/c/madman.c
++++ b/bld/dig/c/madman.c
+@@ -30,6 +30,12 @@
+
****************************************************************************/
+
+
++#if defined( __LINUX__ ) && !defined( __WATCOMC__ )
++/* musl declares ecvt() only under _GNU_SOURCE, while glibc also exposes it
to
++ * _XOPEN_SOURCE. The symbol itself is present in both C libraries. */
++#define _GNU_SOURCE
++#endif
++
+ #include <string.h>
+ #include <ctype.h>
+ #include <limits.h>
- [[SM-Commit] ] GIT changes to master z-rejected grimoire by Ismael Luceno (5f6cdefc7a0d46f66bbbc712dd0b7523ae2c53f1), Ismael Luceno, 08/13/2026
Archive powered by MHonArc 2.6.24.