From 0ba624e389c8a33a1173fb40b8ecc2e874e45bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Wed, 8 Nov 2017 21:57:26 +0100 Subject: [PATCH 1/6] flatpak testing --- flatpak/config.toml | 306 ++++++++++++++++++ flatpak/flatpak-build.sh | 8 + .../org.freedesktop.Sdk.Extension.rust.json | 83 +++++ flatpak/org.gnome.Fractal.json | 35 ++ 4 files changed, 432 insertions(+) create mode 100644 flatpak/config.toml create mode 100644 flatpak/flatpak-build.sh create mode 100644 flatpak/org.freedesktop.Sdk.Extension.rust.json create mode 100644 flatpak/org.gnome.Fractal.json diff --git a/flatpak/config.toml b/flatpak/config.toml new file mode 100644 index 00000000..f8980d6b --- /dev/null +++ b/flatpak/config.toml @@ -0,0 +1,306 @@ +# Sample TOML configuration file for building Rust. +# +# To configure rustbuild, copy this file to the directory from which you will be +# running the build, and name it config.toml. +# +# All options are commented out by default in this file, and they're commented +# out with their default values. The build system by default looks for +# `config.toml` in the current directory of a build for build configuration, but +# a custom configuration file can also be specified with `--config` to the build +# system. + +# ============================================================================= +# Tweaking how LLVM is compiled +# ============================================================================= +[llvm] + +# Indicates whether the LLVM build is a Release or Debug build +#optimize = true + +# Indicates whether an LLVM Release build should include debug info +#release-debuginfo = false + +# Indicates whether the LLVM assertions are enabled or not +#assertions = false + +# Indicates whether ccache is used when building LLVM +#ccache = false +# or alternatively ... +#ccache = "/path/to/ccache" + +# If an external LLVM root is specified, we automatically check the version by +# default to make sure it's within the range that we're expecting, but setting +# this flag will indicate that this version check should not be done. +#version-check = false + +# Link libstdc++ statically into the librustc_llvm instead of relying on a +# dynamic version to be available. +#static-libstdcpp = false + +# Tell the LLVM build system to use Ninja instead of the platform default for +# the generated build system. This can sometimes be faster than make, for +# example. +#ninja = false + +# LLVM targets to build support for. +# Note: this is NOT related to Rust compilation targets. However, as Rust is +# dependent on LLVM for code generation, turning targets off here WILL lead to +# the resulting rustc being unable to compile for the disabled architectures. +# Also worth pointing out is that, in case support for new targets are added to +# LLVM, enabling them here doesn't mean Rust is automatically gaining said +# support. You'll need to write a target specification at least, and most +# likely, teach rustc about the C ABI of the target. Get in touch with the +# Rust team and file an issue if you need assistance in porting! +#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX" + +# Cap the number of parallel linker invocations when compiling LLVM. +# This can be useful when building LLVM with debug info, which significantly +# increases the size of binaries and consequently the memory required by +# each linker process. +# If absent or 0, linker invocations are treated like any other job and +# controlled by rustbuild's -j parameter. +#link-jobs = 0 + +# Delete LLVM build directory on LLVM rebuild. +# This option defaults to `false` for local development, but CI may want to +# always perform clean full builds (possibly accelerated by (s)ccache). +#clean-rebuild = false + +# ============================================================================= +# General build configuration options +# ============================================================================= +[build] + +# Build triple for the original snapshot compiler. This must be a compiler that +# nightlies are already produced for. The current platform must be able to run +# binaries of this build triple and the nightly will be used to bootstrap the +# first compiler. +#build = "x86_64-unknown-linux-gnu" # defaults to your host platform + +# In addition to the build triple, other triples to produce full compiler +# toolchains for. Each of these triples will be bootstrapped from the build +# triple and then will continue to bootstrap themselves. This platform must +# currently be able to run all of the triples provided here. +#host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple + +# In addition to all host triples, other triples to produce the standard library +# for. Each host triple will be used to produce a copy of the standard library +# for each target triple. +#target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple + +# Instead of downloading the src/stage0.txt version of Cargo specified, use +# this Cargo binary instead to build all Rust code +#cargo = "/path/to/bin/cargo" + +# Instead of downloading the src/stage0.txt version of the compiler +# specified, use this rustc binary instead as the stage0 snapshot compiler. +#rustc = "/path/to/bin/rustc" + +# Flag to specify whether any documentation is built. If false, rustdoc and +# friends will still be compiled but they will not be used to generate any +# documentation. +#docs = true + +# Indicate whether the compiler should be documented in addition to the standard +# library and facade crates. +#compiler-docs = false + +# Indicate whether submodules are managed and updated automatically. +#submodules = true + +# The path to (or name of) the GDB executable to use. This is only used for +# executing the debuginfo test suite. +#gdb = "gdb" + +# The node.js executable to use. Note that this is only used for the emscripten +# target when running tests, otherwise this can be omitted. +#nodejs = "node" + +# Python interpreter to use for various tasks throughout the build, notably +# rustdoc tests, the lldb python interpreter, and some dist bits and pieces. +# Note that Python 2 is currently required. +#python = "python2.7" + +# Force Cargo to check that Cargo.lock describes the precise dependency +# set that all the Cargo.toml files create, instead of updating it. +#locked-deps = false + +# Indicate whether the vendored sources are used for Rust dependencies or not +#vendor = false + +# Typically the build system will build the rust compiler twice. The second +# compiler, however, will simply use its own libraries to link against. If you +# would rather to perform a full bootstrap, compiling the compiler three times, +# then you can set this option to true. You shouldn't ever need to set this +# option to true. +#full-bootstrap = false + +# Enable a build of the and extended rust tool set which is not only the +# compiler but also tools such as Cargo. This will also produce "combined +# installers" which are used to install Rust and Cargo together. This is +# disabled by default. +#extended = false + +# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose +#verbose = 0 + +# Build the sanitizer runtimes +#sanitizers = false + +# Indicates whether the OpenSSL linked into Cargo will be statically linked or +# not. If static linkage is specified then the build system will download a +# known-good version of OpenSSL, compile it, and link it to Cargo. +#openssl-static = false + +# ============================================================================= +# General install configuration options +# ============================================================================= +[install] + +# Instead of installing to /usr/local, install to this path instead. +#prefix = "/usr/local" +prefix = "/usr/lib/sdk/rust" + +# Where to install libraries in `prefix` above +#libdir = "lib" + +# Where to install man pages in `prefix` above +#mandir = "share/man" + +# Where to install documentation in `prefix` above +#docdir = "share/doc/rust" + +# ============================================================================= +# Options for compiling Rust code itself +# ============================================================================= +[rust] + +# Whether or not to optimize the compiler and standard library +#optimize = true + +# Number of codegen units to use for each compiler invocation. A value of 0 +# means "the number of cores on this machine", and 1+ is passed through to the +# compiler. +#codegen-units = 1 + +# Whether or not debug assertions are enabled for the compiler and standard +# library +#debug-assertions = false + +# Whether or not debuginfo is emitted +#debuginfo = false + +# Whether or not line number debug information is emitted +#debuginfo-lines = false + +# Whether or not to only build debuginfo for the standard library if enabled. +# If enabled, this will not compile the compiler with debuginfo, just the +# standard library. +#debuginfo-only-std = false + +# Whether or not jemalloc is built and enabled +#use-jemalloc = true + +# Whether or not jemalloc is built with its debug option set +#debug-jemalloc = false + +# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE) +#backtrace = true + +# The default linker that will be used by the generated compiler. Note that this +# is not the linker used to link said compiler. +#default-linker = "cc" + +# The default ar utility that will be used by the generated compiler if LLVM +# cannot be used. Note that this is not used to assemble said compiler. +#default-ar = "ar" + +# The "channel" for the Rust build to produce. The stable/beta channels only +# allow using stable features, whereas the nightly and dev channels allow using +# nightly features +#channel = "dev" + +# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix +# platforms to ensure that the compiler is usable by default from the build +# directory (as it links to a number of dynamic libraries). This may not be +# desired in distributions, for example. +#rpath = true + +# Flag indicating whether tests are compiled with optimizations (the -O flag) or +# with debuginfo (the -g flag) +#optimize-tests = true +#debuginfo-tests = true + +# Flag indicating whether codegen tests will be run or not. If you get an error +# saying that the FileCheck executable is missing, you may want to disable this. +#codegen-tests = true + +# Flag indicating whether the API analysis data should be saved. +#save-analysis = false + +# ============================================================================= +# Options for specific targets +# +# Each of the following options is scoped to the specific target triple in +# question and is used for determining how to compile each target. +# ============================================================================= +[target.x86_64-unknown-linux-gnu] + +# C compiler to be used to compiler C code and link Rust code. Note that the +# default value is platform specific, and if not specified it may also depend on +# what platform is crossing to what platform. +#cc = "cc" + +# C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims). +# This is only used for host targets. +#cxx = "c++" + +# Path to the `llvm-config` binary of the installation of a custom LLVM to link +# against. Note that if this is specifed we don't compile LLVM at all for this +# target. +#llvm-config = "../path/to/llvm/root/bin/llvm-config" + +# Path to the custom jemalloc static library to link into the standard library +# by default. This is only used if jemalloc is still enabled above +#jemalloc = "/path/to/jemalloc/libjemalloc_pic.a" + +# If this target is for Android, this option will be required to specify where +# the NDK for the target lives. This is used to find the C compiler to link and +# build native code. +#android-ndk = "/path/to/ndk" + +# The root location of the MUSL installation directory. The library directory +# will also need to contain libunwind.a for an unwinding implementation. Note +# that this option only makes sense for MUSL targets that produce statically +# linked binaries +#musl-root = "..." + +# ============================================================================= +# Distribution options +# +# These options are related to distribution, mostly for the Rust project itself. +# You probably won't need to concern yourself with any of these options +# ============================================================================= +[dist] + +# This is the folder of artifacts that the build system will sign. All files in +# this directory will be signed with the default gpg key using the system `gpg` +# binary. The `asc` and `sha256` files will all be output into the standard dist +# output folder (currently `build/dist`) +# +# This folder should be populated ahead of time before the build system is +# invoked. +#sign-folder = "path/to/folder/to/sign" + +# This is a file which contains the password of the default gpg key. This will +# be passed to `gpg` down the road when signing all files in `sign-folder` +# above. This should be stored in plaintext. +#gpg-password-file = "path/to/gpg/password" + +# The remote address that all artifacts will eventually be uploaded to. The +# build system generates manifests which will point to these urls, and for the +# manifests to be correct they'll have to have the right URLs encoded. +# +# Note that this address should not contain a trailing slash as file names will +# be appended to it. +#upload-addr = "https://example.com/folder" diff --git a/flatpak/flatpak-build.sh b/flatpak/flatpak-build.sh new file mode 100644 index 00000000..4c9dd7a0 --- /dev/null +++ b/flatpak/flatpak-build.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +flatpak-builder --repo=repo rust-sdk org.freedesktop.Sdk.Extension.rust.json +flatpak-builder --repo=repo fractal org.gnome.Fractal.json + +#flatpak --user remote-add --no-gpg-verify --if-not-exists fractal-repo repo +#flatpak --user install fractal-repo org.freedesktop.Sdk.Extension.rust +#flatpak --user install fractal-repo org.gnome.Fractal diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust.json b/flatpak/org.freedesktop.Sdk.Extension.rust.json new file mode 100644 index 00000000..6f7ee4b4 --- /dev/null +++ b/flatpak/org.freedesktop.Sdk.Extension.rust.json @@ -0,0 +1,83 @@ +{ + "id": "org.freedesktop.Sdk.Extension.rust", + "branch": "1.6", + "runtime": "org.freedesktop.Sdk", + "build-extension": true, + "sdk": "org.freedesktop.Sdk", + "runtime-version": "1.6", + "sdk-extensions": [], + "separate-locales": false, + "cleanup": [ "/share/info", "/share/man", "/stage0" ], + "build-options" : + { + "build-args": [ "--share=network" ], + "env": { + } + }, + "modules": [ + { + "name": "rust", + "sources": [ + { + "type": "git", + "url": "https://github.com/rust-lang/rust.git", + "branch": "3b72af97e42989b2fe104d8edbaee123cdf7c58f" + }, + { + "type": "file", + "path": "config.toml" + }, + { + "type": "shell", + "commands": [ + "./x.py build", + "./x.py install", + "cp -R build/*/stage0 /usr/lib/sdk/rust" + ] + } + ] + }, + { + "name": "cargo", + "ensure-writable": ["/lib/rustlib/rust-installer-version", "/lib/rustlib/uninstall.sh", "/lib/rustlib/components"], + "sources": [ + { + "type": "git", + "url": "https://github.com/rust-lang/cargo", + "branch": "3423351a5d75ac7377bb15987842aadcfd068ad2" + } + ], + "buildsystem": "simple", + "build-commands": [ + "./configure --prefix=/usr/lib/sdk/rust --cargo=/usr/lib/sdk/rust/stage0/bin/cargo --rustc=/usr/lib/sdk/rust/bin/rustc --rustdoc=/usr/lib/sdk/rust/bin/rustdoc", + "make", + "make install" + ] + + }, + { + "name": "scripts", + "sources": [ + { + "type": "script", + "commands": [ + "mkdir -p /app/lib", + "cp /usr/lib/sdk/rust/lib/*.so* /app/lib/" + ], + "dest-filename": "install.sh" + }, + { + "type": "script", + "commands": [ + "export PATH=$PATH:/usr/lib/sdk/rust/bin" + ], + "dest-filename": "use.sh" + } + ], + "buildsystem": "simple", + "build-commands": [ + "cp use.sh install.sh /usr/lib/sdk/rust/" + ] + } + ] +} diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json new file mode 100644 index 00000000..bb0d2e27 --- /dev/null +++ b/flatpak/org.gnome.Fractal.json @@ -0,0 +1,35 @@ +{ + "app-id": "org.gnome.Fractal", + "version": "master", + "runtime": "org.gnome.Platform", + "runtime-version": "3.26", + "sdk": "org.gnome.Sdk", + "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust" ], + "command": "fractal", + "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], + "build-options" : { + "cflags": "-O2 -g", + "cxxflags": "-O2 -g", + "env": { + "V": "1" + }, + "build-args": [ "--share=network" ] + }, + "cleanup": ["/include", "/lib/*/include", "/lib/pkgconfig", "/share/pkgconfig", "/share/aclocal", "/man", "/share/man", "/share/info", "/share/gtk-doc", "*.la", "*.a" ], + "modules": [ + { + "name": "Fractal", + "sources": [ + { + "type": "git", + "url": "https://gitlab.gnome.org/danigm/fractal.git" + } + ], + "buildsystem": "simple", + "build-commands": [ + "/usr/lib/sdk/rust/install.sh", + "source /usr/lib/sdk/rust/use.sh && ./configure --prefix=/app && ninja -C _build/" + ] + } + ] +} From 0748149ea13610dee9d4411e1f3a2101642406d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Thu, 9 Nov 2017 08:45:15 +0100 Subject: [PATCH 2/6] Trying with rustup --- flatpak/org.gnome.Fractal.json | 5 ++--- meson.build | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json index bb0d2e27..3854bec6 100644 --- a/flatpak/org.gnome.Fractal.json +++ b/flatpak/org.gnome.Fractal.json @@ -4,7 +4,6 @@ "runtime": "org.gnome.Platform", "runtime-version": "3.26", "sdk": "org.gnome.Sdk", - "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust" ], "command": "fractal", "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], "build-options" : { @@ -27,8 +26,8 @@ ], "buildsystem": "simple", "build-commands": [ - "/usr/lib/sdk/rust/install.sh", - "source /usr/lib/sdk/rust/use.sh && ./configure --prefix=/app && ninja -C _build/" + "RUSTUP_HOME=/app/ CARGO_HOME=/app/ bash -c 'curl https://sh.rustup.rs -sSf | sh -s -- -y'", + "./configure --prefix=/app && make && make install" ] } ] diff --git a/meson.build b/meson.build index 308a4f4b..760c5c4a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project( - 'fractal', 'rust', + 'fractal', 'c', version: '0.1.0', license: 'GPLv3', ) From 8bce8f767ed3f6cf46d1335247a4579ab9f745c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Thu, 9 Nov 2017 10:05:21 +0100 Subject: [PATCH 3/6] flatpak package generated using rustup --- flatpak/org.gnome.Fractal.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json index 3854bec6..4cd1ba1f 100644 --- a/flatpak/org.gnome.Fractal.json +++ b/flatpak/org.gnome.Fractal.json @@ -7,9 +7,9 @@ "command": "fractal", "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], "build-options" : { - "cflags": "-O2 -g", - "cxxflags": "-O2 -g", "env": { + "RUSTUP_HOME": "/run/build/Fractal/rustup", + "CARGO_HOME": "/run/build/Fractal/cargo", "V": "1" }, "build-args": [ "--share=network" ] @@ -21,13 +21,13 @@ "sources": [ { "type": "git", - "url": "https://gitlab.gnome.org/danigm/fractal.git" + "url": "https://gitlab.gnome.org/danigm/fractal.git", + "branch": "flatpak" } ], "buildsystem": "simple", "build-commands": [ - "RUSTUP_HOME=/app/ CARGO_HOME=/app/ bash -c 'curl https://sh.rustup.rs -sSf | sh -s -- -y'", - "./configure --prefix=/app && make && make install" + "PATH=\"$PATH:$CARGO_HOME/bin\" bash -c 'curl https://sh.rustup.rs -sSf | sh -s -- -y && rustup default stable && ./configure --prefix=/app && make && make install'" ] } ] From b87e672dfe50b7bc08340669cc9f33ccfc913b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Thu, 9 Nov 2017 14:52:39 +0100 Subject: [PATCH 4/6] flatpak page using Sdk extension rust instead of rustup --- flatpak/config.toml | 306 ------------------ flatpak/flatpak-build.sh | 4 +- ...desktop.Sdk.Extension.rust-120.appdata.xml | 7 + ...rg.freedesktop.Sdk.Extension.rust-120.json | 91 ++++++ .../org.freedesktop.Sdk.Extension.rust.json | 83 ----- flatpak/org.gnome.Fractal.json | 13 +- flatpak/org.gnome.Fractal.json-rust-nightly | 43 +++ 7 files changed, 149 insertions(+), 398 deletions(-) delete mode 100644 flatpak/config.toml create mode 100644 flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml create mode 100644 flatpak/org.freedesktop.Sdk.Extension.rust-120.json delete mode 100644 flatpak/org.freedesktop.Sdk.Extension.rust.json create mode 100644 flatpak/org.gnome.Fractal.json-rust-nightly diff --git a/flatpak/config.toml b/flatpak/config.toml deleted file mode 100644 index f8980d6b..00000000 --- a/flatpak/config.toml +++ /dev/null @@ -1,306 +0,0 @@ -# Sample TOML configuration file for building Rust. -# -# To configure rustbuild, copy this file to the directory from which you will be -# running the build, and name it config.toml. -# -# All options are commented out by default in this file, and they're commented -# out with their default values. The build system by default looks for -# `config.toml` in the current directory of a build for build configuration, but -# a custom configuration file can also be specified with `--config` to the build -# system. - -# ============================================================================= -# Tweaking how LLVM is compiled -# ============================================================================= -[llvm] - -# Indicates whether the LLVM build is a Release or Debug build -#optimize = true - -# Indicates whether an LLVM Release build should include debug info -#release-debuginfo = false - -# Indicates whether the LLVM assertions are enabled or not -#assertions = false - -# Indicates whether ccache is used when building LLVM -#ccache = false -# or alternatively ... -#ccache = "/path/to/ccache" - -# If an external LLVM root is specified, we automatically check the version by -# default to make sure it's within the range that we're expecting, but setting -# this flag will indicate that this version check should not be done. -#version-check = false - -# Link libstdc++ statically into the librustc_llvm instead of relying on a -# dynamic version to be available. -#static-libstdcpp = false - -# Tell the LLVM build system to use Ninja instead of the platform default for -# the generated build system. This can sometimes be faster than make, for -# example. -#ninja = false - -# LLVM targets to build support for. -# Note: this is NOT related to Rust compilation targets. However, as Rust is -# dependent on LLVM for code generation, turning targets off here WILL lead to -# the resulting rustc being unable to compile for the disabled architectures. -# Also worth pointing out is that, in case support for new targets are added to -# LLVM, enabling them here doesn't mean Rust is automatically gaining said -# support. You'll need to write a target specification at least, and most -# likely, teach rustc about the C ABI of the target. Get in touch with the -# Rust team and file an issue if you need assistance in porting! -#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX" - -# Cap the number of parallel linker invocations when compiling LLVM. -# This can be useful when building LLVM with debug info, which significantly -# increases the size of binaries and consequently the memory required by -# each linker process. -# If absent or 0, linker invocations are treated like any other job and -# controlled by rustbuild's -j parameter. -#link-jobs = 0 - -# Delete LLVM build directory on LLVM rebuild. -# This option defaults to `false` for local development, but CI may want to -# always perform clean full builds (possibly accelerated by (s)ccache). -#clean-rebuild = false - -# ============================================================================= -# General build configuration options -# ============================================================================= -[build] - -# Build triple for the original snapshot compiler. This must be a compiler that -# nightlies are already produced for. The current platform must be able to run -# binaries of this build triple and the nightly will be used to bootstrap the -# first compiler. -#build = "x86_64-unknown-linux-gnu" # defaults to your host platform - -# In addition to the build triple, other triples to produce full compiler -# toolchains for. Each of these triples will be bootstrapped from the build -# triple and then will continue to bootstrap themselves. This platform must -# currently be able to run all of the triples provided here. -#host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple - -# In addition to all host triples, other triples to produce the standard library -# for. Each host triple will be used to produce a copy of the standard library -# for each target triple. -#target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple - -# Instead of downloading the src/stage0.txt version of Cargo specified, use -# this Cargo binary instead to build all Rust code -#cargo = "/path/to/bin/cargo" - -# Instead of downloading the src/stage0.txt version of the compiler -# specified, use this rustc binary instead as the stage0 snapshot compiler. -#rustc = "/path/to/bin/rustc" - -# Flag to specify whether any documentation is built. If false, rustdoc and -# friends will still be compiled but they will not be used to generate any -# documentation. -#docs = true - -# Indicate whether the compiler should be documented in addition to the standard -# library and facade crates. -#compiler-docs = false - -# Indicate whether submodules are managed and updated automatically. -#submodules = true - -# The path to (or name of) the GDB executable to use. This is only used for -# executing the debuginfo test suite. -#gdb = "gdb" - -# The node.js executable to use. Note that this is only used for the emscripten -# target when running tests, otherwise this can be omitted. -#nodejs = "node" - -# Python interpreter to use for various tasks throughout the build, notably -# rustdoc tests, the lldb python interpreter, and some dist bits and pieces. -# Note that Python 2 is currently required. -#python = "python2.7" - -# Force Cargo to check that Cargo.lock describes the precise dependency -# set that all the Cargo.toml files create, instead of updating it. -#locked-deps = false - -# Indicate whether the vendored sources are used for Rust dependencies or not -#vendor = false - -# Typically the build system will build the rust compiler twice. The second -# compiler, however, will simply use its own libraries to link against. If you -# would rather to perform a full bootstrap, compiling the compiler three times, -# then you can set this option to true. You shouldn't ever need to set this -# option to true. -#full-bootstrap = false - -# Enable a build of the and extended rust tool set which is not only the -# compiler but also tools such as Cargo. This will also produce "combined -# installers" which are used to install Rust and Cargo together. This is -# disabled by default. -#extended = false - -# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose -#verbose = 0 - -# Build the sanitizer runtimes -#sanitizers = false - -# Indicates whether the OpenSSL linked into Cargo will be statically linked or -# not. If static linkage is specified then the build system will download a -# known-good version of OpenSSL, compile it, and link it to Cargo. -#openssl-static = false - -# ============================================================================= -# General install configuration options -# ============================================================================= -[install] - -# Instead of installing to /usr/local, install to this path instead. -#prefix = "/usr/local" -prefix = "/usr/lib/sdk/rust" - -# Where to install libraries in `prefix` above -#libdir = "lib" - -# Where to install man pages in `prefix` above -#mandir = "share/man" - -# Where to install documentation in `prefix` above -#docdir = "share/doc/rust" - -# ============================================================================= -# Options for compiling Rust code itself -# ============================================================================= -[rust] - -# Whether or not to optimize the compiler and standard library -#optimize = true - -# Number of codegen units to use for each compiler invocation. A value of 0 -# means "the number of cores on this machine", and 1+ is passed through to the -# compiler. -#codegen-units = 1 - -# Whether or not debug assertions are enabled for the compiler and standard -# library -#debug-assertions = false - -# Whether or not debuginfo is emitted -#debuginfo = false - -# Whether or not line number debug information is emitted -#debuginfo-lines = false - -# Whether or not to only build debuginfo for the standard library if enabled. -# If enabled, this will not compile the compiler with debuginfo, just the -# standard library. -#debuginfo-only-std = false - -# Whether or not jemalloc is built and enabled -#use-jemalloc = true - -# Whether or not jemalloc is built with its debug option set -#debug-jemalloc = false - -# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE) -#backtrace = true - -# The default linker that will be used by the generated compiler. Note that this -# is not the linker used to link said compiler. -#default-linker = "cc" - -# The default ar utility that will be used by the generated compiler if LLVM -# cannot be used. Note that this is not used to assemble said compiler. -#default-ar = "ar" - -# The "channel" for the Rust build to produce. The stable/beta channels only -# allow using stable features, whereas the nightly and dev channels allow using -# nightly features -#channel = "dev" - -# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix -# platforms to ensure that the compiler is usable by default from the build -# directory (as it links to a number of dynamic libraries). This may not be -# desired in distributions, for example. -#rpath = true - -# Flag indicating whether tests are compiled with optimizations (the -O flag) or -# with debuginfo (the -g flag) -#optimize-tests = true -#debuginfo-tests = true - -# Flag indicating whether codegen tests will be run or not. If you get an error -# saying that the FileCheck executable is missing, you may want to disable this. -#codegen-tests = true - -# Flag indicating whether the API analysis data should be saved. -#save-analysis = false - -# ============================================================================= -# Options for specific targets -# -# Each of the following options is scoped to the specific target triple in -# question and is used for determining how to compile each target. -# ============================================================================= -[target.x86_64-unknown-linux-gnu] - -# C compiler to be used to compiler C code and link Rust code. Note that the -# default value is platform specific, and if not specified it may also depend on -# what platform is crossing to what platform. -#cc = "cc" - -# C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims). -# This is only used for host targets. -#cxx = "c++" - -# Path to the `llvm-config` binary of the installation of a custom LLVM to link -# against. Note that if this is specifed we don't compile LLVM at all for this -# target. -#llvm-config = "../path/to/llvm/root/bin/llvm-config" - -# Path to the custom jemalloc static library to link into the standard library -# by default. This is only used if jemalloc is still enabled above -#jemalloc = "/path/to/jemalloc/libjemalloc_pic.a" - -# If this target is for Android, this option will be required to specify where -# the NDK for the target lives. This is used to find the C compiler to link and -# build native code. -#android-ndk = "/path/to/ndk" - -# The root location of the MUSL installation directory. The library directory -# will also need to contain libunwind.a for an unwinding implementation. Note -# that this option only makes sense for MUSL targets that produce statically -# linked binaries -#musl-root = "..." - -# ============================================================================= -# Distribution options -# -# These options are related to distribution, mostly for the Rust project itself. -# You probably won't need to concern yourself with any of these options -# ============================================================================= -[dist] - -# This is the folder of artifacts that the build system will sign. All files in -# this directory will be signed with the default gpg key using the system `gpg` -# binary. The `asc` and `sha256` files will all be output into the standard dist -# output folder (currently `build/dist`) -# -# This folder should be populated ahead of time before the build system is -# invoked. -#sign-folder = "path/to/folder/to/sign" - -# This is a file which contains the password of the default gpg key. This will -# be passed to `gpg` down the road when signing all files in `sign-folder` -# above. This should be stored in plaintext. -#gpg-password-file = "path/to/gpg/password" - -# The remote address that all artifacts will eventually be uploaded to. The -# build system generates manifests which will point to these urls, and for the -# manifests to be correct they'll have to have the right URLs encoded. -# -# Note that this address should not contain a trailing slash as file names will -# be appended to it. -#upload-addr = "https://example.com/folder" diff --git a/flatpak/flatpak-build.sh b/flatpak/flatpak-build.sh index 4c9dd7a0..f560a539 100644 --- a/flatpak/flatpak-build.sh +++ b/flatpak/flatpak-build.sh @@ -1,8 +1,8 @@ #!/bin/bash -flatpak-builder --repo=repo rust-sdk org.freedesktop.Sdk.Extension.rust.json +flatpak-builder --repo=repo rust-sdk org.freedesktop.Sdk.Extension.rust-120.json flatpak-builder --repo=repo fractal org.gnome.Fractal.json #flatpak --user remote-add --no-gpg-verify --if-not-exists fractal-repo repo -#flatpak --user install fractal-repo org.freedesktop.Sdk.Extension.rust +#flatpak --user install fractal-repo org.freedesktop.Sdk.Extension.rust-120 #flatpak --user install fractal-repo org.gnome.Fractal diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml b/flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml new file mode 100644 index 00000000..6992bf95 --- /dev/null +++ b/flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml @@ -0,0 +1,7 @@ + + + org.freedesktop.Sdk.Extension.rust-120 + CC0-1.0 + Rust 1.20 Sdk extension + Rust compiler and tools + diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust-120.json b/flatpak/org.freedesktop.Sdk.Extension.rust-120.json new file mode 100644 index 00000000..411d8bda --- /dev/null +++ b/flatpak/org.freedesktop.Sdk.Extension.rust-120.json @@ -0,0 +1,91 @@ +{ + "id": "org.freedesktop.Sdk.Extension.rust-120", + "branch": "1.6", + "runtime": "org.freedesktop.Sdk", + "build-extension": true, + "sdk": "org.freedesktop.Sdk", + "runtime-version": "1.6", + "sdk-extensions": [], + "separate-locales": false, + "appstream-compose": false, + "cleanup": [ "/share/info", "/share/man" ], + "build-options" : { + "cflags": "-O2 -g", + "cxxflags": "-O2 -g", + "prefix": "/usr/lib/sdk/rust-120", + "env": { + "V": "1" + } + }, + "modules": [ + { + "name": "rust", + "buildsystem": "simple", + "cleanup": [ + "/share/doc/rust/html" + ], + "sources": [ + { + "type": "archive", + "only-arches": ["i386"], + "url": "https://static.rust-lang.org/dist/rust-1.20.0-i686-unknown-linux-gnu.tar.gz", + "sha256": "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668" + }, + { + "type": "archive", + "only-arches": ["arm"], + "url": "https://static.rust-lang.org/dist/rust-1.20.0-arm-unknown-linux-gnueabihf.tar.gz", + "sha256": "d8282b04619acdcbb5259ba5a3c8677716a015cfef3ba68ba24211590c5bb5dc" + }, + { + "type": "archive", + "only-arches": ["aarch64"], + "url": "https://static.rust-lang.org/dist/rust-1.20.0-aarch64-unknown-linux-gnu.tar.gz", + "sha256": "eaab3df489d4d8f976c4327d812b9870730eed6d0bbd52712767083d02be7472" + }, + { + "type": "archive", + "only-arches": ["x86_64"], + "url": "https://static.rust-lang.org/dist/rust-1.20.0-x86_64-unknown-linux-gnu.tar.gz", + "sha256": "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8" + } + ], + "build-commands": [ + "./install.sh --help", + "./install.sh --list-components --verbose", + "./install.sh --prefix=/usr/lib/sdk/rust-120 --disable-ldconfig --verbose" + ] + }, + { + "name": "scripts", + "sources": [ + { + "type": "script", + "commands": [ + "export PATH=$PATH:/usr/lib/sdk/rust-120/bin" + ], + "dest-filename": "enable.sh" + } + ], + "buildsystem": "simple", + "build-commands": [ + "cp enable.sh /usr/lib/sdk/rust-120/" + ] + }, + { + "name": "appdata", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "cp org.freedesktop.Sdk.Extension.rust-120.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.freedesktop.Sdk.Extension.rust-120 --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Sdk.Extension.rust-120" + ], + "sources": [ + { + "type": "file", + "path": "org.freedesktop.Sdk.Extension.rust-120.appdata.xml" + } + ] + } + ] +} diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust.json b/flatpak/org.freedesktop.Sdk.Extension.rust.json deleted file mode 100644 index 6f7ee4b4..00000000 --- a/flatpak/org.freedesktop.Sdk.Extension.rust.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "org.freedesktop.Sdk.Extension.rust", - "branch": "1.6", - "runtime": "org.freedesktop.Sdk", - "build-extension": true, - "sdk": "org.freedesktop.Sdk", - "runtime-version": "1.6", - "sdk-extensions": [], - "separate-locales": false, - "cleanup": [ "/share/info", "/share/man", "/stage0" ], - "build-options" : - { - "build-args": [ "--share=network" ], - "env": { - } - }, - "modules": [ - { - "name": "rust", - "sources": [ - { - "type": "git", - "url": "https://github.com/rust-lang/rust.git", - "branch": "3b72af97e42989b2fe104d8edbaee123cdf7c58f" - }, - { - "type": "file", - "path": "config.toml" - }, - { - "type": "shell", - "commands": [ - "./x.py build", - "./x.py install", - "cp -R build/*/stage0 /usr/lib/sdk/rust" - ] - } - ] - }, - { - "name": "cargo", - "ensure-writable": ["/lib/rustlib/rust-installer-version", "/lib/rustlib/uninstall.sh", "/lib/rustlib/components"], - "sources": [ - { - "type": "git", - "url": "https://github.com/rust-lang/cargo", - "branch": "3423351a5d75ac7377bb15987842aadcfd068ad2" - } - ], - "buildsystem": "simple", - "build-commands": [ - "./configure --prefix=/usr/lib/sdk/rust --cargo=/usr/lib/sdk/rust/stage0/bin/cargo --rustc=/usr/lib/sdk/rust/bin/rustc --rustdoc=/usr/lib/sdk/rust/bin/rustdoc", - "make", - "make install" - ] - - }, - { - "name": "scripts", - "sources": [ - { - "type": "script", - "commands": [ - "mkdir -p /app/lib", - "cp /usr/lib/sdk/rust/lib/*.so* /app/lib/" - ], - "dest-filename": "install.sh" - }, - { - "type": "script", - "commands": [ - "export PATH=$PATH:/usr/lib/sdk/rust/bin" - ], - "dest-filename": "use.sh" - } - ], - "buildsystem": "simple", - "build-commands": [ - "cp use.sh install.sh /usr/lib/sdk/rust/" - ] - } - ] -} diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json index 4cd1ba1f..d0149621 100644 --- a/flatpak/org.gnome.Fractal.json +++ b/flatpak/org.gnome.Fractal.json @@ -4,31 +4,30 @@ "runtime": "org.gnome.Platform", "runtime-version": "3.26", "sdk": "org.gnome.Sdk", + "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-120"], "command": "fractal", "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], "build-options" : { "env": { - "RUSTUP_HOME": "/run/build/Fractal/rustup", "CARGO_HOME": "/run/build/Fractal/cargo", "V": "1" }, "build-args": [ "--share=network" ] }, - "cleanup": ["/include", "/lib/*/include", "/lib/pkgconfig", "/share/pkgconfig", "/share/aclocal", "/man", "/share/man", "/share/info", "/share/gtk-doc", "*.la", "*.a" ], "modules": [ { "name": "Fractal", + "buildsystem": "simple", + "build-commands": [ + "source /usr/lib/sdk/rust-120/enable.sh && ./configure --prefix=/app && make && make install" + ], "sources": [ { "type": "git", "url": "https://gitlab.gnome.org/danigm/fractal.git", "branch": "flatpak" } - ], - "buildsystem": "simple", - "build-commands": [ - "PATH=\"$PATH:$CARGO_HOME/bin\" bash -c 'curl https://sh.rustup.rs -sSf | sh -s -- -y && rustup default stable && ./configure --prefix=/app && make && make install'" - ] + ] } ] } diff --git a/flatpak/org.gnome.Fractal.json-rust-nightly b/flatpak/org.gnome.Fractal.json-rust-nightly new file mode 100644 index 00000000..b3addbda --- /dev/null +++ b/flatpak/org.gnome.Fractal.json-rust-nightly @@ -0,0 +1,43 @@ +{ + "app-id": "org.gnome.Fractal", + "version": "master", + "runtime": "org.gnome.Platform", + "runtime-version": "3.26", + "sdk": "org.gnome.Sdk", + "command": "fractal", + "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], + "build-options" : { + "env": { + "CARGO_HOME": "/run/build/Fractal/cargo", + "V": "1" + }, + "build-args": [ "--share=network" ] + }, + "modules": [ + { + "name": "rust", + "buildsystem": "simple", + "build-commands": [ + "./install.sh --prefix=/app" + ], + "sources": [ + { + "type": "archive", + "url": "https://static.rust-lang.org/dist/rust-1.21.0-x86_64-unknown-linux-gnu.tar.gz", + "sha256": "b41e70e018402bc04d02fde82f91bea24428e6be432f0df12ac400cfb03108e8" + } + ] + }, + { + "name": "Fractal", + "buildsystem": "meson", + "sources": [ + { + "type": "git", + "url": "https://gitlab.gnome.org/danigm/fractal.git", + "branch": "flatpak" + } + ] + } + ] +} From 00889658746bdcbe03859c5312e41e1027fa4774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Thu, 9 Nov 2017 20:22:17 +0100 Subject: [PATCH 5/6] flatpak working with rust 1.21 freedesktop sdk extension --- flatpak/flatpak-build.sh | 4 +- ...esktop.Sdk.Extension.rust-121.appdata.xml} | 4 +- ...g.freedesktop.Sdk.Extension.rust-121.json} | 32 +++++++------- flatpak/org.gnome.Fractal.json | 6 +-- flatpak/org.gnome.Fractal.json-rust-nightly | 43 ------------------- 5 files changed, 23 insertions(+), 66 deletions(-) rename flatpak/{org.freedesktop.Sdk.Extension.rust-120.appdata.xml => org.freedesktop.Sdk.Extension.rust-121.appdata.xml} (65%) rename flatpak/{org.freedesktop.Sdk.Extension.rust-120.json => org.freedesktop.Sdk.Extension.rust-121.json} (70%) delete mode 100644 flatpak/org.gnome.Fractal.json-rust-nightly diff --git a/flatpak/flatpak-build.sh b/flatpak/flatpak-build.sh index f560a539..f0539a05 100644 --- a/flatpak/flatpak-build.sh +++ b/flatpak/flatpak-build.sh @@ -1,8 +1,8 @@ #!/bin/bash -flatpak-builder --repo=repo rust-sdk org.freedesktop.Sdk.Extension.rust-120.json +flatpak-builder --repo=repo rust-sdk org.freedesktop.Sdk.Extension.rust-121.json flatpak-builder --repo=repo fractal org.gnome.Fractal.json #flatpak --user remote-add --no-gpg-verify --if-not-exists fractal-repo repo -#flatpak --user install fractal-repo org.freedesktop.Sdk.Extension.rust-120 +#flatpak --user install fractal-repo org.freedesktop.Sdk.Extension.rust-121 #flatpak --user install fractal-repo org.gnome.Fractal diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml b/flatpak/org.freedesktop.Sdk.Extension.rust-121.appdata.xml similarity index 65% rename from flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml rename to flatpak/org.freedesktop.Sdk.Extension.rust-121.appdata.xml index 6992bf95..f411a81c 100644 --- a/flatpak/org.freedesktop.Sdk.Extension.rust-120.appdata.xml +++ b/flatpak/org.freedesktop.Sdk.Extension.rust-121.appdata.xml @@ -1,7 +1,7 @@ - org.freedesktop.Sdk.Extension.rust-120 + org.freedesktop.Sdk.Extension.rust-121 CC0-1.0 - Rust 1.20 Sdk extension + Rust 1.21 Sdk extension Rust compiler and tools diff --git a/flatpak/org.freedesktop.Sdk.Extension.rust-120.json b/flatpak/org.freedesktop.Sdk.Extension.rust-121.json similarity index 70% rename from flatpak/org.freedesktop.Sdk.Extension.rust-120.json rename to flatpak/org.freedesktop.Sdk.Extension.rust-121.json index 411d8bda..3120613f 100644 --- a/flatpak/org.freedesktop.Sdk.Extension.rust-120.json +++ b/flatpak/org.freedesktop.Sdk.Extension.rust-121.json @@ -1,5 +1,5 @@ { - "id": "org.freedesktop.Sdk.Extension.rust-120", + "id": "org.freedesktop.Sdk.Extension.rust-121", "branch": "1.6", "runtime": "org.freedesktop.Sdk", "build-extension": true, @@ -12,7 +12,7 @@ "build-options" : { "cflags": "-O2 -g", "cxxflags": "-O2 -g", - "prefix": "/usr/lib/sdk/rust-120", + "prefix": "/usr/lib/sdk/rust-121", "env": { "V": "1" } @@ -28,32 +28,32 @@ { "type": "archive", "only-arches": ["i386"], - "url": "https://static.rust-lang.org/dist/rust-1.20.0-i686-unknown-linux-gnu.tar.gz", - "sha256": "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668" + "url": "https://static.rust-lang.org/dist/rust-1.21.0-i686-unknown-linux-gnu.tar.gz", + "sha256": "b7caed0f602cdb8ef22e0bfa9125a65bec411e15c0b8901d937e43303ec7dbee" }, { "type": "archive", "only-arches": ["arm"], - "url": "https://static.rust-lang.org/dist/rust-1.20.0-arm-unknown-linux-gnueabihf.tar.gz", - "sha256": "d8282b04619acdcbb5259ba5a3c8677716a015cfef3ba68ba24211590c5bb5dc" + "url": "https://static.rust-lang.org/dist/rust-1.21.0-arm-unknown-linux-gnueabihf.tar.gz", + "sha256": "add0b9c2fae88b9d84e5a25ebf09a9805010aaddd6e2584e41b5822ba8e51dd9" }, { "type": "archive", "only-arches": ["aarch64"], - "url": "https://static.rust-lang.org/dist/rust-1.20.0-aarch64-unknown-linux-gnu.tar.gz", - "sha256": "eaab3df489d4d8f976c4327d812b9870730eed6d0bbd52712767083d02be7472" + "url": "https://static.rust-lang.org/dist/rust-1.21.0-aarch64-unknown-linux-gnu.tar.gz", + "sha256": "491ee6c43cc672006968d665bd34c94cc2219ef3592d93d38097c97eaaa864c3" }, { "type": "archive", "only-arches": ["x86_64"], - "url": "https://static.rust-lang.org/dist/rust-1.20.0-x86_64-unknown-linux-gnu.tar.gz", - "sha256": "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8" + "url": "https://static.rust-lang.org/dist/rust-1.21.0-x86_64-unknown-linux-gnu.tar.gz", + "sha256": "b41e70e018402bc04d02fde82f91bea24428e6be432f0df12ac400cfb03108e8" } ], "build-commands": [ "./install.sh --help", "./install.sh --list-components --verbose", - "./install.sh --prefix=/usr/lib/sdk/rust-120 --disable-ldconfig --verbose" + "./install.sh --prefix=/usr/lib/sdk/rust-121 --disable-ldconfig --verbose" ] }, { @@ -62,14 +62,14 @@ { "type": "script", "commands": [ - "export PATH=$PATH:/usr/lib/sdk/rust-120/bin" + "export PATH=$PATH:/usr/lib/sdk/rust-121/bin" ], "dest-filename": "enable.sh" } ], "buildsystem": "simple", "build-commands": [ - "cp enable.sh /usr/lib/sdk/rust-120/" + "cp enable.sh /usr/lib/sdk/rust-121/" ] }, { @@ -77,13 +77,13 @@ "buildsystem": "simple", "build-commands": [ "mkdir -p ${FLATPAK_DEST}/share/appdata", - "cp org.freedesktop.Sdk.Extension.rust-120.appdata.xml ${FLATPAK_DEST}/share/appdata", - "appstream-compose --basename=org.freedesktop.Sdk.Extension.rust-120 --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Sdk.Extension.rust-120" + "cp org.freedesktop.Sdk.Extension.rust-121.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.freedesktop.Sdk.Extension.rust-121 --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Sdk.Extension.rust-121" ], "sources": [ { "type": "file", - "path": "org.freedesktop.Sdk.Extension.rust-120.appdata.xml" + "path": "org.freedesktop.Sdk.Extension.rust-121.appdata.xml" } ] } diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json index d0149621..722e0c13 100644 --- a/flatpak/org.gnome.Fractal.json +++ b/flatpak/org.gnome.Fractal.json @@ -4,7 +4,7 @@ "runtime": "org.gnome.Platform", "runtime-version": "3.26", "sdk": "org.gnome.Sdk", - "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-120"], + "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-121"], "command": "fractal", "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], "build-options" : { @@ -19,13 +19,13 @@ "name": "Fractal", "buildsystem": "simple", "build-commands": [ - "source /usr/lib/sdk/rust-120/enable.sh && ./configure --prefix=/app && make && make install" + "source /usr/lib/sdk/rust-121/enable.sh && ./configure --prefix=/app && make && make install" ], "sources": [ { "type": "git", "url": "https://gitlab.gnome.org/danigm/fractal.git", - "branch": "flatpak" + "branch": "master" } ] } diff --git a/flatpak/org.gnome.Fractal.json-rust-nightly b/flatpak/org.gnome.Fractal.json-rust-nightly deleted file mode 100644 index b3addbda..00000000 --- a/flatpak/org.gnome.Fractal.json-rust-nightly +++ /dev/null @@ -1,43 +0,0 @@ -{ - "app-id": "org.gnome.Fractal", - "version": "master", - "runtime": "org.gnome.Platform", - "runtime-version": "3.26", - "sdk": "org.gnome.Sdk", - "command": "fractal", - "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], - "build-options" : { - "env": { - "CARGO_HOME": "/run/build/Fractal/cargo", - "V": "1" - }, - "build-args": [ "--share=network" ] - }, - "modules": [ - { - "name": "rust", - "buildsystem": "simple", - "build-commands": [ - "./install.sh --prefix=/app" - ], - "sources": [ - { - "type": "archive", - "url": "https://static.rust-lang.org/dist/rust-1.21.0-x86_64-unknown-linux-gnu.tar.gz", - "sha256": "b41e70e018402bc04d02fde82f91bea24428e6be432f0df12ac400cfb03108e8" - } - ] - }, - { - "name": "Fractal", - "buildsystem": "meson", - "sources": [ - { - "type": "git", - "url": "https://gitlab.gnome.org/danigm/fractal.git", - "branch": "flatpak" - } - ] - } - ] -} From 6fc942b3f190e85d9e2f40049dff57c13ecfa69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Fri, 10 Nov 2017 15:03:26 +0100 Subject: [PATCH 6/6] Flatpak version from gitlab archive --- flatpak/org.gnome.Fractal.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flatpak/org.gnome.Fractal.json b/flatpak/org.gnome.Fractal.json index 722e0c13..ef710491 100644 --- a/flatpak/org.gnome.Fractal.json +++ b/flatpak/org.gnome.Fractal.json @@ -4,7 +4,7 @@ "runtime": "org.gnome.Platform", "runtime-version": "3.26", "sdk": "org.gnome.Sdk", - "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-121"], + "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-stable"], "command": "fractal", "finish-args": ["--share=network", "--socket=x11", "--filesystem=host" ], "build-options" : { @@ -19,13 +19,13 @@ "name": "Fractal", "buildsystem": "simple", "build-commands": [ - "source /usr/lib/sdk/rust-121/enable.sh && ./configure --prefix=/app && make && make install" + "source /usr/lib/sdk/rust-stable/enable.sh && ./configure --prefix=/app && make && make install" ], "sources": [ { - "type": "git", - "url": "https://gitlab.gnome.org/danigm/fractal.git", - "branch": "master" + "type": "archive", + "url": "https://gitlab.gnome.org/danigm/fractal/uploads/ce1b14f0e94b943acccd8e1b5b8bb633/fractal-0.1.0.tar.gz", + "sha256": "16bc61ae92670df7968fcff63c3ac27824490b16320b05c91a8495520a1ea3ed" } ] }