Update to sdl-1.2.15.
From brad, with tweaks by ajacoutot@ and me. Tested by many on ports@ Ok ajacoutot@
This commit is contained in:
parent
4fdc9a6e9c
commit
eea121e0d7
@ -1,12 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.81 2012/02/22 08:22:39 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.82 2012/03/02 09:10:38 dcoppa Exp $
|
||||
|
||||
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
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
BUILD_DEPENDS+= devel/yasm
|
||||
.endif
|
||||
|
||||
FLAVORS= aa caca no_x11 altivec
|
||||
FLAVOR?=
|
||||
|
||||
USE_LIBTOOL= Yes
|
||||
USE_GROFF = Yes
|
||||
MODULES= converters/libiconv
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
BUILD_DEPENDS+= devel/nasm
|
||||
.endif
|
||||
|
||||
FLAVORS= aa no_x11
|
||||
FLAVOR?=
|
||||
|
||||
USE_GMAKE= Yes
|
||||
USE_LIBTOOL= Yes
|
||||
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>
|
||||
|
@ -1,10 +1,5 @@
|
||||
MD5 (SDL-1.2.13.tar.gz) = xmYP7qKmg03hC8cbL45NiA==
|
||||
MD5 (patch-libsd1.2.7-libcaca0.9.diff) = 3/bPX8l0lNvgWICGbhUWYA==
|
||||
RMD160 (SDL-1.2.13.tar.gz) = 7Ygl/Jj0s3Wc+eXPg1fXHFDfmSU=
|
||||
RMD160 (patch-libsd1.2.7-libcaca0.9.diff) = 50oezoZFd7b9r4UWqeS0AJWOV1s=
|
||||
SHA1 (SDL-1.2.13.tar.gz) = UfyqPh1cAf2BPqCGiHgPhrGc9Tk=
|
||||
SHA1 (patch-libsd1.2.7-libcaca0.9.diff) = Tk0/XwKG5pYODlza0vkMVJl6bAQ=
|
||||
SHA256 (SDL-1.2.13.tar.gz) = lPmd8dYPKWtX9HQGUKcbZCXaZUBEyjD48M40k0Qp4TI=
|
||||
SHA256 (patch-libsd1.2.7-libcaca0.9.diff) = fnf1KYlqBfccSHTtjR9npVtt976i2zFrClxN/ejoAS8=
|
||||
SIZE (SDL-1.2.13.tar.gz) = 3373673
|
||||
SIZE (patch-libsd1.2.7-libcaca0.9.diff) = 28259
|
||||
MD5 (SDL-1.2.15.tar.gz) = nZbfhBdXKir7eBp8TIEahQ==
|
||||
RMD160 (SDL-1.2.15.tar.gz) = 1IAqCQy0ok7rDIzlaQgC9ZbTlMM=
|
||||
SHA1 (SDL-1.2.15.tar.gz) = DF8ZPO2BCw1846sG2AjLte7wOiw=
|
||||
SHA256 (SDL-1.2.15.tar.gz) = 1tMWp5Pl40gVXw3ZO5eXmJM/uYqh7evMEIgp1kdKrQA=
|
||||
SIZE (SDL-1.2.15.tar.gz) = 3920622
|
||||
|
@ -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@
|
||||
$OpenBSD: patch-Makefile_in,v 1.4 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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@
|
||||
|
@ -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
|
||||
$OpenBSD: patch-configure,v 1.22 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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/12 11:19:06 jakemsr Exp $
|
||||
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/12 11:19:06 jakemsr Exp $
|
||||
CheckPulseAudio
|
||||
CheckNAS
|
||||
CheckX11
|
||||
@@ -33610,7 +33622,7 @@ _ACEOF
|
||||
@@ -29586,7 +29601,7 @@ _ACEOF
|
||||
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
have_audio=yes
|
||||
;;
|
||||
|
@ -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 @@
|
||||
$OpenBSD: patch-include_SDL_config_h_in,v 1.3 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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
|
||||
|
@ -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 @@
|
||||
$OpenBSD: patch-include_SDL_opengl_h,v 1.2 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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.1 2010/06/15 15:29:29 espie Exp $
|
||||
#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.1 2010/06/15 15:29:29 espie Exp $
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
/* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials.
|
||||
/** @name GLext.h
|
||||
|
@ -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
|
||||
$OpenBSD: patch-sdl_pc_in,v 1.2 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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@
|
||||
|
@ -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 @@
|
||||
$OpenBSD: patch-src_audio_SDL_audio_c,v 1.17 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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);
|
||||
|
@ -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 {
|
||||
$OpenBSD: patch-src_audio_SDL_sysaudio_h,v 1.6 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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
|
||||
|
@ -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
|
||||
$OpenBSD: patch-src_cpuinfo_SDL_cpuinfo_c,v 1.2 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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_c,v 1.1 2012/02/17 06:59:46 ajacoutot Ex
|
||||
#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
|
||||
|
42
devel/sdl/patches/patch-src_video_SDL_blit_N_c
Normal file
42
devel/sdl/patches/patch-src_video_SDL_blit_N_c
Normal file
@ -0,0 +1,42 @@
|
||||
$OpenBSD: patch-src_video_SDL_blit_N_c,v 1.1 2012/03/02 09:10:38 dcoppa Exp $
|
||||
|
||||
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--;
|
||||
}
|
30
devel/sdl/patches/patch-src_video_x11_SDL_x11events_c
Normal file
30
devel/sdl/patches/patch-src_video_x11_SDL_x11events_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11events_c,v 1.3 2012/03/02 09:10:38 dcoppa Exp $
|
||||
|
||||
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;
|
@ -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
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.14 2012/03/02 09:10:38 dcoppa Exp $
|
||||
--- 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"
|
||||
|
@ -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 */
|
||||
|
31
devel/sdl/patches/patch-src_video_x11_SDL_x11video_c
Normal file
31
devel/sdl/patches/patch-src_video_x11_SDL_x11video_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11video_c,v 1.3 2012/03/02 09:10:38 dcoppa Exp $
|
||||
|
||||
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));
|
||||
}
|
@ -5,9 +5,6 @@ software, emulators, and many popular games.
|
||||
|
||||
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.
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.14 2008/12/30 22:17:54 sthen Exp $
|
||||
@pkgpath ${BASE_PKGPATH},sun
|
||||
@comment $OpenBSD: PLIST,v 1.15 2012/03/02 09:10:38 dcoppa Exp $
|
||||
@pkgpath ${BASE_PKGPATH},altivec
|
||||
@pkgpath ${BASE_PKGPATH},caca
|
||||
@pkgpath ${BASE_PKGPATH},esd
|
||||
@pkgpath ${BASE_PKGPATH},sun
|
||||
%%SHARED%%
|
||||
bin/sdl-config
|
||||
include/SDL/
|
||||
include/SDL/SDL.h
|
||||
@ -38,6 +41,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 +220,3 @@ lib/pkgconfig/sdl.pc
|
||||
@man man/man3/SDL_mutexV.3
|
||||
share/aclocal/
|
||||
share/aclocal/sdl.m4
|
||||
%%SHARED%%
|
||||
|
Loading…
Reference in New Issue
Block a user