| 123 | if {[variant_isset no_x11]} { |
| 124 | default_variants +quartz |
| 125 | } |
| 126 | |
| 127 | if {![variant_isset quartz]} { |
| 128 | default_variants +x11 |
| 129 | } |
| 130 | |
| 131 | pre-fetch { |
| 132 | if {![variant_isset quartz] && ![variant_isset x11]} { |
| 133 | error "Either +x11 or +quartz is required" |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | pre-configure { |
| 138 | if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} { |
| 139 | set gtk_quartz [exec grep -c GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h] |
| 140 | if {[variant_isset quartz] && ${gtk_quartz} == 0} { |
| 141 | error "+quartz variant selected, but gtk2+x11 is installed" |
| 142 | } elseif {[variant_isset x11] && ${gtk_quartz} == 1} { |
| 143 | error "+x11 variant selected, but gtk2+quartz is installed" |
| 144 | } |
| 145 | } else { |
| 146 | error "Cannot find gdkconfig.h" |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} { |
| 151 | configure.env-append LDFLAGS="-framework Carbon" |
| 152 | } |
| 153 | |
| 154 | variant x11 conflicts quartz description {Enable rendering in X11 (default)} { |
| 155 | } |
| 156 | |
| 157 | variant no_x11 description {Same as +quartz} { |
| 158 | } |
| 159 | |