summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2016-10-11 01:14:50 +0200
committerThibault Saunier <thibault.saunier@osg.samsung.com>2016-10-11 02:00:32 +0200
commit76e946465f03d79568f9fe202c27ec83e1276321 (patch)
tree40c3959935eb1a66c40d9b39db91b9e62e50d0cd
parent2f3c89b321bafd79cdc735c66b418fe9782ec42f (diff)
Add meson as a submodule for now
Allowing us to control the meson version in use so that it just works.
-rw-r--r--.gitmodules3
-rw-r--r--README.md9
-rw-r--r--common.py44
-rwxr-xr-xconfigure36
-rwxr-xr-xgit-update43
-rwxr-xr-xgst-uninstalled.py1
m---------meson0
7 files changed, 70 insertions, 66 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..f601ecb
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "meson"]
+ path = meson
+ url = https://github.com/mesonbuild/meson.git
diff --git a/README.md b/README.md
index 04c154d..c7b4eaa 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,15 @@ GStreamer [meson](http://mesonbuild.com/) based repositories aggregrator
You can build GStreamer and all its component at once using
meson and its "subproject" feature.
+## Getting started
+
+We have an helper script to get started, will get the right [meson](http://mesonbuild.com/)
+version and get you ready to build. You can just get all GStreamer built running:
+
+```
+./configure && ninja -C build/
+```
+
## GStreamer uninstalled
gst-all also contains a special `uninstalled` target that lets you enter
diff --git a/common.py b/common.py
new file mode 100644
index 0000000..65d5b2d
--- /dev/null
+++ b/common.py
@@ -0,0 +1,44 @@
+import argparse
+import subprocess
+
+class Colors:
+ HEADER = '\033[95m'
+ OKBLUE = '\033[94m'
+ OKGREEN = '\033[92m'
+ WARNING = '\033[93m'
+ FAIL = '\033[91m'
+ ENDC = '\033[0m'
+
+ force_disable = False
+
+ @classmethod
+ def disable(cls):
+ cls.HEADER = ''
+ cls.OKBLUE = ''
+ cls.OKGREEN = ''
+ cls.WARNING = ''
+ cls.FAIL = ''
+ cls.ENDC = ''
+
+ @classmethod
+ def enable(cls):
+ if cls.force_disable:
+ return
+
+ cls.HEADER = '\033[95m'
+ cls.OKBLUE = '\033[94m'
+ cls.OKGREEN = '\033[92m'
+ cls.WARNING = '\033[93m'
+ cls.FAIL = '\033[91m'
+ cls.ENDC = '\033[0m'
+
+
+
+def git(args, repository_path):
+ if not isinstance(args, list):
+ args = [args]
+
+ return subprocess.check_output(["git"] + args, cwd=repository_path,
+ stderr=subprocess.STDOUT).decode()
+
+
diff --git a/configure b/configure
index 3629804..9d9a7e1 100755
--- a/configure
+++ b/configure
@@ -7,26 +7,22 @@ import sys
import shutil
import subprocess
+from common import git
+from common import Colors
+
PROJECTNAME = "GStreamer 'all'"
ROOTDIR = os.path.abspath(os.path.dirname(__file__))
-MAKEFILE_TMPL = """all:
-%(tab)scd %(build_dir)s && %(ninja)s -k 100; %(ninja)s
-
-install:
-%(tab)scd %(build_dir)s && DESTDIR="${DESTDIR}" %(ninja)s install
-check:
-%(tab)scd %(build_dir)s && %(ninja)s test
-uninstalled:
-%(tab)scd %(build_dir)s && %(ninja)s uninstalled
+def get_meson():
+ print("Updating meson submodule...", end='')
+ sys.stdout.flush()
+ git(['submodule', 'update', '--init'], ROOTDIR)
+ print("DONE")
-clean:
-%(tab)srm -Rf %(build_dir)s
-%(tab)srm Makefile
-"""
+ return os.path.join(ROOTDIR, 'meson', 'meson.py')
def accept_command(commands):
@@ -42,19 +38,12 @@ def accept_command(commands):
def get_configs(meson):
- meson_version = subprocess.check_output([meson, '--version']).decode().strip()
- if meson_version <= '0.33.0':
- print("Disabling the introspection as support for the introspection with subproject was introduced in 0.34")
- return ['-Dgstreamer:disable_introspection=true',
- '-Dgst-editing-services:disable_introspection=true',
- '-Dgst-devtools:disable_introspection=true']
-
return ['-Dwerror=true']
def configure_meson(args):
"""Configures meson and generate the Makefile."""
- meson = accept_command(["meson", "meson.py"])
+ meson = get_meson()
if not meson:
print("Install mesonbuild to build %s: http://mesonbuild.com/\n"
"You can simply install it with:\n"
@@ -78,11 +67,6 @@ def configure_meson(args):
print("EXIT meson return %s" % e.returncode)
exit(1)
- with open(os.path.join(ROOTDIR, "Makefile"), "w") as makefile:
- makefile.write(MAKEFILE_TMPL %
- {"build_dir": build_dir,
- "ninja": ninja,
- "tab": " "})
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Process some integers.')
diff --git a/git-update b/git-update
index e0919b2..163574f 100755
--- a/git-update
+++ b/git-update
@@ -4,48 +4,11 @@ import os
import subprocess
import xml.etree.ElementTree as ET
+from common import git
+from common import Colors
-SCRIPTDIR = os.path.dirname(__file__)
-class Colors:
- HEADER = '\033[95m'
- OKBLUE = '\033[94m'
- OKGREEN = '\033[92m'
- WARNING = '\033[93m'
- FAIL = '\033[91m'
- ENDC = '\033[0m'
-
- force_disable = False
-
- @classmethod
- def disable(cls):
- cls.HEADER = ''
- cls.OKBLUE = ''
- cls.OKGREEN = ''
- cls.WARNING = ''
- cls.FAIL = ''
- cls.ENDC = ''
-
- @classmethod
- def enable(cls):
- if cls.force_disable:
- return
-
- cls.HEADER = '\033[95m'
- cls.OKBLUE = '\033[94m'
- cls.OKGREEN = '\033[92m'
- cls.WARNING = '\033[93m'
- cls.FAIL = '\033[91m'
- cls.ENDC = '\033[0m'
-
-
-
-def git(args, repository_path):
- if not isinstance(args, list):
- args = [args]
-
- return subprocess.check_output(["git"] + args, cwd=repository_path,
- stderr=subprocess.STDOUT).decode()
+SCRIPTDIR = os.path.dirname(__file__)
def manifest_get_commits(manifest):
diff --git a/gst-uninstalled.py b/gst-uninstalled.py
index 84ba61e..17b8f11 100755
--- a/gst-uninstalled.py
+++ b/gst-uninstalled.py
@@ -65,6 +65,7 @@ def get_subprocess_env(options):
"%s/subprojects/gst-editing-services/tests/validate" % SCRIPTDIR)
prepend_env_var(env, "PATH", os.path.normpath(
"%s/subprojects/gst-devtools/validate/tools" % options.builddir))
+ prepend_env_var(env, "PATH", os.path.join(SCRIPTDIR, 'meson'))
env["PATH"] += os.pathsep + PATH
env["GST_VERSION"] = options.gst_version
env["GST_PLUGIN_SYSTEM_PATH"] = ""
diff --git a/meson b/meson
new file mode 160000
+Subproject a513bcfde613f2a0403f7b0cd34d4bd62674c1d