View previous topic :: View next topic |
Author |
Message |
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Thu Apr 15, 2010 3:42 am Post subject: Canb't get portage to use a patch file I made [SOLVED] |
|
|
Hi
codeblocks appears to be broken right now, but there are instructions on the two files to fix to make it compile. I created a patch file just called codeblocks-codesnippets.patch:
Code: |
--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp 2010-04-14 21:11:43.607566319 -0600
+++ codeblocks-8.02/src/plugins/contrib/codesnippets-new/codesnippets.cpp 2010-04-14 21:11:48.087691281 -0600
@@ -52,8 +52,10 @@
#include "memorymappedfile.h"
#if defined(__WXGTK__)
- #include "wx/gtk/win_gtk.h"
+ #define GSocket GLibSocket
#include <gdk/gdkx.h>
+ #undefine GSocket
+ #include "wx/gtk/win_gtk.h"
#endif
// The plugin needs a flag ON to enable some code for the plugin
|
I created this patch using the tarball from /usr/portage/distfiles.
In the ebuild, I added:
epatch "${FILESDIR}"/codeblocks-codesnippets.patch
and did the usual manifest stuff.
When I try to emerge, it keeps failing, with the patch.out file being:
***** codeblocks-codesnippets.patch *****
=========================================
PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < '/usr/portage/dev-util/codeblocks/files/codeblocks-codesnippets.patch'
=========================================
patching file codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp
Hunk #1 FAILED at 52.
1 out of 1 hunk FAILED -- saving rejects to file codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp.rej
=========================================
PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < '/usr/portage/dev-util/codeblocks/files/codeblocks-codesnippets.patch'
=========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp 2010-04-14 21:11:43.607566319 -0600
|+++ codeblocks-8.02/src/plugins/contrib/codesnippets-new/codesnippets.cpp 2010-04-14 21:11:48.087691281 -0600
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
=========================================
PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < '/usr/portage/dev-util/codeblocks/files/codeblocks-codesnippets.patch'
=========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp 2010-04-14 21:11:43.607566319 -0600
|+++ codeblocks-8.02/src/plugins/contrib/codesnippets-new/codesnippets.cpp 2010-04-14 21:11:48.087691281 -0600
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
=========================================
PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < '/usr/portage/dev-util/codeblocks/files/codeblocks-codesnippets.patch'
=========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp 2010-04-14 21:11:43.607566319 -0600
|+++ codeblocks-8.02/src/plugins/contrib/codesnippets-new/codesnippets.cpp 2010-04-14 21:11:48.087691281 -0600
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
=========================================
PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < '/usr/portage/dev-util/codeblocks/files/codeblocks-codesnippets.patch'
=========================================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- codeblocks-8.02/src/plugins/contrib/codesnippets/codesnippets.cpp 2010-04-14 21:11:43.607566319 -0600
|+++ codeblocks-8.02/src/plugins/contrib/codesnippets-new/codesnippets.cpp 2010-04-14 21:11:48.087691281 -0600
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
I don't understand why it is failing. It isn't a really complex patch. Could anyone possibly tell me what I am doing wrong?
Thanks.
Last edited by tenspd137 on Thu Apr 15, 2010 4:03 am; edited 1 time in total |
|
Back to top |
|
|
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Thu Apr 15, 2010 3:59 am Post subject: |
|
|
I have also verified that the patch works manually - ie I have unpacked the tarball in another directory and applied the patch using the same command that appears to fail in the ebuild. |
|
Back to top |
|
|
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Thu Apr 15, 2010 4:03 am Post subject: |
|
|
Sorry - I played with it some more and got it to work - but I don't know what I did or was doing. Sorry that this isn't really helpful to anyone... |
|
Back to top |
|
|
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Thu Apr 15, 2010 4:07 am Post subject: |
|
|
My guess is that I wasnot paying attention and created them in the wrong directory |
|
Back to top |
|
|
|