summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD97
2 files changed, 86 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ce6957573305..2a88c74d5482 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = flycast
pkgdesc = A multi-platform Sega Dreamcast, Naomi and Atomiswave emulator
pkgver = 2.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/flyinghead/flycast
arch = x86_64
arch = i686
@@ -14,26 +14,24 @@ pkgbase = flycast
depends = hicolor-icon-theme
depends = libgl
depends = libzip
- provides = flycast
provides = reicast
- conflicts = flycast
source = flycast::git+https://github.com/flyinghead/flycast.git#tag=V2.1
source = SDL::git+https://github.com/libsdl-org/SDL
source = Vulkan-Headers::git+https://github.com/KhronosGroup/Vulkan-Headers
source = VulkanMemoryAllocator::git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
source = breakpad::git+https://github.com/flyinghead/mingw-breakpad
source = glslang::git+https://github.com/KhronosGroup/glslang
- source = libchdr::git+https://github.com/rtissera/libchdr
+ source = libchdr::git+https://github.com/flyinghead/libchdr
source = luabridge::git+https://github.com/vinniefalco/LuaBridge
source = oboe::git+https://github.com/google/oboe
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
- md5sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = flycast
diff --git a/PKGBUILD b/PKGBUILD
index ab962d4744ad..8e0908c2f0bd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,15 @@
+# Maintainer: xiota / aur.chaotic.cx
+
_pkgname=flycast
pkgname="$_pkgname"
pkgver=2.1
-_tag="V$pkgver"
-pkgrel=2
+_tag="V${pkgver%%.r*}"
+pkgrel=3
pkgdesc='A multi-platform Sega Dreamcast, Naomi and Atomiswave emulator'
arch=('x86_64' 'i686')
url="https://github.com/flyinghead/flycast"
license=('GPL2')
+
depends=(
'alsa-lib'
'hicolor-icon-theme'
@@ -19,21 +22,61 @@ makedepends=(
'python'
'systemd'
)
-provides=("$_pkgname" reicast)
-conflicts=("$_pkgname")
-source=(
- "$_pkgname"::"git+$url.git#tag=$_tag"
+
+provides=(reicast)
+
+if [ x"$pkgname" == x"$_pkgname" ] ; then
+ # normal package
+ _pkgsrc="$_pkgname"
+ source+=(
+ "$_pkgsrc"::"git+$url.git#tag=$_tag"
+ )
+ sha256sums+=(
+ 'SKIP'
+ )
+
+ pkgver() {
+ cd "$_pkgsrc"
+ echo "${pkgver%%.r*}"
+ }
+else
+ # git package
+ provides+=("$_pkgname")
+ conflicts+=("$_pkgname")
+
+ _pkgsrc="$_pkgname"
+ source+=(
+ "$_pkgsrc"::"git+$url.git"
+
+ # submodules
+ 'Spout'::'git+https://github.com/vkedwardli/Spout2'
+ 'Syphon'::'git+https://github.com/vkedwardli/Syphon-Framework'
+ )
+ sha256sums+=(
+ 'SKIP'
+
+ 'SKIP'
+ 'SKIP'
+ )
+
+ pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags | sed -E 's/^[Vv]//;s/([^-]*-g)/r\1/;s/-/./g'
+ }
+fi
+
+source+=(
+ # common submodules
"SDL"::"git+https://github.com/libsdl-org/SDL"
"Vulkan-Headers"::"git+https://github.com/KhronosGroup/Vulkan-Headers"
"VulkanMemoryAllocator"::"git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator"
"breakpad"::"git+https://github.com/flyinghead/mingw-breakpad"
"glslang"::"git+https://github.com/KhronosGroup/glslang"
- "libchdr"::"git+https://github.com/rtissera/libchdr"
+ "libchdr"::"git+https://github.com/flyinghead/libchdr"
"luabridge"::"git+https://github.com/vinniefalco/LuaBridge"
"oboe"::"git+https://github.com/google/oboe"
)
-md5sums=(
- 'SKIP'
+sha256sums+=(
'SKIP'
'SKIP'
'SKIP'
@@ -45,9 +88,9 @@ md5sums=(
)
prepare() {
- cd "$srcdir/$_pkgname"
+ cd "$_pkgsrc"
- _submodules=(
+ local _submodules=(
'core/deps/SDL'
'core/deps/Vulkan-Headers'
'core/deps/VulkanMemoryAllocator'
@@ -57,27 +100,37 @@ prepare() {
'core/deps/luabridge'
'core/deps/oboe'
)
- for submodule in ${_submodules[@]} ; do
- git submodule init ${submodule}
- git submodule set-url ${submodule} "${srcdir}/${submodule##*/}"
- git -c protocol.file.allow=always submodule update ${submodule}
+
+ if [ x"${pkgname: -4}" != x"-git" ] ; then
+ _submodules+=(
+ 'core/deps/Spout'
+ 'core/deps/Syphon'
+ )
+ fi
+
+ for submodule in "${_submodules[@]}" ; do
+ git submodule init "${submodule}"
+ git submodule set-url "${submodule}" "${srcdir}/${submodule##*/}"
+ git -c protocol.file.allow=always submodule update "${submodule}"
done
- # add missing include
- _file='core/deps/breakpad/src/client/linux/handler/minidump_descriptor.h'
+ # add missing includes
+ local _file='core/deps/breakpad/src/client/linux/handler/minidump_descriptor.h'
if ! grep cstdint "$_file" > /dev/null ; then
sed -Ei 's@^(#include "common/using_std_string.h")$@\1\n#include <cstdint>@' "$_file"
fi
}
build() {
- cd "$srcdir/$_pkgname"
- cmake -B build -S "$srcdir/$_pkgname" \
+ local _cmake_options=(
+ -B build
+ -S "$_pkgsrc"
-DCMAKE_INSTALL_PREFIX='/usr'
- make -C build
+ )
+ cmake "${_cmake_options[@]}"
+ cmake --build build
}
package() {
- cd "$srcdir/$_pkgname/build"
- make DESTDIR="${pkgdir}" install
+ DESTDIR="$pkgdir" cmake --install build
}