Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2015-05-17 22:09:37 +03:00
parent 69cda04199
commit 7f1320a952
8 changed files with 67 additions and 98 deletions

1
.gitignore vendored
View File

@ -108,3 +108,4 @@ mesa-20100720.tar.bz2
/mesa-3282e57.tar.xz
/mesa-c1485f4.tar.xz
/mesa-51e3453.tar.xz
/mesa-5a55f68.tar.xz

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
COMMIT ?=
BRANCH ?=
SANITIZE ?= 1
ifeq ($(strip $(COMMIT)),)
COMMIT = `date +%Y%m%d`
BRANCH = 10.5
else
BRANCH = master
endif
DIRNAME = mesa-${COMMIT}
all: archive
clean:
rm -rf $(DIRNAME)/
clone: clean
git clone --depth 1 --branch $(BRANCH) \
git://git.freedesktop.org/git/mesa/mesa $(DIRNAME)
sanitize: clone vl_mpeg12_decoder.c vl_decoder.c
ifdef SANITIZE
cat < vl_mpeg12_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
cat < vl_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_decoder.c
endif
archive: clone sanitize
tar -cvf ${DIRNAME}.tar.xz ${DIRNAME}

View File

@ -1,34 +0,0 @@
#!/bin/sh
# Usage: ./make-git-snapshot.sh [COMMIT]
#
# to make a snapshot of the given tag/branch. Defaults to HEAD.
# Point env var REF to a local mesa repo to reduce clone time.
if [ -e /usr/bin/pxz ]; then
XZ=/usr/bin/pxz
else
XZ=/usr/bin/xz
fi
if [ -z "$1" ]; then
DIRNAME=mesa-$( date +%Y%m%d )
BRANCH=10.5
else
DIRNAME=mesa-$1
BRANCH=master
fi
echo REF ${REF:+--reference $REF}
echo DIRNAME $DIRNAME
echo HEAD ${1:-$BRANCH}
rm -rf $DIRNAME
git clone --depth 1 ${REF:+--reference $REF} --branch $BRANCH \
git://git.freedesktop.org/git/mesa/mesa $DIRNAME
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
| $XZ > $DIRNAME.tar.xz
# rm -rf $DIRNAME

View File

@ -49,22 +49,21 @@
%define _default_patch_fuzz 2
#% define gitdate 20150218
%define githash 51e3453
%define githash 5a55f68
%define git %{?githash:%{githash}}%{!?githash:%{gitdate}}
Summary: Mesa graphics libraries
Name: mesa
Version: 10.6.0
Release: 0.devel.5.%{git}%{?dist}
Release: 0.devel.6.%{git}%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
# Source0: MesaLib-%{version}.tar.xz
Source0: %{name}-%{git}.tar.xz
Source1: sanitize-tarball.sh
Source2: make-release-tarball.sh
Source3: make-git-snapshot.sh
Source1: Makefile
Source2: vl_decoder.c
Source3: vl_mpeg12_decoder.c
# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
# Source4 contains email correspondence clarifying the license terms.
@ -716,9 +715,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/d3d/*.so
%endif
# Generate changelog using:
# git log old_commit_sha..new_commit_sha --format="- %H: %s (%an)"
%changelog
* Sun May 17 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.6.0-0.devel.6.5a55f68
- 5a55f68
* Thu May 07 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.6.0-0.devel.5.51e3453
- 51e3453

View File

@ -1,55 +0,0 @@
#!/bin/sh
#
# usage: sanitize-tarball.sh [tarball]
if [ "x$1" = "x" ]; then
echo "Usage: sanitize-tarball.sh [tarball]"
exit 1
fi
if [ -e /usr/bin/pxz ]; then
XZ=/usr/bin/pxz
else
XZ=/usr/bin/xz
fi
dirname=$(basename $(basename "$1" .tar.bz2) .tar.xz)
tar xf "$1"
pushd $dirname
cat > src/gallium/auxiliary/vl/vl_mpeg12_decoder.c << EOF
#include "vl_mpeg12_decoder.h"
struct pipe_video_codec *
vl_create_mpeg12_decoder(struct pipe_context *context,
const struct pipe_video_codec *templat)
{
return NULL;
}
EOF
cat > src/gallium/auxiliary/vl/vl_decoder.c << EOF
#include "vl_decoder.h"
bool
vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint)
{
return false;
}
int
vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
{
return 0;
}
struct pipe_video_codec *
vl_create_decoder(struct pipe_context *pipe,
const struct pipe_video_codec *templat)
{
return NULL;
}
EOF
popd
tar cf - $dirname | $XZ > $dirname.tar.xz

View File

@ -1 +1 @@
42b604d6c6d27403a5df88a569c38f03 mesa-51e3453.tar.xz
5fa6fdf74185ee5a72893bd744de8342 mesa-5a55f68.tar.xz

20
vl_decoder.c Normal file
View File

@ -0,0 +1,20 @@
#include "vl_decoder.h"
bool
vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint)
{
return false;
}
int
vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
{
return 0;
}
struct pipe_video_codec *
vl_create_decoder(struct pipe_context *pipe,
const struct pipe_video_codec *templat)
{
return NULL;
}

7
vl_mpeg12_decoder.c Normal file
View File

@ -0,0 +1,7 @@
#include "vl_mpeg12_decoder.h"
struct pipe_video_codec *
vl_create_mpeg12_decoder(struct pipe_context *context,
const struct pipe_video_codec *templat)
{
return NULL;
}