Hello,

I'd like to propose switching the x11/motif port from the old ICS
Open Motif 2.3.8 release to Jon Trulson's Motif fork and updating it to
2.3.9:

https://github.com/jontrulson/motif

Jon Trulson is one of the main CDE maintainers, and this tree is based
on the existing Open Motif 2.3.8 code while incorporating a number of
fixes intended to keep it building on modern systems.

The current OpenBSD port still uses the old SourceForge 2.3.8 archive.
The proposed update therefore stays close to the existing Motif codebase
rather than moving to a substantially different implementation, while
picking up the post-2.3.8 portability and build fixes.

Among the upstream changes are removal of obsolete register keyword
usage, improved iconv detection on BSD systems, and other fixes for
modern compilers and platforms.

The attached patch updates the port to the 2.3.9 tag and changes the
HOMEPAGE and distfile source to Jon's GitHub repository.

Since the GitHub release archive requires generating the GNU build
system files, the port now uses autoreconf via upstream's autogen.sh,
with the required Autoconf and Automake versions specified explicitly.

I also updated WANTLIB and bumped the Xm, Mrm, and Uil shared library
versions for the new build. The static libraries in PLIST are now
marked with @static-lib.

Two small local patches are included for type mismatches in TabStack.c
exposed by Clang, and the existing EditresCom.c portability patch has
been refreshed for the updated upstream source.

My main reason for proposing this change is that the original ICS Motif
tree appears to be effectively dormant, whereas this fork contains the
modernization work already done by a developer closely involved with
CDE and provides a much better base for keeping Motif usable on current
OpenBSD systems.

Thank you for your time and consideration.

Best regards,
David.
? patches/patch-lib_Xm_TabStack_height_c
? patches/patch-lib_Xm_TabStack_width_c
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/motif/Makefile,v
diff -u -p -u -r1.13 Makefile
--- Makefile	21 May 2026 05:17:02 -0000	1.13
+++ Makefile	27 Aug 2026 00:17:54 -0000
@@ -1,21 +1,22 @@
 COMMENT=	Motif toolkit
 
-DISTNAME=	motif-2.3.8
-REVISION=	3
+DISTNAME=	motif-2.3.9
+WRKDIST=	${WRKDIR}/motif-motif-2.3.9
 
-SHARED_LIBS +=  Xm                   6.1      # 4.4
-SHARED_LIBS +=  Mrm                  4.1      # 4.4
-SHARED_LIBS +=  Uil                  5.0      # 4.4
+SHARED_LIBS +=  Xm                   6.2      # 4.4
+SHARED_LIBS +=  Mrm                  4.2      # 4.4
+SHARED_LIBS +=  Uil                  5.1      # 4.4
 
 CATEGORIES=	x11
-HOMEPAGE=	http://motif.ics.com/
+HOMEPAGE=	https://github.com/jontrulson/motif
 
-SITES=		${SITE_SOURCEFORGE:=motif/}
+# Upstream: jontrulson/motif (fork with modern fixes)
+SITES=		https://github.com/jontrulson/motif/archive/refs/tags/
 
 # LGPLv2.1
 PERMIT_PACKAGE=	Yes
 
-WANTLIB=  ICE SM X11 Xext Xft Xmu Xrender Xt c expat fontconfig freetype
+WANTLIB=  ICE SM X11 Xau Xext Xft Xmu Xpm Xrender Xt c expat fontconfig freetype
 WANTLIB+= iconv jpeg m png pthread xcb z
 
 LIB_DEPENDS=	converters/libiconv \
@@ -24,7 +25,10 @@ LIB_DEPENDS=	converters/libiconv \
 
 USE_GROFF=	Yes
 
-CONFIGURE_STYLE=gnu
+CONFIGURE_STYLE=autoreconf
+AUTORECONF=	./autogen.sh
+AUTOCONF_VERSION=	2.73
+AUTOMAKE_VERSION=	1.16
 CONFIGURE_ARGS=	--enable-themes \
 		--enable-xft \
 		--enable-jpeg \
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/motif/distinfo,v
diff -u -p -u -r1.4 distinfo
--- distinfo	28 Apr 2018 16:12:03 -0000	1.4
+++ distinfo	27 Aug 2026 00:17:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (motif-2.3.8.tar.gz) = hZtyNmburH3wGCCdZgRcmFO1C0IYzsrbeU4jWWGevOc=
-SIZE (motif-2.3.8.tar.gz) = 5704328
+SHA256 (motif-2.3.9.tar.gz) = HBO+FrwMBB5GEGGN27s0z315BOq6FzSnT1noJ1qhHig=
+SIZE (motif-2.3.9.tar.gz) = 8885273
Index: patches/patch-lib_Xm_EditresCom_c
===================================================================
RCS file: /cvs/ports/x11/motif/patches/patch-lib_Xm_EditresCom_c,v
diff -u -p -u -r1.1 patch-lib_Xm_EditresCom_c
--- patches/patch-lib_Xm_EditresCom_c	21 May 2026 05:17:02 -0000	1.1
+++ patches/patch-lib_Xm_EditresCom_c	27 Aug 2026 00:17:54 -0000
@@ -1,12 +1,12 @@
 Index: lib/Xm/EditresCom.c
 --- lib/Xm/EditresCom.c.orig
 +++ lib/Xm/EditresCom.c
-@@ -794,7 +794,7 @@ WidgetInfo *info;
+@@ -794,7 +794,7 @@
  
-     register int count;
-     register Widget parent;
--    register unsigned long * child;
-+    register CARD64 * child;
+     int count;
+     Widget parent;
+-    unsigned long * child;
++    CARD64 * child;
  
      for (top = w; XtParent(top) != NULL; top = XtParent(top)) {}
  
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/x11/motif/pkg/DESCR,v
diff -u -p -u -r1.1.1.1 DESCR
--- pkg/DESCR	5 May 2016 19:33:08 -0000	1.1.1.1
+++ pkg/DESCR	27 Aug 2026 00:17:54 -0000
@@ -1 +1,6 @@
 The industry standard user interface toolkit for the X Window System.
+
+This is Jon Trulson's actively maintained fork based on Open Motif 2.3.8
+from ICS MotifZone. It includes build fixes for modern systems, removal 
+of register keyword usage, improved iconv detection for BSD systems, 
+and other portability improvements.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/motif/pkg/PLIST,v
diff -u -p -u -r1.3 PLIST
--- pkg/PLIST	11 Mar 2022 20:16:47 -0000	1.3
+++ pkg/PLIST	27 Aug 2026 00:17:54 -0000
@@ -572,13 +572,13 @@ lib/Xm/wsm/wsm_create.h
 lib/Xm/wsm/wsm_ui.h
 lib/Xm/wsm/xrmLib.c
 lib/Xm/wsm/xrmLib.h
-lib/libMrm.a
+@static-lib lib/libMrm.a
 lib/libMrm.la
 @lib lib/libMrm.so.${LIBMrm_VERSION}
-lib/libUil.a
+@static-lib lib/libUil.a
 lib/libUil.la
 @lib lib/libUil.so.${LIBUil_VERSION}
-lib/libXm.a
+@static-lib lib/libXm.a
 lib/libXm.la
 @lib lib/libXm.so.${LIBXm_VERSION}
 @man man/man1/mwm.1
--- /dev/null	Thu Aug 27 02:18:07 2026
+++ /usr/ports/x11/motif/patches/patch-lib_Xm_TabStack_height_c	Thu Aug 27 01:50:22 2026
@@ -0,0 +1,8 @@
+Fix type mismatch exposed by Clang.
+
+Index: lib/Xm/TabStack.c
+--- lib/Xm/TabStack.c.orig
++++ lib/Xm/TabStack.c
+@@ -1646,1 +1646,1 @@
+-		_XmTabBoxStackedGeometry(XmTabStack_tab_box(tab), height,
++		_XmTabBoxStackedGeometry((XmTabBoxWidget)XmTabStack_tab_box(tab), height,
--- /dev/null	Thu Aug 27 02:18:07 2026
+++ /usr/ports/x11/motif/patches/patch-lib_Xm_TabStack_width_c	Thu Aug 27 01:50:22 2026
@@ -0,0 +1,8 @@
+Fix type mismatch exposed by Clang.
+
+Index: lib/Xm/TabStack.c
+--- lib/Xm/TabStack.c.orig
++++ lib/Xm/TabStack.c
+@@ -1641,1 +1641,1 @@
+-		_XmTabBoxStackedGeometry(XmTabStack_tab_box(tab), width,
++		_XmTabBoxStackedGeometry((XmTabBoxWidget)XmTabStack_tab_box(tab), width,

Reply via email to