diff options
-rw-r--r-- | games/rejoystick/rejoystick.SlackBuild | 18 | ||||
-rw-r--r-- | games/rejoystick/rejoystick.patch | 19 |
2 files changed, 28 insertions, 9 deletions
diff --git a/games/rejoystick/rejoystick.SlackBuild b/games/rejoystick/rejoystick.SlackBuild index 0a314b834ee36..18f9a8d8bab9e 100644 --- a/games/rejoystick/rejoystick.SlackBuild +++ b/games/rejoystick/rejoystick.SlackBuild @@ -6,7 +6,7 @@ PRGNAM=rejoystick VERSION=${VERSION:-0.8.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -46,14 +46,16 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Specify the path to the version.mk file inside of the configure script sed -i "s|^\.\ version\.mk|. ./version.mk|" configure +patch -p1 < $CWD/rejoystick.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -67,14 +69,12 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true # AUTHORS, ChangeLog, and NEWS are empty files mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - COPYING INSTALL README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/rejoystick/rejoystick.patch b/games/rejoystick/rejoystick.patch new file mode 100644 index 0000000000000..a163936aeb9b1 --- /dev/null +++ b/games/rejoystick/rejoystick.patch @@ -0,0 +1,19 @@ +--- rejoystick-0.8.1/src/main.c.orig 2014-12-20 06:55:37.951753670 +0700 ++++ rejoystick-0.8.1/src/main.c 2014-12-20 06:56:23.666092712 +0700 +@@ -137,13 +137,9 @@ + + pthread_t sdl_thread; + +- char* home; +- char* keyfile; +- +- home = (char*)getenv("HOME"); +- keyfile = KEYFILE; +- filename = strcat(home, keyfile); +- ++ const char * home = getenv("HOME"); ++ filename = malloc(strlen(home) + strlen(KEYFILE) + 1); ++ sprintf(filename, "%s%s", home, KEYFILE); + global_argv = argv; + + |