mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
6b3d2d0174
This change comes from the blink repo https://codereview.appspot.com/229430043/ and is unlikely to be accepted upstream into libjpeg-turbo.
31 lines
662 B
Bash
Executable File
31 lines
662 B
Bash
Executable File
#!/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="jconfig.h jconfigint.h moz.build Makefile.in 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
|