You are not logged in.

#1 2009-09-16 16:42:39

raptir
Member
Registered: 2009-09-16
Posts: 31

Problem with applying a patch to zdoom in AUR

I did a little searching and found out about the patch command, but I'm still having some issues with applying this patch. Can anyone help me out? I'm not sure when to be running the patch command and what parameters to use. Thanks in advance.

http://aur.archlinux.org/packages.php?ID=16403

http://mancubus.net/svn/gzdoom/trunk/dumb/src/it/itrender.c?r1=114&r2=354&view=patch

Offline

#2 2009-09-16 17:44:16

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Problem with applying a patch to zdoom in AUR

raptir wrote:

I did a little searching and found out about the patch command, but I'm still having some issues with applying this patch. Can anyone help me out? I'm not sure when to be running the patch command and what parameters to use. Thanks in advance.

http://aur.archlinux.org/packages.php?ID=16403

http://mancubus.net/svn/gzdoom/trunk/dumb/src/it/itrender.c?r1=114&r2=354&view=patch

What are the steps that you took already?
Usually you need to copy the patch to the application's folder, cd to the folder, then something like `patch -p1 < patchfile.patch` should do the trick. Make sure the patch is for the EXACT version of the application that you are patching.


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

#3 2009-09-16 18:50:49

raptir
Member
Registered: 2009-09-16
Posts: 31

Re: Problem with applying a patch to zdoom in AUR

The root of the problem is that when running makepkg, you get this:

[ 15%] Building C object dumb/CMakeFiles/dumb.dir/src/it/itrender.o
/home/mike/zdoom/zdoom/src/zdoom-2.3.1/dumb/src/it/itrender.c:3559: error: static declaration of 'log2' follows non-static declaration
make[2]: *** [dumb/CMakeFiles/dumb.dir/src/it/itrender.o] Error 1
make[1]: *** [dumb/CMakeFiles/dumb.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

The patch provided supposedly fixes that by renaming a function (log2 to mylog2) in itrender.c. I've tried simply running patch -i dumb.patch before running makepkg, but that obviously doesn't work since none of the files are downloaded. I'm guessing that I need to put the patch command somewhere in pkgbuild, I'm just not sure where.

So far, I've just downloaded and extracted the tarball, then I get the above error when running makepkg.

Offline

#4 2009-09-16 18:57:24

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Problem with applying a patch to zdoom in AUR

raptir wrote:

The root of the problem is that when running makepkg, you get this:

[ 15%] Building C object dumb/CMakeFiles/dumb.dir/src/it/itrender.o
/home/mike/zdoom/zdoom/src/zdoom-2.3.1/dumb/src/it/itrender.c:3559: error: static declaration of 'log2' follows non-static declaration
make[2]: *** [dumb/CMakeFiles/dumb.dir/src/it/itrender.o] Error 1
make[1]: *** [dumb/CMakeFiles/dumb.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

The patch provided supposedly fixes that by renaming a function (log2 to mylog2) in itrender.c. I've tried simply running patch -i dumb.patch before running makepkg, but that obviously doesn't work since none of the files are downloaded. I'm guessing that I need to put the patch command somewhere in pkgbuild, I'm just not sure where.

So far, I've just downloaded and extracted the tarball, then I get the above error when running makepkg.

Well you don't need to get the package tarball alone. Get the tarball and open up the PKGBUILD file, see where it gets the source from, then get that source and apply the patch to it. After that you can just compile it yourself...


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

Board footer

Powered by FluxBB