media/update-libjpeg.sh
author Andreea Pavel <apavel@mozilla.com>
Tue, 14 Nov 2017 20:44:54 +0200
changeset 391768 e2e96cb6d4807899cb918ba69227d3ae1e141ac2
parent 302664 4e6dd91cd5823834a7da0394367609a1640dfb11
child 442912 cd76fd701f82dc9211bc8323e9948dedc866af9f
permissions -rwxr-xr-x
Backed out 2 changesets (bug 1416059) for failing /python/mozbuild/mozbuild/test/frontend/test_emitter.py::TestEmitterBasic::test_use_yasm r=backout on a CLOSED TREE Backed out changeset 597624409f4c (bug 1416059) Backed out changeset d0df69766fa5 (bug 1416059)

#!/bin/sh

set -v -e -x

if [ $# -lt 1 ]; then
  echo "Usage: update-libjpeg.sh /path/to/libjpeg-turbo/ [tag]"
  exit 1
fi

srcdir=`realpath $(dirname $0)`
topsrcdir=${srcdir}/..
rm -rf $srcdir/libjpeg

repo=$1
tag=${2-HEAD}

(cd $repo; git archive --prefix=media/libjpeg/ $tag) | (cd $srcdir/..; tar xf -)

cd $srcdir/libjpeg
cp win/jsimdcfg.inc simd/

revert_files="1050342.diff jconfig.h jconfigint.h moz.build MOZCHANGES mozilla.diff simd/jsimdcfg.inc"
if test -d ${topsrcdir}/.hg; then
    hg revert --no-backup $revert_files
elif test -d ${topsrcdir}/.git; then
    git checkout HEAD -- $revert_files
fi

patch -p0 -i mozilla.diff
patch -p0 -i 1050342.diff