diff options
Diffstat (limited to 'graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild')
-rw-r--r-- | graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild | 76 |
1 files changed, 52 insertions, 24 deletions
diff --git a/graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild b/graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild index 4758daa1e3..5927c3191b 100644 --- a/graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild +++ b/graphics/wine-nine-standalone/wine-nine-standalone.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for wine-nine-standalone -# Copyright 2019 Hunter Sezen California, USA +# Copyright 2019-2020 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=wine-nine-standalone -VERSION=${VERSION:-0.4} +VERSION=${VERSION:-0.7} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -57,24 +57,54 @@ fi set -eu exists () { - v=1 + r=0; cwd="$(pwd)" while [ $# -gt 0 ]; do - arg="$1"; shift - case "$arg" in ''|*/) continue ;; esac - x="${arg##*/}" z="${arg%/*}" - [ ! -f "$z/$x" ] || [ ! -x "$z/$x" ] && [ "$z/$x" = "$arg" ] && continue - [ "$x" = "$z" ] && [ -x "$z/$x" ] && [ ! -f "$arg" ] && z= - p=":$z:$PATH" - while [ "$p" != "${p#*:}" ]; do - p="${p#*:}"; d="${p%%:*}" - if [ -f "$d/$x" ] && [ -x "$d/$x" ]; then - printf %s\\n "$d/$x" - v=0 - break - fi - done + v=1; arg="$1"; shift + case "$arg" in + ''|*/ ) + : + ;; + /* ) + if [ -f "$arg" ] && [ -x "$arg" ]; then + printf %s\\n "$arg" + v=0 + fi + ;; + ./* ) + if [ -f "$arg" ] && [ -x "$arg" ]; then + pre="$(cd -- "${arg%%/*}/" && pwd)" + printf %s\\n "${pre%/}/$arg" + v=0 + fi + ;; + */* ) + if [ -f "$arg" ] && [ -x "$arg" ]; then + printf %s\\n "$(cd -- "${arg%%/*}/.." && pwd)/$arg" + v=0 + fi + ;; + * ) + if [ -n "${PATH+x}" ]; then + p=":${PATH:-$cwd}" + while [ "$p" != "${p#*:}" ] && [ -n "${p#*:}" ]; do + p="${p#*:}"; x="${p%%:*}"; z="${x:-$cwd}"; d="${z%/}/$arg" + if [ -f "$d" ] && [ -x "$d" ]; then + case "$d" in + /* ) : ;; + ./* ) pre="$(cd -- "${d%/*}/" && pwd)"; d="${pre%/}/$d" ;; + * ) d="$(cd -- "${d%/*}/" && pwd)/$arg" ;; + esac + printf %s\\n "$d" + v=0 + break + fi + done + fi + ;; + esac + [ $v = 0 ] || r=1 done - return $v + return $r } rm -rf $PKG @@ -91,9 +121,11 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; if [ "${DEBUG:=0}" != 0 ]; then + NDEBUG=false RELEASE=debug SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0/')" else + NDEBUG=true RELEASE=plain fi @@ -125,7 +157,8 @@ for bin do --libdir=lib$bin \ --bindir=bin$bin \ --cross-file=tools/cross-wine$bin \ - -Dstrip=false \ + -Dstrip=$NDEBUG \ + -Db_ndebug=$NDEBUG \ -Dbuildtype=$RELEASE \ build$bin @@ -148,11 +181,6 @@ EOF chmod 0755 $PKG/usr/bin/ninewinecfg$suffix done -if [ "$DEBUG" = 0 ]; then - 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 -fi - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp LICENSE README.rst $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |