Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 510710

Summary: games-emulation/pcsx2 - A PlayStation 2 emulator
Product: Gentoo Linux Reporter: nE0sIghT <ykonotopov>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: RESOLVED FIXED    
Severity: enhancement CC: 96bd763529be62c7350d43e8ae67f9623c998ddc, games, O01eg
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 510686, 510708    
Bug Blocks:    
Attachments: multilib-friendly pcsx2-1.2.2.ebuild
cg-multilib.patch
mesa-10.patch
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
wxGTK:3.0 support patches for pcsx2-1.2.2
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
bindir-1.2.2.patch
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
pcsx2-9999.ebuild
pcsx2-1.2.2.ebuild
pcsx2-9999.ebuild
pcsx2-9999.ebuild
pcsx2-1.2.2.ebuild
pcsx2-1.2.2.ebuild
pcsx2-9999.ebuild
pcsx2-1.3.1.ebuild
pcsx2-1.3.1.ebuild
pcsx2-1.3.1-custom-cflags.patch
metadata.xml

Description nE0sIghT 2014-05-19 06:57:16 UTC
Created attachment 377218 [details]
multilib-friendly pcsx2-1.2.2.ebuild

Some time ago it was removed from tree because (as i think) of GTK+-1 dependency

Recent version do not depends on GTK+-1 anymore.
Comment 1 nE0sIghT 2014-05-19 06:59:54 UTC
Created attachment 377220 [details, diff]
cg-multilib.patch

This patch helps cmake easily find Cg 32 bit libs in Gentoo.
Pull request sent to upstream: https://github.com/PCSX2/pcsx2/pull/48
Comment 2 nE0sIghT 2014-05-19 07:01:24 UTC
Created attachment 377222 [details, diff]
mesa-10.patch

This patch allows GSDX plugin (use=egl) compile with recent mesa.
Upstream issue: https://github.com/PCSX2/pcsx2/issues/47
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-19 07:06:13 UTC
Can't it be built for amd64 then? Is it actively maintained now? Does it have any advantages over pcsxr fork we have in the tree already?
Comment 4 nE0sIghT 2014-05-19 07:10:00 UTC
Yes, it builds fine on amd64 (multilib build)
Yes, it is actively maintained now: https://github.com/PCSX2/pcsx2/commits/master

pcsxr is Playstation 1 emulator, while pcsx2 is Playstation 2 emulator
Comment 5 nE0sIghT 2014-05-19 07:11:18 UTC
Sorr(In reply to Michał Górny from comment #3)
> Can't it be built for amd64 then? Is it actively maintained now?

Sorry, do no understand your question. It can be cross compilled on amd64 for x86. Native amd64 build is not supported
Comment 6 nE0sIghT 2014-05-20 12:56:52 UTC
Created attachment 377284 [details]
pcsx2-1.2.2.ebuild

Remove default CFLAGS (sse/march)
Explicit call cmake-utils_src_compile
Call epatch_user
Minor formatting changes
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2014-05-21 01:19:59 UTC
games goes last on the inherit line

KEYWORDS needs sorting

seds need error checking

if USE=abi_x86_32 is required it seems like there's no need for so much duplication between !amd? and amd? in RDEPEND

mycmakeargs should be an array

should honor GAMES_BINDIR

IUSE="dvd iso" doesn't change the deps so get rid of them and just always build the plugins

this:

if use debug; then
	CMAKE_BUILD_TYPE="Debug"
else
	CMAKE_BUILD_TYPE="Release"
fi

should go in src_prepare, not global scope.
Comment 8 nE0sIghT 2014-05-21 09:44:22 UTC
Created attachment 377354 [details]
pcsx2-1.2.2.ebuild

Changed inherits order
Sorted keywords
Removed duplicated runtime deps for !amd64
Moved CMAKE_BUILD_TYPE to src_configure
Removed IUSE="dvd iso"
Added check for missing sed files
Changed mycmakeargs type to array
Honor GAMES_DATADIR, GAMES_BINDIR

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/3c5951fe4368955a4126df047f8b77d2ad5b4820
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-21 17:08:14 UTC
Comment on attachment 377354 [details]
pcsx2-1.2.2.ebuild

>IUSE="abi_x86_32 cg debug egl glew glsl joystick sdl sound video"
>REQUIRED_USE="
>    abi_x86_32

The abi_x86_32 doesn't do anything here so please remove it from both IUSE and REQUIRED_USE.

>RDEPEND="
>	app-arch/bzip2[abi_x86_32]
>	dev-libs/libaio[abi_x86_32]

Please note that using this kind of deps will make it hard to impossible to install pcsx2 on stable amd64 system. You may want to use mixed emul-linux/native dependencies like explained on the wiki:

https://wiki.gentoo.org/wiki/Project:Multilib/Tips_%26_tricks#Binary_Package_Dependencies

>		cg? (
>			x86? ( media-gfx/nvidia-cg-toolkit )
>			amd64? ( media-gfx/nvidia-cg-toolkit[multilib] )
>		)

I'd rather pinged nvidia team to make nvidia-cg-toolkit abi_x86_32-capable first. This shouldn't be much of a problem.

>src_prepare() {
>	cmake-utils_src_prepare
>
>	! use egl && ( sed -i -e "s:GSdx TRUE:GSdx FALSE:g" cmake/SelectPcsx2Plugins.cmake || die )

Please don't use subshells. And aim at readability.

    if ! use egl; then
        sed -i -e ... || die
    fi

>src_configure() {
>	use amd64 && local ABI=x86

Please use 'multilib_toolchain_setup x86' instead. This will export proper CC, CXX and stuff.

>	if use debug; then
>		CMAKE_BUILD_TYPE="Debug"
>	else
>		CMAKE_BUILD_TYPE="Release"
>	fi

This is incorrect use of USE=debug. Just remove it completely, along with IUSE.

>src_install() {
>	cmake-utils_src_install DESTDIR=${D}

Missing quotes around ${D}.
Comment 10 nE0sIghT 2014-05-21 18:10:36 UTC
(In reply to Michał Górny from comment #9)
> 
> Please note that using this kind of deps will make it hard to impossible to
> install pcsx2 on stable amd64 system. You may want to use mixed
> emul-linux/native dependencies like explained on the wiki:
> 
> https://wiki.gentoo.org/wiki/Project:Multilib/
> Tips_%26_tricks#Binary_Package_Dependencies

As i know neither emul-linux package contains wxGTK. So only partial mixing is possible. Do we need that?
Comment 11 nE0sIghT 2014-05-22 19:14:06 UTC
Created attachment 377460 [details]
pcsx2-1.2.2.ebuild

Removed abi_x86_32, debug use flags
Formatting changes
multilib_toolchain_setup

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/169e03c82768bb431223510f04936ff77a5b5a1c

(In reply to Michał Górny from comment #9)
> Comment on attachment 377354 [details]
> pcsx2-1.2.2.ebuild
> 
> >RDEPEND="
> >	app-arch/bzip2[abi_x86_32]
> >	dev-libs/libaio[abi_x86_32]
> 
> Please note that using this kind of deps will make it hard to impossible to
> install pcsx2 on stable amd64 system. You may want to use mixed
> emul-linux/native dependencies like explained on the wiki:

Neither emul-linux package contains x11-libs/wxGTK, dev-libs/libaio and media-libs/libsoundtouch

> 
> I'd rather pinged nvidia team to make nvidia-cg-toolkit abi_x86_32-capable
> first. This shouldn't be much of a problem.

nvidia-cg-toolkit ebuild update is handled in #466832
Maybe change dependency to media-gfx/nvidia-cg-toolkit[abi_x86_32] and set that bug as a blocker?
Comment 12 Account removed 2014-06-22 06:02:02 UTC
I updated my old modular pcsx2* live ebuilds in gamerlay using some of the modifications here. not perfect yet, but worksforme on x86 and amd64.
patches welcome.
imho it is better to have ebuilds for the different plugins instead of one monolitic one.
thanks for the wxGTK multilib patch in 510708, nE0sIghT
Comment 13 nE0sIghT 2014-06-22 17:35:39 UTC
Created attachment 379416 [details]
pcsx2-1.2.2.ebuild

Fixed wxGTK configuration for amd64 (was broken with last commit)
Added support for live build (just change ebuild version to 9999)

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/80f7af26fb9fef5b0f0f7d4f64b7a471a11389e3#diff-c4d656bcfe9b0ff53af3482f2b875774
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-29 09:03:52 UTC
Could you try newer wxGTK, preferably :3.0?
Comment 15 nE0sIghT 2014-06-29 09:17:04 UTC
Already tried :3.0 with no success. Will try :2.9(In reply to Michał Górny from comment #14)
> Could you try newer wxGTK, preferably :3.0?

Already tried :3.0 with no success. Will try :2.9
Comment 16 nE0sIghT 2014-06-29 09:39:19 UTC
No luck with 2.9 too
Comment 17 nE0sIghT 2014-08-29 15:04:18 UTC
I see some work for wxGTK:3 support in pcsx2 git. Will try to backport patches to 1.2.2
Comment 18 nE0sIghT 2014-08-30 13:48:20 UTC
Created attachment 383960 [details]
wxGTK:3.0 support patches for pcsx2-1.2.2

Here is patches for pcsx2-1.2.2 to support build against wxGTK:3.0
Pcsx2 builded against wxGTK:3.0 does not honor XDG config dir
Comment 19 nE0sIghT 2014-08-30 13:51:24 UTC
Created attachment 383962 [details]
pcsx2-1.2.2.ebuild

Added support for optional building against wxGTK:3.0

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/cbe950519764be4fdf08a9e6e301285c147701a6#diff-c4d656bcfe9b0ff53af3482f2b875774
Comment 20 C. Wijtmans 2014-09-27 13:48:57 UTC
# emerge -av pcsx2-meta

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds built with USE flags to satisfy "x11-libs/wxGTK:2.8[X,abi_x86_32]".
!!! One of the following packages is required to complete your request:
- x11-libs/wxGTK-2.8.12.1-r1::gentoo (Missing IUSE: abi_x86_32)
(dependency required by "games-emulation/pcsx2-9999::gamerlay" [ebuild])
(dependency required by "games-emulation/pcsx2-meta-9999::gamerlay" [ebuild])
(dependency required by "pcsx2-meta" [argument])
Comment 21 nE0sIghT 2014-09-27 15:51:36 UTC
(In reply to C.J. Wijtmans from comment #20)
> # emerge -av pcsx2-meta
> 

vortex overlay contains all needed dependencies
Comment 22 nE0sIghT 2014-09-28 09:58:41 UTC
Created attachment 385652 [details]
pcsx2-1.2.2.ebuild

Added patch to pcsx-1.2.2 for cmake variable "BIN_DIR" to properly honor ${GAMES_BINDIR}. Merged upstream and available when building live 9999 version
Removed wxGTK:3 patches while building 1.2.2 version as i can not support it. Will wait for next pcsx2 release with wxGTK:3 support
Comment 23 nE0sIghT 2014-09-28 09:59:32 UTC
Created attachment 385654 [details, diff]
bindir-1.2.2.patch
Comment 24 nE0sIghT 2014-12-13 23:02:46 UTC
Created attachment 391644 [details]
pcsx2-1.2.2.ebuild

Changed -9999 ebuild part:

Added support for build against GTK+:3
Added support for build against libsdl2
Fixed wxGTK:2.8 build

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/33e8879635adea58d83622004f39f49bf616493c#diff-8a926718d326f34c66662d2ea27cba51
Comment 25 nE0sIghT 2014-12-24 16:41:33 UTC
Created attachment 392328 [details]
pcsx2-1.2.2.ebuild

Removed 9999 ebuild part
Comment 26 nE0sIghT 2014-12-24 16:52:23 UTC
Created attachment 392330 [details]
pcsx2-9999.ebuild

Removed gtk3 use flag because pcsx2 must be built against same gtk+ version as wxGTK.
Removed ability to build against libsdl2 because pcsx2 must be built against same libsdl version as wxGTK.
Actualized langs
Comment 27 nE0sIghT 2014-12-27 15:19:35 UTC
Created attachment 392518 [details]
pcsx2-1.2.2.ebuild

Changed dependencies to mixed emul-linux/native where is possible
Comment 28 nE0sIghT 2014-12-27 15:20:04 UTC
Created attachment 392520 [details]
pcsx2-9999.ebuild

Changed dependencies to mixed emul-linux/native where is possible
Comment 29 nE0sIghT 2015-01-05 10:12:47 UTC
Created attachment 393216 [details]
pcsx2-9999.ebuild

Minor update to match latest upstream changes
Changelog: https://github.com/nE0sIghT/vortex-overlay/commit/7f1c0ee82af9f7cda2730f005d5bfa651847e7e0#diff-0
Comment 30 nE0sIghT 2015-01-05 10:16:00 UTC
Created attachment 393218 [details]
pcsx2-1.2.2.ebuild

Fixed dependencies typo
Comment 31 nE0sIghT 2015-01-09 08:54:40 UTC
Created attachment 393514 [details]
pcsx2-1.2.2.ebuild

Suppress QA text relocation warnings. Upstream issue: https://github.com/PCSX2/pcsx2/issues/417
Diff: https://github.com/nE0sIghT/vortex-overlay/commit/08c9195a9a102fd2eab98f56e8a25c0fc60d6c0b#diff-0
Comment 32 nE0sIghT 2015-01-09 08:55:37 UTC
Created attachment 393516 [details]
pcsx2-9999.ebuild

Suppress QA text relocation warnings. Upstream issue: https://github.com/PCSX2/pcsx2/issues/417
Fix cross compilation on amd64. Upstream issue: https://github.com/PCSX2/pcsx2/pull/422

Diff: https://github.com/nE0sIghT/vortex-overlay/commit/08c9195a9a102fd2eab98f56e8a25c0fc60d6c0b#diff-1
Comment 33 nE0sIghT 2015-02-23 06:44:27 UTC
Created attachment 397290 [details]
pcsx2-1.3.1.ebuild

Version bump with wxGTK-3 support.
Comment 34 nE0sIghT 2015-04-19 08:09:16 UTC
Created attachment 401588 [details]
pcsx2-1.3.1.ebuild

Introduced "custom-cflags" use flag as requested in https://github.com/nE0sIghT/vortex-overlay/issues/4
Disable build of extra plugins as they mostly useless and outdated
Comment 35 nE0sIghT 2015-04-19 08:10:59 UTC
Created attachment 401590 [details, diff]
pcsx2-1.3.1-custom-cflags.patch

Patch for stripping default compiler optimization flags
Comment 36 nE0sIghT 2015-04-19 08:15:06 UTC
Created attachment 401592 [details]
metadata.xml

Package metadata with use flags description
Comment 38 Luke-Jr 2015-08-14 04:36:56 UTC
Weird, it really won't build for 64-bit? I thought they used to *only* support 64-bit... Anyhow, any idea whether it can work in x32 ABI?
Comment 39 nE0sIghT 2015-08-14 04:48:24 UTC
(In reply to Luke-Jr from comment #38)
> Weird, it really won't build for 64-bit? I thought they used to *only*
> support 64-bit...

64 bit is long running task. For now only GSdx plugin can be build for native amd64

(In reply to Luke-Jr from comment #38)
> Anyhow, any idea whether it can work in x32 ABI?

I think it's better fill that question here: https://github.com/PCSX2/pcsx2/issues.