pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib18 MesaLib18: Add Wayland support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/392e5604a6b4
branches:  trunk
changeset: 400048:392e5604a6b4
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Aug 21 12:21:28 2019 +0000

description:
MesaLib18: Add Wayland support.

Note: It doesn't seem to be possible to build Mesa without X11 support yet.

While here,

- Fix building with non-modular X.
- Appease pkglint and my eyes.

diffstat:

 graphics/MesaLib18/Makefile      |   15 ++-
 graphics/MesaLib18/PLIST         |   24 ++---
 graphics/MesaLib18/buildlink3.mk |    7 +-
 graphics/MesaLib18/builtin.mk    |    4 +-
 graphics/MesaLib18/dri.mk        |   38 ++++-----
 graphics/MesaLib18/options.mk    |  149 ++++++++++++++++++++------------------
 6 files changed, 121 insertions(+), 116 deletions(-)

diffs (truncated from 523 to 300 lines):

diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/Makefile
--- a/graphics/MesaLib18/Makefile       Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/Makefile       Wed Aug 21 12:21:28 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2019/04/25 07:32:56 maya Exp $
+# $NetBSD: Makefile,v 1.21 2019/08/21 12:21:28 nia Exp $
 
 DISTNAME=      mesa-18.3.4
 PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
@@ -52,11 +52,11 @@
 SUBST_SED.wrapper-bug+=                -e 's,libglapi_tmp_rename_la,libglapi_la,g'
 
 # Replace /etc/drirc.d with ${PREFIX}/etc/drirc.d
-SUBST_CLASSES+=                        drirc
-SUBST_STAGE.drirc=             pre-configure
-SUBST_MESSAGE.drirc=           Fixing hardcoded /etc/drirc.d references
-SUBST_FILES.drirc+=            src/util/xmlconfig.c
-SUBST_SED.drirc+=               -e 's|/etc|${PREFIX}/etc|g'
+SUBST_CLASSES+=                drirc
+SUBST_STAGE.drirc=     pre-configure
+SUBST_MESSAGE.drirc=   Fixing hardcoded /etc/drirc.d references
+SUBST_FILES.drirc+=    src/util/xmlconfig.c
+SUBST_SED.drirc+=      -e 's|/etc|${PREFIX}/etc|g'
 
 CFLAGS.SunOS+=         -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
 CXXFLAGS.SunOS+=       -Drestrict=__restrict__
@@ -102,9 +102,10 @@
        ${INSTALL_DATA} ${WRKSRC}/src/util/00-mesa-defaults.conf ${DESTDIR}${EGDIR}
 
 .include "../../devel/zlib/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
 .include "../../x11/libXrandr/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"
 .include "../../x11/libxcb/buildlink3.mk"
-.include "../../textproc/expat/buildlink3.mk"
+.include "../../x11/libxshmfence/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/PLIST
--- a/graphics/MesaLib18/PLIST  Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/PLIST  Wed Aug 21 12:21:28 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2019/01/19 21:54:03 tnn Exp $
+@comment $NetBSD: PLIST,v 1.6 2019/08/21 12:21:28 nia Exp $
 ${PLIST.egl}include/EGL/egl.h
 ${PLIST.egl}include/EGL/eglext.h
 ${PLIST.egl}include/EGL/eglextchromium.h
@@ -11,8 +11,8 @@
 include/GL/glx.h
 include/GL/glx_mangle.h
 include/GL/glxext.h
+${PLIST.dri}include/GL/internal/dri_interface.h
 ${PLIST.osmesa}include/GL/osmesa.h
-${PLIST.dri}include/GL/internal/dri_interface.h
 ${PLIST.glesv1}include/GLES/egl.h
 ${PLIST.glesv1}include/GLES/gl.h
 ${PLIST.glesv1}include/GLES/glext.h
@@ -40,12 +40,18 @@
 ${PLIST.swrast}lib/dri/kms_swrast_dri.so
 ${PLIST.freedreno}lib/dri/msm_dri.so
 ${PLIST.nouveau}lib/dri/nouveau_dri.so
+@comment ${PLIST.vdpau}lib/dri/nouveau_drv_video.la
+${PLIST.nouveau}${PLIST.vaapi}lib/dri/nouveau_drv_video.so
 ${PLIST.nouveau_dri}lib/dri/nouveau_vieux_dri.so
+@comment ${PLIST.vdpau}lib/dri/radeonsi_drv_video.la
 ${PLIST.r200}lib/dri/r200_dri.so
 ${PLIST.r300}lib/dri/r300_dri.so
 ${PLIST.r600}lib/dri/r600_dri.so
+@comment ${PLIST.vdpau}lib/dri/r600_drv_video.la
+${PLIST.vaapi}lib/dri/r600_drv_video.so
 ${PLIST.radeon_dri}lib/dri/radeon_dri.so
 ${PLIST.radeonsi}lib/dri/radeonsi_dri.so
