LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2024, 06:34 PM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Question compiling duckstation 0.1-6232 - slackbuild update / changes


So I want to try a newer version of duckstation to see if it solves my controller issue - it is detected but I can't do anything because in any game the character just moves sporadically. This doesn't happen in other emulators such as epsxe. Anyways there is a new version that isn't the latest rolling release (i'd rather just try out the latest stable)https://github.com/stenzek/duckstati.../tag/v0.1-6232. I tried the appimage but it just doesn't even run for me so thats out. Looking at the slackbuild though I can't just change the version, how did the author even get the the filename anyways? the link to the latest (non-rolling) is https://github.com/stenzek/duckstati....1-6232.tar.gz - so if I download that i will just have a file saved as duckstation-0.1-6232.tar.gz; but this is the slackbuild:

Code:
#!/bin/bash

# Slackware build script for duckstation

# Copyright 2022-2023 Steven Voges <Oregon, 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)

PRGNAM=duckstation
VERSION=${VERSION:-0.1.6217}
SRCDATE=${SRCDATE:-20230901}
SRCVER=${SRCVER:-d690732c7d553ab1dc1a8e59889c788d7397ec9d}
COMMIT=$(echo $SRCVER | cut -c -7)
DISCORD=${DISCORD:-OFF}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  exit 0
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRCVER
tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
cd $PRGNAM-$SRCVER

# Fix version since we are not using a git repo.
sed -i "s/HASH=\$(git rev-parse HEAD)/HASH=${SRCVER}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/BRANCH=\$(git rev-parse --abbrev-ref HEAD | tr -d '\\\r\\\n')/BRANCH=master/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/TAG=\$(git describe --tags --dirty --exclude latest --exclude preview --exclude legacy --exclude previous-latest | tr -d '\\\r\\\n')/TAG=${VERSION}-${COMMIT}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/DATE=\$(git log -1 --date=iso8601-strict --format=%cd)/DATE=${SRCDATE}/g" \
  src/scmversion/gen_scmversion.sh
# Fix broken compile when discord is disabled
if [ $DISCORD = "OFF" ]; then
  sed -i "3726d;3727d;3728d;3729d;3730d;3731d;3732d;3733d" src/core/system.cpp
fi
# Fix compilation on Current/GCC13
sed -i "8i #include <cstdint>" dep/reshadefx/include/effect_token.hpp

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 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

mkdir -p build
cd build
  cmake \
    -Wno-dev \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_LIBDIR=./lib${LIBDIRSUFFIX} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_DISCORD_PRESENCE=$DISCORD \
    -DUSE_WAYLAND=ON \
    -DCMAKE_BUILD_TYPE=Release ..
  make
  make install/strip DESTDIR=$PKG
cd ..

