diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2022-12-20 20:40:18 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2022-12-21 13:30:32 +0100 |
commit | a5dc0f82be04d16d330f1343600a16ee1f2a44cc (patch) | |
tree | 057aa329d50374db83d77ce262793d45472affce /patches | |
parent | 15705ea3bcf94a6ac99e92ef8fc782b136e71e4f (diff) | |
download | current-a5dc0f82be04d16d330f1343600a16ee1f2a44cc.tar.gz current-a5dc0f82be04d16d330f1343600a16ee1f2a44cc.tar.xz |
Tue Dec 20 20:40:18 UTC 202220221220204018_15.0
patches/packages/libksba-1.6.3-x86_64-1_slack15.0.txz: Upgraded.
Fix another integer overflow in the CRL's signature parser.
(* Security fix *)
patches/packages/sdl-1.2.15-x86_64-13_slack15.0.txz: Rebuilt.
This update fixes a heap overflow problem in video/SDL_pixels.c in SDL.
By crafting a malicious .BMP file, an attacker can cause the application
using this library to crash, denial of service, or code execution.
Thanks to marav for the heads-up.
For more information, see:
https://www.cve.org/CVERecord?id=CVE-2021-33657
(* Security fix *)
Diffstat (limited to 'patches')
-rw-r--r-- | patches/packages/libksba-1.6.3-x86_64-1_slack15.0.txt (renamed from patches/packages/libksba-1.6.2-x86_64-1_slack15.0.txt) | 0 | ||||
-rw-r--r-- | patches/packages/sdl-1.2.15-x86_64-13_slack15.0.txt | 11 | ||||
-rw-r--r-- | patches/source/sdl/CVE-2021-33657.patch | 35 | ||||
-rw-r--r-- | patches/source/sdl/SDL_mixer.usrlocal.diff | 11 | ||||
-rw-r--r-- | patches/source/sdl/SDL_ttf.shaded.text.diff | 11 | ||||
-rw-r--r-- | patches/source/sdl/libsdl-1.2.15-resizing.patch | 63 | ||||
-rw-r--r-- | patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch | 23 | ||||
-rwxr-xr-x | patches/source/sdl/sdl.SlackBuild | 304 | ||||
-rw-r--r-- | patches/source/sdl/slack-desc | 19 |
9 files changed, 477 insertions, 0 deletions
diff --git a/patches/packages/libksba-1.6.2-x86_64-1_slack15.0.txt b/patches/packages/libksba-1.6.3-x86_64-1_slack15.0.txt index d6bcdaec9..d6bcdaec9 100644 --- a/patches/packages/libksba-1.6.2-x86_64-1_slack15.0.txt +++ b/patches/packages/libksba-1.6.3-x86_64-1_slack15.0.txt diff --git a/patches/packages/sdl-1.2.15-x86_64-13_slack15.0.txt b/patches/packages/sdl-1.2.15-x86_64-13_slack15.0.txt new file mode 100644 index 000000000..5706c71ec --- /dev/null +++ b/patches/packages/sdl-1.2.15-x86_64-13_slack15.0.txt @@ -0,0 +1,11 @@ +sdl: sdl (Simple DirectMedia Layer library) +sdl: +sdl: This is the Simple DirectMedia Layer, a generic API that provides low +sdl: level access to audio, keyboard, mouse, joystick, 3D hardware via +sdl: OpenGL, and 2D framebuffer across multiple platforms. +sdl: +sdl: SDL links against alsa-lib, audiofile, esound, and the X11 libraries. +sdl: Make sure all of these are installed if you're planning to use SDL +sdl: (a full installation will cover all of the prerequisites). +sdl: +sdl: diff --git a/patches/source/sdl/CVE-2021-33657.patch b/patches/source/sdl/CVE-2021-33657.patch new file mode 100644 index 000000000..3ceb96a17 --- /dev/null +++ b/patches/source/sdl/CVE-2021-33657.patch @@ -0,0 +1,35 @@ +From d95c1a4bbd644baba748d341b03141e5f0481ae6 Mon Sep 17 00:00:00 2001 +From: Sam Lantinga <slouken@libsdl.org> +Date: Tue, 30 Nov 2021 12:36:46 -0800 +Subject: [PATCH] Always create a full 256-entry map in case color values are + out of range + +Fixes https://github.com/libsdl-org/SDL/issues/5042 + +Backport of CVE-2021-33657 fix from SDL2 +--- + src/video/SDL_pixels.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c +index 17f1a7199..d0973f217 100644 +--- a/src/video/SDL_pixels.c ++++ b/src/video/SDL_pixels.c +@@ -477,7 +477,7 @@ static Uint8 *Map1to1(SDL_Palette *src, SDL_Palette *dst, int *identical) + } + *identical = 0; + } +- map = (Uint8 *)SDL_malloc(src->ncolors); ++ map = (Uint8 *) SDL_calloc(256, sizeof(Uint8)); + if ( map == NULL ) { + SDL_OutOfMemory(); + return(NULL); +@@ -498,7 +498,7 @@ static Uint8 *Map1toN(SDL_PixelFormat *src, SDL_PixelFormat *dst) + SDL_Palette *pal = src->palette; + + bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel); +- map = (Uint8 *)SDL_malloc(pal->ncolors*bpp); ++ map = (Uint8 *) SDL_calloc(256, bpp); + if ( map == NULL ) { + SDL_OutOfMemory(); + return(NULL); diff --git a/patches/source/sdl/SDL_mixer.usrlocal.diff b/patches/source/sdl/SDL_mixer.usrlocal.diff new file mode 100644 index 000000000..4630e9ea6 --- /dev/null +++ b/patches/source/sdl/SDL_mixer.usrlocal.diff @@ -0,0 +1,11 @@ +--- ./timidity/config.h.orig 2010-02-14 17:14:44.000000000 -0600 ++++ ./timidity/config.h 2010-02-14 17:15:45.000000000 -0600 +@@ -179,7 +179,7 @@ + #else + #define DEFAULT_PATH "/etc/timidity" + #define DEFAULT_PATH1 "/usr/share/timidity" +-#define DEFAULT_PATH2 "/usr/local/lib/timidity" ++#define DEFAULT_PATH2 "/usr/lib/timidity" + #endif + + /* These affect general volume */ diff --git a/patches/source/sdl/SDL_ttf.shaded.text.diff b/patches/source/sdl/SDL_ttf.shaded.text.diff new file mode 100644 index 000000000..549a60a48 --- /dev/null +++ b/patches/source/sdl/SDL_ttf.shaded.text.diff @@ -0,0 +1,11 @@ +--- ./SDL_ttf.c.orig 2012-01-14 22:44:08.000000000 -0600 ++++ ./SDL_ttf.c 2016-06-08 11:59:50.163770281 -0500 +@@ -1747,7 +1747,7 @@ + /* Copy the character from the pixmap */ + src = glyph->pixmap.buffer; + dst = (Uint8*) textbuf->pixels; +- for ( row = 0; row < glyph->bitmap.rows; ++row ) { ++ for ( row = 0; row < glyph->pixmap.rows; ++row ) { + memcpy( dst, src, glyph->pixmap.width ); + src += glyph->pixmap.pitch; + dst += textbuf->pitch; diff --git a/patches/source/sdl/libsdl-1.2.15-resizing.patch b/patches/source/sdl/libsdl-1.2.15-resizing.patch new file mode 100644 index 000000000..709881962 --- /dev/null +++ b/patches/source/sdl/libsdl-1.2.15-resizing.patch @@ -0,0 +1,63 @@ +Description: Revert change that breaks window corner resizing + http://bugzilla.libsdl.org/show_bug.cgi?id=1430 +Author: Andrew Caudwell <acaudwell@gmail.com> +Last-Update: 2012-04-10 +Bug-Debian: http://bugs.debian.org/665779 + +diff -r c787fb1b5699 src/video/x11/SDL_x11events.c +--- a/src/video/x11/SDL_x11events.c Mon Feb 20 23:51:08 2012 -0500 ++++ b/src/video/x11/SDL_x11events.c Mon Mar 26 12:26:52 2012 +1300 +@@ -57,12 +57,6 @@ + static SDLKey MISC_keymap[256]; + SDLKey X11_TranslateKeycode(Display *display, KeyCode kc); + +-/* +- Pending resize target for ConfigureNotify (so outdated events don't +- cause inappropriate resize events) +-*/ +-int X11_PendingConfigureNotifyWidth = -1; +-int X11_PendingConfigureNotifyHeight = -1; + + #ifdef X_HAVE_UTF8_STRING + Uint32 Utf8ToUcs4(const Uint8 *utf8) +@@ -825,16 +819,6 @@ + #ifdef DEBUG_XEVENTS + printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height); + #endif +- if ((X11_PendingConfigureNotifyWidth != -1) && +- (X11_PendingConfigureNotifyHeight != -1)) { +- if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) && +- (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) { +- /* Event is from before the resize, so ignore. */ +- break; +- } +- X11_PendingConfigureNotifyWidth = -1; +- X11_PendingConfigureNotifyHeight = -1; +- } + if ( SDL_VideoSurface ) { + if ((xevent.xconfigure.width != SDL_VideoSurface->w) || + (xevent.xconfigure.height != SDL_VideoSurface->h)) { +diff -r c787fb1b5699 src/video/x11/SDL_x11events_c.h +--- a/src/video/x11/SDL_x11events_c.h Mon Feb 20 23:51:08 2012 -0500 ++++ b/src/video/x11/SDL_x11events_c.h Mon Mar 26 12:26:52 2012 +1300 +@@ -27,8 +27,3 @@ + extern void X11_InitOSKeymap(_THIS); + extern void X11_PumpEvents(_THIS); + extern void X11_SetKeyboardState(Display *display, const char *key_vec); +- +-/* Variables to be exported */ +-extern int X11_PendingConfigureNotifyWidth; +-extern int X11_PendingConfigureNotifyHeight; +- +diff -r c787fb1b5699 src/video/x11/SDL_x11video.c +--- a/src/video/x11/SDL_x11video.c Mon Feb 20 23:51:08 2012 -0500 ++++ b/src/video/x11/SDL_x11video.c Mon Mar 26 12:26:52 2012 +1300 +@@ -1182,8 +1182,6 @@ + current = NULL; + goto done; + } +- X11_PendingConfigureNotifyWidth = width; +- X11_PendingConfigureNotifyHeight = height; + } else { + if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) { + current = NULL; diff --git a/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch b/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch new file mode 100644 index 000000000..7d3e5acfc --- /dev/null +++ b/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch @@ -0,0 +1,23 @@ +--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700 ++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700 +@@ -423,12 +423,15 @@ + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( this->input_grab == SDL_GRAB_OFF ) { +- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { ++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ } ++ posted = SDL_PrivateMouseMotion(0, 0, ++ xevent.xcrossing.x, ++ xevent.xcrossing.y); + } +- posted = SDL_PrivateMouseMotion(0, 0, +- xevent.xcrossing.x, +- xevent.xcrossing.y); + } + break; + diff --git a/patches/source/sdl/sdl.SlackBuild b/patches/source/sdl/sdl.SlackBuild new file mode 100755 index 000000000..d8f943932 --- /dev/null +++ b/patches/source/sdl/sdl.SlackBuild @@ -0,0 +1,304 @@ +#!/bin/bash + +# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2018, 2020, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=sdl +VERSION=${VERSION:-$(echo SDL-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +IMAGE=${IMAGE:-$(echo SDL_image-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +MIXER=${MIXER:-$(echo SDL_mixer-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +NET=${NET:-$(echo SDL_net-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +SOUND=${SOUND:-$(echo SDL_sound-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +TTF=${TTF:-$(echo SDL_ttf-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} + +BUILD=${BUILD:-13_slack15.0} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i586 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-sdl + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf sdl-$VERSION +tar xf $CWD/SDL-$VERSION.tar.?z* || exit 1 +cd SDL-$VERSION || exit 1 +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +zcat $CWD/libsdl-1.2.15-resizing.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/sdl-1.2.14-fix-mouse-clicking.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/CVE-2021-33657.patch.gz | patch -p1 --verbose || exit 1 + +# We must use --disable-x11-shared or programs linked with SDL will +# crash on machines that use the closed source nVidia drivers. + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --disable-arts \ + --disable-esd \ + --enable-shared=yes \ + --enable-static=no \ + --disable-x11-shared || exit 1 + +make $NUMJOBS || make || exit 1 + +# Spam /, for mixer/image later on: +make install || exit 1 +# Later we will need to remove .la files installed to the system by the above. + +# install to package: +make install DESTDIR=$PKG || exit 1 +mkdir -p $PKG/usr/doc/SDL-$VERSION/html +cp -a docs/index.html $PKG/usr/doc/SDL-$VERSION +cp -a docs/html/*.html $PKG/usr/doc/SDL-$VERSION/html +cp -a \ + BUGS COPYING CREDITS INSTALL README* TODO WhatsNew \ + $PKG/usr/doc/SDL-$VERSION + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Add SDL_image: +cd $TMP +rm -rf SDL_image-$IMAGE +tar xf $CWD/SDL_image-$IMAGE.tar.?z* || exit 1 +cd SDL_image-$IMAGE || exit 1 +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# we don't want sdl to load the libs with dlopen(), gcc is smarter... +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --enable-shared=yes \ + --enable-static=no \ + --enable-jpg-shared=no \ + --enable-png-shared=no \ + --enable-tif-shared=no || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 +mkdir -p $PKG/usr/doc/SDL_image-$IMAGE +cp -a \ + CHANGES COPYING README \ + $PKG/usr/doc/SDL_image-$IMAGE + +# Add SDL_mixer: +cd $TMP +rm -rf SDL_mixer-$MIXER +tar xf $CWD/SDL_mixer-$MIXER.tar.?z* || exit 1 +cd SDL_mixer-$MIXER || exit 1 + +# Fix default library path. Don't use /usr/local, and use lib64 where needed: +sed -i "s,usr/local/lib,usr/lib${LIBDIRSUFFIX},g" timidity/config.h + +# Install patched static libmikmod: +tar xf $CWD/libmikmod-3.1.20.tar.xz +( cd libmikmod-3.1.20 + CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr/local \ + --libdir=/usr/local/lib${LIBDIRSUFFIX} \ + --with-pic \ + --enable-shared=no \ + --enable-static=yes || exit 1 + make $NUMJOBS || make || exit 1 + make install || exit 1 +) || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --enable-music-mod \ + --enable-shared=yes \ + --enable-static=no || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/usr/doc/SDL_mixer-$MIXER +cp -a \ + CHANGES COPYING README \ + $PKG/usr/doc/SDL_mixer-$MIXER + +# We do not want to try to pull in -lmikmod, since that was linked static: +sed -i -e "s/ -lmikmod//g" $PKG/usr/lib${LIBDIRSUFFIX}/libSDL_mixer.la + +# Add SDL_net: +cd $TMP +rm -rf SDL_net-$NET +tar xf $CWD/SDL_net-$NET.tar.?z* || exit 1 +cd SDL_net-$NET || exit 1 +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --enable-shared=yes \ + --enable-static=no || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/usr/doc/SDL_net-$NET +cp -a \ + CHANGES COPYING README \ + $PKG/usr/doc/SDL_net-$NET + +# Add SDL_ttf: +cd $TMP +rm -rf SDL_ttf-$TTF +tar xf $CWD/SDL_ttf-$TTF.tar.?z* || exit 1 +cd SDL_ttf-$TTF || exit 1 + +zcat $CWD/SDL_ttf.shaded.text.diff.gz | patch -p1 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --enable-shared=yes \ + --enable-static=no || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/usr/doc/SDL_ttf-$TTF +cp -a \ + CHANGES COPYING README \ + $PKG/usr/doc/SDL_ttf-$TTF + +# Add SDL_sound: +cd $TMP +rm -rf SDL_sound-$SOUND +tar xf $CWD/SDL_sound-$SOUND.tar.?z* || exit 1 +cd SDL_sound-$SOUND || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --enable-shared=yes \ + --enable-static=no || exit 1 + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/usr/doc/SDL_sound-$SOUND +cp -a \ + CHANGES COPYING CREDITS README TODO \ + $PKG/usr/doc/SDL_sound-$SOUND + +# Remove .la files from the package and the system (due to make install): +pushd $PKG + for lafile in usr/lib${LIBDIRSUFFIX}/*.la ; do + rm -f ${lafile} /${lafile} + done +popd + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +gzip -9 $PKG/usr/man/man?/*.? + +cd $PKG +/sbin/makepkg -l y -c n $TMP/sdl-$VERSION-$ARCH-$BUILD.txz diff --git a/patches/source/sdl/slack-desc b/patches/source/sdl/slack-desc new file mode 100644 index 000000000..3ee1d4571 --- /dev/null +++ b/patches/source/sdl/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +sdl: sdl (Simple DirectMedia Layer library) +sdl: +sdl: This is the Simple DirectMedia Layer, a generic API that provides low +sdl: level access to audio, keyboard, mouse, joystick, 3D hardware via +sdl: OpenGL, and 2D framebuffer across multiple platforms. +sdl: +sdl: SDL links against alsa-lib, audiofile, esound, and the X11 libraries. +sdl: Make sure all of these are installed if you're planning to use SDL +sdl: (a full installation will cover all of the prerequisites). +sdl: +sdl: |