6 Commits
Author SHA1 Message Date
lotherk 4ca2833c9c mcde: dtlogin on NetBSD - PAM handle per attempt with syslog, xrdb path of the target, tradcpp CONFIG_OS from the unquoted ident
SvcPam.c: a fresh PAM handle per authenticate, pam_end on failure, the PAM_USER
check was inverted, the conv default case did not advance, failures go to
authlog (follows xsrc/external/mit/xdm greeter/greet.c).
pkgsrc/Makefile: ac_cv_path_XRDB=${X11BASE}/bin/xrdb - the cross build baked the
Linux host's /usr/bin/xrdb into dtlogin; /var/dt/Xerrors on an installed system
said 'sh: /usr/bin/xrdb: not found', so Xresources never loaded and the CDE logo
showed (measured in a VM 2026-11-17).
tradcpp/config.h: CONFIG_OS is the ident as given; the stringify macro turned the
quoted -DCONFIG_OS_IDENT into an invalid macro name and wm/mcde stopped in
lib/tt (tradcpp: Invalid macro name "__NetBSD__", build/logs/userland-2026-11-16-atomic.log)
so the sysroot kept the Nov 15 MCDE. t0436 t0438 t0217
2026-11-17 08:47:08 +00:00
lotherk e71bb99b35 mcde: tradcpp predefines the target OS (dtlogin Xservers)
tradcpp runs on the build host but preprocesses dtlogin/config/*.src for the target. config.h used the compiler's OS, so a Linux->NetBSD cross build preprocessed the __linux__ branch of Xservers.src (tested before __NetBSD__) and installed /usr/pkg/dt/config/Xservers with '/usr/bin/X :0' and Xfailsafe with XDIR=/usr/bin; dtlogin had no server to start. configure.ac now derives MCDE_TRADCPP_CPPFLAGS from host_os and tradcpp takes CONFIG_OS_IDENT for CONFIG_OS. Measured 2026-11-15 (config.log build_os=linux-gnu host_os=netbsd) and by hand: tradcpp with -DCONFIG_OS_IDENT=__NetBSD__ emits ':0   Local local@console /usr/X11R7/bin/X :0', without it '/usr/bin/X :0'.
2026-11-15 09:31:27 +00:00
lotherkandIceman Contributor Free c004331d56 mcde: tradcpp is linked by the build host's compiler
tradcpp_CC/CFLAGS/LDFLAGS are not per-target variables automake honours,
so the generated Makefile still used the target compiler: the tool was a
NetBSD ELF and every build stopped at
'/bin/sh: ../../../../util/tradcpp/tradcpp: not found'
(build/logs/userland-2026-11-14k.log:7697).  Override the generated CC,
CPPFLAGS, CFLAGS and LDFLAGS for this build-tool sub-make with the
*_FOR_BUILD values the top Makefile.am already forwards.

Verified in the work directory: automake emits CC = $(CC_FOR_BUILD); a
host-cc build of the same objects is a Linux ELF and preprocesses -DX=1
to 1.

Fixes the remaining wm/mcde build stop (tasksd t0170).

Co-authored-by: Iceman Contributor Free <noreply@opencode.ai>
2026-11-14 06:57:33 +00:00
lotherk 855b8e0cb0 mcde: the host-tool variables are substituted even without in-tree Motif
util/tradcpp is built and run during every MCDE build, but configure only set
CC_FOR_BUILD/CFLAGS_FOR_BUILD/... inside the with_private_motif block.  With
--without-private-motif (the pkgsrc recipe) the Makefiles got empty values, and
AM_MAKEFLAGS then passed an explicit empty CC_FOR_BUILD down to the sub-makes --
clobbering the value pkgsrc's MAKE_FLAGS had given the top-level make.  tradcpp
was therefore compiled with the target compiler and could not run (build/logs/
userland-2026-11-14j.log:7715ff, and again in 14k after MAKE_FLAGS alone).

The defaults and AC_SUBSTs now stand before the Motif test (LIBS_FOR_BUILD stays
inside: it is Motif's -lXt), and the recipe gives configure the host compiler for
a cross build, since configure's own default is $CC, the target's.  tradcpp needs
no X library, so it no longer links LIBS_FOR_BUILD.
2026-11-14 06:55:24 +00:00
lotherk 8dad938d20 mcde: tradcpp is built for the build host
MCDE runs util/tradcpp while it builds (configure.ac: GENCPP=/util/tradcpp/tradcpp, used on the *.cpp.in templates).  It was compiled with the
target compiler, so the build stopped at 'lib/tt/bin/scripts': '/bin/sh:
../../../../util/tradcpp/tradcpp: not found' -- the file exists, it is a NetBSD
binary (build/logs/userland-2026-11-14j.log:7715ff).

The tree already forwards CC_FOR_BUILD/CFLAGS_FOR_BUILD/... through AM_MAKEFLAGS
(Makefile.am), but nothing used them for tradcpp; its Makefile.am now names them
for that program, and the pkgsrc recipe sets them (NATIVE_CC, and gnu17 for the
host compiler's C23 default) as the Motif recipe already did.
2026-11-14 06:46:29 +00:00
lotherkandClaude Opus 5.5 3b2a54c64b ext/src/mcde: import CDE 2.5.3 and pkgsrc wm/cde unchanged (the base of the MCDE fork)
cde-2.5.3.tar.gz, SHA512 a01b413b... as in pkgsrc distinfo; recipe from
pkgsrc 3c1118e94432.  Added with -f: CDE's .gitignore hides 612 files of
the archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:36:46 +00:00