Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561914 - games-emulation/dolphin-9999 ebuild updates
Summary: games-emulation/dolphin-9999 ebuild updates
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-30 16:38 UTC by Christian Widmer
Modified: 2019-05-23 18:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The updated ebuild for dolphin-9999 (dolphin-9999.ebuild,4.40 KB, text/plain)
2015-09-30 16:38 UTC, Christian Widmer
Details
Unified diff between the old and new ebuild (dolphin-9999.ebuild.diff,3.89 KB, text/plain)
2015-09-30 16:39 UTC, Christian Widmer
Details
Updated metadata.xml with descriptions for the new use flags (metadata.xml,930 bytes, text/xml)
2015-09-30 16:40 UTC, Christian Widmer
Details
New version of the updated ebuild for dolphin-9999 (dolphin-9999.ebuild,4.29 KB, text/plain)
2015-09-30 22:03 UTC, Christian Widmer
Details
Unified diff between the old and new ebuild (dolphin-9999.ebuild.diff,3.26 KB, text/plain)
2015-09-30 22:05 UTC, Christian Widmer
Details
New version of the updated ebuild for dolphin-9999 (dolphin-9999.ebuild,4.28 KB, text/plain)
2015-10-01 17:28 UTC, Christian Widmer
Details
Unified diff between the old and new ebuild (dolphin-9999.ebuild.diff,3.26 KB, text/plain)
2015-10-01 17:30 UTC, Christian Widmer
Details
New version of the updated ebuild for dolphin-9999 (dolphin-9999.ebuild,4.45 KB, text/plain)
2015-10-07 05:55 UTC, Christian Widmer
Details
New version of the updated metadata.xml (metadata.xml,928 bytes, text/xml)
2015-10-07 06:00 UTC, Christian Widmer
Details
Change QT option to QT2 (dolphin-9999.ebuild.patch,582 bytes, patch)
2016-01-08 17:17 UTC, Christian Widmer
Details | Diff
Add support for LINGUAS to the ebuild (dolphin-9999.ebuild.patch,1.08 KB, patch)
2016-03-01 04:03 UTC, Christian Widmer
Details | Diff
Remove use of the deprecated games.eclass (dolphin-9999_remove-games.patch,1.11 KB, patch)
2016-03-12 14:29 UTC, Christian Widmer
Details | Diff
Update locales (dolphin-9999.ebuild_update_locales.patch,512 bytes, patch)
2016-05-31 14:29 UTC, Christian Widmer
Details | Diff
dolphin-9999.ebuild (dolphin-9999.ebuild,4.36 KB, text/plain)
2018-03-18 23:49 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,4.34 KB, text/plain)
2018-03-19 01:21 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,4.34 KB, text/plain)
2018-03-19 12:03 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,4.36 KB, text/plain)
2018-03-19 12:10 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.29 KB, text/plain)
2018-05-02 04:00 UTC, Samuel Bauer
Details
build.log error (file_561914.txt,1.17 KB, text/plain)
2018-05-28 00:23 UTC, Arif Roktim
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.30 KB, text/plain)
2018-06-04 15:18 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.23 KB, text/plain)
2018-06-04 17:03 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.24 KB, text/plain)
2018-06-23 00:57 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.13 KB, text/plain)
2018-07-02 19:19 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,5.03 KB, text/plain)
2018-07-22 17:01 UTC, Samuel Bauer
Details
dolphin-9999.patch (dolphin-9999_01.diff,3.37 KB, patch)
2018-09-01 15:04 UTC, Samuel Bauer
Details | Diff
dolphin-9999.ebuild (dolphin-9999.ebuild,5.03 KB, text/plain)
2018-09-01 15:52 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,4.96 KB, text/plain)
2018-09-02 13:24 UTC, Samuel Bauer
Details
dolphin-9999.ebuild (dolphin-9999.ebuild,4.98 KB, text/plain)
2018-09-03 09:31 UTC, Samuel Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Widmer 2015-09-30 16:38:38 UTC
Created attachment 413372 [details]
The updated ebuild for dolphin-9999

