pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

modular-xorg-server: finish package conversion to meson



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Fri Aug 21 12:09:33 2026 +0200
Changeset:	b1e3dd08ae0d30356a6860d75418d7c11c74a306

Modified Files:
	modular-xorg-server/Makefile
	modular-xorg-server/Makefile.common
	modular-xorg-server/PLIST
	modular-xorg-server/buildlink3.mk
	modular-xorg-server/options.mk
Removed Files:
	modular-xorg-server/TODO
	modular-xorg-server/hacks.mk

Log Message:
modular-xorg-server: finish package conversion to meson

Builds fine, needs runtime testing.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b1e3dd08ae0d30356a6860d75418d7c11c74a306

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 modular-xorg-server/Makefile        |  5 ++--
 modular-xorg-server/Makefile.common | 51 +++++--------------------------
 modular-xorg-server/PLIST           | 21 ++++++-------
 modular-xorg-server/TODO            |  3 --
 modular-xorg-server/buildlink3.mk   |  2 +-
 modular-xorg-server/hacks.mk        | 26 ----------------
 modular-xorg-server/options.mk      | 60 +++++++++++++++++--------------------
 7 files changed, 49 insertions(+), 119 deletions(-)

diffs:
diff --git a/modular-xorg-server/Makefile b/modular-xorg-server/Makefile
index d929189364..7fbb32e4ac 100644
--- a/modular-xorg-server/Makefile
+++ b/modular-xorg-server/Makefile
@@ -12,9 +12,8 @@ NOT_FOR_PLATFORM=	Darwin-*-*
 
 .include "Makefile.common"
 
-CONFIGURE_ARGS+=	--enable-xorg
-CONFIGURE_ARGS+=	--disable-xephyr
-CONFIGURE_ARGS+=	--disable-kdrive
+MESON_ARGS+=		-Dxorg=true
+MESON_ARGS+=		-Dxephyr=false
 
 .include "options.mk"
 
diff --git a/modular-xorg-server/Makefile.common b/modular-xorg-server/Makefile.common
index d744939a34..f29f3065ee 100644
--- a/modular-xorg-server/Makefile.common
+++ b/modular-xorg-server/Makefile.common
@@ -29,8 +29,8 @@ OWN_DIRS+=		${VARBASE}/log
 OWN_DIRS+=		${XKB_OUTPUT_DIR}
 XKB_OUTPUT_DIR?=	${VARBASE}/db/xkb # XXX sync with xkeyboard-config
 
-#CONFIGURE_ARGS+=	--localstatedir=${VARBASE:Q}
-#CONFIGURE_ARGS+=	--with-xkb-output=${XKB_OUTPUT_DIR:Q}
+MESON_ARGS+=		-Dlocalstatedir=${VARBASE:Q}
+MESON_ARGS+=		-Dxkb_output_dir=${XKB_OUTPUT_DIR:Q}
 
 .if ${USE_TOOLS:Mauto*}
 TOOL_DEPENDS+=	xorg-util-macros>=1.1.5:../../devel/xorg-util-macros
@@ -43,15 +43,10 @@ DEPENDS+=	xkeyboard-config-[0-9]*:../../x11/xkeyboard-config
 
 .if ${OPSYS} == "NetBSD"
 CPPFLAGS+=		-D_OPENBSD_SOURCE	# for reallocarray(3)
-#CONFIGURE_ARGS+=	--with-builder-addr="tech-x11%NetBSD.org@localhost"
 # TLS is not supported by NetBSD<6
-.  if ${OPSYS_VERSION} < 060000
-#CONFIGURE_ENV+=	ac_cv_tls=no
-#CONFIGURE_ARGS+=	--disable-glx-tls
-.  endif
 .endif
 
-#CONFIGURE_ARGS+=	--with-fontrootdir=${PREFIX}/share/fonts/X11
+MESON_ARGS+=		-Dfontrootdir=${PREFIX}/share/fonts/X11
 
 LEGACY_FONT_PATHS=
 DEFAULT_FONT_PATHS=
@@ -61,25 +56,13 @@ LEGACY_FONT_PATHS+=	${PREFIX}/lib/X11/fonts/${f}
 .endfor
 FONT_PATHS=		${DEFAULT_FONT_PATHS} ${LEGACY_FONT_PATHS}
 
