From b7747063137bdeb10dc13ebe53c6ea5801cee46d Mon Sep 17 00:00:00 2001 From: Max Gaukler Date: Sun, 10 Nov 2024 20:50:53 +0100 Subject: [PATCH] Fix snap build Quick-and-dirty changes to make the snap build again for 1.5-dev. It builds but there are many open isues left: - Saving / Opening doesn't really work - Extensions hang - Patches specific for snap had to be disabled, probably this causes the above issues - Dependencies for the extensions are probably incomplete - The snap build configuration is quite a mess, many old things need to be checked and probably deleted Related: https://gitlab.com/inkscape/inkscape/-/issues/5414 --- snap/README.md | 56 ++++- snap/hooks/configure | 3 +- snap/local/filedialog-native.patch | 340 -------------------------- snap/local/scripts/inkscape-variables | 5 +- snap/snapcraft.yaml | 106 +++----- 5 files changed, 95 insertions(+), 415 deletions(-) delete mode 100644 snap/local/filedialog-native.patch diff --git a/snap/README.md b/snap/README.md index baa681f112..c907e62b1f 100644 --- a/snap/README.md +++ b/snap/README.md @@ -1,10 +1,64 @@ Snap ==== -This directory and `../snappy/` are used for building the snap (https://snapcraft.io/) package of Inkscape. +This directory is used for building the snap (https://snapcraft.io/) package of Inkscape. Each commit to master sends a new build to the "edge" version. For build status and logs, see https://launchpad.net/~ted/+snap/inkscape-master. That account on launchpad.net is owned by Ted Gould . If the snap does no longer build or run, the most probable reason is that we added a new dependency. Have a look at the recent changes in https://gitlab.com/inkscape/inkscape-ci-docker, and try to make a similar change to `build-packages` (build dependency) or `stage-packages` (runtime dependency) in `snapcraft.yaml`. + +## Building locally + +The following instructions assume that you already have the Inkscape repository cloned (recursively, that means including submodules). +Open a terminal in the top folder of the Inkscape repository. + +First setup: +``` +# Set up snapcraft +sudo snap install --classic snapcraft +``` + +Build: +``` +# Make sure the build starts fresh, without any leftovers from the previous build. +# (Makes it much slower, but can be helpful to avoid weird errors.) +# You can skip this step for quick experiments. +snapcraft clean +# Build +snapcraft +``` + +``` +# Make sure that no apt version of Inkscape is installed +sudo apt remove inkscape +# Install the build result locally (Adjust filename accordingly) +sudo snap install --dangerous inkscape_1.5-dev_amd64.snap +# Fix access to .config/inkscape directory (TODO why is this needed) +sudo snap connect inkscape:dot-config-inkscape +``` + +### Troubleshooting + +``` +The 'snap' directory is meant specifically for snapcraft, but it contains +the following non-snapcraft-related paths: +- README.md + +This is unsupported and may cause unexpected behavior. If you must store +these files within the 'snap' directory, move them to 'snap/local' +``` +Just ignore the message. + + +``` +LXD is required but not installed. Do you wish to install LXD and configure it with the defaults? [y/N]: +``` +Answer `y` . + + +``` +craft-providers error: Failed to install LXD: user must be manually added to 'lxd' group before using LXD. +``` +Run `sudo adduser $USERNAME lxd` , then log out and log in again. diff --git a/snap/hooks/configure b/snap/hooks/configure index c9bdc2651d..91f4e55ce8 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -11,4 +11,5 @@ echo "" >> ${SNAP_DATA}/fontconfig/fonts.conf export FONTCONFIG_FILE=${SNAP_DATA}/fontconfig/fonts.conf -exec ${SNAP}/snap/command-chain/snapcraft-runner ${SNAP}/usr/bin/fc-cache --force --system-only --verbose +# FIXME - errors: +# exec ${SNAP}/snap/command-chain/snapcraft-runner ${SNAP}/usr/bin/fc-cache --force --system-only --verbose diff --git a/snap/local/filedialog-native.patch b/snap/local/filedialog-native.patch deleted file mode 100644 index f729097989..0000000000 --- a/snap/local/filedialog-native.patch +++ /dev/null @@ -1,340 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Taken from: https://gitlab.com/inkscape/inkscape/-/merge_requests/4237 -# And used only for the snap currently. -diff --git a/src/ui/dialog/export-single.cpp b/src/ui/dialog/export-single.cpp -index 27486f42870cfe350a29842c296b3bdca7b30e11..4a1bb7bc098209bffbd0599c519a6d88cad73cb9 100644 ---- a/src/ui/dialog/export-single.cpp -+++ b/src/ui/dialog/export-single.cpp -@@ -107,6 +107,10 @@ SingleExport::SingleExport(BaseObjectType *cobject, const Glib::RefPtrget_widget_derived("si_extention", si_extension_cb); - builder->get_widget("si_filename", si_filename_entry); -+ // Don't encourage people to edit the text, it won't work out -+ if (!Glib::getenv("GTK_USE_PORTAL").empty()) { -+ si_filename_entry->set_sensitive(false); -+ } - builder->get_widget("si_export", si_export); - - builder->get_widget("si_progress", _prog); -@@ -466,8 +470,12 @@ void SingleExport::loadExportHints() - } - - original_name = filename; -- si_filename_entry->set_text(filename); -- si_filename_entry->set_position(filename.length()); -+ -+ // Only set it if we're not using portals or it exists -+ if (Glib::getenv("GTK_USE_PORTAL").empty() || Inkscape::IO::file_test(filename.c_str(), G_FILE_TEST_EXISTS)) { -+ si_filename_entry->set_text(filename); -+ si_filename_entry->set_position(filename.length()); -+ } - - if (dpi.x() != 0.0) { // XXX Should this deal with dpi.y() ? - spin_buttons[SPIN_DPI]->set_value(dpi.x()); -@@ -580,6 +588,10 @@ void SingleExport::onFilenameModified() - filename_modified = true; - } - -+ if (!Glib::getenv("GTK_USE_PORTAL").empty() && !Inkscape::IO::file_test(filename.c_str(), G_FILE_TEST_EXISTS)) { -+ filename = ""; -+ } -+ - si_extension_cb->setExtensionFromFilename(filename); - - extensionConn.unblock(); -diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp -index 44667b6ea8005bbe56c459c99c73b605a2b57514..c57952240beb975aaf93d9be2ba37a56540ba8bb 100644 ---- a/src/ui/dialog/filedialogimpl-gtkmm.cpp -+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp -@@ -75,45 +75,24 @@ namespace Dialog { - ### F I L E D I A L O G B A S E C L A S S - #########################################################################*/ - --void FileDialogBaseGtk::internalSetup() -+// Small function so the translatable strings stay out of the header -+const char * FileDialogBaseGtk::accept_label(Gtk::FileChooserAction dialogType) - { -- filterComboBox = dynamic_cast(get_widget_by_name(this, "GtkComboBoxText")); -- g_assert(filterComboBox); -- -- filterStore = Gtk::ListStore::create(FilterList); -- filterComboBox->set_model(filterStore); -- filterComboBox->signal_changed().connect(sigc::mem_fun(*this, &FileDialogBaseGtk::filterChangedCallback)); -- -- auto cell_renderer = filterComboBox->get_first_cell(); -- if (cell_renderer) { -- // Add enabled column to cell_renderer property -- filterComboBox->add_attribute(cell_renderer->property_sensitive(), FilterList.enabled); -+ if (dialogType == Gtk::FILE_CHOOSER_ACTION_OPEN) { -+ return _("_Open"); -+ } else { -+ return _("_Save"); - } -+} - -- // Open executable file dialogs don't need the preview panel -- if (_dialogType != EXE_TYPES) { -- Inkscape::Preferences *prefs = Inkscape::Preferences::get(); -- bool enablePreview = prefs->getBool(preferenceBase + "/enable_preview", true); -- bool enableSVGExport = prefs->getBool(preferenceBase + "/enable_svgexport", false); -- -- previewCheckbox.set_label(Glib::ustring(_("Enable preview"))); -- previewCheckbox.set_active(enablePreview); -- -- previewCheckbox.signal_toggled().connect(sigc::mem_fun(*this, &FileDialogBaseGtk::_updatePreviewCallback)); -- -- svgexportCheckbox.set_label(Glib::ustring(_("Export as SVG 1.1 per settings in Preferences dialog"))); -- svgexportCheckbox.set_active(enableSVGExport); -- -- svgexportCheckbox.signal_toggled().connect(sigc::mem_fun(*this, &FileDialogBaseGtk::_svgexportEnabledCB)); -- -- // Catch selection-changed events, so we can adjust the text widget -- signal_update_preview().connect(sigc::mem_fun(*this, &FileDialogBaseGtk::_updatePreviewCallback)); -+// Small function so the translatable strings stay out of the header -+const char * FileDialogBaseGtk::cancel_label() -+{ -+ return _("_Cancel"); -+} - -- //###### Add a preview widget -- set_preview_widget(svgPreview); -- set_preview_widget_active(enablePreview); -- set_use_preview_label(false); -- } -+void FileDialogBaseGtk::internalSetup() -+{ - } - - -@@ -225,7 +204,7 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window &parentWindow, const Gl - _dialogType = fileTypes; - - /* Set the pwd and/or the filename */ -- if (dir.size() > 0) { -+ if (dir.size() > 0 && Glib::getenv("GTK_USE_PORTAL").empty()) { - Glib::ustring udir(dir); - Glib::ustring::size_type len = udir.length(); - // leaving a trailing backslash on the directory name leads to the infamous -@@ -246,9 +225,6 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window &parentWindow, const Gl - //###### Add the file types menu - createFilterMenu(); - -- add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL); -- set_default(*add_button(_("_Open"), Gtk::RESPONSE_OK)); -- - //###### Allow easy access to our examples folder - - using namespace Inkscape::IO::Resource; -@@ -316,12 +292,11 @@ void FileOpenDialogImplGtk::createFilterMenu() - bool FileOpenDialogImplGtk::show() - { - set_modal(TRUE); // Window -- sp_transientize(GTK_WIDGET(gobj())); // Make transient - gint b = run(); // Dialog - svgPreview.showNoPreview(); - hide(); - -- if (b == Gtk::RESPONSE_OK) { -+ if (b == Gtk::RESPONSE_ACCEPT) { - if (auto iter = filterComboBox->get_active()) { - setExtension((*iter)[FilterList.extension]); - } -@@ -414,82 +389,8 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow, const Gl - } else { - fileTypeCheckbox.set_active(prefs->getBool("/dialogs/save_as/append_extension", true)); - } -- -- if (_dialogType != CUSTOM_TYPE) -- createFilterMenu(); -- -- childBox.pack_start(checksBox); -- checksBox.pack_start(fileTypeCheckbox); -- checksBox.pack_start(previewCheckbox); -- checksBox.pack_start(svgexportCheckbox); -- -- set_extra_widget(childBox); -- -- // Let's do some customization -- fileNameEntry = dynamic_cast(get_widget_by_name(this, "GtkEntry")); -- if (fileNameEntry) { -- // Catch when user hits [return] on the text field -- fileNameEntry->signal_activate().connect( -- sigc::mem_fun(*this, &FileSaveDialogImplGtk::fileNameEntryChangedCallback)); -- } -- if (auto expander = dynamic_cast(get_widget_by_name(this, "GtkExpander"))) { -- // Always show the file list -- expander->set_expanded(true); -- } -- -- signal_selection_changed().connect(sigc::mem_fun(*this, &FileSaveDialogImplGtk::fileNameChanged)); -- -- // allow easy access to the user's own templates folder -- using namespace Inkscape::IO::Resource; -- char const *templates = Inkscape::IO::Resource::get_path(USER, TEMPLATES); -- if (Inkscape::IO::file_test(templates, G_FILE_TEST_EXISTS) && -- Inkscape::IO::file_test(templates, G_FILE_TEST_IS_DIR) && g_path_is_absolute(templates)) { -- add_shortcut_folder(templates); -- } -- -- add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL); -- set_default(*add_button(_("_Save"), Gtk::RESPONSE_OK)); -- -- show_all_children(); - } - --/** -- * Callback for fileNameEntry widget -- */ --void FileSaveDialogImplGtk::fileNameEntryChangedCallback() --{ -- if (!fileNameEntry) -- return; -- -- Glib::ustring fileName = fileNameEntry->get_text(); -- if (!Glib::get_charset()) // If we are not utf8 -- fileName = Glib::filename_to_utf8(fileName); -- -- // g_message("User hit return. Text is '%s'\n", fileName.c_str()); -- -- if (!Glib::path_is_absolute(fileName)) { -- // try appending to the current path -- // not this way: fileName = get_current_folder() + "/" + fileName; -- std::vector pathSegments; -- pathSegments.emplace_back(get_current_folder()); -- pathSegments.push_back(fileName); -- fileName = Glib::build_filename(pathSegments); -- } -- -- // g_message("path:'%s'\n", fileName.c_str()); -- -- if (Glib::file_test(fileName, Glib::FILE_TEST_IS_DIR)) { -- set_current_folder(fileName); -- } else if (/*Glib::file_test(fileName, Glib::FILE_TEST_IS_REGULAR)*/ true) { -- // dialog with either (1) select a regular file or (2) cd to dir -- // simulate an 'OK' -- set_filename(fileName); -- response(Gtk::RESPONSE_OK); -- } --} -- -- -- - /** - * Callback for fileNameEntry widget - */ -@@ -516,8 +417,13 @@ void FileSaveDialogImplGtk::fileNameChanged() { - - void FileSaveDialogImplGtk::createFilterMenu() - { -+ if (_dialogType == CUSTOM_TYPE) { -+ return; -+ } -+ - Inkscape::Extension::DB::OutputList extension_list; - Inkscape::Extension::db.get_output_list(extension_list); -+ - knownExtensions.clear(); - - addFilter(_("Guess from extension"), "*"); -@@ -547,13 +453,12 @@ bool FileSaveDialogImplGtk::show() - { - change_path(getFilename()); - set_modal(TRUE); // Window -- sp_transientize(GTK_WIDGET(gobj())); // Make transient - gint b = run(); // Dialog - svgPreview.showNoPreview(); - set_preview_widget_active(false); - hide(); - -- if (b == Gtk::RESPONSE_OK) { -+ if (b == Gtk::RESPONSE_ACCEPT) { - updateNameAndExtension(); - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - -@@ -608,6 +513,11 @@ Glib::ustring FileSaveDialogImplGtk::getCurrentDirectory() - */ - void FileSaveDialogImplGtk::change_path(const Glib::ustring &path) - { -+ if (!Glib::getenv("GTK_USE_PORTAL").empty()) { -+ // If we're using the portal we can't control the path -+ return; -+ } -+ - setFilename(path); - - if (Glib::file_test(_filename, Glib::FILE_TEST_IS_DIR)) { -@@ -652,7 +562,7 @@ void FileSaveDialogImplGtk::updateNameAndExtension() - } - - auto output = dynamic_cast(getExtension()); -- if (fileTypeCheckbox.get_active() && output) { -+ if (fileTypeCheckbox.get_active() && output && Glib::getenv("GTK_USE_PORTAL").empty()) { - // Append the file extension if it's not already present and display it in the file name entry field - appendExtension(_filename, output); - change_path(_filename); -diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h -index 9f3d08508a7d4c05541b000644cc05dfbdc767cf..241489e289eb2c947478b343a2cfe3f10e0e2b4e 100644 ---- a/src/ui/dialog/filedialogimpl-gtkmm.h -+++ b/src/ui/dialog/filedialogimpl-gtkmm.h -@@ -62,13 +62,13 @@ findExpanderWidgets(Gtk::Container *parent, - * This class is the base implementation for the others. This - * reduces redundancies and bugs. - */ --class FileDialogBaseGtk : public Gtk::FileChooserDialog -+class FileDialogBaseGtk : public Gtk::FileChooserNative - { - public: - - FileDialogBaseGtk(Gtk::Window& parentWindow, const Glib::ustring &title, - Gtk::FileChooserAction dialogType, FileDialogType type, gchar const* preferenceBase) : -- Gtk::FileChooserDialog(parentWindow, title, dialogType), -+ Gtk::FileChooserNative(title, parentWindow, dialogType, accept_label(dialogType), cancel_label()), - preferenceBase(preferenceBase ? preferenceBase : "unknown"), - _dialogType(type) - { -@@ -77,7 +77,7 @@ public: - - FileDialogBaseGtk(Gtk::Window& parentWindow, const char *title, - Gtk::FileChooserAction dialogType, FileDialogType type, gchar const* preferenceBase) : -- Gtk::FileChooserDialog(parentWindow, title, dialogType), -+ Gtk::FileChooserNative(title, parentWindow, dialogType, accept_label(dialogType), cancel_label()), - preferenceBase(preferenceBase ? preferenceBase : "unknown"), - _dialogType(type) - { -@@ -122,6 +122,9 @@ protected: - Gtk::ComboBoxText *filterComboBox; - - private: -+ const char * accept_label(Gtk::FileChooserAction dialogType); -+ const char * cancel_label(); -+ - void internalSetup(); - - /** -@@ -250,7 +253,6 @@ private: - /** - * Callback for user input into fileNameEntry - */ -- void fileNameEntryChangedCallback(); - void fileNameChanged(); - bool fromCB; - }; -diff --git a/src/ui/drag-and-drop.cpp b/src/ui/drag-and-drop.cpp -index 21ec2c37ff0af5409a7a23fd99c566fa62b6b0d9..8a3fda1f59b7894107feb2f05cd9b9720b3effb0 100644 ---- a/src/ui/drag-and-drop.cpp -+++ b/src/ui/drag-and-drop.cpp -@@ -395,7 +395,14 @@ static void ink_drag_leave( GtkWidget */*widget*/, - void ink_drag_setup(SPDesktopWidget *dtw) - { - if (completeDropTargets.empty()) { -+ // Check to see if we're using portals, then we can't take URLs from -+ // outside of the application -+ auto isportal = !Glib::getenv("GTK_USE_PORTAL").empty(); -+ - for (auto const &entry : ui_drop_target_entries) { -+ if (entry.get_info() == URI_LIST && isportal) { -+ continue; -+ } - completeDropTargets.emplace_back(entry); - } - for (auto const &fmt : Gdk::Pixbuf::get_formats()) { diff --git a/snap/local/scripts/inkscape-variables b/snap/local/scripts/inkscape-variables index 1c8d4566e3..2900a8c354 100755 --- a/snap/local/scripts/inkscape-variables +++ b/snap/local/scripts/inkscape-variables @@ -18,12 +18,13 @@ export INKSCAPE_EXTENSIONS_DIR=${SNAP_USER_COMMON}/extensions/ export GTK_USE_PORTAL=1 -export GS_LIB=${SNAP}/usr/share/ghostscript/9.55.0/Resource/Init/ +export GS_LIB=${SNAP}/usr/share/ghostscript/*.*.*/Resource/Init/ if [ ! -x ${GS_LIB} ]; then echo "WARN: Ghostscript library not executable: $GS_LIB" fi -export PYTHONPATH=/usr/lib/python3.10:/usr/lib/python3.10/lib-dynload:${SNAP}/lib/python3.10/site-packages:${SNAP}/usr/lib/python3/dist-packages +# FIXME - still necessary? +# export PYTHONPATH=/usr/lib/python3.10:/usr/lib/python3.10/lib-dynload:${SNAP}/lib/python3.10/site-packages:${SNAP}/usr/lib/python3/dist-packages cd $SNAP_REAL_HOME diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 8115b26646..410cf3f7e5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -3,7 +3,7 @@ name: inkscape adopt-info: inkscape license: GPL-3.0 confinement: strict -base: core22 +base: core24 compression: lzo plugs: @@ -31,6 +31,7 @@ parts: inkscape: plugin: cmake source: . + cmake-generator: Ninja cmake-parameters: - '-DCMAKE_INSTALL_PREFIX=' build-packages: @@ -45,11 +46,10 @@ parts: - libgc-dev - libglib2.0-dev - libgsl-dev - - libgspell-1-dev - libgtest-dev - - libgtk-3-dev - - libgtkmm-3.0-dev - - libgtksourceview-4-dev + - libgtk-4-dev + - libgtkmm-4.0-dev + - libgtksourceview-5-dev - libharfbuzz-dev - liblcms2-dev - libmagick++-dev @@ -60,20 +60,30 @@ parts: - librevenge-dev - libreadline-dev - libsigc++-2.0-dev + - libspelling-1-dev - libtool - libvisio-dev - libwpg-dev - libxml-parser-perl - libxml2-dev - libxslt1-dev + - ninja-build + - meson - ragel - pkg-config - zlib1g-dev + - python3-appdirs + - python3-cairo + - python3-pil + - python3-gi + - python3-gi-cairo stage-packages: - heif-gdk-pixbuf + - fcitx5-frontend-gtk4 - gir1.2-gtk-3.0 + - ibus-gtk4 - libatkmm-1.6-1v5 - - libboost-filesystem1.74.0 + - libboost-filesystem1.83.0 - libcairomm-1.0-1v5 - libcdr-0.1-1 - libdouble-conversion3 @@ -83,27 +93,28 @@ parts: - libglib2.0-bin - libgsl27 - libgslcblas0 - - libgspell-1-2 - - libgtkmm-3.0-1v5 - - libgtksourceview-4-common - - libgtksourceview-4-0 + - libgtksourceview-5-common + - libgtksourceview-5-0 - liblcms2-2 - - libmagick++-6.q16-8 + - libmagick++-6.q16-9 - libpangomm-1.4-1v5 - libpoppler-glib8 - libpotrace0 + - libproxy1v5 - libpsl5 - librevenge-0.0-0 + - libspelling-1-1 - libvisio-0.1-1 - libwpg-0.3-3 - libxslt1.1 - - aspell - imagemagick - libimage-magick-perl - libwmf-bin - transfig - libsvg-perl - libxml-xql-perl + - python3-appdirs + - python3-cairo - python3-pil - python3-gi - python3-gi-cairo @@ -111,9 +122,8 @@ parts: - -lib/inkscape/*.a - -*canberra*so* # We don't have sound permissions anyway - -usr/lib/*/gtk-2.0 +# TODO removed patch -p1 --batch --directory=$SNAPCRAFT_PART_SRC --input=$SNAPCRAFT_PART_SRC/snap/local/glib-spawn-no-close.patch override-build: | - patch -p1 --batch --directory=$SNAPCRAFT_PART_SRC --input=$SNAPCRAFT_PART_SRC/snap/local/filedialog-native.patch - patch -p1 --batch --directory=$SNAPCRAFT_PART_SRC --input=$SNAPCRAFT_PART_SRC/snap/local/glib-spawn-no-close.patch sed -i.bak -e 's|Icon=${INKSCAPE_ICONPATH}|Icon=${SNAP}/share/inkscape/branding/inkscape.svg|g' $SNAPCRAFT_PART_SRC/org.inkscape.Inkscape.desktop.template snapcraftctl build INKSCAPE_VERSION=`g++ -I${SNAPCRAFT_PART_SRC}/src ${SNAPCRAFT_PART_BUILD}/src/inkscape-version.cpp ${SNAPCRAFT_PROJECT_DIR}/snap/local/print-inkscape-version.cpp -o print-inkscape-version && ./print-inkscape-version` @@ -124,74 +134,26 @@ parts: sed -i "s|_have.*$||" $SNAPCRAFT_PRIME/share/bash-completion/completions/inkscape parse-info: [ share/metainfo/org.inkscape.Inkscape.appdata.xml ] after: [python-deps] # Grab the network stuff first + python-deps: plugin: python - source: . - build-packages: - - python3-pip - override-build: | - export PYTHONUSERBASE=${SNAPCRAFT_PART_INSTALL} - pip3 install poetry - ( for dir in `find ${SNAPCRAFT_PROJECT_DIR}/share/extensions -name pyproject.toml -exec dirname {} \;`; do - ( cd $dir && poetry show -n --only main --no-ansi ) | cut -d " " -f 1 - done ) | sort -u | xargs pip3 install --user --no-compile --find-links + source: ./share/extensions stage-packages: - optipng - - pstoedit +# - pstoedit # - texlive-latex-base +# TODO also process all other pyproject.toml files? +# source: ./share/extensions/other/inkman +# source: ./share/extensions/other/clipart snap-helpers: plugin: dump source: snap/local/scripts - desktop-helpers: - source: https://github.com/ubuntu/snapcraft-desktop-helpers.git - source-subdir: gtk - plugin: make - make-parameters: ["FLAVOR=gtk3"] - build-packages: - - libgtk-3-dev - - locales - stage-packages: - - libxkbcommon0 # XKB_CONFIG_ROOT - - fonts-ubuntu - - dmz-cursor-theme - - light-themes - - adwaita-icon-theme - - gnome-themes-standard - - shared-mime-info - - libgtk-3-0 - - libgtk-3-bin - - libglib2.0-bin - - locales-all - - libc-bin - - xdg-user-dirs - - ibus-gtk3 - - libibus-1.0-5 - - fcitx-frontend-gtk3 - - librsvg2-common # SVG pixbuf loader - prime: - - -*canberra*so* # We don't have sound permissions anyway - - -usr/lib/*/gtk-2.0 - override-prime: | - snapcraftctl prime - glib-compile-schemas ${SNAPCRAFT_PRIME}/usr/share/glib-2.0/schemas/ - LOCPATH=${SNAPCRAFT_PRIME}/usr/lib/locale locale-gen - after: [inkscape, snap-helpers, python-deps] # Last so we compile all the schemas - gtk-locales: - plugin: nil - override-pull: | - set -eux - apt-get download "language-pack-*-base" - override-build: | - set -eux - for deb in *.deb; do dpkg-deb -x $deb .; done - find usr/share/locale-langpack -type f -not -name "gtk30*.mo" -and -not -name "glib*.mo" -and -not -name "gdk*.mo" -and -not -name "gspell*.mo" -and -not -name "coreutils*.mo" -delete - mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share - cp -r usr/share/locale-langpack $SNAPCRAFT_PART_INSTALL/usr/share/ apps: inkscape: + extensions: [ gnome ] command: bin/inkscape - command-chain: [ bin/desktop-launch, inkscape-variables, private-fontcache ] + command-chain: [ inkscape-variables, private-fontcache ] plugs: - desktop - desktop-legacy @@ -199,6 +161,7 @@ apps: - wayland - x11 - unity7 + - cups # printing - dot-config-inkscape - raw-usb # plotter support - network # for extension manager @@ -208,8 +171,9 @@ apps: common-id: org.inkscape.Inkscape completer: share/bash-completion/completions/inkscape viewer: + extensions: [ gnome ] command: bin/inkview - command-chain: [ bin/desktop-launch, inkscape-variables, private-fontcache ] + command-chain: [ inkscape-variables, private-fontcache ] plugs: - desktop - desktop-legacy -- GitLab