--- Portfile.orig	2020-12-31 18:22:38.000000000 -0500
+++ Portfile	2020-12-31 18:32:42.000000000 -0500
@@ -47,6 +47,10 @@
 }
 
 variant x11 {
+    post-extract {
+        reinplace -W "${worksrcpath}/src/video/x11" "s|/opt/X11|${prefix}|g" SDL_x11opengl.c
+    }
+
     configure.args-delete --without-x
     configure.args-append --x-includes=${prefix}/include \
                           --x-libraries=${prefix}/lib \
@@ -60,7 +64,8 @@
         port:xorg-libXrandr \
         port:xorg-libXScrnSaver \
         port:xorg-libXxf86vm \
-        port:xrender
+        port:xrender \
+        port:mesa
 }
 if {${os.subplatform} ne "macosx"} {
     default_variants +x11
