| 122 | |
| 123 | Commenting out the problematic line leads to |
| 124 | {{{ |
| 125 | CC build/SDL_cocoaopengl.lo |
| 126 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:157:61: error: use of undeclared identifier 'NSAppKitVersionNumber10_6'; did you mean 'NSAppKitVersionNumber'? |
| 127 | SDL_bool lion_or_later = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6; |
| 128 | ^~~~~~~~~~~~~~~~~~~~~~~~~ |
| 129 | NSAppKitVersionNumber |
| 130 | /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:21:28: note: 'NSAppKitVersionNumber' declared here |
| 131 | APPKIT_EXTERN const double NSAppKitVersionNumber; |
| 132 | ^ |
| 133 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:180:48: error: use of undeclared identifier 'NSOpenGLProfileVersionLegacy' |
| 134 | NSOpenGLPixelFormatAttribute profile = NSOpenGLProfileVersionLegacy; |
| 135 | ^ |
| 136 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:182:23: error: use of undeclared identifier 'NSOpenGLProfileVersion3_2Core' |
| 137 | profile = NSOpenGLProfileVersion3_2Core; |
| 138 | ^ |
| 139 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:184:21: error: use of undeclared identifier 'NSOpenGLPFAOpenGLProfile' |
| 140 | attr[i++] = NSOpenGLPFAOpenGLProfile; |
| 141 | ^ |
| 142 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:333:33: warning: instance method '-convertRectToBacking:' not found (return type defaults to 'id') [-Wobjc-method-access] |
| 143 | viewport = [contentView convertRectToBacking:viewport]; |
| 144 | ^~~~~~~~~~~~~~~~~~~~ |
| 145 | /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:122:12: note: receiver is instance of class declared here |
| 146 | @interface NSView : NSResponder |
| 147 | ^ |
| 148 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:333:18: error: assigning to 'NSRect' (aka 'struct CGRect') from incompatible type 'id' |
| 149 | viewport = [contentView convertRectToBacking:viewport]; |
| 150 | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 151 | 1 warning and 5 errors generated. |
| 152 | make: *** [build/SDL_cocoaopengl.lo] Error 1 |
| 153 | }}} |
| 154 | thrown by |
| 155 | {{{ |
| 156 | #!objc |
| 157 | /* This gives us the correct viewport for a Retina-enabled view, only |
| 158 | * supported on 10.7+. */ |
| 159 | if ([contentView respondsToSelector:@selector(convertRectToBacking:)]) { |
| 160 | viewport = [contentView convertRectToBacking:viewport]; |
| 161 | } |
| 162 | }}} |
| 163 | Commenting out the assignment leads to |
| 164 | {{{ |
| 165 | CC build/SDL_cocoaopengl.lo |
| 166 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:157:61: error: use of undeclared identifier 'NSAppKitVersionNumber10_6'; did you mean 'NSAppKitVersionNumber'? |
| 167 | SDL_bool lion_or_later = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6; |
| 168 | ^~~~~~~~~~~~~~~~~~~~~~~~~ |
| 169 | NSAppKitVersionNumber |
| 170 | /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:21:28: note: 'NSAppKitVersionNumber' declared here |
| 171 | APPKIT_EXTERN const double NSAppKitVersionNumber; |
| 172 | ^ |
| 173 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:180:48: error: use of undeclared identifier 'NSOpenGLProfileVersionLegacy' |
| 174 | NSOpenGLPixelFormatAttribute profile = NSOpenGLProfileVersionLegacy; |
| 175 | ^ |
| 176 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:182:23: error: use of undeclared identifier 'NSOpenGLProfileVersion3_2Core' |
| 177 | profile = NSOpenGLProfileVersion3_2Core; |
| 178 | ^ |
| 179 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoaopengl.m:184:21: error: use of undeclared identifier 'NSOpenGLPFAOpenGLProfile' |
| 180 | attr[i++] = NSOpenGLPFAOpenGLProfile; |
| 181 | ^ |
| 182 | 4 errors generated. |
| 183 | make: *** [build/SDL_cocoaopengl.lo] Error 1 |
| 184 | }}} |
| 185 | thrown by |
| 186 | {{{ |
| 187 | SDL_bool lion_or_later = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6; |
| 188 | ... |
| 189 | /* specify a profile if we're on Lion (10.7) or later. */ |
| 190 | if (lion_or_later) { |
| 191 | NSOpenGLPixelFormatAttribute profile = NSOpenGLProfileVersionLegacy; |
| 192 | if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_CORE) { |
| 193 | profile = NSOpenGLProfileVersion3_2Core; |
| 194 | } |
| 195 | attr[i++] = NSOpenGLPFAOpenGLProfile; |
| 196 | attr[i++] = profile; |
| 197 | } |
| 198 | }}} |
| 199 | which can temporary be replaced by |
| 200 | {{{ |
| 201 | SDL_bool lion_or_later = false; |
| 202 | }}} |
| 203 | and commenting out the block that asks for Lion. |
| 204 | |
| 205 | Then the same story repeats with |
| 206 | {{{ |
| 207 | CC build/SDL_cocoavideo.lo |
| 208 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoavideo.m:153:59: error: use of undeclared identifier 'NSAppKitVersionNumber10_6'; did you mean 'NSAppKitVersionNumber'? |
| 209 | data->allow_spaces = ((floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) && SDL_GetHintBoolean(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES, SDL_TRUE)); |
| 210 | ^~~~~~~~~~~~~~~~~~~~~~~~~ |
| 211 | NSAppKitVersionNumber |
| 212 | /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:21:28: note: 'NSAppKitVersionNumber' declared here |
| 213 | APPKIT_EXTERN const double NSAppKitVersionNumber; |
| 214 | ^ |
| 215 | /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.5/src/video/cocoa/SDL_cocoavideo.m:156:65: error: use of undeclared identifier 'NSAppKitVersionNumber10_6'; did you mean 'NSAppKitVersionNumber'? |
| 216 | data->screensaver_use_iopm = floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6; |
| 217 | ^~~~~~~~~~~~~~~~~~~~~~~~~ |
| 218 | NSAppKitVersionNumber |
| 219 | /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:21:28: note: 'NSAppKitVersionNumber' declared here |
| 220 | APPKIT_EXTERN const double NSAppKitVersionNumber; |
| 221 | ^ |
| 222 | 2 errors generated. |
| 223 | make: *** [build/SDL_cocoavideo.lo] Error 1 |
| 224 | }}} |