summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiota2023-11-30 07:04:25 -0800
committerxiota2023-11-30 07:05:11 -0800
commitb9253e6807ed7d483844566bc9540e3ab061ef86 (patch)
tree12a0169f6e5e9c355efd24ed1cad9d77c8a5dc78
parent7eba7208b708b3ee5a65e654ae4be9cf39e2553f (diff)
downloadaur-b9253e6807ed7d483844566bc9540e3ab061ef86.tar.gz
5.0.r20495: reorganize, update submodules
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD213
2 files changed, 136 insertions, 81 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6663ce083c06..709e5407f391 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dolphin-emu-debugfast-git
pkgdesc = A Gamecube / Wii / Triforce emulator
- pkgver = 5.0.r20303.gec69ed2173
+ pkgver = 5.0.r20495.g89963c287c
pkgrel = 1
url = https://github.com/dolphin-emu/dolphin
arch = x86_64
@@ -48,6 +48,7 @@ pkgbase = dolphin-emu-debugfast-git
options = !lto
source = dolphin-emu::git+https://github.com/dolphin-emu/dolphin.git
source = zlib-ng::git+https://github.com/zlib-ng/zlib-ng.git
+ source = cyan4973.xxhash::git+https://github.com/Cyan4973/xxHash.git
source = epezent.implot::git+https://github.com/epezent/implot.git
source = gpuopen-librariesandsdks.vulkanmemoryallocator::git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
source = mgba-emu.mgba::git+https://github.com/mgba-emu/mgba.git
@@ -58,5 +59,6 @@ pkgbase = dolphin-emu-debugfast-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = SKIP
pkgname = dolphin-emu-debugfast-git
diff --git a/PKGBUILD b/PKGBUILD
index b84098ce5c34..0afa12cc8d8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,88 +4,103 @@
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Jeremy Newton (Mystro256) <alexjnewt@gmail.com>
+# options
: ${_debugfast:=false}
+: ${_system_zlib:=false}
+: ${_avx_build:=false}
+: ${_pkgtype:=debugfast-git}
+
+
+if [[ x"${_avx_build::1}" == "xt" ]] ; then
+ if [ x"${_pkgtype: -4}" == "x-git" ] ; then
+ _pkgtype="${_pkgtype%-*}-avx-${_pkgtype##*-}"
+ else
+ _pkgtype+="-avx"
+ fi
+fi
+
+# basic info
_pkgname="dolphin-emu"
-pkgname="$_pkgname-debugfast-git"
-pkgver=5.0.r20303.gec69ed2173
+pkgname="$_pkgname${_pkgtype:+-$_pkgtype}"
+pkgver=5.0.r20495.g89963c287c
pkgrel=1
pkgdesc='A Gamecube / Wii / Triforce emulator'
arch=(x86_64)
+_url="https://github.com/dolphin-emu/dolphin"
url="https://dolphin-emu.org"
license=(GPL2)
-depends=(
- # extra/dolphin-emu
- alsa-lib
- bluez-libs
- enet
- gcc-libs
- glibc
- hidapi
- libavcodec.so
- libavformat.so
- libavutil.so
- libcurl.so
- libevdev
- libgl
- libminiupnpc.so
- libpulse
- libsfml-network.so
- libsfml-system.so
- libswscale.so
- libudev.so
- libusb-1.0.so
- libx11
- libxi
- libxrandr
- lzo
- minizip-ng
- pugixml
- qt6-base
- qt6-svg
- sfml
-
- ## dolphin-emu-git
- #libmgba
- #zlib-ng
- cubeb
- fmt
- libspng
- mbedtls2
-)
-makedepends+=(
- cmake
- git
- ninja
- python
-)
-optdepends=(
- 'pulseaudio: PulseAudio backend'
-)
-
-options=(!emptydirs !lto)
-
-if [ x"$pkgname" == x"$_pkgname" ] ; then
- # normal package
- :
-else
- # git package
- url="https://github.com/dolphin-emu/dolphin"
- provides=("$_pkgname")
- conflicts=("$_pkgname")
+# main package
+_main_package() {
+ depends=(
+ # extra/dolphin-emu
+ alsa-lib
+ bluez-libs
+ enet
+ gcc-libs
+ glibc
+ hidapi
+ libavcodec.so
+ libavformat.so
+ libavutil.so
+ libcurl.so
+ libevdev
+ libgl
+ libminiupnpc.so
+ libpulse
+ libsfml-network.so
+ libsfml-system.so
+ libswscale.so
+ libudev.so
+ libusb-1.0.so
+ libx11
+ libxi
+ libxrandr
+ lzo
+ minizip-ng
+ pugixml
+ qt6-base
+ qt6-svg
+ sfml
- _pkgsrc="$_pkgname"
- source=("$_pkgname"::"git+$url.git")
- sha256sums+=('SKIP')
+ ## dolphin-emu-git
+ #libmgba
+ cubeb
+ fmt
+ libspng
+ mbedtls2
+ )
+ makedepends+=(
+ cmake
+ git
+ ninja
+ python
+ )
+ optdepends=(
+ 'pulseaudio: PulseAudio backend'
+ )
- pkgver() {
- cd "$_pkgsrc"
- git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
- }
-fi
+ options=(!emptydirs !lto)
+ if [ x"$pkgname" == x"$_pkgname" ] ; then
+ _main_stable
+ else
+ _main_git
+ fi
+
+ _source_dolphin_emu
+}
+
+# submodules
_source_dolphin_emu() {
+ if [ x"${_system_zlib::1}" == "xt" ] ; then
+ depends+=(zlib-ng)
+ else
+ source+=('zlib-ng'::'git+https://github.com/zlib-ng/zlib-ng.git')
+ sha256sums+=('SKIP')
+ fi
+
source+=(
#'bylaws.libadrenotools'::'git+https://github.com/bylaws/libadrenotools.git'
#'curl'::'git+https://github.com/curl/curl.git'
@@ -100,8 +115,7 @@ _source_dolphin_emu() {
#'mozilla.cubeb'::'git+https://github.com/mozilla/cubeb.git'
#'randy408.libspng'::'git+https://github.com/randy408/libspng.git'
- 'zlib-ng'::'git+https://github.com/zlib-ng/zlib-ng.git'
-
+ 'cyan4973.xxhash'::'git+https://github.com/Cyan4973/xxHash.git'
'epezent.implot'::'git+https://github.com/epezent/implot.git'
'gpuopen-librariesandsdks.vulkanmemoryallocator'::'git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git'
'mgba-emu.mgba'::'git+https://github.com/mgba-emu/mgba.git'
@@ -122,7 +136,6 @@ _source_dolphin_emu() {
#'SKIP'
'SKIP'
-
'SKIP'
'SKIP'
'SKIP'
@@ -145,27 +158,55 @@ _source_dolphin_emu() {
#['mozilla.cubeb']='Externals/cubeb/cubeb'
#['randy408.libspng']='Externals/libspng/libspng'
+ ['cyan4973.xxhash']='Externals/xxhash/xxHash'
['epezent.implot']='Externals/implot/implot'
['gpuopen-librariesandsdks.vulkanmemoryallocator']='Externals/VulkanMemoryAllocator'
['mgba-emu.mgba']='Externals/mGBA/mgba'
['retroachievements.rcheevos']='Externals/rcheevos/rcheevos'
- ['zlib-ng']='Externals/zlib-ng/zlib-ng'
)
+
+ if [ x"${_system_zlib::1}" != "xt" ] ; then
+ _submodules+=(
+ ['zlib-ng']='Externals/zlib-ng/zlib-ng'
+ )
+ fi
+
_submodule_update
)
}
-_submodule_update() {
- for key in ${!_submodules[@]} ; do
- git submodule init "${_submodules[${key}]}"
- git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
- git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
- done
+# stable package
+_main_stable() {
+ :
}
-_source_dolphin_emu
+# git package
+_main_git() {
+ url="${_url:?}"
+ provides=("$_pkgname")
+ conflicts=("$_pkgname")
+
+ _pkgsrc="$_pkgname"
+ source=("$_pkgname"::"git+$url.git")
+ sha256sums+=('SKIP')
+
+ pkgver() {
+ cd "$_pkgsrc"
+ git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+ }
+}
+
+# common functions
prepare() {
+ _submodule_update() {
+ for key in ${!_submodules[@]} ; do
+ git submodule init "${_submodules[${key}]}"
+ git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
+ git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
+ done
+ }
+
_prepare_dolphin_emu
# Fix version string
@@ -180,6 +221,15 @@ prepare() {
}
build() {
+ if [ x"${_system_zlib::1}" == "xt" ] ; then
+ export LDFLAGS="-Wl,--copy-dt-needed-entries"
+ fi
+
+ if [[ x"${_avx_build::1}" == "xt" ]] ; then
+ export CFLAGS="$(echo "$CFLAGS" | sed -E 's@(\s*-(march|mtune)=\S+\s*)@ @g;s@\s*-O[0-9]\s*@ @g;s@\s+@ @g') -march=x86-64-v3 -mtune=skylake -O3"
+ export CXXFLAGS="$(echo "$CFLAGS" | sed -E 's@(\s*-(march|mtune)=\S+\s*)@ @g;s@\s*-O[0-9]\s*@ @g;s@\s+@ @g') -march=x86-64-v3 -mtune=skylake -O3"
+ fi
+
local _cmake_options=(
-B build
-S "$_pkgname"
@@ -213,3 +263,6 @@ package() {
rm -rf "${pkgdir:?}"/usr/{include,lib/libdiscord-rpc.a}
}
+
+# execute
+_main_package