4c06853
#!/bin/sh
4c06853
#
4c06853
# usage: sanitize-tarball.sh [tarball]
4c06853
e99071d
if [ "x$1" = "x" ]; then
e99071d
    echo "Usage: sanitize-tarball.sh [tarball]"
e99071d
    exit 1
e99071d
fi
e99071d
40ec051
if [ -e /usr/bin/pxz ]; then
40ec051
    XZ=/usr/bin/pxz
40ec051
else
40ec051
    XZ=/usr/bin/xz
40ec051
fi
40ec051
4c06853
dirname=$(basename $(basename "$1" .tar.bz2) .tar.xz)
4c06853
4c06853
tar xf "$1"
4c06853
pushd $dirname
4c06853
4c06853
cat > src/gallium/auxiliary/vl/vl_mpeg12_decoder.c << EOF
4c06853
#include "vl_mpeg12_decoder.h"
4c06853
struct pipe_video_decoder *
4c06853
vl_create_mpeg12_decoder(struct pipe_context *context,
4c06853
                         enum pipe_video_profile profile,
4c06853
			 enum pipe_video_entrypoint entrypoint,
4c06853
			 enum pipe_video_chroma_format chroma_format,
4c06853
			 unsigned width, unsigned height,
4c06853
			 unsigned max_references,
4c06853
			 bool expect_chunked_decode)
4c06853
{
4c06853
    return NULL;
4c06853
}
4c06853
EOF
4c06853
4c06853
cat > src/gallium/auxiliary/vl/vl_decoder.c << EOF
4c06853
#include "vl_decoder.h"
4c06853
bool vl_profile_supported(struct pipe_screen *screen,
4c06853
                          enum pipe_video_profile profile)
4c06853
{
4c06853
    return false;
4c06853
}
4c06853
struct pipe_video_decoder *
4c06853
vl_create_decoder(struct pipe_context *pipe,
4c06853
                  enum pipe_video_profile profile,
4c06853
                  enum pipe_video_entrypoint entrypoint,
4c06853
                  enum pipe_video_chroma_format chroma_format,
4c06853
                  unsigned width, unsigned height, unsigned max_references,
4c06853
                  bool expect_chunked_decode)
4c06853
{
4c06853
    return NULL;
4c06853
}
4c06853
EOF
4c06853
4c06853
popd
40ec051
tar cf - $dirname | $XZ > $dirname.tar.xz