[pitivi] build: Modernize xdg-app and start using GNOME 3.20 SDK
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] build: Modernize xdg-app and start using GNOME 3.20 SDK
- Date: Tue, 19 Apr 2016 16:02:20 +0000 (UTC)
commit 89e89a41c56781e9685213ef5ddc6680c42092cc
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Apr 15 13:01:51 2016 -0300
build: Modernize xdg-app and start using GNOME 3.20 SDK
Reviewed-by: Alex Băluț <alexandru balut gmail com>
Differential Revision: https://phabricator.freedesktop.org/D909
build/xdg-app/ipdb-configure | 13 -------
build/xdg-app/matplotlib-configure | 14 --------
build/xdg-app/meson-configure | 13 -------
build/xdg-app/nose-configure | 15 --------
build/xdg-app/numpy-configure | 14 --------
build/xdg-app/pitivi-bundle | 36 ++++++++-----------
build/xdg-app/pitivi.template.json | 66 ++++++++++++++++--------------------
build/xdg-app/pre-commit-configure | 12 ------
build/xdg-app/py-configure | 17 ++++++++-
build/xdg-app/setuptools-configure | 12 ------
10 files changed, 59 insertions(+), 153 deletions(-)
---
diff --git a/build/xdg-app/pitivi-bundle b/build/xdg-app/pitivi-bundle
index 64e6a3a..95a839e 100755
--- a/build/xdg-app/pitivi-bundle
+++ b/build/xdg-app/pitivi-bundle
@@ -34,7 +34,7 @@ RUNTIME_NAME=org.gnome.Platform
# The name of the Sdk to build the bundle against
SDK_NAME=org.gnome.Sdk
# The version of the Sdk to build the bundle against
-SDK_VERSION=3.18
+SDK_VERSION=3.20
# The URL of the Sdk remote repository
SDK_REPO=http://sdk.gnome.org/repo/
# The name to give to the repository if it is not registered in xdg-app yet
@@ -145,12 +145,11 @@ You can find some informations about how to install it for your distribution at:
exit 1
fi
-LOCAL=${LANG:0:2}
SDK_INSTALLED=`xdg-app list-runtimes -d |grep "$SDK_NAME/.*/$SDK_VERSION"`
-SDK_LOCAL_INSTALLED=`xdg-app list-runtimes -d |grep "$SDK_NAME.Locale.$LOCAL/.*/$SDK_VERSION"`
+SDK_LOCAL_INSTALLED=`xdg-app list-runtimes -d |grep "$SDK_NAME.Locale/.*/$SDK_VERSION"`
RUNTIME_INSTALLED=`xdg-app list-runtimes -d |grep "$RUNTIME_NAME/.*/$SDK_VERSION"`
-RUNTIME_LOCAL_INSTALLED=`xdg-app list-runtimes -d |grep "$RUNTIME_NAME.Locale.$LOCAL/.*/$SDK_VERSION"`
+RUNTIME_LOCAL_INSTALLED=`xdg-app list-runtimes -d |grep "$RUNTIME_NAME.Locale/.*/$SDK_VERSION"`
APP_INSTALLED=`xdg-app list-apps -d |grep "$APPLICATION_REF_NAME/.*/$BRANCH"`
if [ -n "$BUNDLE" ]
@@ -201,10 +200,10 @@ then
$XDG_APP_INSTALL $SDK_REPO_NAME $SDK_NAME $SDK_VERSION || exit 1
fi
- if [ -n "$LOCAL" ] && [ -z "$SDK_LOCAL_INSTALLED" ]
+ if [ -z "$SDK_LOCAL_INSTALLED" ]
then
- echo "-> Installing $SDK_NAME.Locale.$LOCAL"
- $XDG_APP_INSTALL $SDK_REPO_NAME $SDK_NAME.Locale.$LOCAL $SDK_VERSION || exit 1
+ echo "-> Installing $SDK_NAME.Locale"
+ $XDG_APP_INSTALL $SDK_REPO_NAME $SDK_NAME.Locale $SDK_VERSION || exit 1
fi
fi
@@ -215,10 +214,10 @@ then
$XDG_APP_ADD_REMOTE $SDK_REPO_NAME $SDK_REPO > /dev/null 2>&1
$XDG_APP_INSTALL $SDK_REPO_NAME $RUNTIME_NAME $SDK_VERSION || exit 1
fi
-if [ -n "$LOCAL" ] && [ -z "$RUNTIME_LOCAL_INSTALLED" ]
+if [ -z "$RUNTIME_LOCAL_INSTALLED" ]
then
- echo "-> Installing $RUNTIME_NAME.Locale.$LOCAL"
- $XDG_APP_INSTALL $SDK_REPO_NAME $RUNTIME_NAME.Locale.$LOCAL $SDK_VERSION || exit 1
+ echo "-> Installing $RUNTIME_NAME.Locale"
+ $XDG_APP_INSTALL $SDK_REPO_NAME $RUNTIME_NAME.Locale $SDK_VERSION || exit 1
fi
# Update runtimes if needed
@@ -228,22 +227,16 @@ then
$XDG_APP_UPDATE $RUNTIME_NAME $SDK_VERSION || exit 1
- if [ -n "$LOCAL" ]
- then
- echo "-> Updating $RUNTIME_NAME.Locale.$LOCAL"
- $XDG_APP_UPDATE $RUNTIME_NAME.Locale.$LOCAL $SDK_VERSION || exit 1
- fi
+ echo "-> Updating $RUNTIME_NAME.Locale"
+ $XDG_APP_UPDATE $RUNTIME_NAME.Locale $SDK_VERSION || exit 1
if [ -n "$DEVEL" ]
then
echo "-> Updating $SDK_NAME $SDK_VERSION"
$XDG_APP_UPDATE $SDK_NAME $SDK_VERSION || exit 1
- if [ -n "$LOCAL" ]
- then
- echo "-> Updating $SDK_NAME.Locale.$LOCAL $SDK_VERSION"
- $XDG_APP_UPDATE $SDK_NAME.Locale.$LOCAL $SDK_VERSION || exit 1
- fi
+ echo "-> Updating $SDK_NAME.Locale $SDK_VERSION"
+ $XDG_APP_UPDATE $SDK_NAME.Locale $SDK_VERSION || exit 1
fi
fi
@@ -346,7 +339,7 @@ then
echo "-> Building $APPLICATION_NAME $DEVELOPMENT_BRANCHNAME from $JSON (options: $XDG_APP_BUILD_OPTIONS)"
cd $SCRIPTDIR
echo "Building with: xdg-app-builder $XDG_APP_BUILD_OPTIONS $PREFIX $JSON"
- xdg-app-builder $XDG_APP_BUILD_OPTIONS $PREFIX $JSON || exit 1
+ xdg-app-builder --ccache $XDG_APP_BUILD_OPTIONS $PREFIX $JSON || exit 1
if [ -z $BUNDLE ]
then
@@ -365,6 +358,7 @@ then
--env=GST_VALIDATE=$GST_VALIDATE \
--env=GST_VALIDATE_LAUNCHER_DEBUG=$GST_VALIDATE_LAUNCHER_DEBUG \
--env=PITIVI_DEBUG=$PITIVI_DEBUG \
+ --env=PITIVI_DEVELOPMENT=1 \
--env=GST_DEBUG_DUMP_DOT_DIR=$GST_DEBUG_DUMP_DOT_DIR \
$PREFIX $SCRIPTDIR/enter_env $*
printf "\n\nYou can now exit that terminal."
diff --git a/build/xdg-app/pitivi.template.json b/build/xdg-app/pitivi.template.json
index 47a4db4..23a0ff1 100644
--- a/build/xdg-app/pitivi.template.json
+++ b/build/xdg-app/pitivi.template.json
@@ -2,7 +2,7 @@
"app-id": "org.pitivi.Pitivi",
"version": "master",
"runtime": "org.gnome.Platform",
- "runtime-version": "3.18",
+ "runtime-version": "3.20",
"finish-args": ["--command=pitivi",
"--share=ipc", "--socket=x11", "--socket=session-bus", "--socket=pulseaudio",
"--talk-name=ca.desrt.dconf",
@@ -14,13 +14,14 @@
"rename-desktop-file": "pitivi.desktop",
"rename-icon": "pitivi",
"desktop-file-name-prefix": "(Daily) ",
- "strip": false,
"build-options" : {
- "cflags": "-O2 -g",
- "cxxflags": "-O2 -g",
+ "cflags": "-O0 -g",
+ "cxxflags": "-O0 -g",
"env": {
"PYTHON": "python3"
- }
+ },
+ "strip": false,
+ "no-debuginfo": true
},
"modules": [
{
@@ -61,30 +62,30 @@
},
{
"name": "numpy",
+ "build-options" : {
+ "build-args": ["--share=network"],
+ "cflags": "-O0 -g -L/usr/lib -Lbuild/temp.linux-x86_64-3.4 -I/usr/include
-I/usr/include/python3.4m/",
+ "env": {"ARCHFLAGS": "-arch x86_64"}
+ },
+ "config-opts": ["--module=numpy==1.10.1"],
"sources": [
{
- "type": "archive",
- "url": "https://pypi.python.org/packages/source/n/numpy/numpy-1.10.1.tar.gz",
- "sha256": "8b9f453f29ce96a14e625100d3dcf8926301d36c5f622623bf8820e748510858"
- },
- {
"type": "file",
- "path": "numpy-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
},
{
"name": "setuptools",
+ "build-options" : {
+ "build-args": ["--share=network"]
+ },
+ "config-opts": ["--module=setuptools==19.7"],
"sources": [
{
- "type": "archive",
- "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-19.7.tar.gz",
- "sha256": "9e0783f3e6b736530a84980dce99fb0f01dafcd31b3f600cde2aa446f6f77cc0"
- },
- {
"type": "file",
- "path": "setuptools-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
@@ -94,10 +95,11 @@
"build-options" : {
"build-args": ["--share=network"]
},
+ "config-opts": ["--module=ipdb==0.8.1"],
"sources": [
{
"type": "file",
- "path": "ipdb-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
@@ -107,10 +109,11 @@
"build-options" : {
"build-args": ["--share=network"]
},
+ "config-opts": ["--module=pre-commit==0.8.0"],
"sources": [
{
"type": "file",
- "path": "pre-commit-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
@@ -120,33 +123,25 @@
"build-options" : {
"build-args": ["--share=network"]
},
+ "config-opts": ["--module=matplotlib==1.5.1"],
"sources": [
{
- "type": "archive",
- "url": "https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.5.0.tar.gz",
- "sha256": "67b08b1650a00a6317d94b76a30a47320087e5244920604c5462188cba0c2646"
- },
- {
"type": "file",
- "path": "matplotlib-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
},
{
"name": "nose",
+ "config-opts": ["--module=nose==1.3.7"],
"build-options" : {
"build-args": ["--share=network"]
},
"sources": [
{
- "type": "archive",
- "url": "https://pypi.python.org/packages/source/n/nose/nose-1.3.7.tar.gz",
- "sha256": "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
- },
- {
"type": "file",
- "path": "nose-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
@@ -156,13 +151,9 @@
"build-options" : {
"build-args": ["--share=network"]
},
+ "config-opts": ["--module=pep8==1.6.2"],
"sources": [
{
- "type": "archive",
- "url": "https://pypi.python.org/packages/source/p/pep8/pep8-1.6.2.tar.gz",
- "sha256": "b8b7e35630b5539e26a197dfc6005be9e1e9a135496b377723a8ebc01b9bcbff"
- },
- {
"type": "file",
"path": "py-configure",
"dest-filename": "configure"
@@ -288,10 +279,11 @@
"build-options" : {
"build-args": ["--share=network"]
},
+ "config-opts": ["--module=meson==0.29"],
"sources": [
{
"type": "file",
- "path": "meson-configure",
+ "path": "py-configure",
"dest-filename": "configure"
}
]
diff --git a/build/xdg-app/py-configure b/build/xdg-app/py-configure
index beceb4c..9a17240 100755
--- a/build/xdg-app/py-configure
+++ b/build/xdg-app/py-configure
@@ -1,13 +1,26 @@
#!/bin/sh
-FLAGS="$@"
+for i in "$@"
+do
+ case $i in
+ --module=*)
+ MODULENAME="${i#*=}"
+ shift
+ ;;
+ *)
+ ARGS="$ARGS $i"
+ shift
+ ;;
+ esac
+done
+
cat <<EOF > Makefile
all:
echo "Nothing"
install:
- python3 ./setup.py install --prefix=/app
+ CXX=/usr/bin/g++ CC=/usr/bin/gcc PYTHONUSERBASE=/app/ pip3 install --user $MODULENAME
EOF
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]