Ken Moffat wrote:
Arch have updated gst-plugins-bad-1.4.5 to fix a crash with firefox
on youtube. The upstream commit is
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?h=1.4&id=bde0f119097117cf0256e450af426
7a47782260b
What that does is update configure.ac, as you would expect. So, we
could do that, followed by autoreconf -fi, but that is quite noisy
and anyway only two lines are affected. I know you all prefer seds
to patches, so my first working version was:
sed -i -e 's/GST_CHECK_FAAD_VERSION \(FAAD2\)/\1/' \
-e 's/EGREP \"GST_CHECK_FAAD_VERSION \\"2\\.$minor\\"\"/EGREP
\"\\"2\\.$minor\\"$\"/' \
And that gets reformatted by my mailer, as expected - one space
after each EGREP. I'm sure the EGREPs can be removed, but it is
still messy and long (all the escapes) so I've produced a patch:
--- gst-plugins-bad-1.4.5/configure.orig 2015-06-26 18:19:28.496568252
+0100
+++ gst-plugins-bad-1.4.5/configure 2015-06-26 18:23:23.474961187 +0100
@@ -40441,11 +40441,11 @@
/* end confdefs.h. */
#include <$faad_hdr>
- GST_CHECK_FAAD_VERSION FAAD2_VERSION
+ FAAD2_VERSION
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "GST_CHECK_FAAD_VERSION \"2\.$minor\"" >/dev/null 2>&1; then :
+ $EGREP "\"2\.$minor\"$" >/dev/null 2>&1; then :
Try this:
sed -i -e 's/ GST_CHECK_FAAD_VERSION / /' \
-e '/"GST_CHECK_FAAD_VERSION/{
s/GST_CHECK_FAAD_VERSION //
s/""/"$"/ }' configure
It an interesting sed because there are two substitutions on one line.
The format of the second expression is:
/address/{
instruction1
instruction2}
The address here is a simple match on the line.
There is only one entry in the file where GST_CHECK_FAAD_VERSION has a
space both before and after. There is only one place in the file where
GST_CHECK_FAAD_VERSION is preceded with a " character.
I think this is relatively clear if you know how to read a sed. There
are no escapes and no regexes. [Well, text is technically a regex. :) ]
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page