Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Applying a user created patch to an ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
vtomj
n00b
n00b


Joined: 11 Mar 2003
Posts: 27

PostPosted: Sat Oct 11, 2003 8:06 pm    Post subject: Applying a user created patch to an ebuild Reply with quote

I need to apply a patch to the alsa-driver-0.9.7-r1.ebuild to make it work with gs-sources 2.4.23 kernel. I have the patch file but I am not sure how to apply the patch. I was told to do this:

Quote:
for gs-sources-2.4.23_pre6-r1 and alsa-driver-0.9.7-r1.ebuild

created a new patch in files called mypatch that looks like this:
Code:
--- include/adriver.h 2003-09-30 01:54:47.000000000 -0700
+++ include/adriver.h.new 2003-10-08 10:59:45.000000000 -0700
@@ -127,7 +127,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3) && !defined(need_resched)
#define need_resched() (current->need_resched)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) && !defined(WE_ARE_WOLK)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23) && !defined(WE_ARE_WOLK)
#include <linux/fs.h>
static inline struct proc_dir_entry *PDE(const struct inode *inode)
{

Then, add a line like this:
Code:
epatch ${FILESDIR}/mypatch

in the .ebuild, after the epatch command that is there.


I am not sure how to do this and help would be appreciated.

Thanks,

Tom
Back to top
View user's profile Send private message
TheEternalVortex
Apprentice
Apprentice


Joined: 15 Oct 2002
Posts: 207
Location: San Jose, CA

PostPosted: Sat Oct 11, 2003 8:36 pm    Post subject: Reply with quote

# cd /usr/portage/media-sound/alsa-driver/
# cp ~/mypatch.patch files
# vi alsa-driver-0.9.7-r1.ebuild
In the ebuild find this line:
epatch ${FILESDIR}/makefile.patch
And add the following below it:
epatch ${FILESDIR}/mypatch.patch

Obviously, replace "mypatch.patch" with the actual file in both cases.
_________________
-- Andy
Back to top
View user's profile Send private message
vtomj
n00b
n00b


Joined: 11 Mar 2003
Posts: 27

PostPosted: Sat Oct 11, 2003 9:08 pm    Post subject: Almost there Reply with quote

Thanks for the help. I now know how to apply the patch but now r2 is released and r1 is not an ebuild anymore. The patch I was given is no longer working.

My original problem is:

Quote:
I have upgraded my Gentoo and emerged the new stable gs-sources-2.4.23_pre6-r1. The new kernel works ok, except the fact that I cannot reemerge alsa-driver-0.9.2.
The problem is as follows:
Code:

gcc -D__KERNEL__ -DMODULE=1 -I/var/tmp/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/include -I/usr/src/linux/include -O2 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -DEXPORT_SYMTAB -c memalloc.c
In file included from ../alsa-kernel/core/memalloc.c:27,
from memalloc.c:28:
/usr/src/linux/include/linux/proc_fs.h:213: redefinition of `PDE'
/var/tmp/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/include/adriver.h:111: `PDE' previously defined here
make[1]: *** [memalloc.o] Błąd 1
make[1]: Leaving directory `/var/tmp/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/acore'
make: *** [compile] Błąd 1

!!! ERROR: media-sound/alsa-driver-0.9.2 failed.
!!! Function src_compile, Line 59, Exitcode 2
!!! Parallel Make Failed


Thanks,

Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum