Package Details: duckstation-git 0.1.r8033.g2f70d1b-1

Git Clone URL: https://aur.archlinux.org/duckstation-git.git (read-only, click to copy)
Package Base: duckstation-git
Description: A Sony PlayStation (PSX) emulator, focusing on playability, speed, and long-term maintainability (git version)
Upstream URL: https://github.com/stenzek/duckstation
Keywords: emulator game gaming psone psx
Licenses: cc-by-nc-nd-4.0
Conflicts: duckstation
Provides: duckstation
Submitter: jackdroido
Maintainer: eugene
Last Packager: eugene
Votes: 26
Popularity: 0.75
First Submitted: 2020-04-25 18:24 (UTC)
Last Updated: 2024-12-01 23:33 (UTC)

Dependencies (44)

Required by (0)

Sources (10)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 11 Next › Last »

MaximGun commented on 2024-05-25 14:08 (UTC)

Failing to build for me:

FAILED: src/util/CMakeFiles/util.dir/gpu_device.cpp.o 
/usr/lib/ccache/bin/clang++ -DENABLE_EGL=1 -DENABLE_OPENGL=1 -DENABLE_VULKAN=1 -DENABLE_WAYLAND=1 -DENABLE_X11=1 -DSOUNDTOUCH_FLOAT_SAMPLES -DST_NO_EXCEPTION_HANDLING=1 -DXXH_STATIC_LINKING_ONLY -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/src/util/.. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/src/common/.. -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/fmt/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/fast_float/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/simpleini/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/imgui/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/libchdr/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/soundtouch/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/xxhash/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/reshadefx/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/glad/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/vulkan/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/cubeb/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/freesurround/include -I/home/maximgun/.cache/yay/duckstation-git/src/duckstation/dep/kissfft/include -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -march=znver3 -mtune=generic -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -fuse-ld=mold         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer         -Wno-implicit-function-declaration -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -Wno-error=format-security -Wno-switch -fno-exceptions -fno-rtti -DFMT_EXCEPTIONS=0 -O3 -DNDEBUG -std=gnu++20 -flto=thin -Winvalid-pch -Xclang -include-pch -Xclang /home/maximgun/.cache/yay/duckstation-git/src/build/src/util/CMakeFiles/util.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/maximgun/.cache/yay/duckstation-git/src/build/src/util/CMakeFiles/util.dir/cmake_pch.hxx -MD -MT src/util/CMakeFiles/util.dir/gpu_device.cpp.o -MF src/util/CMakeFiles/util.dir/gpu_device.cpp.o.d -o src/util/CMakeFiles/util.dir/gpu_device.cpp.o -c /home/maximgun/.cache/yay/duckstation-git/src/duckstation/src/util/gpu_device.cpp
clang++: warning: argument unused during compilation: '-fuse-ld=mold' [-Wunused-command-line-argument]
/home/maximgun/.cache/yay/duckstation-git/src/duckstation/src/util/gpu_device.cpp:1226:79: error: too few arguments to function call, expected 3, have 1
1226 |     dyn_shaderc::shaderc_compile_options_set_generate_debug_info(options.get());
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ^
/home/maximgun/.cache/yay/duckstation-git/src/duckstation/src/util/gpu_device.cpp:1239:56: error: too few arguments to function call, expected 8, have 7
1237 |     dyn_shaderc::shaderc_compile_into_spv(dyn_shaderc::s_compiler.get(), source.data(), source.length(),
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1238 |                                           stage_kinds[static_cast<size_t>(stage)], "source", entry_point,
1239 |                                           options.get()),
    |                                                        ^
2 errors generated.

LarryDave commented on 2024-05-14 09:13 (UTC)

Can't build because now this packages needs normal shaderc, while pcsx2-git needs shaderc-non-semantic-debug. Don't know what to do, help? :D

eugene commented on 2024-04-18 10:25 (UTC)

I adopted most of your changes, @sl1pkn07. Your input is greatly appreciated.

sl1pkn07 commented on 2024-04-17 19:16 (UTC)

take one:. please test (for me build and run bioses, not tested with games)

# Contributor: katt <magunasu.b97@gmail.com>

pkgname=duckstation-git
_pkgname=duckstation
pkgver=0.1.r6674.gd918705
pkgdesc='A Sony PlayStation (PSX) emulator, focusing on playability, speed, and long-term maintainability (git version)'
pkgrel=1
arch=(x86_64 aarch64)
url=https://github.com/stenzek/duckstation
license=(GPL-3.0-only)
depends=(
    sh
    glibc
    gcc-libs
    sdl2
    qt6-base
    libwebp libwebp.so
    libjpeg-turbo libjpeg.so
    libpng libpng16.so
    libxrandr
    libx11
    freetype2 libfreetype.so
    zstd libzstd.so
    zlib libz.so
    dbus libdbus-1.so
    curl libcurl.so
    systemd-libs libudev.so
    hicolor-icon-theme
    libbacktrace-git libbacktrace.so
    )
makedepends=(
    git
    cmake
    clang
    lld
    llvm
    extra-cmake-modules
    qt6-tools
    qt6-wayland
    libdrm
    libpulse
    libwebp
    alsa-lib
    sndio
    ninja
    jack
    python
    )
optdepends=(
    'qt6-wayland: Wayland support'
    'libpulse: Pulseaudio support'
    'sndio: Small audio support'
    'alsa-lib: ALSA support'
    'jack: JACK support'
)
provides=('duckstation')
conflicts=('duckstation')
source=(git+"$url".git
    git+https://github.com/google/shaderc.git#tag=v2024.0
    git+https://github.com/KhronosGroup/glslang.git#commit=d73712b8f6c9047b09e99614e20d456d5ada2390
    git+https://github.com/KhronosGroup/SPIRV-Headers.git#commit=8b246ff75c6615ba4532fe4fde20f1be090c3764
    git+https://github.com/KhronosGroup/SPIRV-Tools.git#commit=04896c462d9f3f504c99a4698605b6524af813c1
    duckstation-qt.desktop
    duckstation-qt.sh)
sha256sums=(
    'SKIP'
    'c1f935c1e0338e274cea4f106fc3b13e02f4150e504a255ddb18221bd80bb416'
    '8c97fbe90abb311903b29d1fec8799e6e8a618ed2b69de6833dfed9252c85dad'
    'bbbdf1f65d11a5e6a1f03da5804e555af9c027e76f9dd22135a092f88b8a9b2b'
    '56bb21ba0a74b6a489398d5a6d429d7e38346ef67c21ee6df00395c990224701'
    'ec2d7358f81598390a8ceca2d1974be3e5f7c45602b550c89a1e9323ab45474b'
    '221a8fc0d1f0cebdf281acc26484e98ebbb59f876e12fdef3f03cf91380e31f5'
)
options=('!lto')

