diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-03-28 20:39:02 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-03-28 20:40:05 +0000 |
commit | a32189dde29365d5ad0eda276c8b397ea9dd24c7 (patch) | |
tree | f41854b238f05a831897e8029dc4baa7d5cd636b | |
parent | 7e394df2b09386a7c289ed0c5d950c763e512ac1 (diff) | |
download | aports-a32189dde29365d5ad0eda276c8b397ea9dd24c7.tar.bz2 aports-a32189dde29365d5ad0eda276c8b397ea9dd24c7.tar.xz |
main/sdl2: add altivec fixes
-rw-r--r-- | main/sdl2/APKBUILD | 8 | ||||
-rw-r--r-- | main/sdl2/altivec-fixes.patch | 36 |
2 files changed, 40 insertions, 4 deletions
diff --git a/main/sdl2/APKBUILD b/main/sdl2/APKBUILD index 65ed6352e3..e7f2b9820d 100644 --- a/main/sdl2/APKBUILD +++ b/main/sdl2/APKBUILD @@ -12,7 +12,8 @@ depends="" depends_dev="alsa-lib-dev libxcursor-dev libxrandr-dev libxrender-dev mesa-dev" makedepends="$depends_dev" subpackages="$pkgname-dev" -source="https://www.libsdl.org/release/$_pkgname-$pkgver.tar.gz" +source="https://www.libsdl.org/release/$_pkgname-$pkgver.tar.gz + altivec-fixes.patch" builddir="$srcdir/$_pkgname-$pkgver" build() { @@ -37,6 +38,5 @@ package() { make DESTDIR="$pkgdir" install || return 1 } -md5sums="d4055424d556b4a908aa76fad63abd3c SDL2-2.0.5.tar.gz" -sha256sums="442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785 SDL2-2.0.5.tar.gz" -sha512sums="6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750 SDL2-2.0.5.tar.gz" +sha512sums="6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750 SDL2-2.0.5.tar.gz +aad37129e8d1259fcceea087794aa45f7d94a5b0b09275a72e20ae53809a587f8a59dba05c9bd763012e6471d6d9d87739e282bcbb7df4de5c66d06d9e23d8d3 altivec-fixes.patch" diff --git a/main/sdl2/altivec-fixes.patch b/main/sdl2/altivec-fixes.patch new file mode 100644 index 0000000000..7617e63367 --- /dev/null +++ b/main/sdl2/altivec-fixes.patch @@ -0,0 +1,36 @@ +--- SDL2-2.0.5.orig/src/video/SDL_blit_N.c ++++ SDL2-2.0.5/src/video/SDL_blit_N.c +@@ -118,12 +118,6 @@ + 16, 8, 0, 24, + 0, NULL + }; +- if (!srcfmt) { +- srcfmt = &default_pixel_format; +- } +- if (!dstfmt) { +- dstfmt = &default_pixel_format; +- } + const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00, + 0x04, 0x04, 0x04, 0x04, + 0x08, 0x08, 0x08, 0x08, +@@ -132,10 +126,16 @@ + vector unsigned char vswiz; + vector unsigned int srcvec; + #define RESHIFT(X) (3 - ((X) >> 3)) +- Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift); +- Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift); +- Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift); +- Uint32 amask; ++ Uint32 rmask, gmask, bmask, amask; ++ if (!srcfmt) { ++ srcfmt = &default_pixel_format; ++ } ++ if (!dstfmt) { ++ dstfmt = &default_pixel_format; ++ } ++ rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift); ++ gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift); ++ bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift); + /* Use zero for alpha if either surface doesn't have alpha */ + if (dstfmt->Amask) { + amask = |