+${PLIST.vaapi}lib/dri/radeonsi_drv_video.so
 ${PLIST.swrast_dri}lib/dri/swrast_dri.so
 ${PLIST.vc4}lib/dri/vc4_dri.so
 ${PLIST.svga}lib/dri/vmwgfx_dri.so
@@ -64,16 +70,16 @@
 ${PLIST.xvmc}${PLIST.r600}lib/libXvMCr600.so.1.0.0
 ${PLIST.gbm}lib/libgbm.la
 lib/libglapi.la
-${PLIST.wayland}lib/libwayland-egl.la
+${PLIST.vulkan}lib/libvulkan_intel.la
+${PLIST.vulkan}lib/libvulkan_radeon.la
 ${PLIST.xatracker}lib/libxatracker.la
 ${PLIST.dri}lib/pkgconfig/dri.pc
 ${PLIST.egl}lib/pkgconfig/egl.pc
 ${PLIST.gbm}lib/pkgconfig/gbm.pc
-${PLIST.osmesa}lib/pkgconfig/osmesa.pc
 lib/pkgconfig/gl.pc
 ${PLIST.glesv1}lib/pkgconfig/glesv1_cm.pc
 ${PLIST.glesv2}lib/pkgconfig/glesv2.pc
-${PLIST.wayland}lib/pkgconfig/wayland-egl.pc
+${PLIST.osmesa}lib/pkgconfig/osmesa.pc
 ${PLIST.xatracker}lib/pkgconfig/xatracker.pc
 ${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so
 ${PLIST.nouveau}${PLIST.vdpau}lib/vdpau/libvdpau_nouveau.so.1
@@ -91,14 +97,6 @@
 ${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1
 ${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0
 ${PLIST.vdpau}lib/vdpau/libvdpau_radeonsi.so.1.0.0
-@comment ${PLIST.vdpau}lib/dri/nouveau_drv_video.la
-${PLIST.nouveau}${PLIST.vaapi}lib/dri/nouveau_drv_video.so
-@comment ${PLIST.vdpau}lib/dri/r600_drv_video.la
-${PLIST.vaapi}lib/dri/r600_drv_video.so
-@comment ${PLIST.vdpau}lib/dri/radeonsi_drv_video.la
-${PLIST.vaapi}lib/dri/radeonsi_drv_video.so
-${PLIST.vulkan}lib/libvulkan_intel.la
-${PLIST.vulkan}lib/libvulkan_radeon.la
 ${PLIST.vulkan}share/vulkan/icd.d/intel_icd.${MACHINE_ARCH}.json
 ${PLIST.vulkan}share/vulkan/icd.d/radeon_icd.${MACHINE_ARCH}.json
 share/examples/mesa/00-mesa-defaults.conf
diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/buildlink3.mk
--- a/graphics/MesaLib18/buildlink3.mk  Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/buildlink3.mk  Wed Aug 21 12:21:28 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.2 2018/10/10 11:03:02 maya Exp $
+# $NetBSD: buildlink3.mk,v 1.3 2019/08/21 12:21:28 nia Exp $
 
 BUILDLINK_TREE+=       MesaLib
 
@@ -13,8 +13,8 @@
 
 .if ${X11_TYPE} == "modular"
 BUILDLINK_ABI_DEPENDS.MesaLib+=        MesaLib>=10.5.3
+.  if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mc++)
 # This is needed to avoid linking conflicting libstdc++ versions
-.  if defined(USE_LANGUAGES) && !empty(USE_LANGUAGES:Mc++)
 GCC_REQD+=                     4.2
 .  endif
 .endif
@@ -42,9 +42,8 @@
 MESALIB_SUPPORTS_EGL=  no
 .endif
 
+.include "../../x11/libXext/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
-
-.include "../../x11/libXext/buildlink3.mk"
 .endif # MESALIB_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -MesaLib
diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/builtin.mk
--- a/graphics/MesaLib18/builtin.mk     Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/builtin.mk     Wed Aug 21 12:21:28 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.1 2018/10/07 23:49:31 ryoon Exp $
+# $NetBSD: builtin.mk,v 1.2 2019/08/21 12:21:28 nia Exp $
 
 BUILTIN_PKG:=  MesaLib
 
@@ -22,6 +22,7 @@
 IS_BUILTIN.MesaLib=    no
 .  endif
 .endif
+
 MAKEVARS+=     IS_BUILTIN.MesaLib
 
 ###
@@ -67,6 +68,7 @@
 .    endif
 .  endif  # PREFER.MesaLib
 .endif
+
 MAKEVARS+=     USE_BUILTIN.MesaLib
 
 ###
diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/dri.mk
--- a/graphics/MesaLib18/dri.mk Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/dri.mk Wed Aug 21 12:21:28 2019 +0000
@@ -1,33 +1,31 @@
-# $NetBSD: dri.mk,v 1.2 2019/04/11 16:27:03 maya Exp $
+# $NetBSD: dri.mk,v 1.3 2019/08/21 12:21:28 nia Exp $
 #
 # Currently, this is for convenience only.
 #
 .if !defined(DRI_MK)
 DRI_MK=                # defined
 
-.  if !defined(USE_BUILTIN.MesaLib)
+.if !defined(USE_BUILTIN.MesaLib)
 CHECK_BUILTIN.MesaLib:=        yes
-.    include "../../graphics/MesaLib/builtin.mk"
+.  include "../../graphics/MesaLib/builtin.mk"
 CHECK_BUILTIN.MesaLib:=        no
-.  endif
+.endif
 
-.  if !empty(USE_BUILTIN.MesaLib:M[Nn][Oo])
-.    if ${OPSYS} != "Darwin"
+.if !empty(USE_BUILTIN.MesaLib:M[Nn][Oo])
+.  if ${OPSYS} != "Darwin"
 BUILDLINK_API_DEPENDS.libdrm+=         libdrm>=2.4.60
-.    endif
-.    if ${OPSYS} == "Linux"
+.  endif
+.  if ${OPSYS} == "Linux"
 BUILDLINK_API_DEPENDS.libxcb+= libxcb>=1.9.3
-.    endif
-.  endif
-.  include "../../x11/xorgproto/buildlink3.mk"
-# XXX these do not have builtin.mk
-.  if ${X11_TYPE} == "modular"
-.    include "../../x11/libxshmfence/buildlink3.mk"
-.  endif
-.  include "../../x11/libXdamage/buildlink3.mk"
-.  include "../../x11/libXfixes/buildlink3.mk"
-.  include "../../x11/libXxf86vm/buildlink3.mk"
-.  if ${OPSYS} != "Darwin"
-.    include "../../x11/libdrm/buildlink3.mk"
 .  endif
 .endif
+.include "../../x11/xorgproto/buildlink3.mk"
+# XXX these do not have builtin.mk
+.include "../../x11/libxshmfence/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.if ${OPSYS} != "Darwin"
+.  include "../../x11/libdrm/buildlink3.mk"
+.endif
+.endif
diff -r 7d69e81cfcf7 -r 392e5604a6b4 graphics/MesaLib18/options.mk
--- a/graphics/MesaLib18/options.mk     Wed Aug 21 11:51:46 2019 +0000
+++ b/graphics/MesaLib18/options.mk     Wed Aug 21 12:21:28 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.12 2019/04/11 16:27:03 maya Exp $
+# $NetBSD: options.mk,v 1.13 2019/08/21 12:21:28 nia Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.MesaLib
-PKG_SUPPORTED_OPTIONS=         llvm dri
+PKG_SUPPORTED_OPTIONS=         llvm dri wayland
 PKG_SUGGESTED_OPTIONS=
 
 PKG_SUPPORTED_OPTIONS+=                glx-tls xvmc debug
@@ -58,62 +58,74 @@
 PLIST_VARS+=   osmesa xvmc
 PLIST_VARS+=   glesv1 glesv2
 
+EGL_PLATFORMS+=                x11
+
+.if ${OPSYS} != "Darwin"
+EGL_PLATFORMS+=                drm
+.endif
+
+.if !empty(PKG_OPTIONS:Mwayland)
+EGL_PLATFORMS+=                wayland
+PLIST.wayland=         yes
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.endif
+
 .if !empty(PKG_OPTIONS:Mdri)
-
 CONFIGURE_ARGS+=       --enable-dri
 # Having DRI3 and egl compiled in by default doesn't hurt, the X server
 # will only use it if it is supported at run time.
 CONFIGURE_ARGS+=       --enable-dri3
-.if ${OPSYS} != "Darwin"
+.  if ${OPSYS} != "Darwin"
 CONFIGURE_ARGS+=       --enable-egl
 CONFIGURE_ARGS+=       --enable-gbm
 PLIST.egl=             yes
 PLIST.gbm=             yes
-.else
+.  else
 CONFIGURE_ARGS+=       --disable-egl
 CONFIGURE_ARGS+=       --disable-gbm
-.endif
+.  endif
 
-.if !empty(PKG_OPTIONS:Mosmesa)
+.  if !empty(PKG_OPTIONS:Mosmesa)
 CONFIGURE_ARGS+=       --enable-osmesa
 PLIST.osmesa=          yes
-.endif
+.  endif
 
-.if !empty(PKG_OPTIONS:Mglesv1)
+.  if !empty(PKG_OPTIONS:Mglesv1)
 CONFIGURE_ARGS+=       --enable-gles1
 PLIST.glesv1=          yes
-.else
+.  else
 CONFIGURE_ARGS+=       --disable-gles1
-.endif
+.  endif
 
-.if !empty(PKG_OPTIONS:Mglesv2)
+.  if !empty(PKG_OPTIONS:Mglesv2)
 CONFIGURE_ARGS+=       --enable-gles2
 PLIST.glesv2=          yes
-.else
+.  else
 CONFIGURE_ARGS+=       --disable-gles2
-.endif
+.  endif
 
-.if !empty(PKG_OPTIONS:Mglx-tls)
+.  if !empty(PKG_OPTIONS:Mglx-tls)
 # Recommended by



Home | Main Index | Thread Index | Old Index