Konrad, 2026-11-14: "was soll dtksh ueberhaupt sein... einfach ne shell von
CDE? fuck it. schmeiss das komplett raus aus MCDE." dtksh is CDE's ksh93
with Motif bindings for scripting dialogs; its bundled ksh93 (AT&T ast's
bin/package) compiles and RUNS test programs while it builds, which a cross
build for NetBSD on a Linux host cannot do -- the reason wm/mcde did not
build for days ("cc: not found", userland-2026-11-14g.log).
- programs/dtksh removed (1204 files); not in programs/Makefile.am,
configure.ac, the recipe (REPLACE_INTERPRETER dtksh, KSH_CC), PLIST (bin,
lib, man page, six catalogues), msg.C.am (dtksh.cat), AGENTS.md.
- What used dtksh:
* dterror.src, dtfile_error.cpp, types/error.ds.src: an error dialog with a
message. New programs/dterror/dterror.c (about 70 lines of Motif), built
as dterror.ds: dterror.ds MESSAGE [TITLE [OK-LABEL]], the convention of
every caller (the data types, dtopen, dtfile ModAttr.c). dtfile_error
was only the 'test' entry of dtfile.config and ModAttr.c's fallback; the
entry is gone and ModAttr.c calls dterror.ds.
* dthelpgen.dtsh: the "building help" dialog helpgen.c forked; it runs
silently now (childPid stays -1).
* dtprintegrate/dtlp.src: the print dialog (1711 lines of dtksh); printing
is to come back through CUPS (tasksd t0177, t0193). dtlp's man page is
out of the doc build and PLIST with it.
* The data types DTKSH_SCRIPT (*.ds) and DTKSH_CONV (*.dtsh) in dt.dt.src:
they would have classed dterror.ds as a script.
- dtterm needs no change: lib/DtTerm/TermPrim/TermPrimSubproc.c takes /usr/bin/zsh,
then the shell of the passwd entry, then /bin/sh, and never started dtksh.
- ksh93 stays as the NetBSD binary for the scripts that say ksh (Xsession).
Measured: make mcde-linux exit=0 (build/logs/mcde-linux-nodtksh-2026-11-14.log),
autogen picked up programs/dterror; dterror.ds under Xvfb shows the error
icon, a two-line message and one button "Understood", and exits 0 on Return.
Not in this commit: the other agents' pending dtfile edits (Search.c,
Navigation.c) and the regenerated distinfo files.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
212 lines
8.4 KiB
Makefile
212 lines
8.4 KiB
Makefile
# $NetBSD: Makefile,v 1.9 2025/11/27 20:31:27 vins Exp $
|
|
|
|
# MCDE, the Makronix fork of CDE 2.5.3 (ext/src/mcde/IMPORT). The source is
|
|
# kept in the Makronix repository; tools/mcde-dist.sh makes the archive below from
|
|
# a commit and writes distinfo. There is no public MASTER_SITES yet: put the
|
|
# archive into DISTDIR.
|
|
DISTNAME= mcde-0.1.0
|
|
CATEGORIES= wm x11
|
|
MASTER_SITES= # none yet
|
|
|
|
MAINTAINER= konrad.lother@gmail.com
|
|
COMMENT= Makronix Common Desktop Environment, a fork of CDE
|
|
LICENSE= gnu-lgpl-v2
|
|
|
|
# MCDE installs the same files as CDE (${PREFIX}/dt): one or the other.
|
|
CONFLICTS+= cde-[0-9]*
|
|
|
|
USE_LANGUAGES= c c++
|
|
USE_LIBTOOL= yes
|
|
USE_TOOLS+= aclocal autoconf automake autoreconf
|
|
USE_TOOLS+= awk bdftopcf gettext gmake gzip ksh
|
|
USE_TOOLS+= lex mkfontdir patch perl pkg-config yacc
|
|
|
|
MAKE_JOBS_SAFE= no
|
|
|
|
PTHREAD_AUTO_VARS= yes
|
|
BUILDLINK_TRANSFORM+= rm:-pthread
|
|
BUILDLINK_PASSTHRU_DIRS+= ${PREFIX}/dt/lib
|
|
|
|
.include "../../mk/bsd.fast.prefs.mk"
|
|
|
|
DEPENDS+= ksh93-[0-9]*:../../shells/ksh93
|
|
DEPENDS+= font-adobe-75dpi-[0-9]*:../../fonts/font-adobe-75dpi
|
|
DEPENDS+= font-adobe-100dpi-[0-9]*:../../fonts/font-adobe-100dpi
|
|
.if ${X11_TYPE} == "modular"
|
|
DEPENDS+= xrdb-[0-9]*:../../x11/xrdb
|
|
DEPENDS+= xset-[0-9]*:../../x11/xset
|
|
DEPENDS+= sessreg-[0-9]*:../../x11/sessreg
|
|
.endif
|
|
TOOL_DEPENDS+= gettext-m4-[0-9]*:../../devel/gettext-m4
|
|
|
|
GNU_CONFIGURE= yes
|
|
GNU_CONFIGURE_PREFIX= ${PREFIX}/dt
|
|
CONFIGURE_ENV+= ac_cv_path_KSH=${PREFIX}/bin/ksh93
|
|
CONFIGURE_ENV+= GZIP=${GZIP_CMD:Q}
|
|
CONFIGURE_ARGS+= MAKE=${MAKE_PROGRAM:Q}
|
|
CONFIGURE_ARGS+= --with-x
|
|
# tclConfig.sh is read by configure on the build host: in a cross build it is
|
|
# in the sysroot, as x11/tk90 does it (_CROSS_DESTDIR is empty when native)
|
|
CONFIGURE_ARGS+= --with-tcl=${_CROSS_DESTDIR:U}${BUILDLINK_PREFIX.tcl}/lib
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}/dt
|
|
CONFIGURE_ARGS+= --with-utmp-file=${VARBASE}/run/utmp
|
|
CONFIGURE_ARGS+= --with-wtmp-file=${VARBASE}/log/wtmp
|
|
# MCDE: these were placeholders patched into configure.ac by pkgsrc
|
|
CONFIGURE_ARGS+= --with-logfiles-dir=${VARBASE}/dt
|
|
CONFIGURE_ARGS+= --with-config-dir=${PKG_SYSCONFDIR}/dt
|
|
CONFIGURE_ARGS+= --with-local-bindir=${PREFIX}/bin
|
|
# MCDE: Motif is the system's (motif.buildlink3.mk below); MCDE builds its
|
|
# own motif/ only outside pkgsrc (configure.ac, --with-private-motif;
|
|
# Konrad, 2026-11-13: "mcde baut sein eigenes motif, wenn es nicht
|
|
# makronix ist")
|
|
CONFIGURE_ARGS+= --without-private-motif
|
|
|
|
.include "options.mk"
|
|
|
|
REPLACE_PERL+= programs/dtinfo/tools/bin/ccdate
|
|
# (no REPLACE_AWK: Xsession.src is a ksh script that calls /usr/bin/awk by
|
|
# its path, which NetBSD and Linux have; REPLACE_AWK changes #! lines only,
|
|
# and awk:run kept the package from being cross-built on a Linux host)
|
|
|
|
REPLACE_INTERPRETER+= tclsh
|
|
REPLACE.tclsh.old= .*/bin/tclsh
|
|
REPLACE.tclsh.new= ${PREFIX}/bin/tclsh
|
|
REPLACE_FILES.tclsh+= programs/dtdocbook/tcl/docbook.tcl
|
|
|
|
CHECK_BUILTIN.iconv:= yes
|
|
.include "../../converters/libiconv/builtin.mk"
|
|
CHECK_BUILTIN.iconv:= no
|
|
.if ${USE_BUILTIN.iconv:tl} == no
|
|
SUBST_CLASSES+= iconv
|
|
SUBST_STAGE.iconv= pre-configure
|
|
SUBST_FILES.iconv+= programs/dtmail/libDtMail/Common/Session.C
|
|
SUBST_FILES.iconv+= programs/dtmail/libDtMail/RFC/RFCBodyPart.C
|
|
SUBST_SED.iconv= -e 's!^[[:space:]]*const char .ip = (const char .) .bp!char *ip = *bp!'
|
|
SUBST_MESSAGE.iconv= Fix for GNU iconv.
|
|
.endif
|
|
|
|
SUBST_CLASSES+= paths
|
|
SUBST_STAGE.paths= pre-configure
|
|
SUBST_FILES.paths+= pkgsrc/cde.desktop pkgsrc/startcde
|
|
SUBST_FILES.paths+= pkgsrc/README.*
|
|
SUBST_VARS.paths= PKG_SYSCONFDIR PREFIX REAL_ROOT_GROUP VARBASE X11BASE
|
|
SUBST_MESSAGE.paths= Replacing path placeholders.
|
|
|
|
MAKE_ENV+= x_includes=${X11BASE}/include
|
|
MAKE_FLAGS+= YACC=${YACC:Q}
|
|
MAKE_FLAGS+= PERL=${PERL5:Q}
|
|
MAKE_FLAGS+= LDFLAGS=${LDFLAGS:M*:Q}
|
|
|
|
# MCDE runs programs it builds while building: util/tradcpp preprocesses the
|
|
# *.cpp.in templates (configure.ac: GENCPP=$(top_builddir)/util/tradcpp/tradcpp).
|
|
# Built with the target compiler that is a NetBSD binary and cannot run here:
|
|
# "/bin/sh: ../../../../util/tradcpp/tradcpp: not found" (build/logs/
|
|
# userland-2026-11-14j.log:7715ff). configure substitutes these into the
|
|
# Makefiles and Makefile.am forwards them through AM_MAKEFLAGS; the MAKE_FLAGS are
|
|
# the belt to that, and the CONFIGURE_ENV the braces -- configure's own default is
|
|
# $CC, i.e. the target's compiler, whenever pkgsrc does not say otherwise.
|
|
.if ${USE_CROSS_COMPILE:U:tl} == "yes"
|
|
# the build tools are 1990s C, and this host's compiler defaults to C23 (see the
|
|
# Motif recipe's CFLAGS_FOR_BUILD)
|
|
CFLAGS_FOR_BUILD= -O2 -std=gnu17
|
|
CPPFLAGS_FOR_BUILD= -DHAVE_FCNTL_H
|
|
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q:U${CC:Q}}
|
|
CONFIGURE_ENV+= AR_FOR_BUILD=${NATIVE_AR:Q:U${AR:Q}}
|
|
CONFIGURE_ENV+= RANLIB_FOR_BUILD=${NATIVE_RANLIB:Q:U${RANLIB:Q}}
|
|
CONFIGURE_ENV+= CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:Q}
|
|
CONFIGURE_ENV+= CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD:Q}
|
|
.endif
|
|
MAKE_FLAGS+= CC_FOR_BUILD=${NATIVE_CC:Q:U${CC:Q}}
|
|
MAKE_FLAGS+= AR_FOR_BUILD=${NATIVE_AR:Q:U${AR:Q}}
|
|
MAKE_FLAGS+= RANLIB_FOR_BUILD=${NATIVE_RANLIB:Q:U${RANLIB:Q}}
|
|
MAKE_FLAGS+= CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD:Q}
|
|
MAKE_FLAGS+= LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD:Q}
|
|
MAKE_FLAGS+= LIBS_FOR_BUILD=
|
|
MAKE_FLAGS+= CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:Q}
|
|
SPECIAL_PERMS+= ${PREFIX}/dt/bin/dtterm ${SETUID_ROOT_PERMS}
|
|
SPECIAL_PERMS+= ${PREFIX}/dt/bin/dtapppgather ${SETUID_ROOT_PERMS}
|
|
SPECIAL_PERMS+= ${PREFIX}/dt/bin/dtmail ${REAL_ROOT_USER} mail 2755
|
|
|
|
RCD_SCRIPTS= dtlogin
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
.for i in .alias .dir
|
|
CONF_FILES+= ${PREFIX}/dt/share/cde/fontaliases/fonts${i} \
|
|
${PKG_SYSCONFDIR}/dt/config/xfonts/C/fonts${i}
|
|
.endfor
|
|
|
|
BUILD_DEFS+= VARBASE
|
|
OWN_DIRS+= ${VARBASE}/dt
|
|
.for d in dt/appconfig/appmanager dt/tmp spool/calendar
|
|
OWN_DIRS+= ${VARBASE}/${d}
|
|
OWN_DIRS_PERMS+= ${VARBASE}/${d} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0770
|
|
.endfor
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/dt/config
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/dt/config/Xsession.d
|
|
OWN_DIRS+= ${PKG_SYSCONFDIR}/dt/config/xfonts/C
|
|
|
|
MAKE_DIRS+= share/xsessions
|
|
INSTALLATION_DIRS+= bin share/doc/${PKGBASE}
|
|
|
|
post-extract:
|
|
${RUN}${MKDIR} ${WRKSRC}/pkgsrc
|
|
${RUN}${CP} ${FILESDIR}/startcde.sh ${WRKSRC}/pkgsrc/startcde
|
|
.for f in cde.desktop README.*
|
|
${RUN}${CP} ${FILESDIR}/${f} ${WRKSRC}/pkgsrc
|
|
.endfor
|
|
|
|
pre-configure:
|
|
${RUN}${CHMOD} u+w ${WRKDIR}/*
|
|
${RUN}for f in `${FIND} ${WRKSRC} -type f | ${XARGS} ${GREP} -l '/usr/bin/X11'`; do \
|
|
${ECHO} Replacing X11 binary path in $$f ; \
|
|
${SED} -e 's:/usr/bin/X11:${X11BASE}/bin:g' $$f > $$f.pdone && ${MV} $$f.pdone $$f; \
|
|
done
|
|
${RUN}for f in `${FIND} ${WRKSRC} -type f | ${XARGS} ${GREP} -l '/usr/dt'`; do \
|
|
${ECHO} Replacing CDE prefix in $$f ; \
|
|
${SED} -e 's:/usr/dt:${PREFIX}/dt:g' $$f > $$f.pdone && ${MV} $$f.pdone $$f; \
|
|
done
|
|
${RUN}for f in `${FIND} ${WRKSRC} -type f | ${XARGS} ${GREP} -l '/etc/dt'`; do \
|
|
${ECHO} Replacing CDE syscondir in $$f ; \
|
|
${SED} -e 's:/etc/dt:${PKG_SYSCONFDIR}/dt:g' $$f > $$f.pdone && ${MV} $$f.pdone $$f; \
|
|
done
|
|
${RUN}set -e; cd ${WRKSRC} && autoreconf -fiv
|
|
|
|
post-install: pam-install
|
|
${RUN}${FIND} ${DESTDIR}${PREFIX}/dt -type f -perm -111 -exec \
|
|
${SH} -c '${STRIP} --strip-unneeded {} > /dev/null 2>&1' \;
|
|
${INSTALL_SCRIPT} ${WRKSRC}/pkgsrc/startcde ${DESTDIR}${PREFIX}/bin
|
|
${INSTALL_DATA} ${WRKSRC}/pkgsrc/cde.desktop \
|
|
${DESTDIR}${PREFIX}/share/xsessions
|
|
.for f in CONTRIBUTORS COPYING HISTORY README.md
|
|
${RUN}${MV} ${DESTDIR}${PREFIX}/dt/${f} \
|
|
${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
|
.endfor
|
|
.for r in README.*
|
|
${INSTALL_DATA} ${WRKSRC}/pkgsrc/${r} \
|
|
${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
|
|
.endfor
|
|
${INSTALL_DATA} ${WRKSRC}/pkgsrc/cde.desktop \
|
|
${DESTDIR}${PREFIX}/share/xsessions
|
|
|
|
.include "../../x11/libXScrnSaver/buildlink3.mk"
|
|
.include "../../x11/libXinerama/buildlink3.mk"
|
|
.include "../../x11/libXrandr/buildlink3.mk"
|
|
.include "../../x11/libXdmcp/buildlink3.mk"
|
|
.include "../../x11/xbitmaps/buildlink3.mk"
|
|
.include "../../x11/libXmu/buildlink3.mk"
|
|
.include "../../x11/libXau/buildlink3.mk"
|
|
.include "../../x11/libSM/buildlink3.mk"
|
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
.include "../../databases/lmdb/buildlink3.mk"
|
|
.include "../../textproc/opensp/buildlink3.mk"
|
|
.include "../../fonts/fontconfig/buildlink3.mk"
|
|
.include "../../lang/tcl/buildlink3.mk"
|
|
.include "../../mk/pthread.buildlink3.mk"
|
|
# Makronix's Motif, from motif/ of the same archive (../pkgsrc-motif)
|
|
.include "../../x11/mcde-motif/buildlink3.mk"
|
|
.include "../../mk/jpeg.buildlink3.mk"
|
|
.include "../../graphics/png/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|