Module Name:    src
Committed By:   mrg
Date:           Tue Apr 16 21:21:51 UTC 2019

Added Files:
        src/external/mit/xorg/lib/libEGL: Makefile
        src/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl:
            Makefile

Log Message:
enable EGL and glamor.  partly from maya@.

for x86 and evbarm:
- install headers and libEGL
- install xorg-server glamoregl component
- link xorg drivers against gbm/egl

bonus fix:
- fix some wrongly marked compatx11file files

build tested on shark, sgimips, evbarm64-el, amd64 and i386.
run tested on radeon, intel and nvidia on amd64, including
'modesetting' driver on amd64.  however, my systems disable
it due to llvmpipe so i'm not sure what is happening.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/lib/libEGL/Makefile
cvs rdiff -u -r0 -r1.1 \
    src/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile

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

Added files:

Index: src/external/mit/xorg/lib/libEGL/Makefile
diff -u /dev/null src/external/mit/xorg/lib/libEGL/Makefile:1.1
--- /dev/null	Tue Apr 16 21:21:51 2019
+++ src/external/mit/xorg/lib/libEGL/Makefile	Tue Apr 16 21:21:51 2019
@@ -0,0 +1,120 @@
+#	$NetBSD: Makefile,v 1.1 2019/04/16 21:21:51 mrg Exp $
+
+.include <bsd.own.mk>
+
+LIB=		EGL
+LIBISCXX=	yes
+
+SHLIB_MAJOR=	0
+SHLIB_MINOR=	0
+
+#SUBDIR=		internal
+
+# egl
+.PATH:		${X11SRCDIR.Mesa}/src/egl/main
+SRCS.egl= \
+	eglapi.c \
+	eglarray.c \
+	eglconfig.c \
+	eglcontext.c \
+	eglcurrent.c \
+	egldevice.c \
+	egldisplay.c \
+	egldriver.c \
+	eglfallbacks.c \
+	eglglobals.c \
+	eglimage.c \
+	egllog.c \
+	eglsurface.c \
+	eglsync.c
+
+.PATH:		${X11SRCDIR.Mesa}/src/egl/drivers/dri2
+SRCS.drivers/dri2= \
+	egl_dri2.c \
+	platform_x11.c \
+	platform_drm.c
+
+# XXX notyet
+#SRCS.drivers/dri2+= \
+#	platform_x11_dri3.c
+
+BUILDSYMLINKS+= ${X11SRCDIR.Mesa}/src/util/debug.c UTILdebug.c
+SRCS.util=      \
+	UTILdebug.c
+CPPFLAGS.UTILdebug.c+=          -I${X11SRCDIR.Mesa}/src/util \
+				-I${X11SRCDIR.Mesa}/src/mesa \
+				-I${X11SRCDIR.Mesa}/src \
+				-I${X11SRCDIR.Mesa}/src/gallium/include
+
+.PATH:		${X11SRCDIR.Mesa}/include/EGL
+INCS=	\
+	egl.h \
+	eglext.h \
+	eglextchromium.h \
+	eglmesaext.h \
+	eglplatform.h
+INCSDIR=${X11INCDIR}/EGL
+
+SRCS+=	${SRCS.egl} ${SRCS.drivers/dri2} ${SRCS.util}
+
+CPPFLAGS+= \
+	-I${X11SRCDIR.Mesa}/include \
+	-I${X11SRCDIR.Mesa}/include/drm-uapi \
+	-I${X11SRCDIR.Mesa}/src/gbm/main \
+	-I${X11SRCDIR.Mesa}/src/egl/main \
+	-I${X11SRCDIR.Mesa}/src/gbm/backends/dri \
+	-I${X11SRCDIR.Mesa}/src/loader \
+	-I${X11SRCDIR.Mesa}/src \
+	-I${DESTDIR}${X11INCDIR}/libdrm
+
+EGL_DRIVER_INSTALL_DIR=${X11ROOTDIR}/lib
+CPPFLAGS+= \
+	-DDEFAULT_DRIVER_DIR=\"${X11USRLIBDIR}/modules/dri\" \
+	-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 \
+	-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
+	-D_EGL_OS_UNIX=1
+
+CPPFLAGS+=	${X11FLAGS.THREADLIB} \
+		-DHAVE_X11_PLATFORM \
+		-DHAVE_DRM_PLATFORM \
+		-DHAVE_TIMESPEC_GET \
+		-DHAVE_PTHREAD \
+		-DHAVE_LIBDRM \
+		-DHAVE_MINCORE
+
+.include "../libloader.mk"
+
+CFLAGS+=	-fvisibility=hidden -fno-strict-aliasing -fno-builtin-memcmp
+CFLAGS+=	-pthread
+
+# XXX missing: xcb-present
+LIBDPLIBS=	Xext		${.CURDIR}/../libXext \
+		X11		${.CURDIR}/../libX11/dynamic \
+		Xfixes		${.CURDIR}/../libXfixes \
+		Xdamage		${.CURDIR}/../libXdamage \
+		Xdmcp		${.CURDIR}/../libXdmcp \
+		glapi		${.CURDIR}/../libglapi \
+		drm		${.CURDIR}/../libdrm \
+		gbm		${.CURDIR}/../libgbm \
+		xshmfence	${.CURDIR}/../libxshmfence \
+		X11-xcb		${.CURDIR}/../libX11/libX11-xcb \
+		xcb-dri2	${.CURDIR}/../libxcb/dri2 \
+		xcb-glx		${.CURDIR}/../libxcb/glx \
+		xcb-xfixes	${.CURDIR}/../libxcb/xfixes \
+		xcb-sync	${.CURDIR}/../libxcb/sync \
+		xcb		${.CURDIR}/../libxcb/libxcb \
+		expat		${NETBSDSRCDIR}/external/mit/expat/lib/libexpat \
+		m		${NETBSDSRCDIR}/lib/libm
+
+MKLINT=no
+
+PKGCONFIG=	egl
+PKGDIST.egl=	${X11SRCDIR.Mesa}/src/egl/main
+.include "${.CURDIR}/../libGL/mesa-ver.mk"
+PKGCONFIG_VERSION.egl=	${MESA_VER}
+
+CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format -Wno-constant-conversion
+
+.include <bsd.x11.mk>
+.include <bsd.lib.mk>
+.include <bsd.subdir.mk>

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile
diff -u /dev/null src/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile:1.1
--- /dev/null	Tue Apr 16 21:21:51 2019
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/glamor_egl/Makefile	Tue Apr 16 21:21:51 2019
@@ -0,0 +1,38 @@
+#	$NetBSD: Makefile,v 1.1 2019/04/16 21:21:51 mrg Exp $
+
+XMODULEDIR=	${X11USRLIBDIR}/modules
+
+.include "../../../Makefile.serverlib"
+.include "../../../Makefile.servermod"
+
+LIB=	glamoregl
+
+.PATH:	${X11SRCDIR.xorg-server}/glamor
+.PATH:	${X11SRCDIR.xorg-server}/hw/xfree86/glamor_egl
+SRCS=	glamor_egl.c \
+	glamor_eglmodule.c \
+	glamor_xf86_xv.c
+
+CPPFLAGS+=	\
+	-I${X11SRCDIR.xorg-server}/hw/xfree86/common \
+	-I${X11SRCDIR.xorg-server}/Xext \
+	-I${X11SRCDIR.xorg-server}/mi \
+	-I${X11SRCDIR.xorg-server}/include \
+	-I${X11SRCDIR.xorg-server}/glamor \
+	-I${X11SRCDIR.xorg-server}/../include \
+	-I${DESTDIR}${X11INCDIR}/X11 \
+	-I${DESTDIR}${X11INCDIR}/pixman-1 \
+	-I${DESTDIR}${X11INCDIR}/xorg \
+	-I${DESTDIR}${X11INCDIR}/libdrm \
+	-I${X11SRCDIR.xorg-server}/hw/xfree86/ddc \
+	-I${X11SRCDIR.xorg-server}/hw/xfree86/i2c
+
+CPPFLAGS+=	\
+	-DGLAMOR_HAS_GBM
+
+LIBDPLIBS=	\
+	gbm	${.CURDIR}/../../../../../lib/libgbm
+
+.include <bsd.x11.mk>
+LIBDIR=	${XMODULEDIR}
+.include <bsd.lib.mk>

Reply via email to