On Sat, February 25, 2012 00:52, Brad Smith wrote:
> On Wed, Feb 22, 2012 at 08:04:13PM -0500, Brad Smith wrote:
>> On Wed, Feb 22, 2012 at 02:58:25PM -0500, Brad Smith wrote:
>> > Here is an update to SDL 1.2.15. .14 fixed a lot of bugs and .15 fixed
>> > a few more. .15 should have resolved the XRandR issue that was reported
>> > with .14. So please test and let me know how it goes.
>>

Everything is fine on amd64. Tested on some games from the tree and openbsd-wip.

>> An updated diff rolling in 3 fixes from upstream and two minor tweaks to the
>> port..
>>
>> Fixed bug 1390 - X11_KeyToUnicode
>> Fixed bug 1424 - Handling of alpha channel in Altivec accelerated blit
>> functions
>> Fixed bug 1427 - integer passed to XChangeProperty() causes crash
>
> Updated diff to fix a build issue on PowerPC.
>
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/Makefile,v
> retrieving revision 1.81
> diff -u -p -r1.81 Makefile
> --- Makefile  22 Feb 2012 08:22:39 -0000      1.81
> +++ Makefile  22 Feb 2012 20:21:13 -0000
> @@ -2,11 +2,13 @@
>
>  COMMENT=     cross-platform multimedia library
>
> -VERSION=     1.2.13
> +VERSION=     1.2.15
>  DISTNAME=    SDL-${VERSION}
>  PKGNAME=     ${DISTNAME:L}
> -REVISION =   17
>  CATEGORIES=  devel
> +MASTER_SITES=        ${HOMEPAGE}release/
> +
> +SHARED_LIBS= SDL     8.0
>
>  HOMEPAGE=    http://www.libsdl.org/
>
> @@ -17,30 +19,29 @@ PERMIT_PACKAGE_CDROM=   Yes
>  PERMIT_PACKAGE_FTP=     Yes
>  PERMIT_DISTFILES_CDROM= Yes
>  PERMIT_DISTFILES_FTP=   Yes
> -WANTLIB=             m sndio usbhid
>
> -MASTER_SITES=        ftp://ftp.fr.freebsd.org/pub/FreeBSD/distfiles/ \
> -             ${HOMEPAGE}release/
> -MASTER_SITES0=       http://dev.beastie.hu/ \
> -             http://www.beastie.hu/
> +WANTLIB=     m sndio usbhid
> +
> +MODULES=     converters/libiconv
>
>  .if ${MACHINE_ARCH} == "i386"
> -BUILD_DEPENDS+=      devel/yasm
> +BUILD_DEPENDS+=      devel/nasm
>  .endif
>
> -FLAVORS=     aa caca no_x11 altivec
> +FLAVORS=     aa no_x11
>  FLAVOR?=
>
> +USE_GMAKE=   Yes
>  USE_LIBTOOL= Yes
> -USE_GROFF =  Yes
> -MODULES=     converters/libiconv
> -
>  SEPARATE_BUILD=      concurrent
>  CONFIGURE_STYLE= gnu
>  MODGNU_CONFIG_GUESS_DIRS=    ${WRKSRC} ${WRKSRC}/test
> -SHARED_LIBS= SDL     8.0
> -CONFIGURE_ENV+=      X11BASE="${X11BASE}" \
> -             CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
> +CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
> +              --disable-arts \
> +              --disable-esd \
> +              --disable-oss \
> +              --disable-pulseaudio
> +CONFIGURE_ENV+=      CPPFLAGS="-I${LOCALBASE}/include" \
>               LDFLAGS="-L${LOCALBASE}/lib" \
>               WITH_SNDIO="Yes"
>
> @@ -48,43 +49,21 @@ CONFIGURE_ENV+=   X11BASE="${X11BASE}" \
>  CONFIGURE_ENV+= ac_cv_lib_usb_hid_init=no \
>               ac_cv_header_usb_h=no
>
> -CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
> -              --disable-arts \
> -              --disable-esd \
> -              --disable-oss \
> -              --disable-pulseaudio \
> -              --enable-nasm \
> -              --enable-pthread-sem
> -
>  .if ${FLAVOR:L:Maa}
> +WANTLIB+=    aa
>  LIB_DEPENDS+=        graphics/aalib
> -WANTLIB +=   aa
>  CONFIGURE_ARGS+= --enable-video-aalib
> -.else
> -CONFIGURE_ARGS+= --disable-video-aalib
> -.endif
> -
> -.if ${FLAVOR:L:Mcaca}
> -PATCH_DIST_STRIP= -p1
> -PATCHFILES=  patch-libsd1.2.7-libcaca0.9.diff:0
> -LIB_DEPENDS+=        graphics/libcaca
> -WANTLIB +=   caca
> -CONFIGURE_ARGS+= --enable-video-caca
> -.else
> -SUPDISTFILES+=       patch-libsd1.2.7-libcaca0.9.diff:0
>  .endif
>
>  .if ${FLAVOR:L:Mno_x11}
>  CONFIGURE_ARGS+= --without-x \
>                --disable-video-x11
> -.else
> -WANTLIB+=    X11>=10 Xau Xdmcp Xext Xrandr Xrender pthread-stubs xcb
>  .endif
>
>  NO_REGRESS=  Yes
>
>  pre-configure:
> -     mkdir -p ${WRKSRC}/src/audio/libsndio
> -     cp ${FILESDIR}/SDL_libsndioaudio.{c,h} ${WRKSRC}/src/audio/libsndio
> +     @mkdir -p ${WRKSRC}/src/audio/libsndio
> +     @cp ${FILESDIR}/SDL_libsndioaudio.{c,h} ${WRKSRC}/src/audio/libsndio
>
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/distinfo,v
> retrieving revision 1.17
> diff -u -p -r1.17 distinfo
> --- distinfo  3 Jan 2008 17:39:40 -0000       1.17
> +++ distinfo  22 Feb 2012 19:40:46 -0000
> @@ -1,10 +1,10 @@
> -MD5 (SDL-1.2.13.tar.gz) = xmYP7qKmg03hC8cbL45NiA==
> +MD5 (SDL-1.2.15.tar.gz) = nZbfhBdXKir7eBp8TIEahQ==
>  MD5 (patch-libsd1.2.7-libcaca0.9.diff) = 3/bPX8l0lNvgWICGbhUWYA==
> -RMD160 (SDL-1.2.13.tar.gz) = 7Ygl/Jj0s3Wc+eXPg1fXHFDfmSU=
> +RMD160 (SDL-1.2.15.tar.gz) = 1IAqCQy0ok7rDIzlaQgC9ZbTlMM=
>  RMD160 (patch-libsd1.2.7-libcaca0.9.diff) = 50oezoZFd7b9r4UWqeS0AJWOV1s=
> -SHA1 (SDL-1.2.13.tar.gz) = UfyqPh1cAf2BPqCGiHgPhrGc9Tk=
> +SHA1 (SDL-1.2.15.tar.gz) = DF8ZPO2BCw1846sG2AjLte7wOiw=
>  SHA1 (patch-libsd1.2.7-libcaca0.9.diff) = Tk0/XwKG5pYODlza0vkMVJl6bAQ=
> -SHA256 (SDL-1.2.13.tar.gz) = lPmd8dYPKWtX9HQGUKcbZCXaZUBEyjD48M40k0Qp4TI=
> +SHA256 (SDL-1.2.15.tar.gz) = 1tMWp5Pl40gVXw3ZO5eXmJM/uYqh7evMEIgp1kdKrQA=
>  SHA256 (patch-libsd1.2.7-libcaca0.9.diff) =
> fnf1KYlqBfccSHTtjR9npVtt976i2zFrClxN/ejoAS8=
> -SIZE (SDL-1.2.13.tar.gz) = 3373673
> +SIZE (SDL-1.2.15.tar.gz) = 3920622
>  SIZE (patch-libsd1.2.7-libcaca0.9.diff) = 28259
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-Makefile_in,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-Makefile_in
> --- patches/patch-Makefile_in 22 Sep 2007 01:12:38 -0000      1.3
> +++ patches/patch-Makefile_in 22 Feb 2012 18:46:36 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-Makefile_in,v 1.3 2007/09/22 01:12:38 pvalchev Exp $
> ---- Makefile.in.orig Sat Sep  8 22:26:45 2007
> -+++ Makefile.in      Sat Sep  8 22:27:31 2007
> -@@ -48,7 +48,7 @@ LT_AGE      = @LT_AGE@
> +--- Makefile.in.orig Thu Jan 19 01:30:05 2012
> ++++ Makefile.in      Wed Feb 22 13:39:54 2012
> +@@ -49,7 +49,7 @@ LT_AGE      = @LT_AGE@
>   LT_CURRENT  = @LT_CURRENT@
>   LT_RELEASE  = @LT_RELEASE@
>   LT_REVISION = @LT_REVISION@
> Index: patches/patch-configure
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-configure,v
> retrieving revision 1.21
> diff -u -p -r1.21 patch-configure
> --- patches/patch-configure   12 Jan 2010 11:19:06 -0000      1.21
> +++ patches/patch-configure   22 Feb 2012 19:06:22 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-configure,v 1.21 2010/01/12 11:19:06 jakemsr Exp $
> ---- configure.orig   Sun Dec 30 21:09:39 2007
> -+++ configure        Tue Jan 12 02:48:55 2010
> -@@ -25411,6 +25411,20 @@ _ACEOF
> +--- configure.orig   Thu Jan 19 01:30:12 2012
> ++++ configure        Wed Feb 22 13:39:54 2012
> +@@ -21000,6 +21000,20 @@ _ACEOF
>       fi
>   }
>
> @@ -22,17 +22,7 @@ $OpenBSD: patch-configure,v 1.21 2010/01
>   CheckPulseAudio()
>   {
>       # Check whether --enable-pulseaudio was given.
> -@@ -26333,9 +26347,6 @@ echo "${ECHO_T}$CompileNASM_ret" >&6; }
> -               win32)
> -                   NASMFLAGS="-f win32"
> -                   ;;
> --              openbsd)
> --                  NASMFLAGS="-f aoutb"
> --                  ;;
> -               macosx)
> -                   NASMFLAGS="-f macho"
> -                   ;;
> -@@ -33577,6 +33588,7 @@ _ACEOF
> +@@ -29551,6 +29565,7 @@ _ACEOF
>           CheckALSA
>           CheckARTSC
>           CheckESD
> @@ -40,7 +30,7 @@ $OpenBSD: patch-configure,v 1.21 2010/01
>           CheckPulseAudio
>           CheckNAS
>           CheckX11
> -@@ -33610,7 +33622,7 @@ _ACEOF
> +@@ -29586,7 +29601,7 @@ _ACEOF
>                   SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
>                   have_audio=yes
>               ;;
> Index: patches/patch-include_SDL_config_h_in
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-include_SDL_config_h_in,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-include_SDL_config_h_in
> --- patches/patch-include_SDL_config_h_in     24 Jan 2009 10:56:11 -0000      
> 1.2
> +++ patches/patch-include_SDL_config_h_in     22 Feb 2012 18:46:42 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-include_SDL_config_h_in,v 1.2 2009/01/24 10:56:11 jakemsr Exp
> $
> ---- include/SDL_config.h.in.orig     Sun Dec 30 20:48:36 2007
> -+++ include/SDL_config.h.in  Sun Sep 21 10:32:49 2008
> -@@ -182,6 +182,7 @@
> +--- include/SDL_config.h.in.orig     Thu Jan 19 01:30:05 2012
> ++++ include/SDL_config.h.in  Wed Feb 22 13:39:54 2012
> +@@ -184,6 +184,7 @@
>   #undef SDL_AUDIO_DRIVER_QNXNTO
>   #undef SDL_AUDIO_DRIVER_SNDMGR
>   #undef SDL_AUDIO_DRIVER_SUNAUDIO
> Index: patches/patch-include_SDL_opengl_h
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-include_SDL_opengl_h,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-include_SDL_opengl_h
> --- patches/patch-include_SDL_opengl_h        15 Jun 2010 15:29:29 -0000      
> 1.1
> +++ patches/patch-include_SDL_opengl_h        2 Sep 2010 23:02:57 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-include_SDL_opengl_h,v 1.1 2010/06/15 15:29:29 espie Exp $
> ---- include/SDL_opengl.h.orig        Thu May 13 13:54:28 2010
> -+++ include/SDL_opengl.h     Thu May 13 13:56:19 2010
> -@@ -33,7 +33,11 @@
> +--- include/SDL_opengl.h.orig        Mon Oct 12 19:07:19 2009
> ++++ include/SDL_opengl.h     Thu Sep  2 19:02:50 2010
> +@@ -35,7 +35,11 @@
>   #endif
>   #ifndef NO_SDL_GLEXT
>   #define __glext_h_  /* Don't let gl.h include glext.h */
> @@ -13,7 +13,7 @@ $OpenBSD: patch-include_SDL_opengl_h,v 1
>   #if defined(__MACOSX__)
>   #include <OpenGL/gl.h>      /* Header File For The OpenGL Library */
>   #include <OpenGL/glu.h>     /* Header File For The GLU Library */
> -@@ -46,6 +50,10 @@
> +@@ -48,6 +52,10 @@
>   #endif
>   #ifndef NO_SDL_GLEXT
>   #undef __glext_h_
> @@ -23,4 +23,4 @@ $OpenBSD: patch-include_SDL_opengl_h,v 1
>  +#endif
>   #endif
>
> - /* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
> + /** @name GLext.h
> Index: patches/patch-sdl_pc_in
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-sdl_pc_in,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-sdl_pc_in
> --- patches/patch-sdl_pc_in   20 Mar 2008 22:00:15 -0000      1.1
> +++ patches/patch-sdl_pc_in   2 Sep 2010 23:01:52 -0000
> @@ -1,11 +1,12 @@
>  $OpenBSD: patch-sdl_pc_in,v 1.1 2008/03/20 22:00:15 pvalchev Exp $
> ---- sdl.pc.in.orig   Thu Mar 20 07:59:18 2008
> -+++ sdl.pc.in        Thu Mar 20 07:59:38 2008
> -@@ -10,5 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platf
> +--- sdl.pc.in.orig   Mon Oct 12 19:07:20 2009
> ++++ sdl.pc.in        Sat Nov  7 13:30:12 2009
> +@@ -10,6 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platf
>   Version: @SDL_VERSION@
>   Requires:
>   Conflicts:
>  -Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
> +-Libs.private: @SDL_STATIC_LIBS@
>  -Cflags: -I${includedir}/SDL @SDL_CFLAGS@
>  +Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @X_LIBS@
>  +Cflags: -I${includedir}/SDL @SDL_CFLAGS@ @X_CFLAGS@
> Index: patches/patch-src_audio_SDL_audio_c
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-src_audio_SDL_audio_c,v
> retrieving revision 1.16
> diff -u -p -r1.16 patch-src_audio_SDL_audio_c
> --- patches/patch-src_audio_SDL_audio_c       24 Jan 2009 10:56:11 -0000      
> 1.16
> +++ patches/patch-src_audio_SDL_audio_c       22 Feb 2012 18:46:36 -0000
> @@ -1,22 +1,19 @@
>  $OpenBSD: patch-src_audio_SDL_audio_c,v 1.16 2009/01/24 10:56:11 jakemsr Exp
> $
> ---- src/audio/SDL_audio.c.orig       Sun Dec 30 20:47:59 2007
> -+++ src/audio/SDL_audio.c    Thu Jan 22 20:40:14 2009
> -@@ -36,6 +36,9 @@
> +--- src/audio/SDL_audio.c.orig       Thu Jan 19 01:30:06 2012
> ++++ src/audio/SDL_audio.c    Wed Feb 22 13:41:58 2012
> +@@ -36,11 +36,15 @@
>
>   /* Available audio drivers */
>   static AudioBootStrap *bootstrap[] = {
> ++
> + #if SDL_AUDIO_DRIVER_PULSE
> +     &PULSE_bootstrap,
> + #endif
> + #if SDL_AUDIO_DRIVER_ALSA
> +     &ALSA_bootstrap,
> ++#endif
>  +#if SDL_AUDIO_DRIVER_SNDIO
>  +    &SNDIO_bootstrap,
> -+#endif
> + #endif
>   #if SDL_AUDIO_DRIVER_BSD
>       &BSD_AUDIO_bootstrap,
> - #endif
> -@@ -532,7 +535,7 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
> -                     return(-1);
> -             }
> -             if ( audio->convert.needed ) {
> --                    audio->convert.len = (int) ( ((double) desired->size) /
> -+                    audio->convert.len = (int) ( ((double) 
> audio->spec.size) /
> -                                           audio->convert.len_ratio );
> -                     audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
> -                        audio->convert.len*audio->convert.len_mult);
> Index: patches/patch-src_audio_SDL_sysaudio_h
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-src_audio_SDL_sysaudio_h,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-src_audio_SDL_sysaudio_h
> --- patches/patch-src_audio_SDL_sysaudio_h    24 Jan 2009 10:56:11 -0000      
> 1.5
> +++ patches/patch-src_audio_SDL_sysaudio_h    22 Feb 2012 18:46:36 -0000
> @@ -1,7 +1,7 @@
>  $OpenBSD: patch-src_audio_SDL_sysaudio_h,v 1.5 2009/01/24 10:56:11 jakemsr
> Exp $
> ---- src/audio/SDL_sysaudio.h.orig    Sun Dec 30 20:47:59 2007
> -+++ src/audio/SDL_sysaudio.h Sun Sep 21 10:34:09 2008
> -@@ -103,6 +103,9 @@ typedef struct AudioBootStrap {
> +--- src/audio/SDL_sysaudio.h.orig    Thu Jan 19 01:30:06 2012
> ++++ src/audio/SDL_sysaudio.h Wed Feb 22 13:39:54 2012
> +@@ -105,6 +105,9 @@ typedef struct AudioBootStrap {
>   #if SDL_AUDIO_DRIVER_BSD
>   extern AudioBootStrap BSD_AUDIO_bootstrap;
>   #endif
> Index: patches/patch-src_cpuinfo_SDL_cpuinfo_c
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-src_cpuinfo_SDL_cpuinfo_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-src_cpuinfo_SDL_cpuinfo_c
> --- patches/patch-src_cpuinfo_SDL_cpuinfo_c   17 Feb 2012 06:59:46 -0000      
> 1.1
> +++ patches/patch-src_cpuinfo_SDL_cpuinfo_c   24 Feb 2012 21:08:18 -0000
> @@ -1,9 +1,9 @@
>  $OpenBSD: patch-src_cpuinfo_SDL_cpuinfo_c,v 1.1 2012/02/17 06:59:46 ajacoutot
> Exp $
> ---- src/cpuinfo/SDL_cpuinfo.c.orig   Wed Jan 25 10:22:20 2012
> -+++ src/cpuinfo/SDL_cpuinfo.c        Wed Jan 25 10:33:59 2012
> +--- src/cpuinfo/SDL_cpuinfo.c.orig   Thu Jan 19 01:30:06 2012
> ++++ src/cpuinfo/SDL_cpuinfo.c        Fri Feb 24 16:08:00 2012
>  @@ -28,6 +28,10 @@
>
> - #if defined(__MACOSX__) && defined(__ppc__)
> + #if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
>   #include <sys/sysctl.h> /* For AltiVec check */
>  +#elif defined(__OpenBSD__) && defined(__powerpc__)
>  +#include <sys/param.h>
> @@ -12,13 +12,22 @@ $OpenBSD: patch-src_cpuinfo_SDL_cpuinfo_
>   #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
>   #include <signal.h>
>   #include <setjmp.h>
> -@@ -306,8 +310,12 @@ static __inline__ int CPU_haveSSE2(void)
> +@@ -42,7 +46,7 @@
> + #define CPU_HAS_SSE2        0x00000080
> + #define CPU_HAS_ALTIVEC     0x00000100
> +
> +-#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__
> ++#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__
> + /* This is the brute force way of detecting instruction sets...
> +    the idea is borrowed from the libmpeg2 library - thanks!
> +  */
> +@@ -359,8 +363,12 @@ static __inline__ int CPU_haveSSE2(void)
>   static __inline__ int CPU_haveAltiVec(void)
>   {
>       volatile int altivec = 0;
> --#if defined(__MACOSX__) && defined(__ppc__)
> +-#if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
>  -    int selectors[2] = { CTL_HW, HW_VECTORUNIT };
> -+#if defined(__MACOSX__) && defined(__ppc__) || defined(__OpenBSD__) &&
> defined(__powerpc__)
> ++#if (defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))) ||
> (defined(__OpenBSD__) && defined(__powerpc__))
>  +# ifdef __OpenBSD__
>  +    int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC };
>  +# else
> Index: patches/patch-src_video_SDL_blit_N_c
> ===================================================================
> RCS file: patches/patch-src_video_SDL_blit_N_c
> diff -N patches/patch-src_video_SDL_blit_N_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_video_SDL_blit_N_c      23 Feb 2012 00:42:27 -0000
> @@ -0,0 +1,42 @@
> +$OpenBSD$
> +
> +Fixed bug 1424 - Handling of alpha channel in Altivec accelerated blit
> functions
> +
> +--- src/video/SDL_blit_N.c.orig      Wed Feb 22 19:36:49 2012
> ++++ src/video/SDL_blit_N.c   Wed Feb 22 19:38:46 2012
> +@@ -689,6 +689,8 @@ static void ConvertAltivec32to32_noprefetch(SDL_BlitIn
> +         while ((UNALIGNED_PTR(dst)) && (width)) {
> +             bits = *(src++);
> +             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
> ++            if(!srcfmt->Amask)
> ++              a = srcfmt->alpha;
> +             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
> +             width--;
> +         }
> +@@ -716,6 +718,8 @@ static void ConvertAltivec32to32_noprefetch(SDL_BlitIn
> +         while (extrawidth) {
> +             bits = *(src++);  /* max 7 pixels, don't bother with prefetch.
> */
> +             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
> ++            if(!srcfmt->Amask)
> ++              a = srcfmt->alpha;
> +             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
> +             extrawidth--;
> +         }
> +@@ -769,6 +773,8 @@ static void ConvertAltivec32to32_prefetch(SDL_BlitInfo
> +             vec_dstst(dst+scalar_dst_lead, DST_CTRL(2,32,1024),
> DST_CHAN_DEST);
> +             bits = *(src++);
> +             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
> ++            if(!srcfmt->Amask)
> ++              a = srcfmt->alpha;
> +             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
> +             width--;
> +         }
> +@@ -798,6 +804,8 @@ static void ConvertAltivec32to32_prefetch(SDL_BlitInfo
> +         while (extrawidth) {
> +             bits = *(src++);  /* max 7 pixels, don't bother with prefetch.
> */
> +             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
> ++            if(!srcfmt->Amask)
> ++              a = srcfmt->alpha;
> +             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
> +             extrawidth--;
> +         }
> Index: patches/patch-src_video_x11_SDL_x11events_c
> ===================================================================
> RCS file: patches/patch-src_video_x11_SDL_x11events_c
> diff -N patches/patch-src_video_x11_SDL_x11events_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_video_x11_SDL_x11events_c       23 Feb 2012 00:41:23 
> -0000
> @@ -0,0 +1,30 @@
> +$OpenBSD$
> +
> +Fixed bug 1390 - X11_KeyToUnicode
> +
> +--- src/video/x11/SDL_x11events.c.orig       Wed Feb 22 19:31:47 2012
> ++++ src/video/x11/SDL_x11events.c    Wed Feb 22 19:33:27 2012
> +@@ -1246,14 +1246,23 @@ static void get_modifier_masks(Display *display)
> +  * sequences (dead accents, compose key sequences) will not work since the
> +  * state has been irrevocably lost.
> +  */
> ++extern DECLSPEC Uint16 SDLCALL X11_KeyToUnicode(SDLKey, SDLMod);
> ++
> + Uint16 X11_KeyToUnicode(SDLKey keysym, SDLMod modifiers)
> + {
> ++    static int warning = 0;
> +     struct SDL_VideoDevice *this = current_video;
> +     char keybuf[32];
> +     int i;
> +     KeySym xsym = 0;
> +     XKeyEvent xkey;
> +     Uint16 unicode;
> ++
> ++    if ( warning ) {
> ++            warning = 0;
> ++            fprintf(stderr, "WARNING: Application is using 
> X11_KeyToUnicode().\n");
> ++            fprintf(stderr, "This is not an official SDL function, please 
> report this
> as a bug.\n");
> ++    }
> +
> +     if ( !this || !SDL_Display ) {
> +             return 0;
> Index: patches/patch-src_video_x11_SDL_x11gl_c
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/patches/patch-src_video_x11_SDL_x11gl_c,v
> retrieving revision 1.13
> diff -u -p -r1.13 patch-src_video_x11_SDL_x11gl_c
> --- patches/patch-src_video_x11_SDL_x11gl_c   27 Jan 2008 18:43:20 -0000      
> 1.13
> +++ patches/patch-src_video_x11_SDL_x11gl_c   22 Feb 2012 18:46:36 -0000
> @@ -1,6 +1,6 @@
>  $OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.13 2008/01/27 18:43:20 pvalchev
> Exp $
> ---- src/video/x11/SDL_x11gl.c.orig   Sun Dec 30 20:48:13 2007
> -+++ src/video/x11/SDL_x11gl.c        Sun Jan 27 10:37:35 2008
> +--- src/video/x11/SDL_x11gl.c.orig   Thu Jan 19 01:30:06 2012
> ++++ src/video/x11/SDL_x11gl.c        Wed Feb 22 13:39:54 2012
>  @@ -34,7 +34,7 @@
>   #elif defined(__QNXNTO__)
>   #define DEFAULT_OPENGL      "libGL.so.3"
> Index: patches/patch-src_video_x11_SDL_x11modes_c
> ===================================================================
> RCS file: patches/patch-src_video_x11_SDL_x11modes_c
> diff -N patches/patch-src_video_x11_SDL_x11modes_c
> --- patches/patch-src_video_x11_SDL_x11modes_c        16 Sep 2008 20:43:10 
> -0000      1.10
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,31 +0,0 @@
> -$OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.10 2008/09/16 20:43:10 naddy
> Exp $
> ---- src/video/x11/SDL_x11modes.c.orig        Mon Dec 31 05:48:13 2007
> -+++ src/video/x11/SDL_x11modes.c     Mon Sep 15 23:36:02 2008
> -@@ -52,8 +52,25 @@ static int cmpmodelist(const void *va, const void *vb)
> - #if SDL_VIDEO_DRIVER_X11_VIDMODE
> - Bool SDL_NAME(XF86VidModeGetModeInfo)(Display *dpy, int scr,
> SDL_NAME(XF86VidModeModeInfo) *info)
> - {
> --    SDL_NAME(XF86VidModeModeLine) *l =
> (SDL_NAME(XF86VidModeModeLine)*)((char*)info + sizeof info->dotclock);
> --    return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, (int*)&info->dotclock,
> l);
> -+    Bool retval;
> -+    int dotclock;
> -+    SDL_NAME(XF86VidModeModeLine) l;
> -+    SDL_memset(&l, 0, sizeof(l));
> -+    retval = SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, &dotclock, &l);
> -+    info->dotclock = dotclock;
> -+    info->hdisplay = l.hdisplay;
> -+    info->hsyncstart = l.hsyncstart;
> -+    info->hsyncend = l.hsyncend;
> -+    info->htotal = l.htotal;
> -+    info->hskew = l.hskew;
> -+    info->vdisplay = l.vdisplay;
> -+    info->vsyncstart = l.vsyncstart;
> -+    info->vsyncend = l.vsyncend;
> -+    info->vtotal = l.vtotal;
> -+    info->flags = l.flags;
> -+    info->privsize = l.privsize;
> -+    info->private = l.private;
> -+    return retval;
> - }
> - #endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
> -
> Index: patches/patch-src_video_x11_SDL_x11video_c
> ===================================================================
> RCS file: patches/patch-src_video_x11_SDL_x11video_c
> diff -N patches/patch-src_video_x11_SDL_x11video_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_video_x11_SDL_x11video_c        23 Feb 2012 00:41:43 
> -0000
> @@ -0,0 +1,31 @@
> +$OpenBSD$
> +
> +Fixed bug 1427 - integer passed to XChangeProperty() causes crash
> +
> +--- src/video/x11/SDL_x11video.c.orig        Wed Feb 22 19:34:11 2012
> ++++ src/video/x11/SDL_x11video.c     Wed Feb 22 19:36:25 2012
> +@@ -418,16 +418,21 @@ static void create_aux_windows(_THIS)
> +     }
> +
> +     {
> +-            pid_t pid = getpid();
> ++            union align_pid {
> ++                    pid_t pid;
> ++                    long dummy;
> ++            } a_pid;
> +             char hostname[256];
> +
> +-            if (pid > 0 && gethostname(hostname, sizeof(hostname)) > -1) {
> ++            a_pid.pid = getpid();
> ++
> ++            if (a_pid.pid > 0 && gethostname(hostname, sizeof(hostname)) > 
> -1) {
> +                     Atom _NET_WM_PID = XInternAtom(SDL_Display, 
> "_NET_WM_PID", False);
> +                     Atom WM_CLIENT_MACHINE = XInternAtom(SDL_Display, 
> "WM_CLIENT_MACHINE",
> False);
> +
> +                     hostname[sizeof(hostname)-1] = '\0';
> +                     XChangeProperty(SDL_Display, WMwindow, _NET_WM_PID, 
> XA_CARDINAL, 32,
> +-                                    PropModeReplace, (unsigned char *)&pid, 
> 1);
> ++                                    PropModeReplace, (unsigned char 
> *)&a_pid.pid, 1);
> +                     XChangeProperty(SDL_Display, WMwindow, 
> WM_CLIENT_MACHINE, XA_STRING, 8,
> +                                     PropModeReplace, (unsigned char 
> *)hostname, SDL_strlen(hostname));
> +             }
> Index: pkg/DESCR
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/pkg/DESCR,v
> retrieving revision 1.10
> diff -u -p -r1.10 DESCR
> --- pkg/DESCR 30 Dec 2008 02:15:20 -0000      1.10
> +++ pkg/DESCR 22 Feb 2012 19:46:02 -0000
> @@ -5,9 +5,6 @@ software, emulators, and many popular ga
>
>  Packages can be built with additional FLAVORs:
>
> -  caca:      SDL built with colour ASCII art support.
> -     This FLAVOR requires the libcaca package.
> -
>    aa:   SDL built with ASCII art support.
>       This FLAVOR requires the aalib package.
>
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/devel/sdl/pkg/PLIST,v
> retrieving revision 1.14
> diff -u -p -r1.14 PLIST
> --- pkg/PLIST 30 Dec 2008 22:17:54 -0000      1.14
> +++ pkg/PLIST 22 Feb 2012 20:43:53 -0000
> @@ -1,6 +1,7 @@
>  @comment $OpenBSD: PLIST,v 1.14 2008/12/30 22:17:54 sthen Exp $
>  @pkgpath ${BASE_PKGPATH},sun
>  @pkgpath ${BASE_PKGPATH},esd
> +%%SHARED%%
>  bin/sdl-config
>  include/SDL/
>  include/SDL/SDL.h
> @@ -38,6 +39,7 @@ include/SDL/close_code.h
>  lib/libSDL.a
>  lib/libSDL.la
>  lib/libSDLmain.a
> +lib/libSDLmain.la
>  lib/pkgconfig/
>  lib/pkgconfig/sdl.pc
>  @man man/man3/SDLKey.3
> @@ -216,4 +218,3 @@ lib/pkgconfig/sdl.pc
>  @man man/man3/SDL_mutexV.3
>  share/aclocal/
>  share/aclocal/sdl.m4
> -%%SHARED%%
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>


Reply via email to