[polari] flatpak: Hack around ninja's 0-mtime sillyness
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] flatpak: Hack around ninja's 0-mtime sillyness
- Date: Mon, 20 Mar 2017 10:07:08 +0000 (UTC)
commit 9e609473527c54e0de768058be9e10327b229626
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Mar 18 21:56:14 2017 +0100
flatpak: Hack around ninja's 0-mtime sillyness
Boy oh boy, this is horrible ...
build-aux/flatpak/fixup-mozjs-38.sh | 6 ++
build-aux/flatpak/meson-work-around-0-mtime.patch | 52 +++++++++++++++++++++
org.gnome.Polari-unstable.json | 15 ++++++
3 files changed, 73 insertions(+), 0 deletions(-)
---
diff --git a/build-aux/flatpak/fixup-mozjs-38.sh b/build-aux/flatpak/fixup-mozjs-38.sh
new file mode 100644
index 0000000..45eb05f
--- /dev/null
+++ b/build-aux/flatpak/fixup-mozjs-38.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/bash
+
+# mozjs-38.pc includes an '-include' flat that points to a header
+# ninja considers "dirty"; just kill it off.
+mozjs=/usr/lib/pkgconfig/mozjs-38.pc
+sed -e 's@-include [^ ]\+@@' $mozjs > /app${mozjs##/usr}
diff --git a/build-aux/flatpak/meson-work-around-0-mtime.patch
b/build-aux/flatpak/meson-work-around-0-mtime.patch
new file mode 100644
index 0000000..5cb0e7e
--- /dev/null
+++ b/build-aux/flatpak/meson-work-around-0-mtime.patch
@@ -0,0 +1,52 @@
+From f56ca83802009e63a5428ac8d10c37a74e6e0dfa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner gnome org>
+Date: Sun, 19 Mar 2017 02:15:04 +0100
+Subject: [PATCH 1/2] deps: Consider all pkg-config deps "system" includes
+
+... to work around ninja considering files with mtime==0 as dirty.
+---
+ mesonbuild/dependencies.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
+index e4317f1e..ed3fbb6b 100644
+--- a/mesonbuild/dependencies.py
++++ b/mesonbuild/dependencies.py
+@@ -204,7 +204,7 @@ class PkgConfigDependency(Dependency):
+ if ret != 0:
+ raise DependencyException('Could not generate cargs for %s:\n\n%s' %
+ (self.name, out))
+- self.cargs = out.split()
++ self.cargs = out.replace('-I', '-isystem=').split()
+
+ def _set_libs(self):
+ libcmd = [self.name, '--libs']
+--
+2.12.0
+
+
+From b79c97447c868725456bb6a71712ccf21cf6452e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner gnome org>
+Date: Sun, 19 Mar 2017 00:57:18 +0100
+Subject: [PATCH 2/2] gnome: Revert pkg-config change for gi-scanner args
+
+g-ir-scanner doesn't handle -isystem, so transform back to -I ...
+---
+ mesonbuild/modules/gnome.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 13ffabc7..c61ab76f 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -524,6 +524,7 @@ class GnomeModule(ExtensionModule):
+ elif isinstance(girtarget, build.SharedLibrary):
+ libname = girtarget.get_basename()
+ scan_command += ['--library', libname]
++ scan_command = list(map(lambda s:s.replace('-isystem=','-I'),scan_command))
+ scankwargs = {'output': girfile,
+ 'input': libsources,
+ 'command': scan_command,
+--
+2.12.0
+
diff --git a/org.gnome.Polari-unstable.json b/org.gnome.Polari-unstable.json
index 25b528a..72ee8d7 100644
--- a/org.gnome.Polari-unstable.json
+++ b/org.gnome.Polari-unstable.json
@@ -67,6 +67,10 @@
"type": "archive",
"url":
"https://github.com/mesonbuild/meson/releases/download/0.38.1/meson-0.38.1.tar.gz",
"sha256": "dcb05349b32427924fa2a258a5e23e40e09c1bf9dd09919198c3a2ae1c38ba53"
+ },
+ {
+ "type": "patch",
+ "path": "build-aux/flatpak/meson-work-around-0-mtime.patch"
}
]
},
@@ -134,6 +138,17 @@
]
},
{
+ "name": "mozjs-38",
+ "buildsystem": "simple",
+ "build-commands": ["bash fixup-mozjs-38.sh"],
+ "sources": [
+ {
+ "type": "file",
+ "path": "build-aux/flatpak/fixup-mozjs-38.sh"
+ }
+ ]
+ },
+ {
"name": "polari",
"buildsystem": "meson",
"builddir": true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]