-#CONFIGURE_ARGS+=	--with-default-font-path=${FONT_PATHS:ts,:Q}
-
-#CONFIGURE_ARGS+=	--disable-config-hal
-#CONFIGURE_ARGS+=	--disable-xwin
-#CONFIGURE_ARGS+=	--disable-xephyr
-#CONFIGURE_ARGS+=	--disable-kdrive
-##CONFIGURE_ARGS+=	--disable-kdrive-vesa
-#CONFIGURE_ARGS+=	--enable-xtrans-send-fds
-
-#CONFIGURE_ARGS+=	--with-int10=x86emu
+MESON_ARGS+=		-Ddefault_font_path=${FONT_PATHS:ts,:Q}
+MESON_ARGS+=		-Dhal=false
+MESON_ARGS+=		-Dxwin=false
 
-#CONFIGURE_ENV+=		APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
-#CONFIGURE_ENV+=		DRIVER_MAN_SUFFIX=4
-
-PLIST_VARS+=		sunos
 PLIST_SUBST+=		SUNOS_ARCH=${SUNOS_ARCH}
 
 .if ${OPSYS} == "SunOS"
-PLIST.sunos=		yes
 .  if ${MACHINE_ARCH} == "i386"
 SUNOS_ARCH=		ia32
 .  elif ${MACHINE_ARCH} == "x86_64"
@@ -89,31 +72,13 @@ SUNOS_ARCH=		sparcv8plus
 .  endif
 .endif
 
-PLIST_VARS+=		sparc
-.if ${MACHINE_ARCH:Msparc*}
-PLIST.sparc=		yes
-.endif
-
-# Workaround for PR#41556.
-# Avoid to use bsd_kqueue_apm, force to use bsd_apm instead.
-#CONFIGURE_ENV.NetBSD+=	ac_cv_header_sys_event_h=no
-
-# Avoid picking up epoll on illumos
-#CONFIGURE_ENV.SunOS+=	ac_cv_func_epoll_create1=no
-
-# Only available in newer releases
-#CONFIGURE_ENV.SunOS+=	ac_cv_func_mkostemp=no
-
 INSTALLATION_DIRS+=	lib/xorg/modules/drivers lib/xorg/modules/input
 
-TOOL_DEPENDS+=		tradcpp-[0-9]*:../../devel/tradcpp
-#CONFIGURE_ENV+=	ac_cv_path_RAWCPP="${TOOLBASE}/bin/tradcpp -Uunix"
-
 .if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD"
-#CONFIGURE_ARGS+=	--with-sha1=libc
+MESON_ARGS+=		-Dsha1=libc
 .else
 .include "../../security/nettle/buildlink3.mk"
-#CONFIGURE_ARGS+=	--with-sha1=libnettle
+MESON_ARGS+=		-Dsha1=libnettle
 .endif
 
 .include "../../devel/meson/build.mk"
diff --git a/modular-xorg-server/PLIST b/modular-xorg-server/PLIST
index 95543f1600..681cd06c00 100644
--- a/modular-xorg-server/PLIST
+++ b/modular-xorg-server/PLIST
@@ -25,10 +25,11 @@ include/xorg/dixfont.h
 include/xorg/dixfontstr.h
 include/xorg/dixgrabs.h
 include/xorg/dixstruct.h
-include/xorg/dri.h
-include/xorg/dri2.h
+${PLIST.dri}include/xorg/dri.h
+${PLIST.dri}include/xorg/dri2.h
+@comment bug in upstream, should be ${PLIST.dri}
 include/xorg/dri3.h
-include/xorg/dristruct.h
+${PLIST.dri}include/xorg/dristruct.h
 include/xorg/edid.h
 include/xorg/events.h
 include/xorg/exa.h
@@ -46,7 +47,7 @@ include/xorg/gc.h
 include/xorg/gcstruct.h
 include/xorg/geext.h
 include/xorg/geint.h
-include/xorg/glamor.h
+${PLIST.dri}include/xorg/glamor.h
 include/xorg/globals.h
 include/xorg/glxvndabi.h
 include/xorg/glyphstr.h
@@ -94,7 +95,7 @@ include/xorg/regionstr.h
 include/xorg/resource.h
 include/xorg/rgb.h
 include/xorg/rrtransform.h
-include/xorg/sarea.h
+${PLIST.dri}include/xorg/sarea.h
 include/xorg/screenint.h
 include/xorg/scrnintstr.h
 include/xorg/selection.h
@@ -107,7 +108,7 @@ include/xorg/validate.h
 include/xorg/vbe.h
 include/xorg/vbeModes.h
 include/xorg/vgaHW.h
-include/xorg/vndserver.h
+${PLIST.dri}include/xorg/vndserver.h
 include/xorg/wfbrename.h
 include/xorg/window.h
 include/xorg/windowstr.h
@@ -153,12 +154,12 @@ include/xorg/xserver-properties.h
 include/xorg/xvdix.h
 include/xorg/xvmcext.h
 lib/pkgconfig/xorg-server.pc
-lib/xorg/modules/drivers/modesetting_drv.so
-lib/xorg/modules/extensions/libglx.so
+${PLIST.dri}lib/xorg/modules/drivers/modesetting_drv.so
+${PLIST.dri}lib/xorg/modules/extensions/libglx.so
 lib/xorg/modules/input/inputtest_drv.so
 lib/xorg/modules/libexa.so
 lib/xorg/modules/libfbdevhw.so
-lib/xorg/modules/libglamoregl.so
+${PLIST.dri}lib/xorg/modules/libglamoregl.so
 lib/xorg/modules/libint10.so
 lib/xorg/modules/libshadow.so
 lib/xorg/modules/libshadowfb.so
@@ -173,7 +174,7 @@ man/man1/gtf.1
 man/man4/exa.4
 man/man4/fbdevhw.4
 man/man4/inputtestdrv.4
-man/man4/modesetting.4
+${PLIST.dri}man/man4/modesetting.4
 man/man5/xorg.conf.5
 man/man5/xorg.conf.d.5
 share/X11/xorg.conf.d/10-quirks.conf
diff --git a/modular-xorg-server/TODO b/modular-xorg-server/TODO
deleted file mode 100644
index 62471154f1..0000000000
--- a/modular-xorg-server/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-Replace CONFIGURE_ARGS.
-
-Fix options.mk.
diff --git a/modular-xorg-server/buildlink3.mk b/modular-xorg-server/buildlink3.mk
index 3f31ed3b0c..b41eea4893 100644
--- a/modular-xorg-server/buildlink3.mk
+++ b/modular-xorg-server/buildlink3.mk
@@ -7,7 +7,7 @@ MODULAR_XORG_SERVER_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.modular-xorg-server+=	modular-xorg-server>=21.1.4nb1
 BUILDLINK_ABI_DEPENDS.modular-xorg-server?=	modular-xorg-server>=21.1.9nb1
-BUILDLINK_PKGSRCDIR.modular-xorg-server?=	../../x11/modular-xorg-server
+BUILDLINK_PKGSRCDIR.modular-xorg-server?=	../../wip/modular-xorg-server
 BUILDLINK_INCDIRS.modular-xorg-server+=		include/xorg
 
 .include "../../mk/bsd.fast.prefs.mk"
diff --git a/modular-xorg-server/hacks.mk b/modular-xorg-server/hacks.mk
deleted file mode 100644
index ad47bc686f..0000000000
--- a/modular-xorg-server/hacks.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# $NetBSD: hacks.mk,v 1.2 2025/02/25 19:14:46 wiz Exp $
-
-.if !defined(MODULAR_XORG_SERVER_HACKS_MK)
-MODULAR_XORG_SERVER_HACKS_MK=	defined
-
-### [Tue Apr  9 13:40:46 JST 2024 : pho]
-###
-### With "smart scheduler" enabled, Xserver sets up an itimer to
-### periodically receive SIGALRM from the kernel while the server is doing
-### a socket I/O and processing commands from X clients. When the signal
-### arrives while Xserver is in pixman_composite_src_8888_8888_asm_neon()
-### or any similar functions from libpixman, the process fails to return
-### from the signal handler and exits with status code 22 (EINVAL) due to
-### kern/58149. These functions misalign SP while doing some SIMD stuff,
-### thereby trigger the kernel bug.
-###
-### Disabling itimer can avoid the problem but there might be a performance
-### regression.
-###
-.if ${MACHINE_PLATFORM:MNetBSD-9.*-aarch64} || \
-	${MACHINE_PLATFORM} == NetBSD-10.0-aarch64
-PKG_HACKS+=	smart-scheduler-workaround
-CONFIGURE_ENV+=	ac_cv_func_setitimer=no
-.endif
-
-.endif  # MODULAR_XORG_SERVER_HACKS_MK
diff --git a/modular-xorg-server/options.mk b/modular-xorg-server/options.mk
index 198d04586e..897639916f 100644
--- a/modular-xorg-server/options.mk
+++ b/modular-xorg-server/options.mk
@@ -1,12 +1,20 @@
 # $NetBSD: options.mk,v 1.24 2023/03/30 08:25:06 wiz Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.modular-xorg-server
