summaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 17:42:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 17:42:51 +0000
commitba429d344132c088177e853cce8ff7181570b221 (patch)
tree87ebf15269b4301737abd1735baabba71be93622 /build-aux
parentInitial commit. (diff)
downloadgedit-ba429d344132c088177e853cce8ff7181570b221.tar.xz
gedit-ba429d344132c088177e853cce8ff7181570b221.zip
Adding upstream version 44.2.upstream/44.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/buildstream/README.md5
-rw-r--r--build-aux/buildstream/amtk.bst15
-rw-r--r--build-aux/buildstream/gedit.bst27
-rw-r--r--build-aux/buildstream/tepl.bst18
-rw-r--r--build-aux/flatpak/.gitignore2
-rw-r--r--build-aux/flatpak/0-readme.md8
-rwxr-xr-xbuild-aux/flatpak/1-build-and-install.sh3
-rwxr-xr-xbuild-aux/flatpak/2-run-app.sh3
-rwxr-xr-xbuild-aux/flatpak/3-teardown.sh3
-rwxr-xr-xbuild-aux/flatpak/generate-json-manifest.sh11
-rw-r--r--build-aux/flatpak/org.gnome.gedit.json115
-rw-r--r--build-aux/flatpak/org.gnome.gedit.yml93
-rwxr-xr-xbuild-aux/meson/post_install.py30
-rw-r--r--build-aux/snap/snapcraft.yaml192
14 files changed, 525 insertions, 0 deletions
diff --git a/build-aux/buildstream/README.md b/build-aux/buildstream/README.md
new file mode 100644
index 0000000..20cc5c3
--- /dev/null
+++ b/build-aux/buildstream/README.md
@@ -0,0 +1,5 @@
+gedit BuildStream elements
+==========================
+
+Copy the `*.bst` files in gnome-build-meta's `elements/world/` directory, and
+then run BuildStream as usual from there.
diff --git a/build-aux/buildstream/amtk.bst b/build-aux/buildstream/amtk.bst
new file mode 100644
index 0000000..11f9c34
--- /dev/null
+++ b/build-aux/buildstream/amtk.bst
@@ -0,0 +1,15 @@
+kind: meson
+
+sources:
+- kind: git_tag
+ url: gnome_gitlab:World/amtk.git
+ track: master
+
+build-depends:
+- sdk/gobject-introspection.bst
+- sdk/gtk-doc.bst
+- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
+
+depends:
+- sdk/gtk+-3.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
diff --git a/build-aux/buildstream/gedit.bst b/build-aux/buildstream/gedit.bst
new file mode 100644
index 0000000..168fd91
--- /dev/null
+++ b/build-aux/buildstream/gedit.bst
@@ -0,0 +1,27 @@
+kind: meson
+
+sources:
+- kind: git_tag
+ url: gnome:gedit.git
+ track: master
+ submodules:
+ subprojects/libgd:
+ checkout: true
+ url: gnome:libgd.git
+
+build-depends:
+- sdk/appstream-glib.bst
+- sdk/gtk-doc.bst
+- sdk/gobject-introspection.bst
+- sdk/vala.bst
+- freedesktop-sdk.bst:components/itstool.bst
+- freedesktop-sdk.bst:components/perl.bst
+- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
+
+depends:
+- core-deps/gspell.bst
+- core-deps/libpeas.bst
+- sdk/adwaita-icon-theme.bst
+- sdk/gsettings-desktop-schemas.bst
+- world/tepl.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
diff --git a/build-aux/buildstream/tepl.bst b/build-aux/buildstream/tepl.bst
new file mode 100644
index 0000000..11793fc
--- /dev/null
+++ b/build-aux/buildstream/tepl.bst
@@ -0,0 +1,18 @@
+kind: meson
+
+sources:
+- kind: git_tag
+ url: gnome_gitlab:swilmet/tepl.git
+ track: main
+
+build-depends:
+- sdk/gobject-introspection.bst
+- sdk/gtk-doc.bst
+- freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
+
+depends:
+- sdk/gsettings-desktop-schemas.bst
+- sdk/gtksourceview-4.bst
+- world/amtk.bst
+- freedesktop-sdk.bst:components/icu.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
diff --git a/build-aux/flatpak/.gitignore b/build-aux/flatpak/.gitignore
new file mode 100644
index 0000000..7949add
--- /dev/null
+++ b/build-aux/flatpak/.gitignore
@@ -0,0 +1,2 @@
+.flatpak-builder/
+build/
diff --git a/build-aux/flatpak/0-readme.md b/build-aux/flatpak/0-readme.md
new file mode 100644
index 0000000..8506797
--- /dev/null
+++ b/build-aux/flatpak/0-readme.md
@@ -0,0 +1,8 @@
+gedit flatpak
+=============
+
+First, you need to set up gnome-nightly:
+
+https://wiki.gnome.org/Apps/Nightly
+
+And install its runtime and SDK.
diff --git a/build-aux/flatpak/1-build-and-install.sh b/build-aux/flatpak/1-build-and-install.sh
new file mode 100755
index 0000000..cb96038
--- /dev/null
+++ b/build-aux/flatpak/1-build-and-install.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+flatpak-builder --force-clean --user --install build org.gnome.gedit.yml
diff --git a/build-aux/flatpak/2-run-app.sh b/build-aux/flatpak/2-run-app.sh
new file mode 100755
index 0000000..1dc2b58
--- /dev/null
+++ b/build-aux/flatpak/2-run-app.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+flatpak run org.gnome.gedit
diff --git a/build-aux/flatpak/3-teardown.sh b/build-aux/flatpak/3-teardown.sh
new file mode 100755
index 0000000..99cbb06
--- /dev/null
+++ b/build-aux/flatpak/3-teardown.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+flatpak uninstall --user org.gnome.gedit
diff --git a/build-aux/flatpak/generate-json-manifest.sh b/build-aux/flatpak/generate-json-manifest.sh
new file mode 100755
index 0000000..c8544e3
--- /dev/null
+++ b/build-aux/flatpak/generate-json-manifest.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: Copyright 2022 Jake Dane
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# yq: A portable command-line YAML processor.
+# Currently hosted here: https://github.com/mikefarah/yq
+
+# At the time of writing, some tools around Flatpak (for example gnome-builder)
+# only supports the *.json format, but *.yml is easier to edit.
+
+yq eval 'org.gnome.gedit.yml' --output-format json > 'org.gnome.gedit.json'
diff --git a/build-aux/flatpak/org.gnome.gedit.json b/build-aux/flatpak/org.gnome.gedit.json
new file mode 100644
index 0000000..12d9a74
--- /dev/null
+++ b/build-aux/flatpak/org.gnome.gedit.json
@@ -0,0 +1,115 @@
+{
+ "app-id": "org.gnome.gedit",
+ "runtime": "org.gnome.Platform",
+ "runtime-version": "master",
+ "sdk": "org.gnome.Sdk",
+ "command": "gedit",
+ "tags": [
+ "nightly"
+ ],
+ "desktop-file-name-prefix": "(Nightly) ",
+ "finish-args": [
+ "--share=ipc",
+ "--socket=x11",
+ "--socket=fallback-x11",
+ "--socket=wayland",
+ "--metadata=X-DConf=migrate-path=/org/gnome/gedit/",
+ "--filesystem=host",
+ "--filesystem=xdg-run/gvfsd",
+ "--talk-name=org.gtk.vfs.*"
+ ],
+ "build-options": {
+ "cflags": "-O2 -g",
+ "cxxflags": "-O2 -g",
+ "env": {
+ "V": "1"
+ }
+ },
+ "cleanup": [
+ "/include",
+ "/lib/pkgconfig",
+ "/share/pkgconfig",
+ "/share/aclocal",
+ "/man",
+ "/share/man",
+ "/share/gtk-doc",
+ "/share/vala",
+ "/share/gir-1.0",
+ "*.la",
+ "*.a"
+ ],
+ "modules": [
+ {
+ "name": "libpeas",
+ "buildsystem": "meson",
+ "config-opts": [
+ "-Dlua51=false",
+ "-Dvapi=true",
+ "-Ddemos=false",
+ "-Dglade_catalog=false"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://download.gnome.org/sources/libpeas/1.34/libpeas-1.34.0.tar.xz",
+ "sha256": "4305f715dab4b5ad3e8007daec316625e7065a94e63e25ef55eb1efb964a7bf0"
+ }
+ ]
+ },
+ {
+ "name": "gspell",
+ "cleanup": [
+ "/bin"
+ ],
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://download.gnome.org/sources/gspell/1.12/gspell-1.12.0.tar.xz",
+ "sha256": "40d2850f1bb6e8775246fa1e39438b36caafbdbada1d28a19fa1ca07e1ff82ad"
+ }
+ ]
+ },
+ {
+ "name": "amtk",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "archive",
+ "url": "https://download.gnome.org/sources/amtk/5.6/amtk-5.6.1.tar.xz",
+ "sha256": "d50115b85c872aac296934b5ee726a3fa156c6f5ad96d27e0edd0aa5ad173228"
+ }
+ ]
+ },
+ {
+ "name": "tepl",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/swilmet/tepl.git",
+ "branch": "main"
+ }
+ ]
+ },
+ {
+ "name": "gedit",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/gedit.git"
+ }
+ ]
+ },
+ {
+ "name": "gedit-plugins",
+ "buildsystem": "meson",
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.gnome.org/GNOME/gedit-plugins.git"
+ }
+ ]
+ }
+ ]
+}
diff --git a/build-aux/flatpak/org.gnome.gedit.yml b/build-aux/flatpak/org.gnome.gedit.yml
new file mode 100644
index 0000000..bd6ab12
--- /dev/null
+++ b/build-aux/flatpak/org.gnome.gedit.yml
@@ -0,0 +1,93 @@
+# After editing this file run generate-json-manifest.sh.
+# Don't edit the *.json manifest file by hand.
+---
+app-id: org.gnome.gedit
+runtime: org.gnome.Platform
+runtime-version: master
+sdk: org.gnome.Sdk
+command: gedit
+tags:
+ - nightly
+desktop-file-name-prefix: "(Nightly) "
+
+finish-args:
+ - "--share=ipc"
+ - "--socket=x11"
+ - "--socket=fallback-x11"
+ - "--socket=wayland"
+ - "--metadata=X-DConf=migrate-path=/org/gnome/gedit/"
+ # Needed at least for the integrated file browser plugin:
+ - "--filesystem=host"
+ # GVfs GIO APIs access using backend URIs
+ - "--filesystem=xdg-run/gvfsd"
+ # For opening files from remote locations (with GVfs):
+ - "--talk-name=org.gtk.vfs.*"
+
+build-options:
+ cflags: "-O2 -g"
+ cxxflags: "-O2 -g"
+ env:
+ V: '1'
+
+cleanup:
+ - "/include"
+ - "/lib/pkgconfig"
+ - "/share/pkgconfig"
+ - "/share/aclocal"
+ - "/man"
+ - "/share/man"
+ - "/share/gtk-doc"
+ - "/share/vala"
+ - "/share/gir-1.0"
+ - "*.la"
+ - "*.a"
+
+modules:
+ - name: libpeas
+ buildsystem: meson
+ config-opts:
+ - "-Dlua51=false"
+ - "-Dvapi=true"
+ - "-Ddemos=false"
+ - "-Dglade_catalog=false"
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/libpeas/1.34/libpeas-1.34.0.tar.xz
+ sha256: 4305f715dab4b5ad3e8007daec316625e7065a94e63e25ef55eb1efb964a7bf0
+
+ - name: gspell
+ cleanup:
+ - "/bin"
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/gspell/1.12/gspell-1.12.0.tar.xz
+ sha256: 40d2850f1bb6e8775246fa1e39438b36caafbdbada1d28a19fa1ca07e1ff82ad
+
+ - name: amtk
+ buildsystem: meson
+ sources:
+ - type: archive
+ url: https://download.gnome.org/sources/amtk/5.6/amtk-5.6.1.tar.xz
+ sha256: d50115b85c872aac296934b5ee726a3fa156c6f5ad96d27e0edd0aa5ad173228
+
+ - name: tepl
+ buildsystem: meson
+ sources:
+ - type: git
+ url: https://gitlab.gnome.org/swilmet/tepl.git
+ branch: main
+
+ - name: gedit
+ buildsystem: meson
+ sources:
+ - type: git
+ url: https://gitlab.gnome.org/GNOME/gedit.git
+ # To build a local branch, comment out 'url' and uncomment:
+ # path: ../../
+ # branch: wip/misc
+
+ - name: gedit-plugins
+ buildsystem: meson
+ sources:
+ - type: git
+ url: https://gitlab.gnome.org/GNOME/gedit-plugins.git
diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py
new file mode 100755
index 0000000..15b7838
--- /dev/null
+++ b/build-aux/meson/post_install.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+libdir = sys.argv[1]
+datadir = sys.argv[2]
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas',
+ os.path.join(datadir, 'glib-2.0', 'schemas')])
+
+ print('Updating icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-qtf',
+ os.path.join(datadir, 'icons', 'hicolor')])
+
+ print('Updating desktop database...')
+ subprocess.call(['update-desktop-database', '-q',
+ os.path.join(datadir, 'applications')])
+
+ print('Compiling python modules...')
+ subprocess.call([sys.executable, '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins')])
+
+ print('Compiling python modules (optimized versions) ...')
+ subprocess.call([sys.executable, '-O', '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins')])
diff --git a/build-aux/snap/snapcraft.yaml b/build-aux/snap/snapcraft.yaml
new file mode 100644
index 0000000..fc49c39
--- /dev/null
+++ b/build-aux/snap/snapcraft.yaml
@@ -0,0 +1,192 @@
+name: gedit
+version: git
+adopt-info: gedit
+grade: stable # must be 'stable' to release into candidate/stable channels
+confinement: strict
+base: core18
+
+layout:
+ /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0:
+ symlink: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpeas-1.0
+ /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit:
+ symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit
+ /usr/share/gedit:
+ symlink: $SNAP/usr/share/gedit
+
+slots:
+ # for GtkApplication registration
+ gedit:
+ interface: dbus
+ bus: session
+ name: org.gnome.gedit
+
+apps:
+ gedit:
+ command: usr/bin/gedit
+ extensions: [gnome-3-28]
+ plugs:
+ - avahi-observe
+ - cups-control
+ - gsettings
+ - home
+ - network
+ - mount-observe
+ - removable-media
+ common-id: org.gnome.gedit.desktop
+ environment:
+ GSETTINGS_SCHEMA_DIR: $SNAP/share/glib-2.0/schemas
+ LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
+ GI_TYPELIB_PATH: $SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit/girepository-1.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/girepository-1.0:$SNAP/gnome-platform/usr/lib/girepository-1.0:$SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/girepository-1.0
+ PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$SNAP/gnome-platform/usr/lib/python3/dist-packages
+ GTK_USE_PORTAL: 1
+
+parts:
+ amtk:
+ source: https://gitlab.gnome.org/GNOME/amtk.git
+ source-type: git
+ plugin: autotools
+ configflags:
+ - --prefix=/usr
+ - --enable-introspection=no
+ organize:
+ snap/gedit/current/usr: usr
+
+ tepl:
+ after: [amtk, gtksourceview]
+ source: https://gitlab.gnome.org/GNOME/tepl.git
+ source-type: git
+ plugin: meson
+ meson-parameters:
+ - --prefix=/usr
+ organize:
+ snap/gedit/current/usr: usr
+ build-packages:
+ - libuchardet-dev
+ stage-packages:
+ - libuchardet0
+
+ gtksourceview:
+ source: https://gitlab.gnome.org/GNOME/gtksourceview.git
+ source-type: git
+ plugin: meson
+ meson-parameters:
+ - --prefix=/usr
+ - -Dc_args="-Wno-error=undef"
+ organize:
+ snap/gedit/current/usr: usr
+ build-packages:
+ - autoconf-archive
+ - gettext
+ - gobject-introspection
+ - gtk-doc-tools
+ - libfribidi-dev
+ - libgirepository1.0-dev
+ - libglib2.0-dev
+ - libgtk-3-dev
+ - libpeas-dev
+ - libxml2-dev
+ - libxml2-utils
+ - valac
+ # meson gir overrides don't work well
+ override-build: |
+ snapcraftctl build
+ cp $SNAPCRAFT_PART_INSTALL/usr/share/gir-1.0/GtkSource* /usr/share/gir-1.0
+ cp $SNAPCRAFT_PART_INSTALL/usr/share/vala/vapi/gtksource* /usr/share/vala/vapi
+
+ gedit:
+ after: [gtksourceview, tepl]
+ source: .
+ source-type: git
+ parse-info: [usr/share/metainfo/org.gnome.gedit.appdata.xml]
+ plugin: meson
+ meson-parameters:
+ - --prefix=/usr
+ - -Dvala_args="--vapidir=$SNAPCRAFT_STAGE/usr/share/vala/vapi"
+ build-environment:
+ - C_INCLUDE_PATH: $SNAPCRAFT_STAGE/usr/include/gtksourceview-4
+ override-build: |
+ sed -i.bak -e 's|Icon=org.gnome.gedit$|Icon=${SNAP}/meta/gui/org.gnome.gedit.svg|g' data/org.gnome.gedit.desktop.in
+ sed -i.bak -e "s|symlink_media: true|symlink_media: false|g" help/meson.build
+ snapcraftctl build
+ mkdir -p $SNAPCRAFT_PART_INSTALL/meta/gui/
+ cp data/icons/org.gnome.gedit.svg $SNAPCRAFT_PART_INSTALL/meta/gui/
+ cp ../install/usr/share/applications/org.gnome.gedit.desktop $SNAPCRAFT_PART_INSTALL/meta/gui/
+ build-packages:
+ - desktop-file-utils
+ - gettext
+ - gsettings-desktop-schemas-dev
+ - gtk-doc-tools
+ - itstool
+ - libsoup2.4-dev
+ - libgspell-1-dev
+ - libxml2-dev
+ - libglib2.0-dev
+ - libgtk-3-dev
+ - libpeas-dev
+ - libx11-dev
+ - python3
+ - python-gi-dev
+ - gobject-introspection
+ - libgirepository1.0-dev
+ - valac
+ stage-packages:
+ - libfribidi0
+
+ gedit-plugins:
+ after: [gedit]
+ source: https://gitlab.gnome.org/GNOME/gedit-plugins.git
+ source-type: git
+ plugin: meson
+ meson-parameters:
+ - --prefix=/snap/gedit/current/usr
+ - -Dplugin_bookmarks=true
+ - -Dplugin_bracketcompletion=true
+ - -Dplugin_charmap=true
+ - -Dplugin_codecomment=true
+ - -Dplugin_colorpicker=true
+ - -Dplugin_colorschemer=true
+ - -Dplugin_commander=false
+ - -Dplugin_drawspaces=true
+ - -Dplugin_findinfiles=false
+ - -Dplugin_git=true
+ - -Dplugin_joinlines=true
+ - -Dplugin_multiedit=false
+ - -Dplugin_smartspaces=true
+ - -Dplugin_terminal=true
+ - -Dplugin_textsize=true
+ - -Dplugin_translate=true
+ - -Dplugin_wordcompletion=true
+ - -Dplugin_zeitgeist=false
+ organize:
+ snap/gedit/current/usr: usr
+ build-environment:
+ - C_INCLUDE_PATH: $SNAPCRAFT_STAGE/usr/include:$SNAPCRAFT_STAGE/usr/include/gedit-3.14:$SNAPCRAFT_STAGE/usr/include/gtksourceview-4
+ - LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gedit
+ - PKG_CONFIG_PATH: $PKG_CONFIG_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
+ build-packages:
+ - appstream
+ - build-essential
+ - gettext
+ - gnome-common
+ - itstool
+ - libgit2-glib-1.0-dev
+ - libglib2.0-dev
+ - libgtk-3-dev
+ - libgucharmap-2-90-dev
+ - libvte-2.91-dev
+ - python3
+ - python3-dbus
+ - python-dbus-dev
+ - python-gi-dev
+ - yelp-tools
+ stage-packages:
+ - python3
+ - python3-dbus
+ - python3-gi
+ - python3-setuptools
+# Zeitgeist plugin isn't as useful in a Snap.
+ stage:
+ - -usr/lib/gedit/plugins/libzeitgeist.so
+ - -usr/lib/gedit/plugins/zeitgeist.plugin
+ - -usr/share/help/*/gedit/zeitgeist-dataprovider.page
+ - -usr/share/metainfo/gedit-zeitgeist.metainfo.xml