[54397] users/toby
toby at macports.org
toby at macports.org
Sun Jul 26 11:46:43 PDT 2009
Revision: 54397
http://trac.macports.org/changeset/54397
Author: toby at macports.org
Date: 2009-07-26 11:46:41 -0700 (Sun, 26 Jul 2009)
Log Message:
-----------
almost-working libsdl-devel port (actually builds on SL)
Added Paths:
-----------
users/toby/ports/
users/toby/ports/PortIndex
users/toby/ports/PortIndex.quick
users/toby/ports/devel/
users/toby/ports/devel/libsdl-devel/
users/toby/ports/devel/libsdl-devel/Portfile
users/toby/ports/devel/libsdl-devel/files/
users/toby/ports/devel/libsdl-devel/files/patch-configure
users/toby/ports/devel/libsdl-devel/files/patch-src__audio__macosx__SDL_coreaudio.c
users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoakeyboard.m
users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoamodes.m
users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.h
users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.m
users/toby/ports/devel/libsdl-devel/work
Added: users/toby/ports/PortIndex
===================================================================
--- users/toby/ports/PortIndex (rev 0)
+++ users/toby/ports/PortIndex 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,2 @@
+libsdl-devel 233
+variants universal portdir devel/libsdl-devel description . homepage http://www.libsdl.org/ epoch 0 platforms darwin name libsdl-devel maintainers toby long_description ... categories {devel multimedia} version 1.3.0-4563 revision 0
Added: users/toby/ports/PortIndex.quick
===================================================================
--- users/toby/ports/PortIndex.quick (rev 0)
+++ users/toby/ports/PortIndex.quick 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1 @@
+libsdl-devel 0
Added: users/toby/ports/devel/libsdl-devel/Portfile
===================================================================
--- users/toby/ports/devel/libsdl-devel/Portfile (rev 0)
+++ users/toby/ports/devel/libsdl-devel/Portfile 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,32 @@
+# $Id$
+
+PortSystem 1.0
+
+name libsdl-devel
+version 1.3.0-4563
+categories devel multimedia
+
+description .
+long_description \
+ ...
+homepage http://www.libsdl.org/
+
+platforms darwin
+#license lgpl2.1+
+maintainers toby
+
+master_sites ${homepage}tmp/
+checksums md5 69c55acd8fbf053a4591b0c07f1a8447 \
+ sha1 e97c99584beb86b2695292187d90defd7b0aadc7 \
+ rmd160 a68177b0b9340a971bfb6034d152e4e4418e8787
+
+distname SDL-${version}
+
+patchfiles patch-configure \
+ patch-src__audio__macosx__SDL_coreaudio.c \
+ patch-src__video__cocoa__SDL_cocoakeyboard.m \
+ patch-src__video__cocoa__SDL_cocoamodes.m \
+ patch-src__video__cocoa__SDL_cocoawindow.h \
+ patch-src__video__cocoa__SDL_cocoawindow.m
+
+configure.args --without-x --disable-cdrom
Added: users/toby/ports/devel/libsdl-devel/files/patch-configure
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-configure (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-configure 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,14 @@
+--- configure.orig 2009-07-16 15:41:48.000000000 -0700
++++ configure 2009-07-16 15:41:52.000000000 -0700
+@@ -30636,11 +30636,6 @@
+ _ACEOF
+
+ SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
+- cat >>confdefs.h <<\_ACEOF
+-#define SDL_AUDIO_DRIVER_SNDMGR 1
+-_ACEOF
+-
+- SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
Added: users/toby/ports/devel/libsdl-devel/files/patch-src__audio__macosx__SDL_coreaudio.c
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-src__audio__macosx__SDL_coreaudio.c (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-src__audio__macosx__SDL_coreaudio.c 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,57 @@
+--- src/audio/macosx/SDL_coreaudio.c.orig 2009-06-10 07:03:19.000000000 -0700
++++ src/audio/macosx/SDL_coreaudio.c 2009-07-16 17:22:21.000000000 -0700
+@@ -23,9 +23,6 @@
+
+ #include <CoreAudio/CoreAudio.h>
+ #include <AudioUnit/AudioUnit.h>
+-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
+-#include <AudioUnit/AUNTComponent.h>
+-#endif
+
+ #include "SDL_audio.h"
+ #include "../SDL_audio_c.h"
+@@ -342,7 +339,7 @@
+ scope, bus, &callback,
+ sizeof(callback));
+
+- CloseComponent(this->hidden->audioUnit);
++ AudioComponentInstanceDispose(this->hidden->audioUnit);
+ this->hidden->audioUnitOpened = 0;
+ }
+ SDL_free(this->hidden->buffer);
+@@ -416,8 +413,8 @@
+ {
+ OSStatus result = noErr;
+ AURenderCallbackStruct callback;
+- ComponentDescription desc;
+- Component comp = NULL;
++ AudioComponentDescription desc;
++ AudioComponent comp = NULL;
+ UInt32 enableIO = 0;
+ const AudioUnitElement output_bus = 0;
+ const AudioUnitElement input_bus = 1;
+@@ -430,20 +427,20 @@
+ return 0;
+ }
+
+- SDL_memset(&desc, '\0', sizeof(ComponentDescription));
++ SDL_memset(&desc, '\0', sizeof(AudioComponentDescription));
+ desc.componentType = kAudioUnitType_Output;
+ desc.componentSubType = kAudioUnitSubType_HALOutput;
+ desc.componentManufacturer = kAudioUnitManufacturer_Apple;
+
+- comp = FindNextComponent(NULL, &desc);
++ comp = AudioComponentFindNext(NULL, &desc);
+ if (comp == NULL) {
+ SDL_SetError("Couldn't find requested CoreAudio component");
+ return 0;
+ }
+
+ /* Open & initialize the audio unit */
+- result = OpenAComponent(comp, &this->hidden->audioUnit);
+- CHECK_RESULT("OpenAComponent");
++ result = AudioComponentInstanceNew(comp, &this->hidden->audioUnit);
++ CHECK_RESULT("AudioComponentInstanceNew");
+
+ this->hidden->audioUnitOpened = 1;
+
Added: users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoakeyboard.m
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoakeyboard.m (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoakeyboard.m 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,44 @@
+--- src/video/cocoa/SDL_cocoakeyboard.m.orig 2009-07-16 17:28:25.000000000 -0700
++++ src/video/cocoa/SDL_cocoakeyboard.m 2009-07-16 17:33:36.000000000 -0700
+@@ -351,14 +351,14 @@
+ static void
+ UpdateKeymap(SDL_VideoData *data)
+ {
+- KeyboardLayoutRef key_layout;
++ TISInputSourceRef key_layout;
+ const void *chr_data;
+ int i;
+ SDL_scancode scancode;
+ SDLKey keymap[SDL_NUM_SCANCODES];
+
+ /* See if the keymap needs to be updated */
+- KLGetCurrentKeyboardLayout(&key_layout);
++ key_layout = TISCopyCurrentKeyboardLayoutInputSource();
+ if (key_layout == data->key_layout) {
+ return;
+ }
+@@ -367,7 +367,7 @@
+ SDL_GetDefaultKeymap(keymap);
+
+ /* Try Unicode data first (preferred as of Mac OS X 10.5) */
+- KLGetKeyboardLayoutProperty(key_layout, kKLuchrData, &chr_data);
++ chr_data = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
+ if (chr_data) {
+ UInt32 keyboard_type = LMGetKbdType();
+ OSStatus err;
+@@ -400,6 +400,7 @@
+ return;
+ }
+
++#if 0
+ /* Fall back to older style key map data */
+ KLGetKeyboardLayoutProperty(key_layout, kKLKCHRData, &chr_data);
+ if (chr_data) {
+@@ -449,6 +450,7 @@
+ SDL_SetKeymap(data->keyboard, 0, keymap, SDL_NUM_SCANCODES);
+ return;
+ }
++#endif
+ }
+
+ void
Added: users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoamodes.m
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoamodes.m (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoamodes.m 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,43 @@
+--- src/video/cocoa/SDL_cocoamodes.m.orig 2009-07-16 16:46:13.000000000 -0700
++++ src/video/cocoa/SDL_cocoamodes.m 2009-07-16 16:46:22.000000000 -0700
+@@ -23,24 +23,6 @@
+
+ #include "SDL_cocoavideo.h"
+
+-/*
+- Add methods to get at private members of NSScreen.
+- Since there is a bug in Apple's screen switching code
+- that does not update this variable when switching
+- to fullscreen, we'll set it manually (but only for the
+- main screen).
+-*/
+- at interface NSScreen (NSScreenAccess)
+-- (void) setFrame:(NSRect)frame;
+- at end
+-
+- at implementation NSScreen (NSScreenAccess)
+-- (void) setFrame:(NSRect)frame;
+-{
+- _frame = frame;
+-}
+- at end
+-
+ static void
+ CG_SetError(const char *prefix, CGDisplayErr result)
+ {
+@@ -248,15 +230,6 @@
+ CGReleaseDisplayFadeReservation(fade_token);
+ }
+
+- /*
+- There is a bug in Cocoa where NSScreen doesn't synchronize
+- with CGDirectDisplay, so the main screen's frame is wrong.
+- As a result, coordinate translation produces incorrect results.
+- We can hack around this bug by setting the screen rect
+- ourselves. This hack should be removed if/when the bug is fixed.
+- */
+- [[NSScreen mainScreen] setFrame:NSMakeRect(0,0,mode->w,mode->h)];
+-
+ return 0;
+
+ /* Since the blanking window covers *all* windows (even force quit) correct recovery is crucial */
Added: users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.h
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.h (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.h 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,11 @@
+--- src/video/cocoa/SDL_cocoawindow.h.orig 2009-07-17 11:26:07.000000000 -0700
++++ src/video/cocoa/SDL_cocoawindow.h 2009-07-17 11:26:14.000000000 -0700
+@@ -27,7 +27,7 @@
+ typedef struct SDL_WindowData SDL_WindowData;
+
+ /* *INDENT-OFF* */
+- at interface Cocoa_WindowListener:NSResponder {
++ at interface Cocoa_WindowListener:NSResponder <NSWindowDelegate> {
+ SDL_WindowData *_data;
+ }
+
Added: users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.m
===================================================================
--- users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.m (rev 0)
+++ users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoawindow.m 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1,18 @@
+--- src/video/cocoa/SDL_cocoawindow.m.orig 2009-07-17 11:45:41.000000000 -0700
++++ src/video/cocoa/SDL_cocoawindow.m 2009-07-17 11:45:57.000000000 -0700
+@@ -167,6 +167,7 @@
+ int button;
+
+ index = _data->videodata->mouse;
++ printf("mouseDown %d\n", [theEvent buttonNumber]);
+ switch ([theEvent buttonNumber]) {
+ case 0:
+ button = SDL_BUTTON_LEFT;
+@@ -200,6 +201,7 @@
+ int button;
+
+ index = _data->videodata->mouse;
++ printf("mouseUp %d\n", [theEvent buttonNumber]);
+ switch ([theEvent buttonNumber]) {
+ case 0:
+ button = SDL_BUTTON_LEFT;
Added: users/toby/ports/devel/libsdl-devel/work
===================================================================
--- users/toby/ports/devel/libsdl-devel/work (rev 0)
+++ users/toby/ports/devel/libsdl-devel/work 2009-07-26 18:46:41 UTC (rev 54397)
@@ -0,0 +1 @@
+link /opt/local/var/macports/build/_Volumes_eve_libsdl-devel/work
\ No newline at end of file
Property changes on: users/toby/ports/devel/libsdl-devel/work
___________________________________________________________________
Added: svn:special
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090726/79e45297/attachment-0001.html>
More information about the macports-changes
mailing list