From 13c959d38950bb593d63a519e081921c47a285f3 Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Mon, 27 Mar 2017 11:04:16 +0200 Subject: [PATCH] build: Update flatpak build and organize folder structure Flatpak doesn't need to build meson or a patch for ninja and meson to work properly: https://github.com/flatpak/flatpak/issues/607 https://bugzilla.gnome.org/show_bug.cgi?id=774368 https://github.com/flatpak/freedesktop-sdk-images/commit/273e2460aa55a0fd80d4b2feef38795991b4d665 This patch updates this and improves the folder structure with a build-aux folder to clear up the root folder. https://bugzilla.gnome.org/show_bug.cgi?id=780580 --- make_release.sh => build-aux/make_release.sh | 2 +- .../meson}/check_libgd.sh | 0 build-aux/meson/postinstall.sh | 13 +++++++++++ build-scripts/compile_gschemas.sh | 7 ------ meson-glib-check.patch | 11 ---------- meson.build | 4 ++-- org.gnome.Nautilus.json | 22 ------------------- setuptools-makefile | 5 ----- 8 files changed, 16 insertions(+), 48 deletions(-) rename make_release.sh => build-aux/make_release.sh (92%) rename {build-scripts => build-aux/meson}/check_libgd.sh (100%) create mode 100755 build-aux/meson/postinstall.sh delete mode 100755 build-scripts/compile_gschemas.sh delete mode 100644 meson-glib-check.patch delete mode 100644 setuptools-makefile diff --git a/make_release.sh b/build-aux/make_release.sh similarity index 92% rename from make_release.sh rename to build-aux/make_release.sh index f33e48996..c0aa56762 100755 --- a/make_release.sh +++ b/build-aux/make_release.sh @@ -1,5 +1,5 @@ #!/bin/sh -test -n "$srcdir" || srcdir=$(dirname "$0") +test -n "$srcdir" || srcdir=$1 test -n "$srcdir" || srcdir=. cd $srcdir diff --git a/build-scripts/check_libgd.sh b/build-aux/meson/check_libgd.sh similarity index 100% rename from build-scripts/check_libgd.sh rename to build-aux/meson/check_libgd.sh diff --git a/build-aux/meson/postinstall.sh b/build-aux/meson/postinstall.sh new file mode 100755 index 000000000..9d10bf1e2 --- /dev/null +++ b/build-aux/meson/postinstall.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Package managers set this so we don't need to run +if [ -z "$DESTDIR" ]; then + echo Compiling GSettings schemas... + glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas + + echo Updating desktop database... + update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications + + echo Updating icon cache... + gtk-update-icon-cache -q -t -f ${MESON_INSTALL_PREFIX}/share/icons/hicolor +fi \ No newline at end of file diff --git a/build-scripts/compile_gschemas.sh b/build-scripts/compile_gschemas.sh deleted file mode 100755 index 01010099d..000000000 --- a/build-scripts/compile_gschemas.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Avoid compiling schemas when packaging. -if [ -z "$DESTDIR" ] -then - glib-compile-schemas "${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas" -fi diff --git a/meson-glib-check.patch b/meson-glib-check.patch deleted file mode 100644 index eea326f76..000000000 --- a/meson-glib-check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- mesonbuild/modules/gnome.py.glib 2017-02-21 20:45:17.187843787 -0500 -+++ mesonbuild/modules/gnome.py 2017-02-21 20:46:18.062188395 -0500 -@@ -37,7 +37,7 @@ - # - # https://github.com/ninja-build/ninja/issues/1184 - # https://bugzilla.gnome.org/show_bug.cgi?id=774368 --gresource_dep_needed_version = '>= 2.52.0' -+gresource_dep_needed_version = '>= 2.50.0' - - native_glib_version = None - girwarning_printed = False diff --git a/meson.build b/meson.build index 6aa73125a..68c3f33f0 100644 --- a/meson.build +++ b/meson.build @@ -101,7 +101,7 @@ subdir ('eel') subdir ('libnautilus-extension') message ('Checking for libgd…') -run_command ('build-scripts/check_libgd.sh') +run_command ('build-aux/meson/check_libgd.sh') libgd_options = ['static=true', 'with-gtk-hacks=true', @@ -128,4 +128,4 @@ if get_option ('enable-nst-extension') endif # Compile GSettings schemas when installing from source. -meson.add_install_script ('build-scripts/compile_gschemas.sh') +meson.add_install_script ('build-aux/meson/postinstall.sh') diff --git a/org.gnome.Nautilus.json b/org.gnome.Nautilus.json index 04f10f000..a8caa50da 100644 --- a/org.gnome.Nautilus.json +++ b/org.gnome.Nautilus.json @@ -29,28 +29,6 @@ }, "cleanup": [ "/include", "/share/bash-completion" ], "modules": [ - { - "name": "meson", - "no-autogen": true, - "sources": [ - { - "type": "archive", - "url": "https://github.com/mesonbuild/meson/releases/download/0.38.1/meson-0.38.1.tar.gz", - "sha256": "dcb05349b32427924fa2a258a5e23e40e09c1bf9dd09919198c3a2ae1c38ba53" - }, - { - "type": "patch", - "path": "meson-glib-check.patch", - "strip-components": 0 - - }, - { - "type": "file", - "path": "setuptools-makefile", - "dest-filename": "Makefile" - } - ] - }, { "name": "libexif", "sources": [ diff --git a/setuptools-makefile b/setuptools-makefile deleted file mode 100644 index 96c28f093..000000000 --- a/setuptools-makefile +++ /dev/null @@ -1,5 +0,0 @@ -all: - python3 ./setup.py build - -install: - python3 ./setup.py install --prefix=/app --skip-build --optimize=1