-PKG_SUPPORTED_OPTIONS=	inet6 dri debug dtrace
-PKG_SUGGESTED_OPTIONS=	inet6 dri dtrace
+PKG_SUPPORTED_OPTIONS=	dri dtrace
+PKG_SUGGESTED_OPTIONS=	#dri
 
 .include "../../mk/bsd.options.mk"
 
-PLIST_VARS+=		dri dtrace
+PLIST_VARS+=		dri # dtrace
+
+PRINT_PLIST_AWK+=	{ if (/include\/xorg\/dri/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/include\/xorg\/glamor/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/include\/xorg\/sarea/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/include\/xorg\/vndserver/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/libglamor/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/libglx/) $$0 = "$${PLIST.dri}" $$0 }
+PRINT_PLIST_AWK+=	{ if (/modesetting/) $$0 = "$${PLIST.dri}" $$0 }
 
 .if !empty(PKG_OPTIONS:Mdri)
 .include "../../graphics/libepoxy/buildlink3.mk"
@@ -15,44 +23,30 @@ BUILDLINK_API_DEPENDS.MesaLib+=	MesaLib>=11
 .include "../../x11/libdrm/buildlink3.mk"
 .include "../../x11/libxshmfence/buildlink3.mk"
 PLIST.dri=		yes
-#CONFIGURE_ARGS+=	--enable-dri
-#CONFIGURE_ARGS+=	--enable-dri2
-#CONFIGURE_ARGS+=	--enable-dri3
-#CONFIGURE_ARGS+=	--enable-glx
+MESON_ARGS+=		-Ddri1=true
+MESON_ARGS+=		-Ddri2=true
+MESON_ARGS+=		-Ddri3=true
+MESON_ARGS+=		-Dglx=true
 .  if ${MESALIB_SUPPORTS_EGL:tl} == "yes"
-#CONFIGURE_ARGS+=	--enable-glamor
+MESON_ARGS+=		-Dglamor=true
 .  endif
-#CONFIGURE_ARGS+=	--enable-present
 .else
 ###
 ### XXX Perhaps we should allow for a built-in glx without dri enabled?
 ###
-#CONFIGURE_ARGS+=	--disable-dri
-#CONFIGURE_ARGS+=	--disable-dri2
-#CONFIGURE_ARGS+=	--disable-dri3
-#CONFIGURE_ARGS+=	--disable-glx
-#CONFIGURE_ARGS+=	--disable-glamor
-#CONFIGURE_ARGS+=	--disable-present
-pre-build: disable-modesetting
-.PHONY: disable-modesetting
-disable-modesetting:
-	(${ECHO} "all:"; ${ECHO} "install:") > ${WRKSRC}/hw/xfree86/drivers/modesetting/Makefile
-.endif
-
-.if !empty(PKG_OPTIONS:Minet6)
-#CONFIGURE_ARGS+=	--enable-ipv6
-.else
-#CONFIGURE_ARGS+=	--disable-ipv6
-.endif
-
-.if !empty(PKG_OPTIONS:Mdebug)
-#CONFIGURE_ARGS+=	--enable-debug
-CFLAGS+=		-ggdb
+MESON_ARGS+=		-Ddri1=false
+MESON_ARGS+=		-Ddri2=false
+MESON_ARGS+=		-Ddri3=false
+MESON_ARGS+=		-Dglx=false
+MESON_ARGS+=		-Dglamor=false
 .endif
 
+# FAILED: [code=1] dix/liblibxserver_dix.a.p/Xserver.o
+# /usr/sbin/dtrace -G -s ../include/Xserver.d -o dix/liblibxserver_dix.a.p/Xserver.o
+# dtrace: failed to compile script ../include/Xserver.d: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
 .if !empty(PKG_OPTIONS:Mdtrace)
-PLIST.dtrace=		yes
-#CONFIGURE_ARGS+=	--with-dtrace
+#PLIST.dtrace=		yes
+MESON_ARGS+=		-Ddtrace=true
 .else
-#CONFIGURE_ARGS+=	--without-dtrace
+MESON_ARGS+=		-Ddtrace=false
 .endif


Home | Main Index | Thread Index | Old Index