pkgver() {
    cd "$srcdir/$_pkgname"
    git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    echo "Building shaderc..."
    cd "$srcdir/shaderc"
    pushd third_party
        ln -sf ../../glslang ./
        ln -sf ../../SPIRV-Headers ./spirv-headers
        ln -sf ../../SPIRV-Tools ./spirv-tools
    popd
    git apply "$srcdir/$_pkgname/scripts/shaderc-changes.patch" \
      --exclude=CMakeLists.txt \
      --exclude=libshaderc/CMakeLists.txt \
      --exclude third_party/CMakeLists.txt

    cmake -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_PREFIX_PATH="$srcdir/deps" \
        -DCMAKE_INSTALL_PREFIX="$srcdir/deps" \
        -DSHADERC_SKIP_TESTS=ON \
        -DSHADERC_SKIP_EXAMPLES=ON \
        -DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
        -G Ninja
    cmake --build build --parallel
    cmake --install build

    echo "Building duckstation..."
    cd "$srcdir"

    # preparation for find shaderc as static
    sed -e 's|shaderc_shared|shaderc_combined|g' \
        -e 's|PUBLIC Shaderc|PRIVATE Shaderc|g' \
        -i duckstation/CMakeModules/FindShaderc.cmake \
        -i duckstation/src/util/CMakeLists.txt
    sed '/INTERFACE_COMPILE/d' -i duckstation/CMakeModules/FindShaderc.cmake

    cmake -B build -S duckstation \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_C_COMPILER=clang \
        -DCMAKE_CXX_COMPILER=clang++ \
        -DCMAKE_C_FLAGS="$CFLAGS -Wno-error=format-security" \
        -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-error=format-security" \
        -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
        -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
        -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
        -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
        -DCMAKE_PREFIX_PATH="$srcdir/deps" \
        -DCMAKE_SKIP_RPATH=ON \
        -DBUILD_NOGUI_FRONTEND=OFF \
        -DBUILD_QT_FRONTEND=ON \
        -G Ninja \
        -Wno-dev
    cmake --build build --parallel
}

package() {
    # Initially install everything into /usr/lib/duckstation
    install -m 755 -d "${pkgdir}/usr/lib"
    cp -drv --no-preserve='ownership' build/bin "${pkgdir}/usr/lib/${_pkgname}"

    # Move shared data to /usr/share/duckstation
    cd "${pkgdir}/usr/lib/${_pkgname}"
    install -m 755 -d "${pkgdir}/usr/share/${_pkgname}"
    for _dir in resources translations
    do
        mv "${_dir}" "${pkgdir}/usr/share/${_pkgname}"
        ln -s "/usr/share/${_pkgname}/${_dir}" .
    done

    # Install additional license
    install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}/"
    mv "${pkgdir}/usr/share/${_pkgname}/resources/thirdparty.html" "${pkgdir}/usr/share/licenses/${pkgname}/"
    ln -s "/usr/share/licenses/${pkgname}/thirdparty.html" "${pkgdir}/usr/share/${_pkgname}/resources/"

    install -Dvm755 "${srcdir}/duckstation-qt.sh" "${pkgdir}/usr/bin/duckstation-qt"
    install -Dvm644 "${srcdir}/duckstation-qt.desktop" "${pkgdir}/usr/share/applications/duckstation-qt.desktop"
    install -Dvm644 "${pkgdir}/usr/share/${_pkgname}/resources/images/duck.png" "${pkgdir}/usr/share/icons/hicolor/64x64/apps/duckstation-qt.png"
}

i take the liberty to add some dependencies described in the build process. can remove it if not need at all

greetings

sl1pkn07 commented on 2024-04-17 15:52 (UTC)

oh. i missread how build dusckstation their dependencies (normally this type of projects use gitmodules, but is not the case). let me check again your new pkgbuild posted below

greetings

sl1pkn07 commented on 2024-04-16 13:26 (UTC)

you not need build separately shaderrc in the pkgbuild, let duckstation build it when use their build environment.

let me time and i craft the pkgbuild for you

greetings

eugene commented on 2024-04-16 12:06 (UTC) (edited on 2024-04-16 12:41 (UTC) by eugene)

@sl1pkn07 I'm not sure it is possible.
Locally I modified PKBUILD to build shaderc as part of the package and to place it alongside duckstation binary. But implementation is rather ugly, and uses patchelf to mess with embedded paths.
To those who are curious: https://pastebin.com/hcy7FraF

sl1pkn07 commented on 2024-04-15 23:57 (UTC)

better make shaderrc with that custom patch as static library and build duskstation against it

greetings

eugene commented on 2024-04-15 16:12 (UTC) (edited on 2024-04-15 16:12 (UTC) by eugene)

@Niinu Reason for addition is this commit: https://github.com/stenzek/duckstation/commit/59eeb892432c587f3bff0400b93c26291c61ba05
Without shaderc-non-semantic-debug package build fails.