Commit bcabc23f authored by Thibault Saunier's avatar Thibault Saunier

flatpak: Allow specifying what GStreamer version to use

Keep building against master by default
Reviewed-by: Alexandru Băluț's avatarAlex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1067
parent c0a6c84a
......@@ -5,20 +5,25 @@ import os
import subprocess
import sys
if __name__ == "__main__":
if len(sys.argv) != 4:
print("call with: %s <template_file> <outfile> <basedir>" %
if len(sys.argv) != 5:
print("call with: %s <template_file> <outfile> <basedir> <gst-version> " %
sys.argv[0])
print("-> Generating %s" % sys.argv[2])
basedir = sys.argv[3]
gst_version = sys.argv[4]
with open(sys.argv[1], "r") as tf:
template = json.load(tf)
print("-> Generating %s against GStreamer %s" % (sys.argv[2], gst_version))
for module in template["modules"]:
if module["sources"][0]["type"] != "git":
continue
if module["name"].startswith("gst"):
module["sources"][0]["branch"] = gst_version
repo = os.path.join(basedir, module["name"])
if not os.path.exists(os.path.join(repo, ".git")):
print("-> Module: %s using online repo: %s" % (
......
......@@ -38,6 +38,8 @@ SDK_REPO=http://sdk.gnome.org/repo/
# The name to give to the repository if it is not registered in flatpak yet
SDK_DEFAULT_REPO_NAME=gnome
GST_VERSION=master
# ------------------------------------------- #
FLATPAK=flatpak
......@@ -164,6 +166,10 @@ do
COMMIT_BODY="${i#*=}"
shift
;;
--gst-version=*)
GST_VERSION="${i#*=}"
shift
;;
esac
done
......@@ -363,7 +369,7 @@ then
then
# Update values in the json template
JSON=$SCRIPTDIR/$APP_BUILD_NAME.json
$SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH
$SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH $GST_VERSION
echo "-> Removing prefix $PREFIX"
rm -Rf $PREFIX
......
......@@ -296,7 +296,7 @@
},
{
"name": "gst-python",
"config-opts": ["--with-pygi-overrides-dir=/app/lib/python3.3/site-packages/gi/overrides/"],
"config-opts": ["--with-pygi-overrides-dir=/app/lib/python3.4/site-packages/gi/overrides/"],
"sources": [
{
"type": "git",
......@@ -329,7 +329,7 @@
"sources": [
{
"type": "git",
"url": "https://github.com/thiblahute/gst-transcoder.git"
"url": "https://github.com/pitivi/gst-transcoder.git"
},
{
"type": "file",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment