Date: Mon, 27 Apr 2026 20:19:35 +0000 From: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 00c569400eda - 2026Q2 - x11-servers/xlibre-server: Re-add Glamor SDK API patches. Message-ID: <69efc4d7.3406a.20347ca4@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch 2026Q2 has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=00c569400edaf8625410adecf30de28c45f238b9 commit 00c569400edaf8625410adecf30de28c45f238b9 Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> AuthorDate: 2026-04-26 05:50:16 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2026-04-27 20:19:10 +0000 x11-servers/xlibre-server: Re-add Glamor SDK API patches. - Fix path issue on xlibre-xf86-video-amdgpu - Mk/Uses/xlibre-cat.mk cleanup - xlibre-xf86-input-synaptics|wacom drivers cleanup due xlibre-cat.mk file changes With hat: xlibre (cherry picked from commit 439ad72612af8d38b4280cbbd3c1e3104daffd3f) --- Mk/Uses/xlibre-cat.mk | 70 +++++++++--------- x11-drivers/xlibre-xf86-input-synaptics/Makefile | 4 +- x11-drivers/xlibre-xf86-input-wacom/Makefile | 4 +- x11-drivers/xlibre-xf86-video-amdgpu/Makefile | 7 +- x11-servers/xlibre-server/Makefile | 2 +- .../files/patch-glamor__glamor_priv.h | 60 ++++++++++++++++ .../xlibre-server/files/patch-glamor_glamor.h | 82 ++++++++++++++++++++++ 7 files changed, 184 insertions(+), 45 deletions(-) diff --git a/Mk/Uses/xlibre-cat.mk b/Mk/Uses/xlibre-cat.mk index 2a8bf55cd966..548da3d44e7a 100644 --- a/Mk/Uses/xlibre-cat.mk +++ b/Mk/Uses/xlibre-cat.mk @@ -7,24 +7,25 @@ # Usage: USES=xlibre-cat:category[,buildsystem] # # category is one of: -# * driver depends on xorgproto at least +# * driver Depends on xorgproto at least +# * server Sets the upstream for X servers, nothing much. # -# Bleow are the old freedesktop.org categories and their comments -# XLibre only hosts the driver category and the xserver, these -# categoryes are disabled now, but kept in a commented state for -# if they be added to XLibre in the future. +# Below are the old freedesktop.org categories and their comments. +# XLibre only hosts the driver category and the server. These +# categories are disabled now, but kept in a commented state for +# if they get added to XLibre in the future. # # * app Installs applications, no shared libraries. # * data Installs only data. -# * doc no particular notes -# * font don't install .pc file +# * doc No particular notes. +# * font Don't install .pc file. # * lib various dependencies, install .pc file, needs -# pathfix -# * proto install .pc file, needs pathfix, most only needed at +# pathfix. +# * proto Install .pc file, needs pathfix, most only needed at # build time. -# * util no particular notes +# * util No particular notes. # -# These categories has to match upstream categories. Don't invent +# These categories have to match upstream categories. Don't invent # your own. # # builsystem is one of: @@ -84,11 +85,7 @@ _XLIBRE_BUILDSYS= autotools EXTRACT_SUFX?= .tar.bz2 . endif -DIST_SUBDIR= xlibre/${_XLIBRE_CAT} -# Do not set the DIST_SUBDIR to xlibre for XLibre flavors of 3rd party ports. -. if !empty(PKGNAMEPREFIX) && ${PKGNAMEPREFIX} == xlibre- && ${_XLIBRE_CAT} == driver -DIST_SUBDIR= xorg/${_XLIBRE_CAT} -. endif +DIST_SUBDIR?= xlibre/${_XLIBRE_CAT} . if ${_XLIBRE_BUILDSYS} == meson .include "${USESDIR}/meson.mk" @@ -99,45 +96,37 @@ GNU_CONFIGURE= yes IGNORE= unknown build system specified via xlibre-cat:${xlibre-cat_ARGS:ts,} . endif -# Set up things for fetching from XLibre GitHub. -# This can be overridden using normal GH_* macros in the ports Makefile. -# We make a best guess for GH_PROJECT. +# Set up variables for fetching from XLibre GitHub. +# These can be overridden using normal GH_* macros in the port's Makefile. +# We are just making a best guess for these variables. USE_GITHUB?= yes GH_ACCOUNT?= X11Libre -# Do not do the bellow for XLibre flavors of 3rd party ports. -. if empty(PKGNAMEPREFIX) || ${PKGNAMEPREFIX} != xlibre- -# Set the GitHub upstream. -. if ${_XLIBRE_CAT} == driver +. if ${_XLIBRE_CAT} == driver # Removes the xlibre- suffix from the PORTNAME -GH_PROJECT?= ${PORTNAME:tl:C/xlibre-//} +GH_PROJECT?= ${PORTNAME:tl:C/xlibre-//} GH_TAGNAME?= ${PORTNAME}-${PORTVERSION} -. elif ${_XLIBRE_CAT} == server -GH_PROJECT?= xserver +. elif ${_XLIBRE_CAT} == server +GH_PROJECT?= xserver GH_TAGNAME?= xlibre-xserver-${PORTVERSION} -. else -GH_PROJECT?= ${PORTNAME:tl} -. endif -# Add conflicts between X.Org and XLibre variants of X drivers: -CONFLICTS= ${PORTNAME:tl:C/xlibre-//} . endif . if ${_XLIBRE_BUILDSYS} == meson # Set up meson stuff here . else -# Things from GitHub doesn't come with pre-generated configure, add dependency +# Repos from GitHub don't come with pre-generated configure, add dependency # on autoreconf and run it, if we're using autotools. .include "${USESDIR}/autoreconf.mk" . endif # -# All xlibre ports needs pkgconfig to build, but some ports look for pkgconfig +# All XLibre ports needs pkgconfig to build, but some ports look for pkgconfig # and then continue the build. # .include "${USESDIR}/pkgconfig.mk" # -# All xlibre ports need xorg-macros except for the server. +# All XLibre ports need xorg-macros except for the servers. # . if ${PORTNAME} != xorg-macros && ${_XLIBRE_CAT} != server USE_XLIBRE+= xlibre-macros @@ -152,14 +141,16 @@ USE_XLIBRE+= xlibre-macros #. elif ${_XLIBRE_CAT} == driver . if ${_XLIBRE_CAT} == driver -.include "../../x11-servers/xlibre-server/Makefile.version" -MODULEDIR=lib/xorg/modules/xlibre-${XLIBRE_MJR_VER} USE_XLIBRE+= xlibre-server -USE_XORG+= xi xorgproto +USE_XORG+= xorgproto CFLAGS+= -Werror=uninitialized + +# Sets the XLibre module directory based on server version. +.include "../../x11-servers/xlibre-server/Makefile.version" +MODULEDIR= lib/xorg/modules/xlibre-${XLIBRE_MJR_VER} PLIST_SUB+= MODULEDIR=${MODULEDIR} . if ${_XLIBRE_BUILDSYS} == meson -# Put special stuff for meson here +# Put special stuff for driver meson here . else CONFIGURE_ENV+= PKG_CONFIG_PATH=${PREFIX}/libdata/pkgconfig/ \ DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4' @@ -169,6 +160,9 @@ libtool_ARGS?= # empty INSTALL_TARGET= install-strip . endif +# Add conflicts between X.Org and XLibre variants of X drivers: +CONFLICTS= ${PORTNAME:tl:C/xlibre-//} + . elif ${_XLIBRE_CAT} == server # For common flags across servers. diff --git a/x11-drivers/xlibre-xf86-input-synaptics/Makefile b/x11-drivers/xlibre-xf86-input-synaptics/Makefile index da911b16b101..e8dd36bb59d1 100644 --- a/x11-drivers/xlibre-xf86-input-synaptics/Makefile +++ b/x11-drivers/xlibre-xf86-input-synaptics/Makefile @@ -1,6 +1,6 @@ PORTNAME= xlibre-xf86-input-synaptics PORTVERSION= 25.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= xlibre@FreeBSD.org @@ -11,7 +11,7 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= pathfix xorg xlibre-cat:driver -USE_XORG= x11 xtst +USE_XORG= x11 xi xtst OPTIONS_DEFINE= EVDEV OPTIONS_DEFAULT=EVDEV diff --git a/x11-drivers/xlibre-xf86-input-wacom/Makefile b/x11-drivers/xlibre-xf86-input-wacom/Makefile index ec249a4b5207..546d154c4b00 100644 --- a/x11-drivers/xlibre-xf86-input-wacom/Makefile +++ b/x11-drivers/xlibre-xf86-input-wacom/Makefile @@ -1,6 +1,6 @@ PORTNAME= xlibre-xf86-input-wacom PORTVERSION= 25.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= xlibre@FreeBSD.org @@ -15,7 +15,7 @@ BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto RUN_DEPENDS= webcamd>=3.1.0.1:multimedia/webcamd USES= gmake pathfix xorg xlibre-cat:driver -USE_XORG= x11 xext xinerama xrandr +USE_XORG= x11 xext xi xinerama xrandr LDFLAGS+= -Wl,--as-needed # Xext USE_RC_SUBR= wacom diff --git a/x11-drivers/xlibre-xf86-video-amdgpu/Makefile b/x11-drivers/xlibre-xf86-video-amdgpu/Makefile index 1561195756d2..6de99ca542f8 100644 --- a/x11-drivers/xlibre-xf86-video-amdgpu/Makefile +++ b/x11-drivers/xlibre-xf86-video-amdgpu/Makefile @@ -1,6 +1,6 @@ PORTNAME= xlibre-xf86-video-amdgpu PORTVERSION= 25.0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= xlibre@FreeBSD.org @@ -21,8 +21,11 @@ USE_GL= gbm CONFIGURE_ARGS+=--disable-udev -PLIST_FILES= ${MODULEDIR}/drivers/video/amdgpu_drv.so \ +PLIST_FILES= ${MODULEDIR}/drivers/amdgpu_drv.so \ share/man/man4/amdgpu.4x.gz \ share/X11/xorg.conf.d/10-amdgpu.conf +post-patch: + ${REINPLACE_CMD} -e 's|--variable=video_drivers_dir`|--variable=moduledir`/drivers|g' ${WRKSRC}/configure.ac + .include <bsd.port.mk> diff --git a/x11-servers/xlibre-server/Makefile b/x11-servers/xlibre-server/Makefile index af4e19d7bc39..02e7d96e4799 100644 --- a/x11-servers/xlibre-server/Makefile +++ b/x11-servers/xlibre-server/Makefile @@ -1,6 +1,6 @@ PORTNAME= xlibre-server PORTVERSION= ${XLIBRE_VER} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= x11-servers MAINTAINER= xlibre@FreeBSD.org diff --git a/x11-servers/xlibre-server/files/patch-glamor__glamor_priv.h b/x11-servers/xlibre-server/files/patch-glamor__glamor_priv.h new file mode 100644 index 000000000000..ddb2f952a7c9 --- /dev/null +++ b/x11-servers/xlibre-server/files/patch-glamor__glamor_priv.h @@ -0,0 +1,60 @@ +--- glamor/glamor_priv.h.orig 2026-04-21 11:32:22.000000000 -0700 ++++ glamor/glamor_priv.h 2026-04-25 18:41:22.504539000 -0700 +@@ -1007,57 +1007,6 @@ + + int glamor_egl_fd_from_pixmap(ScreenPtr, PixmapPtr, CARD16 *, CARD32 *); + +-/* @glamor_fds_from_pixmap: Get a dma-buf fd from a pixmap. +- * +- * @screen: Current screen pointer. +- * @pixmap: The pixmap from which we want the fd. +- * @fds, @strides, @offsets: Pointers to fill info of each plane. +- * @modifier: Pointer to fill the modifier of the buffer. +- * +- * the pixmap and the buffer associated by the fds will share the same +- * content. The caller is responsible to close the returned file descriptors. +- * Returns the number of planes, -1 on error. +- * */ +-int glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, +- uint32_t *strides, uint32_t *offsets, +- uint64_t *modifier); +- +-/* @glamor_pixmap_from_fds: Creates a pixmap to wrap a dma-buf fds. +- * +- * @screen: Current screen pointer. +- * @num_fds: Number of fds to import +- * @fds: The dma-buf fds to import. +- * @width: The width of the buffers. +- * @height: The height of the buffers. +- * @stride: The stride of the buffers. +- * @depth: The depth of the buffers. +- * @bpp: The bpp of the buffers. +- * @modifier: The modifier of the buffers. +- * +- * Returns a valid pixmap if the import succeeded, else NULL. +- * */ +-PixmapPtr glamor_pixmap_from_fds(ScreenPtr screen, +- CARD8 num_fds, +- const int *fds, +- CARD16 width, +- CARD16 height, +- const CARD32 *strides, +- const CARD32 *offsets, +- CARD8 depth, +- CARD8 bpp, +- uint64_t modifier); +- +-Bool glamor_get_formats(ScreenPtr screen, CARD32 *num_formats, CARD32 **formats); +- +-Bool glamor_get_modifiers(ScreenPtr screen, +- uint32_t format, +- uint32_t *num_modifiers, +- uint64_t **modifiers); +- +-Bool glamor_get_drawable_modifiers(DrawablePtr draw, +- uint32_t format, +- uint32_t *num_modifiers, +- uint64_t **modifiers); + + void glamor_egl_screen_init(ScreenPtr screen, + struct glamor_context *glamor_ctx); diff --git a/x11-servers/xlibre-server/files/patch-glamor_glamor.h b/x11-servers/xlibre-server/files/patch-glamor_glamor.h new file mode 100644 index 000000000000..8f4c886a5ff9 --- /dev/null +++ b/x11-servers/xlibre-server/files/patch-glamor_glamor.h @@ -0,0 +1,82 @@ +--- glamor/glamor.h.orig 2026-04-25 18:41:16.101162000 -0700 ++++ glamor/glamor.h 2026-04-25 18:41:22.504221000 -0700 +@@ -152,6 +152,23 @@ + * */ + extern _X_EXPORT Bool glamor_supports_pixmap_import_export(ScreenPtr screen); + ++/* @glamor_fds_from_pixmap: Get a dma-buf fd from a pixmap. ++ * ++ * @screen: Current screen pointer. ++ * @pixmap: The pixmap from which we want the fd. ++ * @fds, @strides, @offsets: Pointers to fill info of each plane. ++ * @modifier: Pointer to fill the modifier of the buffer. ++ * ++ * the pixmap and the buffer associated by the fds will share the same ++ * content. The caller is responsible to close the returned file descriptors. ++ * Returns the number of planes, -1 on error. ++ * */ ++extern _X_EXPORT int glamor_fds_from_pixmap(ScreenPtr screen, ++ PixmapPtr pixmap, ++ int *fds, ++ uint32_t *strides, uint32_t *offsets, ++ uint64_t *modifier); ++ + /* @glamor_fd_from_pixmap: Get a dma-buf fd from a pixmap. + * + * @screen: Current screen pointer. +@@ -217,6 +234,31 @@ + extern _X_EXPORT struct gbm_bo *glamor_gbm_bo_from_pixmap(ScreenPtr screen, + PixmapPtr pixmap); + ++/* @glamor_pixmap_from_fds: Creates a pixmap to wrap a dma-buf fds. ++ * ++ * @screen: Current screen pointer. ++ * @num_fds: Number of fds to import ++ * @fds: The dma-buf fds to import. ++ * @width: The width of the buffers. ++ * @height: The height of the buffers. ++ * @stride: The stride of the buffers. ++ * @depth: The depth of the buffers. ++ * @bpp: The bpp of the buffers. ++ * @modifier: The modifier of the buffers. ++ * ++ * Returns a valid pixmap if the import succeeded, else NULL. ++ * */ ++extern _X_EXPORT PixmapPtr glamor_pixmap_from_fds(ScreenPtr screen, ++ CARD8 num_fds, ++ const int *fds, ++ CARD16 width, ++ CARD16 height, ++ const CARD32 *strides, ++ const CARD32 *offsets, ++ CARD8 depth, ++ CARD8 bpp, ++ uint64_t modifier); ++ + /* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd. + * + * @screen: Current screen pointer. +@@ -257,9 +299,22 @@ + CARD8 depth, + CARD8 bpp); + ++extern _X_EXPORT Bool glamor_get_formats(ScreenPtr screen, ++ CARD32 *num_formats, ++ CARD32 **formats); ++ ++extern _X_EXPORT Bool glamor_get_modifiers(ScreenPtr screen, ++ uint32_t format, ++ uint32_t *num_modifiers, ++ uint64_t **modifiers); ++ ++extern _X_EXPORT Bool glamor_get_drawable_modifiers(DrawablePtr draw, ++ uint32_t format, ++ uint32_t *num_modifiers, ++ uint64_t **modifiers); ++ + extern _X_EXPORT void glamor_set_drawable_modifiers_func(ScreenPtr screen, + GetDrawableModifiersFuncPtr func); +- + #ifdef GLAMOR_FOR_XORG + + #define GLAMOR_EGL_MODULE_NAME "glamoregl"home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69efc4d7.3406a.20347ca4>