mkdir -p $PKG/opt/$PRGNAM $PKG/usr/bin $PKG/usr/share/applications $PKG/usr/share/pixmaps
cp -r $TMP/$PRGNAM-$SRCVER/build/bin/* $PKG/opt/$PRGNAM/
ln -s ../../opt/$PRGNAM/$PRGNAM-qt $PKG/usr/bin/$PRGNAM-qt
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
ln -s ../../../opt/$PRGNAM/resources/images/duck.png $PKG/usr/share/pixmaps/$PRGNAM.png

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  *.md LICENSE \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

Last edited by Jeebizz; 01-13-2024 at 12:58 PM.
 
Old 01-08-2024, 08:36 PM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,699

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
I didn't want to install QT6 so I am using the flatpak version. I use Alien Bob's flatpak packages for flatpak. I had a similar issue with my gamepad but was able to fix it by changing settings>Controller>Controller Port ?>Controller type. YMMV
 
Old 01-08-2024, 09:01 PM   #3
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by Daedra View Post
I didn't want to install QT6 so I am using the flatpak version. I use Alien Bob's flatpak packages for flatpak. I had a similar issue with my gamepad but was able to fix it by changing settings>Controller>Controller Port ?>Controller type. YMMV
How did you do that exactly? My controller is an actual Playstation2 controller via one of those usb converters. This is my dmesg:

Code:
[612659.173520] usb 1-1.2: USB disconnect, device number 4
[612661.393272] usb 1-1.2: new low-speed USB device number 7 using ehci-pci
[612661.476018] usb 1-1.2: New USB device found, idVendor=079d, idProduct=0202, bcdDevice= 1.00
[612661.476034] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[612661.476037] usb 1-1.2: Product: USB Game Device
[612661.480748] input: USB Game Device as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:079D:0202.0006/input/input21
[612661.480963] hid-generic 0003:079D:0202.0006: input,hidraw2: USB HID v1.00 Joystick [USB Game Device] on usb-0000:00:1a.0-1.2/input0
Id be happy just to be able to compile the new version of duckstation, I don't care about qt6 since I already installed it - besides its going to replace qt5 anyways when KDE6 hits Slackware anyways. As for the slackbuild, I tried to comment out the source version and date versions, and just use version 0.1.6232, but it errors out after it extracts the file; and I'm not even going to bother with flatpaks.
 
Old 01-08-2024, 09:21 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,699

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
The circle in red in the screenshot. Try playing around with the different controller options and see if one works.
Attached Thumbnails
Click image for larger version

Name:	111.jpg
Views:	21
Size:	226.0 KB
ID:	42369  

Last edited by Daedra; 01-08-2024 at 09:26 PM.
 
Old 01-08-2024, 09:29 PM   #5
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by Daedra View Post
The circle in red in the screenshot. Try playing around with the different controller options and see if one works.
Not sure what I am missing, it "works" , only the character will move on its own without me touching the d-pad , I can try to wrestle with the character by moving the d pad in the opposite direction, this would sound like its more of a physical issue as if my controller itself is dirty, but its clean and again in epsxe I have no issue. Only difference between your screenshot is my for the d-pad mapping is SDL-axis, unless you mapped only the d-pad to your keyboard? but that wouldn't make any sense...I have it set to digital too and shows port 1.
Click image for larger version

Name:	Screenshot_2024-01-08_21-29-13.png
Views:	12
Size:	89.7 KB
ID:	42370

Last edited by Jeebizz; 01-08-2024 at 09:48 PM.
 
Old 01-08-2024, 09:34 PM   #6
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
I'm sure it has something maybe to do with the 'converter', I just don't think duckstation likes it, which is why I want to compile the next version - but the way the slackbuild is, I don't have that option.... I even tried to disable SDL , but that doesn't do anything. I'd rather not go back to epsxe, yea my controller works there - but I like the modest improvement of duckstation has, and the fact that I can enhance to 720p, Lunar Silver Star and Lunar 2 Eternal Blue looks amazing... I just can't play them on duckstation.
 
Old 01-10-2024, 06:13 PM   #7
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Well I still can't get the slackbuild to compile the later versions:
Code:
#!/bin/bash

# Slackware build script for duckstation

# Copyright 2022-2023 Steven Voges <Oregon, 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)

PRGNAM=duckstation
VERSION=${VERSION:-0.1.6232}
#SRCDATE=${SRCDATE:-20230901}
#SRCVER=${SRCVER:-d690732c7d553ab1dc1a8e59889c788d7397ec9d}
#COMMIT=$(echo $SRCVER | cut -c -7)
DISCORD=${DISCORD:-OFF}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-txz}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  exit 0
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
#rm -rf $PRGNAM-$SRCVER
rm -rf $PRGNAM
#tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
tar xvf $CWD/$PRGNAM.tar.gz
#cd $PRGNAM-$SRCVER
cd $PRGNAM

# Fix version since we are not using a git repo.
sed -i "s/HASH=\$(git rev-parse HEAD)/HASH=${SRCVER}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/BRANCH=\$(git rev-parse --abbrev-ref HEAD | tr -d '\\\r\\\n')/BRANCH=master/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/TAG=\$(git describe --tags --dirty --exclude latest --exclude preview --exclude legacy --exclude previous-latest | tr -d '\\\r\\\n')/TAG=${VERSION}-${COMMIT}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/DATE=\$(git log -1 --date=iso8601-strict --format=%cd)/DATE=${SRCDATE}/g" \
  src/scmversion/gen_scmversion.sh
# Fix broken compile when discord is disabled
if [ $DISCORD = "OFF" ]; then
  sed -i "3726d;3727d;3728d;3729d;3730d;3731d;3732d;3733d" src/core/system.cpp
fi
# Fix compilation on Current/GCC13
sed -i "8i #include <cstdint>" dep/reshadefx/include/effect_token.hpp

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 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

mkdir -p build
cd build
  cmake \
    -Wno-dev \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_LIBDIR=./lib${LIBDIRSUFFIX} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_DISCORD_PRESENCE=$DISCORD \
    -DUSE_WAYLAND=ON \
    -DCMAKE_BUILD_TYPE=Release ..
  make
  make install/strip DESTDIR=$PKG
cd ..

mkdir -p $PKG/opt/$PRGNAM $PKG/usr/bin $PKG/usr/share/applications $PKG/usr/share/pixmaps
cp -r $TMP/$PRGNAM-$SRCVER/build/bin/* $PKG/opt/$PRGNAM/
ln -s ../../opt/$PRGNAM/$PRGNAM-qt $PKG/usr/bin/$PRGNAM-qt
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
ln -s ../../../opt/$PRGNAM/resources/images/duck.png $PKG/usr/share/pixmaps/$PRGNAM.png

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  *.md LICENSE \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
Code:
oot@slackmachine:/home/slackuser/source/duckstation# ./duckstation.SlackBuild 
tar: /home/slackuser/source/duckstation/duckstation.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
 
Old 01-10-2024, 06:56 PM   #8
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
try this:

cd /home/slackuser/source/duckstation/
cp duckstation-0.1-6232.tar.gz duckstation.tar.gz

then re-run the SlackBuild
 
Old 01-10-2024, 07:11 PM   #9
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by rkelsen View Post
try this:

cd /home/slackuser/source/duckstation/
cp duckstation-0.1-6232.tar.gz duckstation.tar.gz

then re-run the SlackBuild
starts to extract then stops:

Code:
duckstation-0.1-6232/src/util/vulkan_builders.h
duckstation-0.1-6232/src/util/vulkan_device.cpp
duckstation-0.1-6232/src/util/vulkan_device.h
duckstation-0.1-6232/src/util/vulkan_entry_points.h
duckstation-0.1-6232/src/util/vulkan_entry_points.inl
duckstation-0.1-6232/src/util/vulkan_loader.cpp
duckstation-0.1-6232/src/util/vulkan_loader.h
duckstation-0.1-6232/src/util/vulkan_pipeline.cpp
duckstation-0.1-6232/src/util/vulkan_pipeline.h
duckstation-0.1-6232/src/util/vulkan_stream_buffer.cpp
duckstation-0.1-6232/src/util/vulkan_stream_buffer.h
duckstation-0.1-6232/src/util/vulkan_swap_chain.cpp
duckstation-0.1-6232/src/util/vulkan_swap_chain.h
duckstation-0.1-6232/src/util/vulkan_texture.cpp
duckstation-0.1-6232/src/util/vulkan_texture.h
duckstation-0.1-6232/src/util/wav_writer.cpp
duckstation-0.1-6232/src/util/wav_writer.h
duckstation-0.1-6232/src/util/win32_raw_input_source.cpp
duckstation-0.1-6232/src/util/win32_raw_input_source.h
duckstation-0.1-6232/src/util/window_info.cpp
duckstation-0.1-6232/src/util/window_info.h
duckstation-0.1-6232/src/util/xaudio2_audio_stream.cpp
duckstation-0.1-6232/src/util/xinput_source.cpp
duckstation-0.1-6232/src/util/xinput_source.h
./duckstation.SlackBuild: line 78: cd: duckstation: No such file or directory
root@slackmachine:/home/slackuser/source/duckstation#
 
Old 01-10-2024, 08:12 PM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Did you make these changes to the script?

Code:
#rm -rf $PRGNAM-$SRCVER
rm -rf $PRGNAM
#tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
tar xvf $CWD/$PRGNAM.tar.gz
#cd $PRGNAM-$SRCVER
cd $PRGNAM
 
Old 01-10-2024, 08:15 PM   #11
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by rkelsen View Post
Did you make these changes to the script?

Code:
#rm -rf $PRGNAM-$SRCVER
rm -rf $PRGNAM
#tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
tar xvf $CWD/$PRGNAM.tar.gz
#cd $PRGNAM-$SRCVER
cd $PRGNAM
Yea because there is no src version anymore... I wish this was like a libreoffice , all I have to do is change the version number and thats it - but obviously thats not the case here.... so I'll post the unaltered slackbuild, perhaps you might have a better idea what to modify...

Code:
#!/bin/bash

# Slackware build script for duckstation

# Copyright 2022-2023 Steven Voges <Oregon, 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)

PRGNAM=duckstation
VERSION=${VERSION:-0.1.6217}
SRCDATE=${SRCDATE:-20230901}
SRCVER=${SRCVER:-d690732c7d553ab1dc1a8e59889c788d7397ec9d}
COMMIT=$(echo $SRCVER | cut -c -7)
DISCORD=${DISCORD:-OFF}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  exit 0
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRCVER
tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
cd $PRGNAM-$SRCVER

# Fix version since we are not using a git repo.
sed -i "s/HASH=\$(git rev-parse HEAD)/HASH=${SRCVER}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/BRANCH=\$(git rev-parse --abbrev-ref HEAD | tr -d '\\\r\\\n')/BRANCH=master/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/TAG=\$(git describe --tags --dirty --exclude latest --exclude preview --exclude legacy --exclude previous-latest | tr -d '\\\r\\\n')/TAG=${VERSION}-${COMMIT}/g" \
  src/scmversion/gen_scmversion.sh
sed -i "s/DATE=\$(git log -1 --date=iso8601-strict --format=%cd)/DATE=${SRCDATE}/g" \
  src/scmversion/gen_scmversion.sh
# Fix broken compile when discord is disabled
if [ $DISCORD = "OFF" ]; then
  sed -i "3726d;3727d;3728d;3729d;3730d;3731d;3732d;3733d" src/core/system.cpp
fi
# Fix compilation on Current/GCC13
sed -i "8i #include <cstdint>" dep/reshadefx/include/effect_token.hpp

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 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

mkdir -p build
cd build
  cmake \
    -Wno-dev \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_LIBDIR=./lib${LIBDIRSUFFIX} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DENABLE_DISCORD_PRESENCE=$DISCORD \
    -DUSE_WAYLAND=ON \
    -DCMAKE_BUILD_TYPE=Release ..
  make
  make install/strip DESTDIR=$PKG
cd ..

mkdir -p $PKG/opt/$PRGNAM $PKG/usr/bin $PKG/usr/share/applications $PKG/usr/share/pixmaps
cp -r $TMP/$PRGNAM-$SRCVER/build/bin/* $PKG/opt/$PRGNAM/
ln -s ../../opt/$PRGNAM/$PRGNAM-qt $PKG/usr/bin/$PRGNAM-qt
cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
ln -s ../../../opt/$PRGNAM/resources/images/duck.png $PKG/usr/share/pixmaps/$PRGNAM.png

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  *.md LICENSE \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
 
Old 01-10-2024, 08:21 PM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Change SRCVER:

Code:
SRCVER=0.1-6232
 
Old 01-10-2024, 08:25 PM   #13
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by rkelsen View Post
Change SRCVER:

Code:
SRCVER=0.1-6232
Shouldn't it be 0.1.6232 ?

Also I am starting with the original slackbuilds, and what about srcdate?
 
Old 01-10-2024, 08:29 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by Jeebizz View Post
Shouldn't it be 0.1.6232?
No, it should match the version number in the file name.
 
Old 01-10-2024, 08:31 PM   #15
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,190

Original Poster
Rep: Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382Reputation: 1382
Quote:
Originally Posted by rkelsen View Post
No, it should match the version number in the file name.
Yea I changed it to this now:
Code:
PRGNAM=duckstation
VERSION=${VERSION:-0.1-6232}
SRCDATE=${SRCDATE:-20230901}
SRCVER=${SRCVER:-0.1-6232}
COMMIT=$(echo $SRCVER | cut -c -7)
DISCORD=${DISCORD:-OFF}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
Code:
uckstation-0.1-6232/src/util/win32_raw_input_source.h
duckstation-0.1-6232/src/util/window_info.cpp
duckstation-0.1-6232/src/util/window_info.h
duckstation-0.1-6232/src/util/xaudio2_audio_stream.cpp
duckstation-0.1-6232/src/util/xinput_source.cpp
duckstation-0.1-6232/src/util/xinput_source.h
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Version: 3.21.4
CMake System Name: Linux
Build Type: Release
CMake Error at CMakeLists.txt:50 (find_package):
  Could not find a configuration file for package "SDL2" that is compatible
  with requested version "2.28.5".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/SDL2/sdl2-config.cmake, version: 2.0.20
    /usr/X11R6/lib64/cmake/SDL2/sdl2-config.cmake, version: 2.0.20



-- Configuring incomplete, errors occurred!
See also "/tmp/SBo/duckstation-0.1-6232/build/CMakeFiles/CMakeOutput.log".
Guess now I have to solve my SDL2 problem, but progress at least......
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help installing Duckstation emulator please kernelhead Linux - Newbie 1 06-08-2022 08:12 PM
[SOLVED] sbopkg installs "original" SlackBuild to /usr/doc/<pkg>/ instead of "local" SlackBuild drumz Slackware 29 01-20-2018 12:12 AM
LXer: Technology Changes Us, Changes Society, and Changes Governments LXer Syndicated Linux News 0 10-10-2016 02:00 PM
[Patch and SlackBuild] Grub-2.02~beta2 SlackBuild and Patch. ReaperX7 Slackware 3 01-28-2015 09:30 AM
svn MPlayer slackbuild script: r29363 changes = no more docs andrew.46 Slackware 2 06-20-2009 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration