Bug 228487 - New port: emulators/yuzu, experimental Nintendo Switch emulator
Summary: New port: emulators/yuzu, experimental Nintendo Switch emulator
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
Depends on:
Reported: 2018-05-25 16:31 UTC by Greg V
Modified: 2019-07-04 13:39 UTC (History)
2 users (show)

See Also:

yuzu.patch (4.92 KB, patch)
2018-05-25 16:31 UTC, Greg V
no flags Details | Diff
yuzu.patch v2 (4.61 KB, patch)
2018-05-27 11:15 UTC, Greg V
no flags Details | Diff
yuzu.patch v3 (6.19 KB, patch)
2018-07-09 11:05 UTC, Greg V
no flags Details | Diff
yuzu.patch v4 (6.14 KB, patch)
2018-07-24 18:29 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2018-05-25 16:31:32 UTC
Created attachment 193695 [details]

Based on emulators/citra, thanks jbeich@

unicorn is bundled because yuzu needs newer than any released tagged version.

To test, you can e.g. run vba-next https://github.com/RSDuck/vba-next-switch/releases it should display a tiny file picker menu
Comment 1 Kirill Ponomarev freebsd_committer 2018-05-26 08:58:52 UTC
Doesn't build on current:

Comment 2 Greg V 2018-05-27 11:15:05 UTC
Created attachment 193758 [details]
yuzu.patch v2

> make.sh: gmake: not found

oops, added gmake build dependency
Comment 3 Li-Wen Hsu freebsd_committer 2018-07-09 02:14:26 UTC
Doesn't build on 11: https://gist.github.com/lwhsu/70369ccf248f2836e0519903bdb662a5
Comment 4 Greg V 2018-07-09 11:05:26 UTC
Created attachment 194988 [details]
yuzu.patch v3

Okay.. We don't need unicorn examples here, added a patch to disable building them. Tested on hardened 11-stable.

+ updated git version
Comment 5 Li-Wen Hsu freebsd_committer 2018-07-10 14:22:25 UTC
(In reply to Greg V from comment #4)
Thanks, this one builds fine.

BTW, don't we need to switch to USES=qt:5 and USE_QT?

Please check the 20180630 entry of ports/CHANGES, thanks!
Comment 6 Greg V 2018-07-24 18:29:17 UTC
Created attachment 195430 [details]
yuzu.patch v4

(In reply to Li-Wen Hsu from comment #5)
Sure, here's a version with qt:5
Comment 7 Jan Beich freebsd_committer 2018-07-28 19:18:34 UTC
Comment on attachment 195430 [details]
yuzu.patch v4

> +BROKEN_FreeBSD_10=	libc++ does not support C++17 features e.g., weak_from_this

s/weak_from_this/<string_view>/ per https://ptpb.pw/B1rN

> +ONLY_FOR_ARCHS=	amd64
> +ONLY_FOR_ARCHS_REASON=	https://github.com/MerryMage/dynarmic/issues/35

Builds fine on:
- 11.1 i386, see https://ptpb.pw/-Zuz
- 11.1 aarch64, see https://ptpb.pw/RSV4

Broken on:
- 11.1 armv6, see https://ptpb.pw/pl0a
- 12.0 armv7, see https://ptpb.pw/GuiB

> +USE_SDL=	sdl2

Does input actually work in yuzu-qt5? If not you may need to force SDL2 detection even when -DENABLE_SDL2=off is passed, see emulators/citra/files/patch-CMakeLists.txt

> +USES=		cmake:outsource compiler:c++14-lang iconv localbase:ldflags

Better switch to USES=compiler:c++17-lang as declared in CMakeLists.txt. Fon one, recent Citra (Qt5) doesn't build with Clang 4.0, see https://ptpb.pw/W-dn

> +		-D_DECLARE_C99_LDBL_MATH # XXX ports/193528

This is a cruft from GCC < 6 support. Given C++17 requirement, I think, it's safe to drop.
Comment 8 Jan Beich freebsd_committer 2018-07-28 19:22:57 UTC
(In reply to Jan Beich from comment #7)
> s/weak_from_this/<string_view>/ per https://ptpb.pw/B1rN

Sorry, wrong error log (only 10.4 i386 complained about <string_view>). My point is weak_from_this is not used in Yuzu.
Comment 9 commit-hook freebsd_committer 2019-06-30 00:26:56 UTC
A commit references this bug:

Author: jbeich
Date: Sun Jun 30 00:26:17 UTC 2019
New revision: 505393
URL: https://svnweb.freebsd.org/changeset/ports/505393

  emulators/yuzu: add new port

  PR:		228487
  Submitted by:	Greg V <greg@unrelenting.technology> (based on)

Comment 10 Jan Beich freebsd_committer 2019-06-30 00:39:56 UTC
Greg, can you check it still works? I mostly redid from scratch as your version was severaly out of date both with upstream and citra port.
Comment 11 Greg V 2019-07-04 13:05:12 UTC
(In reply to Jan Beich from comment #10)

Yeah, it can launch a homebrew program (I tested https://github.com/RSDuck/vba-next-switch/releases) with `-platform xcb` (seems like they still don't really support wayland).. I'm not really using it right now, so no serious testing with actual games.
Comment 12 Jan Beich freebsd_committer 2019-07-04 13:39:34 UTC
Thanks for confirming.