gnome-builder: enable docs, fix typos.
I also tried turning on the tests, but they don't work and I don't understand why not.
This commit is contained in:
parent
7bd3ca49bc
commit
6ae9723cfb
|
@ -0,0 +1,29 @@
|
||||||
|
From 6d2edb1635465dc226bc7e05fd33c9ee456e2430 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jamey Sharp <jamey@minilop.net>
|
||||||
|
Date: Mon, 30 Jul 2018 13:26:28 -0700
|
||||||
|
Subject: [PATCH 1/3] Make libide's install_dir an absolute path.
|
||||||
|
|
||||||
|
As far as I know, this change should be a no-op on all systems where
|
||||||
|
Builder works today. However, it is necessary for getting the correct
|
||||||
|
shared-library path into generated .gir and typelib files when building
|
||||||
|
on Nix, so I'm hoping this is an acceptable change for upstream.
|
||||||
|
---
|
||||||
|
src/libide/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/libide/meson.build b/src/libide/meson.build
|
||||||
|
index e0643eda4..e27e0e43a 100644
|
||||||
|
--- a/src/libide/meson.build
|
||||||
|
+++ b/src/libide/meson.build
|
||||||
|
@@ -229,7 +229,7 @@ libide = shared_library('ide-' + libide_api_version,
|
||||||
|
dependencies: libide_deps,
|
||||||
|
c_args: libide_args,
|
||||||
|
install: true,
|
||||||
|
- install_dir: pkglibdir,
|
||||||
|
+ install_dir: pkglibdir_abs,
|
||||||
|
install_rpath: pkglibdir_abs,
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.16.4
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
From 4c5d544772920c774e99388ca4e8457f0c0a4ba4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jamey Sharp <jamey@minilop.net>
|
||||||
|
Date: Mon, 30 Jul 2018 13:30:15 -0700
|
||||||
|
Subject: [PATCH 2/3] Allow packagers to specify the Python libprefix.
|
||||||
|
|
||||||
|
When packaging for Nix, the directory that pygobject finds its overrides
|
||||||
|
in is not writable. It'll usually look something like this, and can only
|
||||||
|
contain files built by the pygobject package itself:
|
||||||
|
|
||||||
|
/nix/store/58qam3zgdcvvsz4g081pp98kg9i5v7rb-python3.6-pygobject-3.26.1/lib/python3.6/site-packages/gi/overrides
|
||||||
|
|
||||||
|
This makes Builder's pygobject_override_dir heuristic fail, because
|
||||||
|
Builder's libdir is not a prefix of pygobject's libdir.
|
||||||
|
|
||||||
|
Fortunately, what Builder actually needs is for its overrides to be on
|
||||||
|
the Python import path when it runs, and that's easier to arrange. We
|
||||||
|
just need to be sure that Ide.py gets installed to
|
||||||
|
|
||||||
|
<libdir>/python<version>/site-packages/gi/overrides
|
||||||
|
|
||||||
|
So this patch allows packagers to optionally specify the
|
||||||
|
"python<version>" portion of the path, and just constructs the rest of
|
||||||
|
the path using Builder's libdir.
|
||||||
|
|
||||||
|
The existing auto-detection code is still used unless the
|
||||||
|
-Dpython_libprefix option is explicitly specified to override it.
|
||||||
|
---
|
||||||
|
meson_options.txt | 2 ++
|
||||||
|
src/libide/meson.build | 5 +++++
|
||||||
|
2 files changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 1ee96f23e..ca94bcd62 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -19,6 +19,8 @@ option('with_docs', type: 'boolean', value: false)
|
||||||
|
|
||||||
|
option('ctags_path', type: 'string', value: '')
|
||||||
|
|
||||||
|
+option('python_libprefix', type: 'string')
|
||||||
|
+
|
||||||
|
# Plugins
|
||||||
|
# Ideally we want many of these to be defined in the plugin dir:
|
||||||
|
# https://github.com/mesonbuild/meson/issues/707
|
||||||
|
diff --git a/src/libide/meson.build b/src/libide/meson.build
|
||||||
|
index e27e0e43a..b245c855a 100644
|
||||||
|
--- a/src/libide/meson.build
|
||||||
|
+++ b/src/libide/meson.build
|
||||||
|
@@ -164,6 +164,10 @@ if get_option('with_editorconfig')
|
||||||
|
endif
|
||||||
|
|
||||||
|
# We want to find the subdirectory to install our override into:
|
||||||
|
+python_libprefix = get_option('python_libprefix')
|
||||||
|
+if python_libprefix != ''
|
||||||
|
+ pygobject_override_dir = join_paths(get_option('libdir'), python_libprefix, 'site-packages', 'gi', 'overrides')
|
||||||
|
+else
|
||||||
|
python3 = find_program('python3')
|
||||||
|
|
||||||
|
get_overridedir = '''
|
||||||
|
@@ -193,6 +197,7 @@ if ret.returncode() != 0
|
||||||
|
else
|
||||||
|
pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
|
||||||
|
endif
|
||||||
|
+endif
|
||||||
|
|
||||||
|
install_data('Ide.py', install_dir: pygobject_override_dir)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.16.4
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
From 8d4d251bb613feb2c4aad3d9aef77d9691c0a882 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jamey Sharp <jamey@minilop.net>
|
||||||
|
Date: Mon, 30 Jul 2018 15:22:30 -0700
|
||||||
|
Subject: [PATCH 3/3] Add missing ostree-1 dependency to flatpak plugin
|
||||||
|
|
||||||
|
---
|
||||||
|
src/plugins/flatpak/meson.build | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/src/plugins/flatpak/meson.build b/src/plugins/flatpak/meson.build
|
diff --git a/src/plugins/flatpak/meson.build b/src/plugins/flatpak/meson.build
|
||||||
index 657f7939b..28982bb74 100644
|
index 657f7939b..28982bb74 100644
|
||||||
--- a/src/plugins/flatpak/meson.build
|
--- a/src/plugins/flatpak/meson.build
|
||||||
|
@ -10,3 +19,6 @@ index 657f7939b..28982bb74 100644
|
||||||
dependency('libsoup-2.4', version: '>= 2.52.0'),
|
dependency('libsoup-2.4', version: '>= 2.52.0'),
|
||||||
libgit_dep,
|
libgit_dep,
|
||||||
]
|
]
|
||||||
|
--
|
||||||
|
2.16.4
|
||||||
|
|
|
@ -1,7 +1,30 @@
|
||||||
{ stdenv, fetchurl, gnome3, gobjectIntrospection, meson, ninja, pkgconfig
|
{ stdenv
|
||||||
, appstream-glib, desktop-file-utils, python3, python3Packages, wrapGAppsHook
|
, desktop-file-utils
|
||||||
, flatpak, gspell, gtk3, gtksourceview3, json-glib, jsonrpc-glib, libdazzle
|
, docbook_xsl
|
||||||
, libxml2, ostree, pcre , sysprof, template-glib, vala, webkitgtk
|
, fetchurl
|
||||||
|
, flatpak
|
||||||
|
, gnome3
|
||||||
|
, gobjectIntrospection
|
||||||
|
, gspell
|
||||||
|
, gtk-doc
|
||||||
|
, gtk3
|
||||||
|
, gtksourceview3
|
||||||
|
, hicolor-icon-theme
|
||||||
|
, json-glib
|
||||||
|
, jsonrpc-glib
|
||||||
|
, libdazzle
|
||||||
|
, libxml2
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, ostree
|
||||||
|
, pcre
|
||||||
|
, pkgconfig
|
||||||
|
, python3
|
||||||
|
, sysprof
|
||||||
|
, template-glib
|
||||||
|
, vala
|
||||||
|
, webkitgtk
|
||||||
|
, wrapGAppsHook
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "3.28.4";
|
version = "3.28.4";
|
||||||
|
@ -15,15 +38,17 @@ in stdenv.mkDerivation {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3Packages.wrapPython
|
#appstream-glib # tests fail if these tools are available
|
||||||
wrapGAppsHook
|
desktop-file-utils
|
||||||
|
docbook_xsl
|
||||||
gobjectIntrospection
|
gobjectIntrospection
|
||||||
|
gtk-doc
|
||||||
|
hicolor-icon-theme
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
python3.pkgs.wrapPython
|
||||||
appstream-glib
|
wrapGAppsHook
|
||||||
desktop-file-utils
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -53,16 +78,18 @@ in stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./python-libprefix.patch
|
./0001-Make-libide-s-install_dir-an-absolute-path.patch
|
||||||
./flatpak-deps.patch
|
./0002-Allow-packagers-to-specify-the-Python-libprefix.patch
|
||||||
|
./0003-Add-missing-ostree-1-dependency-to-flatpak-plugin.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dpython_libprefix=${python3.libPrefix}"
|
"-Dpython_libprefix=${python3.libPrefix}"
|
||||||
"-Dwith_clang=false"
|
"-Dwith_clang=false"
|
||||||
|
"-Dwith_docs=true"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = with python3Packages; requiredPythonModules [ pygobject3 ];
|
pythonPath = with python3.pkgs; requiredPythonModules [ pygobject3 ];
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
buildPythonPath "$out $pythonPath"
|
buildPythonPath "$out $pythonPath"
|
||||||
|
@ -76,6 +103,8 @@ in stdenv.mkDerivation {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
#doCheck = true;
|
||||||
|
|
||||||
passthru.updateScript = gnome3.updateScript { packageName = pname; };
|
passthru.updateScript = gnome3.updateScript { packageName = pname; };
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
--- gnome-builder-3.28.4/meson_options.txt.orig 2018-07-29 15:36:03.605081188 -0700
|
|
||||||
+++ gnome-builder-3.28.4/meson_options.txt 2018-07-29 15:36:19.877608836 -0700
|
|
||||||
@@ -15,6 +15,8 @@
|
|
||||||
option('with_help', type: 'boolean')
|
|
||||||
option('with_docs', type: 'boolean', value: false)
|
|
||||||
|
|
||||||
+option('python_libprefix', type: 'string')
|
|
||||||
+
|
|
||||||
# Plugins
|
|
||||||
# Ideally we want many of these to be defined in the plugin dir:
|
|
||||||
# https://github.com/mesonbuild/meson/issues/707
|
|
||||||
--- gnome-builder-3.28.4/src/libide/meson.build.orig 2018-07-29 15:36:03.605081188 -0700
|
|
||||||
+++ gnome-builder-3.28.4/src/libide/meson.build 2018-07-29 15:36:43.237365710 -0700
|
|
||||||
@@ -161,6 +161,10 @@
|
|
||||||
endif
|
|
||||||
|
|
||||||
# We want to find the subdirectory to install our override into:
|
|
||||||
+python_libprefix = get_option('python_libprefix')
|
|
||||||
+if python_libprefix != ''
|
|
||||||
+ pygobject_override_dir = join_paths(get_option('libdir'), python_libprefix, 'site_packages', 'gi', 'overrides')
|
|
||||||
+else
|
|
||||||
python3 = find_program('python3')
|
|
||||||
|
|
||||||
get_overridedir = '''
|
|
||||||
@@ -190,6 +194,7 @@
|
|
||||||
else
|
|
||||||
pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
|
|
||||||
endif
|
|
||||||
+endif
|
|
||||||
|
|
||||||
install_data('Ide.py', install_dir: pygobject_override_dir)
|
|
||||||
|
|
||||||
@@ -222,7 +227,7 @@
|
|
||||||
dependencies: libide_deps,
|
|
||||||
c_args: libide_args,
|
|
||||||
install: true,
|
|
||||||
- install_dir: pkglibdir,
|
|
||||||
+ install_dir: pkglibdir_abs,
|
|
||||||
install_rpath: pkglibdir_abs,
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue