You are not logged in.

#1 2007-04-02 13:36:00

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

PKGBUILD for PCSX2

Since PCSX2 finally got their Linux port updated I figured I'd give it a try, of course I want to have pacman handle it as well, hence I began to put a PKGBUILD together. This is a first for me so please point out any errors.

I don't know how to properly specify that this package requires OpenGL, I'm not sure what to put in depends for that, any ideas?

Make sure you have these libraries: gtk2, OpenGL, Cg (for the GS plugins)

If you're using Arch64 you will need to modify the nvidia-cg-toolkit PKGBUILD found in AUR since it only builds for x86, simply change the filename from "Cg-1.5_x86.tar.gz" to "Cg-1.5_x86_64.tar.gz" and then either remove the md5sum or put in the new one "b8adf028a41f70424c0147f54c2f9aa8".

It should work fine on i686 too I guess, but I haven't tested it.

... PKGBUILD removed, check post below ...

Since PCSX2 puts all it's configure files, user files in local directories to the emulator I had give full permissions for anyone in the users group for those directories. However, when I install the package those permissions aren't preserved, they are correct if I look under $startdir/pkg/, am I overlooking something? Should this be put in a post-install file?

To make any use of PCSX2 you will need a BIOS-file, so that info must go in a post-install file anyway (pointing here: http://www.pcsx2.net/downloads.php?p=tool), I just haven't created it yet.

Last edited by [vEX] (2007-04-05 14:22:04)


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#2 2007-04-05 13:56:01

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: PKGBUILD for PCSX2

[vEX] wrote:

I don't know how to properly specify that this package requires OpenGL, I'm not sure what to put in depends for that, any ideas?

Make sure you have these libraries: gtk2, OpenGL, Cg (for the GS plugins)

I still don't know how to take care of that dependency, atm I've put a note in pre_install().

Updated PKGBUILD:

# Contributor: [vEX]
pkgname=pcsx2
pkgver=0.9.3
pkgrel=1
pkgdesc="A PlayStation 2 emulator."
_filename=8022
arch=(x86_64)
url="http://www.pcsx2.net"
license=('GPL')
depends=('bzip2' 'gtk2' 'nvidia-cg-toolkit')
install=pcsx2.install
makedepends=('p7zip')
source=(http://www.pcsx2.net/files/${_filename})
noextract=()
md5sums=('08a16192d0f169c96165cb1ca20712f7')

build() {
    # Rename the file
    mv ${_filename} $startdir/src/pcsx0.9.3_and_plugins_src.7z

    cd $startdir/src/

    # Extract the sources
    7za x pcsx0.9.3_and_plugins_src.7z

    # Clean up dirty file structure from the 7-zip (get rid of .svn-directories)
    find . -type d -name .svn -print0 | xargs -0 rm -rf

    # Fix permissions
    chmod a+x $startdir/src/plugins/gs/zerogs/opengl/configure

    # Build it all
    sh build.sh all

    # Put all files in /opt/pcsx2
    mkdir -p $startdir/pkg/opt/pcsx2/.pixmaps
    cp -r $startdir/src/bin/* $startdir/pkg/opt/pcsx2
    cp -r $startdir/src/bin/.pixmaps/* $startdir/pkg/opt/pcsx2/.pixmaps

    # Change ownership and permissions so that anyone in the users group can use it
    ## The different folders contain; pcsx2/bios - the PlayStation 2 BIOS files, 
    ## pcsx2/inis - configuration files, pcsx2/logs - log files, pcsx2/memcards - 
    ## emulated memory cards, pcsx2/sstates - save states, pcsx2/snap - screenshots
    chown -R root.users $startdir/pkg/opt/pcsx2
    chmod -R g+rwx $startdir/pkg/opt/pcsx2/bios $startdir/pkg/opt/pcsx2/inis $startdir/pkg/opt/pcsx2/logs $startdir/pkg/opt/pcsx2/memcards $startdir/pkg/opt/pcsx2/sstates $startdir/pkg/opt/pcsx2/snap
    
    # Check if the downloaded source file is still in the current directory even after
    # being moved, if so procede to delete it
    if [ -a $startdir/${_filename} ]; then
        rm $startdir/${_filename}
    fi
}

pcsx2.install:

# arg 1:  the new package version
pre_install() {
    echo "NOTE:"
    echo "PCSX2 depends on hardware accelerated OpenGL. Running PCSX2"
    echo "under beryl/compiz isn't adviced due to severe speed loss."
}

# arg 1:  the new package version
post_install() {
    echo "NOTE:"
    echo "To be able to use PCSX2 you will need to obtain a dump of"
    echo "the PlayStation 2 BIOS. The necessary tool can be found here:"
    echo "http://www.pcsx2.net/downloads.php?p=tool"
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
  #pre_install $1
  /bin/true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    #post_install $1
  /bin/true
}

# arg 1:  the old package version
pre_remove() {
  /bin/true
}

# arg 1:  the old package version
post_remove() {
  /bin/true
}

op=$1
shift
$op $*

Last edited by [vEX] (2007-04-14 20:32:45)


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#3 2007-04-05 14:35:53

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: PKGBUILD for PCSX2

I've installed and run namcap on the files and it suggets both 'mesa' and 'nvidia-utils' as dependencies. Can I put in 'libgl' as a dependency to cover that and will it be enough to satisfy the OpenGL dependency stated by the PCSX2 authors?


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#4 2007-04-05 14:39:37

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: PKGBUILD for PCSX2

Woo. I tried to get PSCX2's linux port working just two hours ago, but couldn't compile. Let me try your PKGBUILD.

-edit-

Does it actually work for you? It segfaults when I change options.

As for opengl, libgl should be okay. As for permission, have you looked at newest news (regarding fakeroot)?.

Last edited by lucke (2007-04-05 14:55:14)

Offline

#5 2007-04-07 20:15:17

Greycloack
Member
Registered: 2004-03-05
Posts: 166

Re: PKGBUILD for PCSX2

Segfaults here as well, but I get a segfault when I try to run a game on the binary build as well...

Offline

#6 2007-04-08 12:09:05

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: PKGBUILD for PCSX2

Yeah I tried it and it seems somewhat buggy, hopefully the next release will be better. I think if you just accept the settings the first time and then close and restart it you can change the options. There was some post on their forums talking about that issue. As for playing games it seems to be somewhat working, some games I've tried segfaults while others seem to work, try for example Final Fantasy X or Kingdom Hearts, both seemed to work.

And permissions are now working fine with the updated fakeroot package. :-)

Adding libgl as dependency for OpenGL doesn't seem enough to satisfy namcap, but if you think it's okay together with the note in the pcsx2.install file I think I can go ahead and upload it to AUR.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#7 2007-04-08 12:13:49

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: PKGBUILD for PCSX2

It segfaults here when loading FFX.

Offline

#8 2007-04-08 13:12:27

_alexmyself
Member
From: france
Registered: 2005-09-18
Posts: 89

Re: PKGBUILD for PCSX2

[root@alex_portable ~]# yaourt -S libgl
:: libgl-dri conflicts with ati-fglrx-utils. Remove ati-fglrx-utils? [Y/n] n

i have not tested this pkgbuild but remember about libgl conflict with ati-fglrx drivers

Offline

#9 2007-04-08 13:33:57

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: PKGBUILD for PCSX2

_alexmyself wrote:

[root@alex_portable ~]# yaourt -S libgl
:: libgl-dri conflicts with ati-fglrx-utils. Remove ati-fglrx-utils? [Y/n] n

i have not tested this pkgbuild but remember about libgl conflict with ati-fglrx drivers

Both nvidia-utils and ati-fglrx-utils provide libgl - that's why it makes sense to use it as a dependency for pcsx2.

Offline

#10 2007-04-08 17:16:11

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: PKGBUILD for PCSX2

lucke wrote:

It segfaults here when loading FFX.

It works here (some screenshots: http://web.telia.com/~u85920559/pcsx2/), might have something to do with the other segfaults that happens, hopefully the next release will be more stable.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#11 2007-04-08 17:27:48

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: PKGBUILD for PCSX2

Okay, I've uploaded it to AUR, however since I might violate the packaging standards (storing all files in /opt/pcsx2 might be seen as directory tree violation since normally configuration is put in /etc) it might get deleted.

Last edited by [vEX] (2007-04-08 17:33:48)


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

Board footer

Powered by FluxBB