The live ebuild of games-emulation/dolphin is quite outdated with regards to dependencies and USE flags. Here is an updated version of the ebuild with the rationale for the changes being the following:

SRC_URI: While the URI for the live ebuilds already has changed, the one for the archives still pointed to googlecode.com.

IUSE: The support for openmp was removed by upstream and opengl is mandatory which makes both flags obsolete. The new flags are most of the options extracted from the CMakeLists.txt. Evdev is the upstream default for linux therefore it is marked as default in IUSE. The same holds true for wxwidgets. The system-bochs flag is added because the bundled disassembler (bochs-disasm) they use is part of app-emulation/bochs.

RDEPEND: The dependencies were updated by examining the binaries' dynamic sections and the CMakeLists.txt. Because upstream dropped the use of the havege rng in polarssl, it is not needed to be force-enabled anymore.


There are two remaining issues, though. First, the system-bochs useflag is quite useless as of now because the bochs version in tree does not compile on kernels>=4.0 until bug 551258 is fixed. Second, the CMakeLists.txt for the experimental qt5 frontend does not have an install section for anything apart from APPLE, which leads to the binary not being installed. This, however, is an upstream bug and I am going to report it there.
Comment 1 Christian Widmer 2015-09-30 16:39:30 UTC
Created attachment 413374 [details]
Unified diff between the old and new ebuild
Comment 2 Christian Widmer 2015-09-30 16:40:14 UTC
Created attachment 413376 [details]
Updated metadata.xml with descriptions for the new use flags
Comment 3 Christian Widmer 2015-09-30 22:03:53 UTC
Created attachment 413396 [details]
New version of the updated ebuild for dolphin-9999

Unfortunately, bochs does not install any header files which leads to the approach of using a system-wide installation to link against not working. Therefore I removed the flag from the ebuild in this new version. I also used the opportunity to fix the sorting of RDEPEND which also revealed that I accidentally listed virtual/opengl twice. Lastly, I added sys-devel/gettext to DEPEND because it is needed to process the translations.
Comment 4 Christian Widmer 2015-09-30 22:05:46 UTC
Created attachment 413398 [details]
Unified diff between the old and new ebuild
Comment 5 Christian Widmer 2015-10-01 17:28:56 UTC
Created attachment 413452 [details]
New version of the updated ebuild for dolphin-9999

Removed the qt5 built with use dependency from cmake which I added under the false assumption that it influences anything besides cmake frontends.
Comment 6 Christian Widmer 2015-10-01 17:30:41 UTC
Created attachment 413454 [details]
Unified diff between the old and new ebuild
Comment 7 Christian Widmer 2015-10-07 05:55:33 UTC
Created attachment 413952 [details]
New version of the updated ebuild for dolphin-9999

Another update of the ebuild. This one adds use flags for advanced logging, precompiled headers (was used by default before) and profiling using OProfile (discovery of it is bugged at the moment, but an upstream fix has been proposed). Furthermore upstream replaced polarssl with mbedtls so the dependency was changed accordingly.

I'll stop uploading diffs until explicitly requested because they probably weren't needed in the first place.
Comment 8 Christian Widmer 2015-10-07 06:00:26 UTC
Created attachment 413954 [details]
New version of the updated metadata.xml

Updated the use flags' descriptions.
Comment 9 edoceo 2015-11-30 06:04:53 UTC
I just tried this ebuild and it worked just great for me.  The ebuild that is in mainline portage won't work at all because of missing mbedtls.  I would like to see the ebuild provided here moved forward.  Thanks to Christian for making this work.
Comment 10 Devan Franchini (RETIRED) gentoo-dev 2015-12-12 20:57:23 UTC
Thank you for taking the time to submit both the bug report and these patches.

For the most part, I've pretty much taken what was in the ebuild you uploaded, and applied to it the ebuild which will be on portage's main tree. If you want to see what I didn't include and feel like there is something that should be in there that isn't then feel free to comment in here and I'll respond as soon as I can.

I don't plan to close this bug report as it can be used in discussion of further dolphin-9999 updates. Once I test the ebuild shortly, I'll be pushing it to the tree.

By the way, I noticed that bochs-2.6.8 does build on 4.0+ linux kernels, however, dolphin's build system makes no attempt to make use of a shared bochs over the one located in the External.
Comment 11 Christian Widmer 2015-12-12 23:57:17 UTC
Thanks for reviewing my proposed changes!

There are indeed a few questions regarding the changes you made. I'm pretty sure nvidia-cg-toolkit isn't needed anymore, for the project removed it from their externals in 2012 and a quick grep over the sources shows nothing is including cg.h. The same holds true for glew, which was completely dropped in 2013. On the other hand, readelf -d shows that the binary definitely links against libpng and lzo, both of which are also in the Externals directory.
Comment 12 David Brooke 2015-12-13 05:45:58 UTC
I ran into this problem during an install with the latest ebuild:

[ 61%] Building CXX object Source/Core/Core/CMakeFiles/core.dir/HW/GCMemcard.cpp.o
cd /var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999_build/Source/Core/Core && /usr/bin/x86_64-pc-linux-gnu-g++  -DDATA_DIR=\"/usr/share/games/dolphin/\" -DHAVE_ALSA=1 -DHAVE_AO=0 -DHAVE_BLUEZ=1 -DHAVE_LIBAV -DHAVE_OPENAL=0 -DHAVE_PORTAUDIO=1 -DHAVE_PULSEAUDIO=0 -DHAVE_SDL=1 -DHAVE_WX=1 -DHAVE_X11=1 -DHAVE_X11_XINPUT2=1 -DHAVE_XRANDR=1 -DUSE_PIPES=1 -DWXUSINGDLL -D_ARCH_64=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__WXGTK__   -DNDEBUG -DNDEBUG -march=core-avx2 -O2 -pipe  -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -fvisibility-inlines-hidden -fvisibility=hidden -pthread -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Externals/GL -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Externals/Bochs_disasm -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Externals/xxhash -I/usr/include/libpng16 -I/usr/include/SDL2 -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Externals/SOIL -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -isystem /usr/lib64/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999_build/Source/Core/Common -I/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Externals/gtest/include    -msse2 -Wall -fno-strict-aliasing -fno-exceptions -std=c++1y -o CMakeFiles/core.dir/HW/GCMemcard.cpp.o -c /var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core/Core/HW/GCMemcard.cpp
/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core/Core/HW/EXI_DeviceMic.cpp: In member function ‘void CEXIMic::StreamReadOne()’:
/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core/Core/HW/EXI_DeviceMic.cpp:124:45: error: ‘memcpy’ was not declared in this scope
   memcpy(ring_buffer, last_buffer, buff_size);
                                             ^
/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core/Core/HW/EXI_DeviceMic.cpp: In constructor ‘CEXIMic::CEXIMic(int)’:
/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999/Source/Core/Core/HW/EXI_DeviceMic.cpp:154:44: error: ‘memset’ was not declared in this scope
  memset(ring_buffer, 0, sizeof(ring_buffer));
                                            ^
