media/update-libjpeg.sh
author Olli Pettay <Olli.Pettay@helsinki.fi>
Wed, 03 Jan 2018 18:42:50 +0200
changeset 449398 a53f97560b8fd38fdcac5436225afb38e705a215
parent 342694 4e6dd91cd5823834a7da0394367609a1640dfb11
child 498140 0203e34e995060ce1fb3abbe5c5b6f8b2fc76ba7
permissions -rwxr-xr-x
backout Bug 1414204 because of regressions, r=backout

#!/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