[gitg/carlosgc/guri] Use GUri instead of SoupURI




commit 3e90311fe86f05d20ed5fa5c24cebd18edd35a43
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Mar 23 16:14:34 2021 +0100

    Use GUri instead of SoupURI
    
    It removes the direct dependency on libsoup so that we don't need to
    migrate to libsoup3
    
    Fixes #324

 PACKAGING                             |  2 +-
 libgitg-ext/meson.build               |  1 -
 libgitg/gitg-credentials-manager.vala |  4 +--
 libgitg/meson.build                   |  1 -
 meson.build                           |  3 +-
 osx/Taps/gitg/gitg.rb                 |  1 -
 osx/Taps/gitg/libsoup.rb              | 67 -----------------------------------
 7 files changed, 4 insertions(+), 75 deletions(-)
---
diff --git a/PACKAGING b/PACKAGING
index 68199d11..fe0f11bc 100644
--- a/PACKAGING
+++ b/PACKAGING
@@ -87,7 +87,7 @@ Installed:
 Following is a list of dependencies of gitg. Note that these are subject to
 change and a definite list can be obtained by inspecting configure.ac instead:
 
-- glib >= 2.38
+- glib >= 2.68
 - gtk+ >= 3.10
 - gtksourceview >= 3.10
 - gobject-introspection >= 0.10.1
diff --git a/libgitg-ext/meson.build b/libgitg-ext/meson.build
index f116ba01..f49c1dbd 100644
--- a/libgitg-ext/meson.build
+++ b/libgitg-ext/meson.build
@@ -89,7 +89,6 @@ if get_option('docs')
     '--pkg', 'ggit-1.0',
     '--pkg', 'gio-2.0',
     '--pkg', 'gtk+-3.0',
-    '--pkg', 'libsoup-2.4',
     '--pkg', 'gee-0.8',
   ]
 
diff --git a/libgitg/gitg-credentials-manager.vala b/libgitg/gitg-credentials-manager.vala
index 331aaaf5..686a6889 100644
--- a/libgitg/gitg-credentials-manager.vala
+++ b/libgitg/gitg-credentials-manager.vala
@@ -225,13 +225,13 @@ public class CredentialsManager
                }
                else
                {
-                       var uri = new Soup.URI(url);
+                       var uri = GLib.Uri.parse(url, GLib.UriFlags.NONE);
 
                        if (uri != null)
                        {
                                host = uri.get_host();
 
-                               if (!uri.uses_default_port())
+                               if (uri.get_port() != -1)
                                {
                                        host = @"$(host):$(uri.get_port())";
                                }
diff --git a/libgitg/meson.build b/libgitg/meson.build
index 493fef5d..e20e07c8 100644
--- a/libgitg/meson.build
+++ b/libgitg/meson.build
@@ -99,7 +99,6 @@ deps = common_deps + [
   gtksourceview_dep,
   libide_dep,
   libsecret_dep,
-  libsoup_dep,
   m_dep,
 ]
 
diff --git a/meson.build b/meson.build
index f5db5ae8..ec87a214 100644
--- a/meson.build
+++ b/meson.build
@@ -123,7 +123,7 @@ add_project_arguments('--vapidir=' + vapi_dir, language: 'vala')
 symbol_map = join_paths(source_root, 'libgitg.map')
 common_ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
 
-glib_req_version = '>= 2.38'
+glib_req_version = '>= 2.68'
 
 gee_dep = dependency('gee-0.8')
 gio_dep = dependency('gio-2.0', version: glib_req_version)
@@ -136,7 +136,6 @@ gtksourceview_dep = dependency('gtksourceview-4', version: '>= 4.0.3')
 libgit2_glib_dep = dependency('libgit2-glib-1.0', version: ['>= 0.27.8'])
 libpeas_dep = dependency('libpeas-1.0')
 libsecret_dep = dependency('libsecret-1')
-libsoup_dep = dependency('libsoup-2.4')
 libxml_dep = dependency('libxml-2.0', version: '>= 2.9.0')
 libdazzle_dep = dependency('libdazzle-1.0')
 json_glib_dependency = dependency('json-glib-1.0')
diff --git a/osx/Taps/gitg/gitg.rb b/osx/Taps/gitg/gitg.rb
index 4fdc92e7..0e7f687a 100644
--- a/osx/Taps/gitg/gitg.rb
+++ b/osx/Taps/gitg/gitg.rb
@@ -14,7 +14,6 @@ class Gitg < Formula
   depends_on "gnome/gitg/shared-mime-info"
   depends_on "gnome/gitg/gtk+3" => "with-quartz-relocation"
   depends_on "gnome/gitg/gtksourceview3"
-  depends_on "gnome/gitg/libsoup"
   depends_on "gnome/gitg/libsecret"
   depends_on "gnome/gitg/libpeas"
   depends_on "gnome/gitg/gspell"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]