Source/Core/Core/CMakeFiles/core.dir/build.make:2366: recipe for target 'Source/Core/Core/CMakeFiles/core.dir/HW/EXI_DeviceMic.cpp.o' failed
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/HW/EXI_DeviceMic.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999_build'
CMakeFiles/Makefile2:560: recipe for target 'Source/Core/Core/CMakeFiles/core.dir/all' failed
make[1]: *** [Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/games-emulation/dolphin-9999/work/dolphin-9999_build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: games-emulation/dolphin-9999::gentoo failed (compile phase):
 *   emake failed
Comment 13 Christian Widmer 2015-12-13 13:41:46 UTC
That's an upstream bug when building without pre-compiled headers. Because upstream has no buildbot for builds without pch, a couple of those issues emerge over time when people try different build configurations. I opened a pull request upstream (https://github.com/dolphin-emu/dolphin/pull/3335) to fix the issue. In the meantime you might build dolphin with the pch USE flag enabled to work around the issue.

This leads me to think that it might be a good idea to change to +pch in IUSE because this is the default upstream and it is likely that some more of those issues will arise considering there is no automated testing for nopch builds.
Comment 14 David Brooke 2015-12-13 15:46:28 UTC
Changing to +pch USE flag fixed the issue. The install works as expected.
Thanks
Comment 15 Devan Franchini (RETIRED) gentoo-dev 2015-12-13 21:16:48 UTC
(In reply to Christian Widmer from comment #11)
> Thanks for reviewing my proposed changes!
> 
> There are indeed a few questions regarding the changes you made. I'm pretty
> sure nvidia-cg-toolkit isn't needed anymore, for the project removed it from
> their externals in 2012 and a quick grep over the sources shows nothing is
> including cg.h. The same holds true for glew, which was completely dropped
> in 2013. On the other hand, readelf -d shows that the binary definitely
> links against libpng and lzo, both of which are also in the Externals
> directory.

Not a problem, thank you for contributing! All things you recommended have been changed all will be reflected in the next portage sync. In regards to making pch default to on though, I feel this shouldn't be the case. However, in lieu of having any other solution, I'll enable it until the bug report you linked is resolved.
Comment 16 Christian Widmer 2016-01-08 17:17:45 UTC
Created attachment 422314 [details, diff]
Change QT option to QT2

Upstream dropped the code that was activated by the QT configuration option. The current experimental QT GUI is enabled by the QT2 configuration option.
Comment 17 Christian Widmer 2016-03-01 04:03:51 UTC
Created attachment 427066 [details, diff]
Add support for LINGUAS to the ebuild

The ebuild in the portage tree unconditionally installs all localization files regardless of the user's configuration. This adds support for the LINGUAS variable to only install the requested translations.
Comment 18 Christian Widmer 2016-03-12 14:29:25 UTC
Created attachment 428032 [details, diff]
Remove use of the deprecated games.eclass

Yet another proposed change. This one removes the use of the games eclass which is considered deprecated[1][2]. Conveniently, this also removes the need to specifically handle the desktop entry and the icons as those are already installed in the correct places.

[1] https://devmanual.gentoo.org/eclass-reference/games.eclass/
[2] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Policies#Games
Comment 19 Devan Franchini (RETIRED) gentoo-dev 2016-03-24 01:33:14 UTC
Thank you all for your contributions to the dolphin-emu ebuild.
I have been busier than normal so most of my work in the development community has slowed down to a creeping pace. I do want you to know that these proposed changes will be looked at and likely applied this upcoming weekend, likely Sunday for myself. :)
Comment 20 Christian Widmer 2016-05-31 14:29:31 UTC
Created attachment 435936 [details, diff]
Update locales

This patch updates the ebuild's locales for there have been changes upstream. 

I'm also taking this opportunity to mark all the proposed changes that have already been committed as obsolete. The only thing remaining is the change of the QT option to QT2. This one is, however, quite useful because -DENABLE_QT doesn't exist anymore and all the QT code is activated with -DENABLE_QT2.
Comment 21 Devan Franchini (RETIRED) gentoo-dev 2016-06-25 02:36:18 UTC
Both changes have been made and the 9999 ebuild is up to date on upgrades. Feel free to continue to use this as a means of conveying updates in the future. And again, thank you all for your time.
Comment 22 Samuel Bauer 2018-03-18 23:49:57 UTC
Created attachment 524326 [details]
dolphin-9999.ebuild

Removed flag: ao openal portaudio
   dropped support
Removed flag: bluetooth
   previously depending on bluez, now on hidapi which is mandatory

Unbundled:
    hidapi
    xxhash
    pugixml
    glslang

Required in tree to allow unbundling
    wxGTK:3.1.0 still not in tree
    cpp-optparse
    cubeb
    SOIL

bochs-disasm: a small piece from bochs, bundling avoids dependency to full bochs 

Do not unbundle:
    gtest      : https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#why-is-it-not-recommended-to-install-a-pre-compiled-copy-of-google-test-for-example-into-usrlocal
    soundtouch : CMakeLists.txt: Unable to use system soundtouch library: We require shorts, not floats.

Suggestions and remarks are welcome.
But please, avoid replacing changes done inside the ebuild by patches. It is very nice for released packages, but really not consistent for live ebuilds.

Compiles and runs fine with various combinations from this flag set: alsa doc egl evdev ffmpeg llvm lto pch profile qt5 sdl wxwidgets
Comment 23 Samuel Bauer 2018-03-19 01:21:41 UTC
Created attachment 524338 [details]
dolphin-9999.ebuild
Comment 24 Samuel Bauer 2018-03-19 12:03:53 UTC
Created attachment 524386 [details]
dolphin-9999.ebuild
Comment 25 Samuel Bauer 2018-03-19 12:10:47 UTC
Created attachment 524388 [details]
dolphin-9999.ebuild
Comment 26 Samuel Bauer 2018-05-02 04:00:25 UTC
Created attachment 529308 [details]
dolphin-9999.ebuild

Changed default gui: wxwidget to qt

Do not allow lto when compiling with qt support (as suggested on the dolphin wiki) -> REQUIRED_USE

Fix Headless build conditionals

Added picojson: do not unbundle, picojson from Externals is not vanilla.
Comment 27 Samuel Bauer 2018-05-02 04:07:46 UTC
(In reply to Samuel BAUER from comment #26)

Renamed the old bluetooth flag: bluez
    by default bluetooth is now supported through hidapi
    this flag allow bluez to be used (the old way)

The ebuild still have mandatory dependency to hidapi, even when bluez flag turned on. It may not reflect dolphin depedency ( to be checked )
Comment 28 Arif Roktim 2018-05-28 00:23:50 UTC
Created attachment 533598 [details]
build.log error

ebuild fails when trying to move Externals/SOIL.
SOIL has been completely removed from dolphin upstream: https://github.com/dolphin-emu/dolphin/commit/c51ae9c62aa471a2b91fbdf548e0ab3591b2d717
Comment 29 Samuel Bauer 2018-06-04 15:18:30 UTC
Created attachment 534756 [details]
dolphin-9999.ebuild

(In reply to Arif Roktim from comment #28)

> SOIL has been completely removed from dolphin upstream:
> https://github.com/dolphin-emu/dolphin/commit/
> c51ae9c62aa471a2b91fbdf548e0ab3591b2d717

Thanks for noticing it.

added an updated version of the ebuild.
glslang is not unbundled for this version
Comment 30 Samuel Bauer 2018-06-04 17:03:11 UTC
Created attachment 534762 [details]
dolphin-9999.ebuild

Sorry for the previous attachment, this one unbundles glslang.
Comment 31 Scall 2018-06-18 18:52:31 UTC
I think these lines should be removed from the attached ebuild, since the wiki info seems outdated:

# https://github.com/dolphin-emu/dolphin/wiki/Building-With-Qt
REQUIRED_USE="qt5? ( !lto )"

dolphin-emu(qt) actually builds and runs fine with lto.
Comment 32 Samuel Bauer 2018-06-18 23:07:40 UTC
(In reply to Scall from comment #31)
> I think these lines should be removed from the attached ebuild, since the
> wiki info seems outdated:
> 
> # https://github.com/dolphin-emu/dolphin/wiki/Building-With-Qt
> REQUIRED_USE="qt5? ( !lto )"
> 
> dolphin-emu(qt) actually builds and runs fine with lto.

This bugreport made me think it was maybe related to cland/llvm
https://bugreports.qt.io/browse/QTBUG-61710

So I tried compiling with such flags
"llvm lto qt5" -> failure (relocations)
"-llvm lto qt5" -> failure

The suggested:
"llvm -lto qt5" compiles and runs fine here however.

Here are parts of my settings:
compiler CFLAGS="-march=native -O2 -pipe -ggdb" gcc-7.3.0-r3::gentoo
cpu flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts
USE="alsa doc evdev ffmpeg llvm qt5 sdl -bluez -egl -libav -log -lto -profile -pulseaudio -upnp -web-report -wxwidgets" ABI_X86="(64)"

So I'm not sure I should change anything in the proposed ebuild for now.
Hope more details, for further testing.
Comment 33 Scall 2018-06-19 20:45:42 UTC
(In reply to Samuel BAUER from comment #32)

Ok, never mind, I've done some tests switching GCC version:

* GCC 6.4.0: it builds and runs fine with lto.
* GCC 7.3.0: it doesn't build, unless lto is disabled.
* GCC 8.1.0: it builds but the GUI doesn't show up when I launch dolphin-emu, unless lto is disabled.

Note: I've done these tests with both llvm and -llvm, but it doesn't make any difference.
Comment 34 Enne Eziarc 2018-06-21 16:44:22 UTC
This ebuild will either need to patch out the forced use of /usr/bin/ccache in the build, or addpredict $CCACHE_DIR to avoid sandbox violations.
Comment 35 Samuel Bauer 2018-06-23 00:57:51 UTC
Created attachment 536872 [details]
dolphin-9999.ebuild

(In reply to Anthony Parsons from comment #34)
> This ebuild will either need to patch out the forced use of /usr/bin/ccache
> in the build, or addpredict $CCACHE_DIR to avoid sandbox violations.

I think this ebuild version disables ccache auto-detection.
Thank you for your remark.
Comment 37 Samuel Bauer 2018-07-02 19:19:32 UTC
Created attachment 538146 [details]
dolphin-9999.ebuild

(In reply to Scall from comment #36)
> dolphin-wx has been removed:
> https://github.com/dolphin-emu/dolphin/commit/
> e22c5333ab50c3e84774ce831eaeba48bcea5901
Thanks again Anthony.
---------------------

While updating the ebuild, I also noticed a new bundle: discord-rpc
So I added a new use flag: +discord (I keep it set by default as upstream does).
Compile both with and without this new flag set, everything is ok, but I did not test this new feature.
Comment 38 Samuel Bauer 2018-07-02 19:21:35 UTC
Sorry: "Thanks again Scall"
Comment 39 Enne Eziarc 2018-07-14 18:43:11 UTC
Another small change needed: instances of "qt2" were changed to "qt" upstream, this affects the path at line 87 and the configure switch at line 130 of the current ebuild.

Ref: https://github.com/dolphin-emu/dolphin/commit/13ba24c5a6795532c8893eccf2a21ae95682e1b7
Comment 40 Samuel Bauer 2018-07-22 03:05:51 UTC
If anyone agrees, I can proxy maintain, anyway I already maintain for myself, and gentoo bugtracker gives feedbacks opportunity.
Comment 41 Larry the Git Cow gentoo-dev 2018-07-22 12:27:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bb6ef82a48532432ec66af39d50df7cff3237ff

commit 7bb6ef82a48532432ec66af39d50df7cff3237ff
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-07-22 12:27:16 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-07-22 12:27:25 +0000

    games-emulation/dolphin: adopt an orphan, refresh live ebuild
    
    A few minor changes:
    - refreshed locale list (as suggested by the ebuild check)
    - moved from EAPI=5 to EAPI=6
    - dropped removed WxWidgets UI
    - added depends on more bundled libraries
    
    Closes: https://bugs.gentoo.org/561914
    Closes: https://bugs.gentoo.org/598625
    Closes: https://bugs.gentoo.org/632882
    Package-Manager: Portage-2.3.43, Repoman-2.3.10

 games-emulation/dolphin/dolphin-9999.ebuild | 90 ++++++++++++++++-------------
 games-emulation/dolphin/metadata.xml        |  5 +-
 2 files changed, 54 insertions(+), 41 deletions(-)
Comment 42 Samuel Bauer 2018-07-22 17:01:25 UTC
Created attachment 540518 [details]
dolphin-9999.ebuild
Comment 43 Samuel Bauer 2018-09-01 15:04:27 UTC
Created attachment 545730 [details, diff]
dolphin-9999.patch

Following mail exchanges with Slyfox (ebuild maintainer)
    1/ remove deprecated dependencies and build system fixes
    2/ rename bluetooth flag to bluez as hidapi manages bluetooth devices without bluez
    3/ allow portage to manage ccache and alsa dependencies (skip autodetect)
Forgot to speak about in mail
    4/ remove ao deprecated dependencies
    5/ Fix enet slot
    6/ updated package minimal version following current tree
    7/ Sort RDEPEND alphabetically
    8/ Sort mycmakeargs aphabetically
    9/ allow portage to manage pulseaudio dependencies (skip autodetect)
   
What's still to do:
    1/ Reasonable
      * Allow portage to manage systemd dependencies (skip autodetect)
      * Allow analytics to be disabled (web-report)
      
      * Upgrade EAPI to 7
    2/ Painful to maintain
      My last ebuild version unbundled xxhash, glslang, vulkan
      Unbundling leads to troubles when using both lto and qt5
Comment 44 Samuel Bauer 2018-09-01 15:52:44 UTC
Created attachment 545734 [details]
dolphin-9999.ebuild

Update unbundling ebuild
Added net-misc/curl dependency
Sorted RDEPEND and mycmakeargs alphabetically
Comment 45 Samuel Bauer 2018-09-02 13:24:03 UTC
Created attachment 545778 [details]
dolphin-9999.ebuild

Added a vulkan flag: allow disabling vulkan video backend when not available for hardware.
Unbundle glslang only if lto is not active.
Comment 46 Samuel Bauer 2018-09-03 09:31:55 UTC
Created attachment 545790 [details]
dolphin-9999.ebuild

Following advices on the dolphin wiki, I just assumed lto and qt5 were not compatible, that isn't true.
As glslang produces static libraries, unbundling would require system to be compiled with lto.
The upper workaround just let compile bundled glslang if lto flag is active.
When dev-util/glslang is built with lto, unbundling works nice, but there is no way to check this fact within the dolphin ebuild (would require to add a lto flag to glslang).

About vulkan, I'll prepare a patch for dolphin build system, and send it upstream.
Comment 47 Larry the Git Cow gentoo-dev 2018-09-03 19:13:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b019d1acd2401caea4a9566ecbca8391e763d613

commit b019d1acd2401caea4a9566ecbca8391e763d613
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-09-03 19:11:03 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-09-03 19:13:02 +0000

    games-emulation/dolphin: sort mycmakeargs alphabetically
    
    Patch by  Samuel Bauer.
    
    Bug: https://bugs.gentoo.org/561914
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 games-emulation/dolphin/dolphin-9999.ebuild | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5765256c9a8cf089c304f1dc4b2fe8fc663842

commit 7a5765256c9a8cf089c304f1dc4b2fe8fc663842
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-09-03 19:07:07 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-09-03 19:13:01 +0000

    games-emulation/dolphin: update live ebuild
    
    Changes by Samuel Bauer and by Anthony Parsons:
    - drop disappeared dependencies and flags: USE="ao openal portaudio"
    - drop 'sed' calls and use cmake options instead
    - disable automagic ccache autodetection
    
    Bug: https://bugs.gentoo.org/561914
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 games-emulation/dolphin/dolphin-9999.ebuild | 49 +++++++----------------------
 1 file changed, 12 insertions(+), 37 deletions(-)
Comment 48 Sergei Trofimovich (RETIRED) gentoo-dev 2018-09-03 21:51:23 UTC
I've pulled most straightforward changes (not sure I used most recent ebuild) and have a few concerns on left changes. Thank you!

Below is a commented diff against dolphin-9999.ebuild (4.98 KB, text/plain) 2018-09-03 09:31 UTC:

>  RDEPEND="
> ...
> +       vulkan? ( !lto? ( dev-util/glslang ) )
lto-guarded changes on the other hand are normally bugs waiting to be reported/fixed.

Arguably lto flag should not even be an explicit USE flag as it's a user's preference but I can live with status quo of the ebuild. But i'd strongly prefer not to complicate dependencies as workarounds and try to fix it upstream instead.

> -       bluetooth? ( net-wireless/bluez )
> +       bluez? ( net-wireless/bluez )

Why the USE name change? ::gentoo seems to use mostly USE=bluetooth: "bluetooth - Enable Bluetooth Support"

$ git grep net-wireless/bluez | fgrep 'bluez?' | wc -l
4
$ git grep net-wireless/bluez | fgrep 'bluetooth?' | wc -l
71

> -       ffmpeg? (
> -               libav? ( media-video/libav:= )
> -               !libav? ( media-video/ffmpeg:= )
> -       )
> +       ffmpeg? ( virtual/ffmpeg[libav=] )

ffmpeg and libav are not binary-compatible packages neither across ffmpeg<->libav nor across versions of both.

Binary instability means that dolphin needs to be rebuilt every time ffmpeg dependency changes. It's what ':=' subslot operator does. virtual/ffmpeg has no way to propagate that information.

> +       ## Let portage manage ccache. Thanks Anthony Parsons
> +       sed -i -e '/CCache/s/^/#/' CMakeLists.txt || die

This can be done with '-DCCACHE_BIN=CCACHE_BIN-NOTFOUND' unless I miss something.

> -       # Remove all the bundled libraries that support system-installed
> -       # preference. See CMakeLists.txt for conditional 'add_subdirectory' calls.
> -       local KEEP_SOURCES=(
> -               Bochs_disasm
> -               cpp-optparse
> ...

That looks like unintended removal.
Comment 49 Samuel Bauer 2018-09-04 08:51:05 UTC
(In reply to Sergei Trofimovich from comment #48)
> Below is a commented diff against dolphin-9999.ebuild
The reasonable set of changes was only in the patch for the in tree ebuild, dolphin-9999.patch
https://561914.bugs.gentoo.org/attachment.cgi?id=545730

> I've pulled most straightforward changes (not sure I used most recent
> ebuild) and have a few concerns on left changes. Thank you!
Thank you too.

1/ Set of changes from the patch

> Why the USE name change? ::gentoo seems to use mostly USE=bluetooth:
> "bluetooth - Enable Bluetooth Support"
No matter just keep it as it is.

> virtual/ffmpeg has no way to propagate that information.
Yes, I just re-read the virtual package, it's clearly explained.

> > +       sed -i -e '/CCache/s/^/#/' CMakeLists.txt || die 
> This can be done with '-DCCACHE_BIN=CCACHE_BIN-NOTFOUND' unless I miss
> something.
Even better.

2/ Changes outside the patch 
> > +       vulkan? ( !lto? ( dev-util/glslang ) )
> lto-guarded changes on the other hand are normally bugs waiting to be
> reported/fixed. 
> Arguably lto flag should not even be an explicit USE flag as it's a user's
> preference but I can live with status quo of the ebuild. But i'd strongly
> prefer not to complicate dependencies as workarounds and try to fix it
> upstream instead.
Lto flag is already present in this ebuild. unbundling glslang is possible only if lto if not present ( or glslang built with lto ).
glslang is required only by vulkan video backend and it's about 20% of the build time. Sad especially on old machines were vulkan backend is even not usable.

> That looks like unintended removal.
That was unintended for sure.