Index: Portfile
===================================================================
--- Portfile	(revision 121304)
+++ Portfile	(working copy)
@@ -444,10 +444,6 @@
 variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
     # Enable cocoa support in configure
     configure.args-append   -Dcocoa=ON -Dx11=OFF
-    # Some changes are needed to make OpenGL and X11 work properly together
-    # If these get fixed, make +opengl default also for X11
-    # https://sft.its.cern.ch/jira/browse/ROOT-6393
-    default_variants-append +opengl
 }
 
 variant x11 conflicts cocoa description {Enables X11 graphical backend} {
@@ -478,6 +474,13 @@
     default_variants-append ${default_gui_variant}
 }
 
+if { [variant_isset cocoa] } {
+    # Some changes are needed to make OpenGL and X11 work properly together
+    # If these get fixed, make +opengl default also for X11
+    # https://sft.its.cern.ch/jira/browse/ROOT-6393
+    default_variants-append +opengl
+}
+
 # ========================================================================================
 # Setup various clang variants, to provide alternative C++ compilers that support cocoa
 # ========================================================================================
