Hugh Sasse wrote:
On Mon, 23 Mar 2009, Eric Miller wrote:
Did my patch work, then?
[...]
I have to be honest. I haven't tried it yet because I didn't have time at work
to learn how to apply patches. I'm a newbie to Linux development. I will
tonight and let you know.
That's OK, it took me a while to learn as well. The patch program is
pretty robust and will tell you if it gets upset.
cd bloopaphone
# You will need to be above the c directory, i.e, the top of the git
# tree
patch < bloopaphone_patch_untested
Should basically do the job. If that doesn't work, play with the -p
option to patch, which tells it how many directories to prune off the
front of the paths in the patch. -p0 or -p1 and so forth.
Patch (not sun's patch as per Solaris 9 and before, but GNU patch) should
detect if you are applying a patch to something already patched, or if
it just makes no sense. The patch that Sun shipped was probably some
variant of Larry Wall's original program, but he recommends GNU patch
(when I last looked at his page anyway). Theirs wouln't cope with
unified context diffs.
One customarily (nowadays) generate patches with
diff -u orig new
or in this case since I was doing a diff against the repository
git diff -u
This gives a unified diff as opposed to the traditional patches which
used < and > to indicate lines from first and second file.
It also has some lines of context to help patch cope with badly aligned
patches.
Oh, I wrote some blurb about this somwhere....
Well, not so much as I thought, basically links to
http://www.gnu.org/software/patch/patch.html
http://www.gnu.org/software/diffutils/manual/html_node/Making-Patches.html#Making%20Patches
Which is most of what one needs to know.
Eric
HTH
Hugh
Hugh,
It didn't like the patch. Here's the compiler output:
gcc -I. -c -obin/main.o -Wall -I/usr/include -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/lib/ruby/1.8/i486-linux -DVIDEO -O
-DSHOES_GTK -fPIC -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libpng12 -I/usr/include/vlc/plugins bin/main.c
gcc -Ldist -o dist/shoes-bin bin/main.o -lruby1.8 -lpng -lcairo
-lpangocairo-1.0 -lungif -ljpeg -lrt -lvlc -L/usr/lib -lcairo
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lshoes -L.
-Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic
echo 'LD_LIBRARY_PATH=$APPPATH $APPPATH/shoes-bin "$@"' >> dist/shoes
In file included from c/notation.rl:13:
bloopsaphone.h:95: error: expected ';', ',' or ')' before '*' token
make: *** [notation.o] Error 1
strip -x dist/*.so.*
strip -x dist/*.so