tech-pkg archive

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

Re: [PATCH] graphics/MesaLib: add osmesa option



Here is an updated patch for the non-optional osmesa addition.

Am Mon, 9 Oct 2017 13:12:50 +0200
schrieb Thomas Klausner <tk%giga.or.at@localhost>:

> > 1. general fixup (like glproto)  
> 
> Yes, please. But with explanations. For example, it builds for me with
> modular xorg without adding the glproto manually.

I had to do some test builds to reconstruct this. Glproto is actually
needed once you add osmesa. The X11 state tracker misses glxproto.h
otherwise.

I also removed the --disable-gallium-llvm … it should not hurt, but I
did not see that it is necessary right now.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
Universität Hamburg
RRZ / Basis-Infrastruktur / HPC
Schlüterstr. 70
20146 Hamburg
Tel.: 040/42838 8826
Fax: 040/428 38 6270
Index: graphics/MesaLib/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/MesaLib/Makefile,v
retrieving revision 1.139
diff -u -r1.139 Makefile
--- graphics/MesaLib/Makefile	3 Sep 2017 08:53:09 -0000	1.139
+++ graphics/MesaLib/Makefile	11 Oct 2017 13:40:29 -0000
@@ -2,7 +2,7 @@
 
 DISTNAME=	mesa-11.2.2
 PKGNAME=	${DISTNAME:S/mesa/MesaLib/}
-PKGREVISION=	6
+PKGREVISION=	7
 CATEGORIES=	graphics x11
 MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=	.tar.xz
@@ -46,6 +46,8 @@
 SUBST_FILES.wrapper-bug+=	src/glx/Makefile.in
 SUBST_FILES.wrapper-bug+=	src/mapi/Makefile.in
 SUBST_FILES.wrapper-bug+=	src/mesa/drivers/x11/Makefile.in
+SUBST_FILES.wrapper-bug+=       src/mesa/drivers/osmesa/Makefile.in
+SUBST_FILES.wrapper-bug+=       src/gallium/targets/libgl-xlib/Makefile.in
 SUBST_SED.wrapper-bug=		-e 's,shared-glapi/libglapi.la,shared-glapi/libglapi_tmp_rename.la,g'
 SUBST_SED.wrapper-bug+=		-e 's,libglapi.la,libglapi_impl.la,g'
 SUBST_SED.wrapper-bug+=		-e 's,libglapi_tmp_rename.la,libglapi.la,g'
@@ -109,6 +111,7 @@
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/src/mesa/drivers/dri/common/drirc ${DESTDIR}${PREFIX}/share/examples/MesaLib
 
+.include "../../x11/glproto/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"
 .include "../../x11/libxcb/buildlink3.mk"
Index: graphics/MesaLib/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/MesaLib/PLIST,v
retrieving revision 1.35
diff -u -r1.35 PLIST
--- graphics/MesaLib/PLIST	24 Feb 2017 13:48:33 -0000	1.35
+++ graphics/MesaLib/PLIST	11 Oct 2017 13:40:29 -0000
@@ -48,6 +48,10 @@
 ${PLIST.svga}lib/dri/vmwgfx_dri.so
 ${PLIST.dri}lib/libEGL.la
 lib/libGL.la
+@ For some reason not included in the above when building osmesa.
+@ Bug in pkgsrc?
+lib/libGL.so.1.6.0
+lib/libOSMesa.la
 ${PLIST.dri}lib/libGLESv1_CM.la
 ${PLIST.dri}lib/libGLESv2.la
 ${PLIST.gbm}lib/libgbm.la
@@ -58,6 +62,7 @@
 ${PLIST.dri}lib/pkgconfig/egl.pc
 ${PLIST.gbm}lib/pkgconfig/gbm.pc
 lib/pkgconfig/gl.pc
+lib/pkgconfig/osmesa.pc
 ${PLIST.dri}lib/pkgconfig/glesv1_cm.pc
 ${PLIST.dri}lib/pkgconfig/glesv2.pc
 ${PLIST.wayland}lib/pkgconfig/wayland-egl.pc
Index: graphics/MesaLib/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/MesaLib/options.mk,v
retrieving revision 1.57
diff -u -r1.57 options.mk
--- graphics/MesaLib/options.mk	1 Jul 2017 12:48:10 -0000	1.57
+++ graphics/MesaLib/options.mk	11 Oct 2017 13:40:29 -0000
@@ -29,6 +29,16 @@
 # other features
 PLIST_VARS+=	gbm vaapi vdpau wayland xatracker
 
+GALLIUM_DRIVERS=	#
+.if ${OPSYS} != "Darwin"
+GALLIUM_DRIVERS+=	swrast
+.endif
+
+
+# OSMesa wants swrast,llvmpipe,softpipe; hoping for swrast at least.
+# I would like a non-DRI build with llvmpipe. Can I have that with pkgsrc?
+CONFIGURE_ARGS+=	--enable-osmesa
+
 .if !empty(PKG_OPTIONS:Mdri)
 
 CONFIGURE_ARGS+=	--enable-dri
@@ -67,15 +77,13 @@
 .include "../../graphics/MesaLib/dri.mk"
 
 DRI_DRIVERS=		#
-GALLIUM_DRIVERS=	#
 
 # Software rasterizer
+# It is all DRI?! The DRI-less gallium swrast (softpipe) does not have those
+# PLIST files.
+PLIST.swrast=		yes
 PLIST.swrast_dri=	yes
 DRI_DRIVERS+=		swrast
-.if ${OPSYS} != "Darwin"
-PLIST.swrast=		yes
-GALLIUM_DRIVERS+=	swrast
-.endif
 
 # x86 only drivers
 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && ${OPSYS} != "Darwin"
@@ -149,7 +157,6 @@
 CONFIGURE_ARGS+=	--with-egl-platforms=x11,drm
 .endif
 
-CONFIGURE_ARGS+=	--with-gallium-drivers=${GALLIUM_DRIVERS:ts,}
 CONFIGURE_ARGS+=	--with-dri-drivers=${DRI_DRIVERS:ts,}
 
 .if !empty(PKG_OPTIONS:Mllvm)
@@ -187,7 +194,6 @@
 CONFIGURE_ARGS+=	--disable-r600-llvm-compiler
 .endif # llvm
 .else # !dri
-CONFIGURE_ARGS+=	--with-gallium-drivers=
 CONFIGURE_ARGS+=	--with-dri-drivers=
 CONFIGURE_ARGS+=	--disable-dri
 CONFIGURE_ARGS+=	--disable-dri3
@@ -200,3 +206,5 @@
 PKG_FAIL_REASON+=	"The llvm PKG_OPTION must also be disabled when dri is disabled"
 .endif
 .endif
+
+CONFIGURE_ARGS+=	--with-gallium-drivers=${GALLIUM_DRIVERS:ts,}

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Home | Main Index | Thread Index | Old Index